@cntrl-site/components 1.0.19-alpha.3 → 1.0.19-alpha.4
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 +16 -16
- package/dist/index.mjs +434 -427
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Ge=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),ki=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",Al="ControlSlider-module__middleRightAlignment___wEbfX",_l="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Pe={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:Al,bottomLeftAlignment:_l,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(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 Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",oi=1,Ol=2,li=3,fi=4,Mi=5,ro=6,ho=7,Bl={CREATED:oi,MOUNTED:Ol,IDLE:li,MOVING:fi,SCROLLING:Mi,DRAGGING:ro,DESTROYED:ho};function bn(e){e.length=0}function Wn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ht(e){return e.bind.apply(e,[null].concat(Wn(arguments,1)))}var Ya=setTimeout,rr=function(){};function Gr(e){return requestAnimationFrame(e)}function So(e,t){return typeof t===e}function $i(e){return!vr(e)&&So("object",e)}var yr=Array.isArray,Ja=ht(So,"function"),Rn=ht(So,"string"),Wi=ht(So,"undefined");function vr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Fi(e){return yr(e)?e:[e]}function Jt(e,t){Fi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function ao(e,t){return e.push.apply(e,Fi(t)),e}function gn(e,t,n){e&&Jt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){gn(e,Rn(t)?t.split(" "):t,!0)}function Ni(e,t){Jt(t,e.appendChild.bind(e))}function xr(e,t){Jt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ci(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Wn(e.children):[];return t?n.filter(function(i){return Ci(i,t)}):n}function Hi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ti=Object.keys;function Un(e,t,n){return e&&(n?Ti(e).reverse():Ti(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Li(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){e[i]=t[i]})}),e}function _n(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){yr(n)?e[i]=n.slice():$i(n)?e[i]=_n({},$i(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){Jt(t||Ti(e),function(n){delete e[n]})}function cn(e,t){Jt(e,function(n){Jt(t,function(i){n&&n.removeAttribute(i)})})}function ze(e,t,n){$i(t)?Un(t,function(i,o){ze(e,o,i)}):Jt(e,function(i){vr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ri(e,t,n){var i=document.createElement(e);return t&&(Rn(t)?ln(i,t):ze(i,t)),n&&Ni(n,i),i}function Qt(e,t,n){if(Wi(n))return getComputedStyle(e)[t];vr(n)||(e.style[t]=""+n)}function Ei(e,t){Qt(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function en(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Ut(e){return e.getBoundingClientRect()}function Gn(e){Jt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return Hi(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Wn(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function ar(e){return e.timeStamp}function jn(e){return Rn(e)?e:e?e+"px":""}var Oi="splide",Sr="data-"+Oi;function xi(e,t){if(!e)throw new Error("["+Oi+"] "+(t||""))}var kn=Math.min,fo=Math.max,yo=Math.floor,Pi=Math.ceil,Dt=Math.abs;function is(e,t,n){return Dt(e-t)<n}function so(e,t,n,i){var o=kn(t,n),s=fo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ti(e,t,n){var i=kn(t,n),o=fo(t,n);return kn(fo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function lr(e,t){return Jt(t,function(n){e=e.replace("%s",""+n)}),e}function $r(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+$r(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){Jt(a,function(p){p&&Jt(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),bn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Fn="mounted",cr="ready",xn="move",yi="moved",Cr="click",rs="active",as="inactive",ss="visible",ls="hidden",It="refresh",zt="updated",ci="resize",$o="resized",cs="drag",ds="dragging",us="dragged",Co="scroll",Yn="scrolled",zl="overflow",Tr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Lr="navigation:mounted",Er="autoplay:play",fs="autoplay:playing",Pr="autoplay:pause",Ir="lazyload:loaded",ys="sk",vs="sh",vo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Fi(s).join(" "),function(d){a.apply(a,yr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Wn(arguments,1))}return e&&e.event.on(Tr,n.destroy),Li(n,{bus:t,on:i,off:ht(n.unbind,t),emit:o})}function To(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?kn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function y($){e=$}function P(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:y,isPaused:P}}function Vl(e){var t=e;function n(o){t=o}function i(o){return br(Fi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=To(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ti(o).sort(function(y,P){return m?+y-+P:+P-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,y){var P=matchMedia(y);a.bind(P,"change",w),d.push([m,P])}function w(){var m=i.is(ho),y=n.direction,P=d.reduce(function($,T){return _n($,T[1].matches?T[0]:{})},{});Xr(n),v(P),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?_n(n,s):Xr(n,Ti(s)))}function v(m,y,P){_n(n,m),y&&_n(Object.getPrototypeOf(n),m),(P||!i.is(oi))&&e.emit(zt,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Lo="Arrow",Eo=Lo+"Left",Po=Lo+"Right",bs=Lo+"Up",xs=Lo+"Down",Zr="rtl",Io="ttb",jo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,Po],ArrowRight:[xs,Eo]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===Io?0:-1;return jo[s]&&jo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=jo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var fn="role",ai="tabindex",Ul="disabled",nn="aria-",Bi=nn+"controls",ws=nn+"current",Qr=nn+"selected",Gt=nn+"label",Ar=nn+"labelledby",Ss=nn+"hidden",_r=nn+"orientation",Ii=nn+"roledescription",ea=nn+"live",ta=nn+"busy",na=nn+"atomic",Rr=[fn,ai,Ul,Bi,ws,Gt,Ar,Ss,_r,Ii],dn=Oi+"__",Nn="is-",zo=Oi,ia=dn+"track",Gl=dn+"list",Ao=dn+"slide",$s=Ao+"--clone",Xl=Ao+"__container",kr=dn+"arrows",_o=dn+"arrow",Cs=_o+"--prev",Ts=_o+"--next",Ro=dn+"pagination",Ls=Ro+"__page",Yl=dn+"progress",Jl=Yl+"__bar",Zl=dn+"toggle",Ql=dn+"spinner",ec=dn+"sr",tc=Nn+"initialized",Xn=Nn+"active",Es=Nn+"prev",Ps=Nn+"next",dr=Nn+"visible",ur=Nn+"loading",Is=Nn+"focus-in",As=Nn+"overflow",nc=[Xn,dr,Es,Ps,ur,Is,As],ic={slide:Ao,clone:$s,arrows:kr,arrow:_o,prev:Cs,next:Ts,pagination:Ro,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ci(n,t);)n=n.parentElement;return n}var rc=5,oa=200,_s="touchstart mousedown",Vo="touchmove mousemove",Do="touchend touchcancel mouseup click";function ac(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function y(){S(),M(),T()}function P(){o(It,$),o(It,y),o(zt,T),s(document,_s+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Is,!!m)})}function $(b){var R=Rr.concat("style");bn(p),hn(a,u),hn(x,w),cn([x,v],R),cn(a,b?R:["style",Ii])}function T(){hn(a,u),hn(x,w),u=W(zo),w=W(ia),ln(a,u),ln(x,w),ze(a,Gt,n.label),ze(a,Ar,n.labelledby)}function S(){x=I("."+ia),v=Hi(x,"."+Gl),xi(x&&v,"A track/list element is missing."),ao(p,Qa(v,"."+Ao+":not(."+$s+")")),Un({arrows:kr,pagination:Ro,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=I("."+b)}),Li(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Oi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!en(a,fn)&&a.tagName!=="SECTION"&&R&&ze(a,fn,R),ze(a,Ii,d.carousel),ze(v,fn,"presentation")}function I(b){var R=ns(a,b);return R&&oc(R,"."+zo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===zo&&Xn]}return Li(l,{setup:y,mount:P,destroy:$})}var di="slide",vi="loop",ji="fade";function sc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,y=u.slideFocus,P=l.Direction.resolve,$=en(i,"style"),T=en(i,Gt),S=n>-1,M=Hi(i,"."+Xl),I;function W(){S||(i.id=p.id+"-slide"+$r(t+1),ze(i,fn,m?"tabpanel":"group"),ze(i,Ii,v.slide),ze(i,Gt,T||lr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",ht(a,Cr,X)),d(i,"keydown",ht(a,ys,X)),s([yi,vs,Yn],L),s(Lr,V),x&&s(xn,g)}function R(){I=!0,o.destroy(),hn(i,nc),cn(i,Rr),ze(i,"style",$),ze(i,Gt,T||"")}function V(){var q=e.splides.map(function(O){var Y=O.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");ze(i,Gt,lr(v.slideX,(S?n:t)+1)),ze(i,Bi,q),ze(i,fn,y?"button":""),y&&cn(i,Ii)}function g(){I||L()}function L(){if(!I){var q=e.index;_(),H(),gn(i,Es,t===q-1),gn(i,Ps,t===q+1)}}function _(){var q=se();q!==Yr(i,Xn)&&(gn(i,Xn,q),ze(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),O=!q&&(!se()||S);if(e.state.is([fi,Mi])||ze(i,Ss,O||""),ze(wr(i,u.focusableNodes||""),ai,O?-1:""),y&&ze(i,ai,O?-1:0),q!==Yr(i,dr)&&(gn(i,dr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function U(q,O,Y){Qt(Y&&M||i,q,O)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(ji))return se();var q=Ut(l.Elements.track),O=Ut(i),Y=P("left",!0),ie=P("right",!0);return yo(q[Y])<=Pi(O[Y])&&yo(O[ie])<=Pi(q[ie])}function k(q,O){var Y=Dt(q-t);return!S&&(u.rewind||e.is(vi))&&(Y=kn(Y,e.length-Y)),Y<=O}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:L,style:U,isWithin:k};return X}function lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(It,v),o(It,x)}function x(){l.forEach(function(L,_){y(L,_,-1)})}function v(){I(function(L){L.destroy()}),bn(u)}function m(){I(function(L){L.update()})}function y(L,_,H){var U=sc(e,_,H,L);U.mount(),u.push(U),u.sort(function(se,j){return se.index-j.index})}function P(L){return L?W(function(_){return!_.isClone}):u}function $(L){var _=t.Controller,H=_.toIndex(L),U=_.hasFocus()?1:n.perPage;return W(function(se){return so(se.index,H,H+U-1)})}function T(L){return W(L)[0]}function S(L,_){Jt(L,function(H){if(Rn(H)&&(H=ts(H)),Za(H)){var U=l[_];U?xr(H,U):Ni(p,H),ln(H,n.classes.slide),R(H,ht(s,ci))}}),s(It)}function M(L){Gn(W(L).map(function(_){return _.slide})),s(It)}function I(L,_){P(_).forEach(L)}function W(L){return u.filter(Ja(L)?L:function(_){return Rn(L)?Ci(_.slide,L):br(Fi(L),_.index)})}function b(L,_,H){I(function(U){U.style(L,_,H)})}function R(L,_){var H=wr(L,"img"),U=H.length;U?H.forEach(function(se){a(se,"load error",function(){--U||_()})}):_()}function V(L){return L?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:y,get:P,getIn:$,getAt:T,add:S,remove:M,forEach:I,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,y,P,$;function T(){S(),s(window,"resize load",Dl(ht(a,ci))),o([zt,It],S),o(ci,M)}function S(){y=n.direction===Io,Qt(u,"maxWidth",jn(n.width)),Qt(w,l("paddingLeft"),I(!1)),Qt(w,l("paddingRight"),I(!0)),M(!0)}function M(X){var q=Ut(u);(X||P.width!==q.width||P.height!==q.height)&&(Qt(w,"height",W()),m(l("marginRight"),jn(n.gap)),m("width",R()),m("height",V(),!0),P=q,a($o),$!==($=k())&&(gn(u,As,$),a(zl,$)))}function I(X){var q=n.padding,O=l(X?"right":"left");return q&&jn(q[O]||($i(q)?0:q))||"0px"}function W(){var X="";return y&&(X=b(),xi(X,"height or heightRatio is missing."),X="calc("+X+" - "+I(!1)+" - "+I(!0)+")"),X}function b(){return jn(n.height||Ut(x).width*n.heightRatio)}function R(){return n.autoWidth?null:jn(n.fixedWidth)||(y?"":g())}function V(){return jn(n.fixedHeight)||(y?n.autoHeight?null:g():b())}function g(){var X=jn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function L(){return Ut(x)[l("width")]}function _(X,q){var O=v(X||0);return O?Ut(O.slide)[l("width")]+(q?0:se()):0}function H(X,q){var O=v(X);if(O){var Y=Ut(O.slide)[l("right")],ie=Ut(x)[l("left")];return Dt(Y-ie)+(q?0:se())}return 0}function U(X){return H(e.length-1)-H(0)+_(0,X)}function se(){var X=v(0);return X&&parseFloat(Qt(X.slide,l("marginRight")))||0}function j(X){return parseFloat(Qt(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(ji)||U(!0)>L()}return{mount:T,resize:M,listSize:L,slideSize:_,sliderSize:U,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(It,w),o([zt,ci],v),(p=P())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Gn(l),bn(l),i.destroy()}function v(){var $=P();p!==$&&(p<$||!$)&&i.emit(It)}function m($){var T=a.get().slice(),S=T.length;if(S){for(;T.length<$;)ao(T,T);ao(T.slice(-$),T.slice(0,$)).forEach(function(M,I){var W=I<$,b=y(M.slide,I);W?xr(b,T[0].slide):Ni(s.list,b),ao(l,b),a.register(b,I-$+(W?0:S),M.index)})}}function y($,T){var S=$.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+$r(T+1),S}function P(){var $=n.clones;if(!e.is(vi))$=0;else if(Wi($)){var T=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=T&&Pi(Ut(s.track)[d("width")]/T);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,y=v.orient,P=t.Elements,$=P.list,T=P.track,S;function M(){S=t.Transition,o([Fn,$o,zt,It],I)}function I(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(O,Y,ie,re){O!==Y&&X(O>ie)&&(L(),R(g(U(),O>ie),!0)),a(fi),s(xn,Y,ie,O),S.start(Y,function(){a(li),s(yi,Y,ie,O),re&&re()})}function b(O){R(H(O,!0))}function R(O,Y){if(!e.is(ji)){var ie=Y?O:V(O);Qt($,"transform","translate"+m("X")+"("+ie+"px)"),O!==ie&&s(vs)}}function V(O){if(e.is(vi)){var Y=_(O),ie=Y>t.Controller.getEnd(),re=Y<0;(re||ie)&&(O=g(O,ie))}return O}function g(O,Y){var ie=O-k(Y),re=x();return O-=y(re*(Pi(Dt(ie)/re)||1))*(Y?1:-1),O}function L(){R(U(),!0),S.cancel()}function _(O){for(var Y=t.Slides.get(),ie=0,re=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,f=Dt(H(ae,!0)-O);if(f<=re)re=f,ie=ae;else break}return ie}function H(O,Y){var ie=y(u(O-1)-j(O));return Y?se(ie):ie}function U(){var O=m("left");return Ut($)[O]-Ut(T)[O]+y(p(!1))}function se(O){return n.trimSpace&&e.is(di)&&(O=ti(O,0,y(x(!0)-w()))),O}function j(O){var Y=n.focus;return Y==="center"?(w()-l(O,!0))/2:+Y*l(O)||0}function k(O){return H(O?t.Controller.getEnd():0,!!n.trimSpace)}function X(O){var Y=y(g(U(),O));return O?Y>=0:Y<=$[m("scrollWidth")]-Ut(T)[m("width")]}function q(O,Y){Y=Wi(Y)?U():Y;var ie=O!==!0&&y(Y)<y(k(!1)),re=O!==!1&&y(Y)>y(k(!0));return ie||re}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:L,toIndex:_,toPosition:H,getPosition:U,getLimit:k,exceededLimit:q,reposition:I}}function mc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(vi),y=e.is(di),P=ht(U,!1),$=ht(U,!0),T=n.start||0,S,M=T,I,W,b;function R(){V(),o([zt,It,vo],V),o($o,g)}function V(){I=x(!0),W=n.perMove,b=n.perPage,S=X();var f=ti(T,0,v?S:I-1);f!==T&&(T=f,a.reposition())}function g(){S!==X()&&s(vo)}function L(f,oe,he){if(!ae()){var fe=H(f),We=k(fe);We>-1&&(oe||We!==T)&&(ie(We),a.move(fe,We,M,he))}}function _(f,oe,he,fe){t.Scroll.scroll(f,oe,he,function(){var We=k(a.toIndex(d()));ie(v?kn(We,S):We),fe&&fe()})}function H(f){var oe=T;if(Rn(f)){var he=f.match(/([+\-<>])(\d+)?/)||[],fe=he[1],We=he[2];fe==="+"||fe==="-"?oe=se(T+ +(""+fe+(+We||1)),T):fe===">"?oe=We?q(+We):P(!0):fe==="<"&&(oe=$(!0))}else oe=m?f:ti(f,0,S);return oe}function U(f,oe){var he=W||(F()?1:b),fe=se(T+he*(f?-1:1),T,!(W||F()));return fe===-1&&y&&!is(d(),l(!f),1)?f?0:S:oe?fe:k(fe)}function se(f,oe,he){if(w()||F()){var fe=j(f);fe!==f&&(oe=f,f=fe,he=!1),f<0||f>S?!W&&(so(0,f,oe,!0)||so(S,oe,f,!0))?f=q(O(f)):m?f=he?f<0?-(I%b||b):I:f:n.rewind?f=f<0?S:0:f=-1:he&&f!==oe&&(f=q(O(oe)+(f<oe?-1:1)))}else f=-1;return f}function j(f){if(y&&n.trimSpace==="move"&&f!==T)for(var oe=d();oe===p(f,!0)&&so(f,0,e.length-1,!n.rewind);)f<T?--f:++f;return f}function k(f){return m?(f+I)%I||0:f}function X(){for(var f=I-(F()||m&&W?1:b);v&&f-- >0;)if(p(I-1,!0)!==p(f,!0)){f++;break}return ti(f,0,I-1)}function q(f){return ti(F()?f:b*f,0,S)}function O(f){return F()?kn(f,S):yo((f>=S?I-1:f)/b)}function Y(f){var oe=a.toIndex(f);return y?ti(oe,0,S):oe}function ie(f){f!==T&&(M=T,T=f)}function re(f){return f?M:T}function F(){return!Wi(n.focus)||n.isNavigation}function ae(){return e.state.is([fi,Mi])&&!!n.waitForTransition}return{mount:R,go:L,scroll:_,getNext:P,getPrev:$,getAdjacent:U,getEnd:X,setIndex:ie,getIndex:re,toIndex:q,toPage:O,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Ki=40;function fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,y=p.next,P,$,T={};function S(){I(),o(zt,M)}function M(){W(),S()}function I(){var _=n.arrows;_&&!(m&&y)&&V(),m&&y&&(Li(T,{prev:m,next:y}),Ei(v,_?"":"none"),ln(v,$=kr+"--"+n.direction),_&&(b(),L(),ze([m,y],Bi,x.id),a(ps,m,y)))}function W(){i.destroy(),hn(v,$),P?(Gn(w?[m,y]:v),m=y=null):cn([m,y],Rr)}function b(){o([Fn,yi,It,Yn,vo],L),s(y,"click",ht(R,">")),s(m,"click",ht(R,"<"))}function R(_){u.go(_,!0)}function V(){v=w||ri("div",d.arrows),m=g(!0),y=g(!1),P=!0,Ni(v,[m,y]),!w&&xr(v,x)}function g(_){var H='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Ki+" "+Ki+'" width="'+Ki+'" height="'+Ki+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function L(){if(m&&y){var _=e.index,H=u.getPrev(),U=u.getNext(),se=H>-1&&_<H?l.last:l.prev,j=U>-1&&_>U?l.first:l.next;m.disabled=H<0,y.disabled=U<0,ze(m,Gt,se),ze(y,Gt,j),a(ms,m,y,H,U)}}return{arrows:T,mount:S,destroy:W,update:L}}var yc=Sr+"-interval";function vc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=To(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,y,P=v==="pause";function $(){v&&(T(),x&&ze(x,Bi,p.track.id),P||S(),W())}function T(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",I()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){y=V.type==="focusin",I()}),x&&s(x,"click",function(){P?S():M(!0)}),o([xn,Co,It],d.rewind),o(xn,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=P=!1,W(),a(Er))}function M(V){V===void 0&&(V=!0),P=!!V,W(),l()||(d.pause(),a(Pr))}function I(){P||(m||y?M(!1):S())}function W(){x&&(gn(x,Xn,!P),ze(x,Gt,n.i18n[P?"play":"pause"]))}function b(V){var g=p.bar;g&&Qt(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+en(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Ir,ht(d,!0)),o([Fn,zt,It],ht(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=Hi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),Ei(p,l?"none":"")}return{mount:s,destroy:ht(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(di),v,m,y=1;function P(){o(xn,M),o([zt,It],I)}function $(b,R,V,g,L){var _=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),U=sr(b)*H*yo(Dt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+U}var se=is(_,b,1);y=1,R=se?0:R||fo(Dt(b-_)/$c,Cc),m=g,v=To(R,T,ht(S,_,b,L),1),a(Mi),s(Co),v.start()}function T(){a(li),m&&m(),s(Yn)}function S(b,R,V,g){var L=l(),_=b+(R-b)*W(g),H=(_-L)*y;w(L+H),x&&!V&&u()&&(y*=Sc,Dt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function I(){v&&!v.isPaused()&&(M(),T())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:P,destroy:M,scroll:$,cancel:I}}var ni={passive:!1,capture:!0};function Lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,y=m.resolve,P=m.orient,$=p.getPosition,T=p.exceededLimit,S,M,I,W,b,R=!1,V,g,L;function _(){a(x,Vo,rr,ni),a(x,Do,rr,ni),a(x,_s,U,ni),a(x,"click",k,{capture:!0}),a(x,"dragstart",mn),o([Fn,zt],H)}function H(){var G=n.drag;ce(!G),W=G==="free"}function U(G){if(V=!1,!g){var B=We(G);fe(G.target)&&(B||!G.button)&&(w.isBusy()?mn(G,!0):(L=B?x:window,b=l.is([fi,Mi]),I=null,a(L,Vo,se,ni),a(L,Do,j,ni),p.cancel(),u.cancel(),X(G)))}}function se(G){if(l.is(ro)||(l.set(ro),s(cs)),G.cancelable)if(b){p.translate(S+he(F(G)));var B=ae(G)>oa,N=R!==(R=T());(B||N)&&X(G),V=!0,s(ds),mn(G)}else Y(G)&&(b=O(G),mn(G))}function j(G){l.is(ro)&&(l.set(li),s(us)),b&&(q(G),mn(G)),d(L,Vo,se),d(L,Do,j),b=!1}function k(G){!g&&V&&mn(G,!0)}function X(G){I=M,M=G,S=$()}function q(G){var B=ie(G),N=re(B),me=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(ji)?w.go(P(sr(B))<0?me?"<":"-":me?">":"+"):e.is(di)&&R&&me?w.go(T(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function O(G){var B=n.dragMinThreshold,N=$i(B),me=N&&B.mouse||0,Ce=(N?B.touch:+B)||10;return Dt(F(G))>(We(G)?Ce:me)}function Y(G){return Dt(F(G))>Dt(F(G,!0))}function ie(G){if(e.is(vi)||!R){var B=ae(G);if(B&&B<oa)return F(G)/B}return 0}function re(G){return $()+sr(G)*kn(Dt(G)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(G,B){return oe(G,B)-oe(f(G),B)}function ae(G){return ar(G)-ar(f(G))}function f(G){return M===G&&I||M}function oe(G,B){return(We(G)?G.changedTouches[0]:G)["page"+y(B?"Y":"X")]}function he(G){return G/(R&&e.is(di)?rc:1)}function fe(G){var B=n.noDrag;return!Ci(G,"."+Ls+", ."+_o)&&(!B||!Ci(G,B))}function We(G){return typeof TouchEvent<"u"&&G instanceof TouchEvent}function Z(){return b}function ce(G){g=G}return{mount:_,disable:ce,isDragging:Z}}var Ec={Spacebar:" ",Right:Po,Left:Eo,Up:bs,Down:xs};function Mr(e){return e=Rn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(zt,v),o(zt,x),o(xn,y)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,P))}function v(){a(p,ra)}function m($){u=$}function y(){var $=u;u=!0,Ya(function(){u=$})}function P($){if(!u){var T=Mr($);T===l(Eo)?e.go("<"):T===l(Po)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var wi=Sr+"-lazy",lo=wi+"-srcset",Ic="["+wi+"], ["+lo+"]";function Ac(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[yi,Yn],u=[];function w(){n.lazyLoad&&(x(),o(It,x))}function x(){bn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(T){wr(T.slide,Ic).forEach(function(S){var M=en(S,wi),I=en(S,lo);if(M!==S.src||I!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=Hi(b,"."+W)||ri("span",W,b);u.push([S,T,R]),S.src||Ei(S,"none")}})})}function m(){u=u.filter(function(T){var S=n.perPage*((n.preloadPages||1)+1)-1;return T[1].isWithin(e.index,S)?y(T):!0}),u.length||s(p)}function y(T){var S=T[0];ln(T[1].slide,ur),a(S,"load error",ht(P,T)),ze(S,"src",en(S,wi)),ze(S,"srcset",en(S,lo)),cn(S,wi),cn(S,lo)}function P(T,S){var M=T[0],I=T[1];hn(I.slide,ur),S.type!=="error"&&(Gn(T[2]),Ei(M,""),d(Ir,M,I),d(ci)),l&&$()}function $(){u.length&&y(u.shift())}return{mount:w,destroy:ht(bn,u),check:m}}function _c(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,y=[],P,$;function T(){S(),o([zt,It,vo],T);var g=n.pagination;m&&Ei(m,g?"":"none"),g&&(o([xn,Co,Yn],V),M(),V(),s(gs,{list:P,items:y},R(e.index)))}function S(){P&&(Gn(m?Wn(P.children):P),hn(P,$),bn(y),P=null),i.destroy()}function M(){var g=e.length,L=n.classes,_=n.i18n,H=n.perPage,U=u()?p.getEnd()+1:Pi(g/H);P=m||ri("ul",L.pagination,l.track.parentElement),ln(P,$=Ro+"--"+b()),ze(P,fn,"tablist"),ze(P,Gt,_.select),ze(P,_r,b()===Io?"vertical":"");for(var se=0;se<U;se++){var j=ri("li",null,P),k=ri("button",{class:L.page,type:"button"},j),X=d.getIn(se).map(function(O){return O.slide.id}),q=!u()&&H>1?_.pageX:_.slideX;a(k,"click",ht(I,se)),n.paginationKeyboard&&a(k,"keydown",ht(W,se)),ze(j,fn,"presentation"),ze(k,fn,"tab"),ze(k,Bi,X.join(" ")),ze(k,Gt,lr(q,se+1)),ze(k,ai,-1),y.push({li:j,button:k,page:se})}}function I(g){x(">"+g,!0)}function W(g,L){var _=y.length,H=Mr(L),U=b(),se=-1;H===v(Po,!1,U)?se=++g%_:H===v(Eo,!1,U)?se=(--g+_)%_:H==="Home"?se=0:H==="End"&&(se=_-1);var j=y[se];j&&(es(j.button),x(">"+se),mn(L,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return y[p.toPage(g)]}function V(){var g=R(w(!0)),L=R(w());if(g){var _=g.button;hn(_,Xn),cn(_,Qr),ze(_,ai,-1)}if(L){var H=L.button;ln(H,Xn),ze(H,Qr,!0),ze(H,ai,"")}s(hs,{list:P,items:y},g,L)}return{items:y,mount:T,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),bn(s)}function l(){d(),a()}function p(m,y){var P=wt(m);P.on(xn,function($,T,S){y.go(y.is(vi)?S:$)}),s.push(P)}function u(){var m=wt(e),y=m.on;y(Cr,x),y(ys,v),y([Fn,zt],w),s.push(m),m.emit(Lr,e.splides)}function w(){ze(t.Elements.list,_r,n.direction===Io?"vertical":"")}function x(m){e.go(m.index)}function v(m,y){br(Rc,Mr(y))&&(x(m),mn(y))}return{setup:ht(t.Media.set,{slideFocus:Wi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ni)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=ar(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&mn(p)}}function l(p){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=ri("span",ec),l=To(Wc,ht(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),ze(s,na,!0),d.textContent="…",o(Er,ht(x,!0)),o(Pr,ht(x,!1)),o([yi,Yn],ht(u,!0)))}function u(v){ze(s,ta,v),v?(Ni(s,d),l.start()):(Gn(d),l.cancel())}function w(){cn(s,[ea,na,ta]),Gn(d)}function x(v){a&&ze(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:Ac,Pagination:_c,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Oc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bc(e,t,n){var i=t.Slides;function o(){wt(e).on([Fn,It],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:rr}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=ht(Qt,a,"transition"),l;function p(){wt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var y=i.toPosition(v,!0),P=i.getPosition(),$=x(v);Dt(y-P)>=1&&$>=1?n.useScroll?s.scroll(y,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(y,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(di)&&m){var y=o.getIndex(!0),P=o.getEnd();if(y===0&&v>=P||y>=P&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Vl(oi),this.splides=[],this._o={},this._E={};var o=Rn(n)?ns(document,n):n;xi(o,o+" is invalid."),this.root=o,i=_n({label:en(o,Gt)||"",labelledby:en(o,Ar)||""},Oc,e.defaults,i||{});try{_n(i,JSON.parse(en(o,Sr)))}catch{xi(!1,"Invalid JSON")}this._o=Object.create(_n({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;xi(a.is([oi,ho]),"Already mounted!"),a.set(oi),this._C=d,this._T=o||this._T||(this.is(ji)?Bc:jc),this._E=i||this._E;var l=Li({},Nc,this._E,{Transition:this._T});return Un(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Un(d,function(p){p.mount&&p.mount()}),this.emit(Fn),ln(this.root,tc),a.set(li),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(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(Wn(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(It),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(oi)?wt(this).on(cr,this.destroy.bind(this,i)):(Un(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Tr),o.destroy(),i&&bn(this.splides),s.set(ho)),this},Hl(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})(),Wr=zc;Wr.defaults={};Wr.STATES=Bl;var aa=[[Fn,"onMounted"],[cr,"onReady"],[xn,"onMove"],[yi,"onMoved"],[Cr,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[It,"onRefresh"],[zt,"onUpdated"],[ci,"onResize"],[$o,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Co,"onScroll"],[Yn,"onScrolled"],[Tr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Lr,"onNavigationMounted"],[Er,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Pr,"onAutoplayPause"],[Ir,"onLazyLoadLoaded"]];function Fr(...e){return e.filter(Boolean).join(" ")}function bo(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(bo(e)&&bo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(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 mr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():bo(i)?n[o]=mr(bo(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Fr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Nr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},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&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Vc(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){aa.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 c.createElement(t,{className:Fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Hr=({children:e,className:t,...n})=>c.createElement("li",{className:Fr("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Ge=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),ki=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",_l="ControlSlider-module__middleRightAlignment___wEbfX",Al="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Pe={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:_l,bottomLeftAlignment:Al,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(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 Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",oi=1,Ol=2,li=3,fi=4,Mi=5,ro=6,ho=7,Bl={CREATED:oi,MOUNTED:Ol,IDLE:li,MOVING:fi,SCROLLING:Mi,DRAGGING:ro,DESTROYED:ho};function bn(e){e.length=0}function Wn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ht(e){return e.bind.apply(e,[null].concat(Wn(arguments,1)))}var Ya=setTimeout,rr=function(){};function Gr(e){return requestAnimationFrame(e)}function So(e,t){return typeof t===e}function $i(e){return!vr(e)&&So("object",e)}var yr=Array.isArray,Ja=ht(So,"function"),Rn=ht(So,"string"),Wi=ht(So,"undefined");function vr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Fi(e){return yr(e)?e:[e]}function Jt(e,t){Fi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function ao(e,t){return e.push.apply(e,Fi(t)),e}function gn(e,t,n){e&&Jt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){gn(e,Rn(t)?t.split(" "):t,!0)}function Ni(e,t){Jt(t,e.appendChild.bind(e))}function xr(e,t){Jt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ci(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Wn(e.children):[];return t?n.filter(function(i){return Ci(i,t)}):n}function Hi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ti=Object.keys;function Un(e,t,n){return e&&(n?Ti(e).reverse():Ti(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Li(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){e[i]=t[i]})}),e}function An(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){yr(n)?e[i]=n.slice():$i(n)?e[i]=An({},$i(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){Jt(t||Ti(e),function(n){delete e[n]})}function cn(e,t){Jt(e,function(n){Jt(t,function(i){n&&n.removeAttribute(i)})})}function ze(e,t,n){$i(t)?Un(t,function(i,o){ze(e,o,i)}):Jt(e,function(i){vr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ri(e,t,n){var i=document.createElement(e);return t&&(Rn(t)?ln(i,t):ze(i,t)),n&&Ni(n,i),i}function Qt(e,t,n){if(Wi(n))return getComputedStyle(e)[t];vr(n)||(e.style[t]=""+n)}function Ei(e,t){Qt(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function en(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Ut(e){return e.getBoundingClientRect()}function Gn(e){Jt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return Hi(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Wn(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function ar(e){return e.timeStamp}function jn(e){return Rn(e)?e:e?e+"px":""}var Oi="splide",Sr="data-"+Oi;function xi(e,t){if(!e)throw new Error("["+Oi+"] "+(t||""))}var kn=Math.min,fo=Math.max,yo=Math.floor,Pi=Math.ceil,Dt=Math.abs;function is(e,t,n){return Dt(e-t)<n}function so(e,t,n,i){var o=kn(t,n),s=fo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ti(e,t,n){var i=kn(t,n),o=fo(t,n);return kn(fo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function lr(e,t){return Jt(t,function(n){e=e.replace("%s",""+n)}),e}function $r(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+$r(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){Jt(a,function(p){p&&Jt(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),bn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Fn="mounted",cr="ready",xn="move",yi="moved",Cr="click",rs="active",as="inactive",ss="visible",ls="hidden",It="refresh",zt="updated",ci="resize",$o="resized",cs="drag",ds="dragging",us="dragged",Co="scroll",Yn="scrolled",zl="overflow",Tr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Lr="navigation:mounted",Er="autoplay:play",fs="autoplay:playing",Pr="autoplay:pause",Ir="lazyload:loaded",ys="sk",vs="sh",vo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Fi(s).join(" "),function(d){a.apply(a,yr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Wn(arguments,1))}return e&&e.event.on(Tr,n.destroy),Li(n,{bus:t,on:i,off:ht(n.unbind,t),emit:o})}function To(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?kn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function y($){e=$}function P(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:y,isPaused:P}}function Vl(e){var t=e;function n(o){t=o}function i(o){return br(Fi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=To(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ti(o).sort(function(y,P){return m?+y-+P:+P-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,y){var P=matchMedia(y);a.bind(P,"change",w),d.push([m,P])}function w(){var m=i.is(ho),y=n.direction,P=d.reduce(function($,T){return An($,T[1].matches?T[0]:{})},{});Xr(n),v(P),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?An(n,s):Xr(n,Ti(s)))}function v(m,y,P){An(n,m),y&&An(Object.getPrototypeOf(n),m),(P||!i.is(oi))&&e.emit(zt,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Lo="Arrow",Eo=Lo+"Left",Po=Lo+"Right",bs=Lo+"Up",xs=Lo+"Down",Zr="rtl",Io="ttb",jo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,Po],ArrowRight:[xs,Eo]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===Io?0:-1;return jo[s]&&jo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=jo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var fn="role",ai="tabindex",Ul="disabled",nn="aria-",Bi=nn+"controls",ws=nn+"current",Qr=nn+"selected",Gt=nn+"label",_r=nn+"labelledby",Ss=nn+"hidden",Ar=nn+"orientation",Ii=nn+"roledescription",ea=nn+"live",ta=nn+"busy",na=nn+"atomic",Rr=[fn,ai,Ul,Bi,ws,Gt,_r,Ss,Ar,Ii],dn=Oi+"__",Nn="is-",zo=Oi,ia=dn+"track",Gl=dn+"list",_o=dn+"slide",$s=_o+"--clone",Xl=_o+"__container",kr=dn+"arrows",Ao=dn+"arrow",Cs=Ao+"--prev",Ts=Ao+"--next",Ro=dn+"pagination",Ls=Ro+"__page",Yl=dn+"progress",Jl=Yl+"__bar",Zl=dn+"toggle",Ql=dn+"spinner",ec=dn+"sr",tc=Nn+"initialized",Xn=Nn+"active",Es=Nn+"prev",Ps=Nn+"next",dr=Nn+"visible",ur=Nn+"loading",Is=Nn+"focus-in",_s=Nn+"overflow",nc=[Xn,dr,Es,Ps,ur,Is,_s],ic={slide:_o,clone:$s,arrows:kr,arrow:Ao,prev:Cs,next:Ts,pagination:Ro,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ci(n,t);)n=n.parentElement;return n}var rc=5,oa=200,As="touchstart mousedown",Vo="touchmove mousemove",Do="touchend touchcancel mouseup click";function ac(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function y(){S(),M(),T()}function P(){o(It,$),o(It,y),o(zt,T),s(document,As+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Is,!!m)})}function $(b){var R=Rr.concat("style");bn(p),hn(a,u),hn(x,w),cn([x,v],R),cn(a,b?R:["style",Ii])}function T(){hn(a,u),hn(x,w),u=W(zo),w=W(ia),ln(a,u),ln(x,w),ze(a,Gt,n.label),ze(a,_r,n.labelledby)}function S(){x=I("."+ia),v=Hi(x,"."+Gl),xi(x&&v,"A track/list element is missing."),ao(p,Qa(v,"."+_o+":not(."+$s+")")),Un({arrows:kr,pagination:Ro,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=I("."+b)}),Li(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Oi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!en(a,fn)&&a.tagName!=="SECTION"&&R&&ze(a,fn,R),ze(a,Ii,d.carousel),ze(v,fn,"presentation")}function I(b){var R=ns(a,b);return R&&oc(R,"."+zo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===zo&&Xn]}return Li(l,{setup:y,mount:P,destroy:$})}var di="slide",vi="loop",ji="fade";function sc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,y=u.slideFocus,P=l.Direction.resolve,$=en(i,"style"),T=en(i,Gt),S=n>-1,M=Hi(i,"."+Xl),I;function W(){S||(i.id=p.id+"-slide"+$r(t+1),ze(i,fn,m?"tabpanel":"group"),ze(i,Ii,v.slide),ze(i,Gt,T||lr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",ht(a,Cr,X)),d(i,"keydown",ht(a,ys,X)),s([yi,vs,Yn],L),s(Lr,V),x&&s(xn,g)}function R(){I=!0,o.destroy(),hn(i,nc),cn(i,Rr),ze(i,"style",$),ze(i,Gt,T||"")}function V(){var q=e.splides.map(function(O){var Y=O.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");ze(i,Gt,lr(v.slideX,(S?n:t)+1)),ze(i,Bi,q),ze(i,fn,y?"button":""),y&&cn(i,Ii)}function g(){I||L()}function L(){if(!I){var q=e.index;A(),H(),gn(i,Es,t===q-1),gn(i,Ps,t===q+1)}}function A(){var q=se();q!==Yr(i,Xn)&&(gn(i,Xn,q),ze(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),O=!q&&(!se()||S);if(e.state.is([fi,Mi])||ze(i,Ss,O||""),ze(wr(i,u.focusableNodes||""),ai,O?-1:""),y&&ze(i,ai,O?-1:0),q!==Yr(i,dr)&&(gn(i,dr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function U(q,O,Y){Qt(Y&&M||i,q,O)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(ji))return se();var q=Ut(l.Elements.track),O=Ut(i),Y=P("left",!0),ie=P("right",!0);return yo(q[Y])<=Pi(O[Y])&&yo(O[ie])<=Pi(q[ie])}function k(q,O){var Y=Dt(q-t);return!S&&(u.rewind||e.is(vi))&&(Y=kn(Y,e.length-Y)),Y<=O}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:L,style:U,isWithin:k};return X}function lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(It,v),o(It,x)}function x(){l.forEach(function(L,A){y(L,A,-1)})}function v(){I(function(L){L.destroy()}),bn(u)}function m(){I(function(L){L.update()})}function y(L,A,H){var U=sc(e,A,H,L);U.mount(),u.push(U),u.sort(function(se,j){return se.index-j.index})}function P(L){return L?W(function(A){return!A.isClone}):u}function $(L){var A=t.Controller,H=A.toIndex(L),U=A.hasFocus()?1:n.perPage;return W(function(se){return so(se.index,H,H+U-1)})}function T(L){return W(L)[0]}function S(L,A){Jt(L,function(H){if(Rn(H)&&(H=ts(H)),Za(H)){var U=l[A];U?xr(H,U):Ni(p,H),ln(H,n.classes.slide),R(H,ht(s,ci))}}),s(It)}function M(L){Gn(W(L).map(function(A){return A.slide})),s(It)}function I(L,A){P(A).forEach(L)}function W(L){return u.filter(Ja(L)?L:function(A){return Rn(L)?Ci(A.slide,L):br(Fi(L),A.index)})}function b(L,A,H){I(function(U){U.style(L,A,H)})}function R(L,A){var H=wr(L,"img"),U=H.length;U?H.forEach(function(se){a(se,"load error",function(){--U||A()})}):A()}function V(L){return L?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:y,get:P,getIn:$,getAt:T,add:S,remove:M,forEach:I,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,y,P,$;function T(){S(),s(window,"resize load",Dl(ht(a,ci))),o([zt,It],S),o(ci,M)}function S(){y=n.direction===Io,Qt(u,"maxWidth",jn(n.width)),Qt(w,l("paddingLeft"),I(!1)),Qt(w,l("paddingRight"),I(!0)),M(!0)}function M(X){var q=Ut(u);(X||P.width!==q.width||P.height!==q.height)&&(Qt(w,"height",W()),m(l("marginRight"),jn(n.gap)),m("width",R()),m("height",V(),!0),P=q,a($o),$!==($=k())&&(gn(u,_s,$),a(zl,$)))}function I(X){var q=n.padding,O=l(X?"right":"left");return q&&jn(q[O]||($i(q)?0:q))||"0px"}function W(){var X="";return y&&(X=b(),xi(X,"height or heightRatio is missing."),X="calc("+X+" - "+I(!1)+" - "+I(!0)+")"),X}function b(){return jn(n.height||Ut(x).width*n.heightRatio)}function R(){return n.autoWidth?null:jn(n.fixedWidth)||(y?"":g())}function V(){return jn(n.fixedHeight)||(y?n.autoHeight?null:g():b())}function g(){var X=jn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function L(){return Ut(x)[l("width")]}function A(X,q){var O=v(X||0);return O?Ut(O.slide)[l("width")]+(q?0:se()):0}function H(X,q){var O=v(X);if(O){var Y=Ut(O.slide)[l("right")],ie=Ut(x)[l("left")];return Dt(Y-ie)+(q?0:se())}return 0}function U(X){return H(e.length-1)-H(0)+A(0,X)}function se(){var X=v(0);return X&&parseFloat(Qt(X.slide,l("marginRight")))||0}function j(X){return parseFloat(Qt(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(ji)||U(!0)>L()}return{mount:T,resize:M,listSize:L,slideSize:A,sliderSize:U,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(It,w),o([zt,ci],v),(p=P())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Gn(l),bn(l),i.destroy()}function v(){var $=P();p!==$&&(p<$||!$)&&i.emit(It)}function m($){var T=a.get().slice(),S=T.length;if(S){for(;T.length<$;)ao(T,T);ao(T.slice(-$),T.slice(0,$)).forEach(function(M,I){var W=I<$,b=y(M.slide,I);W?xr(b,T[0].slide):Ni(s.list,b),ao(l,b),a.register(b,I-$+(W?0:S),M.index)})}}function y($,T){var S=$.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+$r(T+1),S}function P(){var $=n.clones;if(!e.is(vi))$=0;else if(Wi($)){var T=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=T&&Pi(Ut(s.track)[d("width")]/T);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,y=v.orient,P=t.Elements,$=P.list,T=P.track,S;function M(){S=t.Transition,o([Fn,$o,zt,It],I)}function I(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(O,Y,ie,re){O!==Y&&X(O>ie)&&(L(),R(g(U(),O>ie),!0)),a(fi),s(xn,Y,ie,O),S.start(Y,function(){a(li),s(yi,Y,ie,O),re&&re()})}function b(O){R(H(O,!0))}function R(O,Y){if(!e.is(ji)){var ie=Y?O:V(O);Qt($,"transform","translate"+m("X")+"("+ie+"px)"),O!==ie&&s(vs)}}function V(O){if(e.is(vi)){var Y=A(O),ie=Y>t.Controller.getEnd(),re=Y<0;(re||ie)&&(O=g(O,ie))}return O}function g(O,Y){var ie=O-k(Y),re=x();return O-=y(re*(Pi(Dt(ie)/re)||1))*(Y?1:-1),O}function L(){R(U(),!0),S.cancel()}function A(O){for(var Y=t.Slides.get(),ie=0,re=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,f=Dt(H(ae,!0)-O);if(f<=re)re=f,ie=ae;else break}return ie}function H(O,Y){var ie=y(u(O-1)-j(O));return Y?se(ie):ie}function U(){var O=m("left");return Ut($)[O]-Ut(T)[O]+y(p(!1))}function se(O){return n.trimSpace&&e.is(di)&&(O=ti(O,0,y(x(!0)-w()))),O}function j(O){var Y=n.focus;return Y==="center"?(w()-l(O,!0))/2:+Y*l(O)||0}function k(O){return H(O?t.Controller.getEnd():0,!!n.trimSpace)}function X(O){var Y=y(g(U(),O));return O?Y>=0:Y<=$[m("scrollWidth")]-Ut(T)[m("width")]}function q(O,Y){Y=Wi(Y)?U():Y;var ie=O!==!0&&y(Y)<y(k(!1)),re=O!==!1&&y(Y)>y(k(!0));return ie||re}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:L,toIndex:A,toPosition:H,getPosition:U,getLimit:k,exceededLimit:q,reposition:I}}function mc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(vi),y=e.is(di),P=ht(U,!1),$=ht(U,!0),T=n.start||0,S,M=T,I,W,b;function R(){V(),o([zt,It,vo],V),o($o,g)}function V(){I=x(!0),W=n.perMove,b=n.perPage,S=X();var f=ti(T,0,v?S:I-1);f!==T&&(T=f,a.reposition())}function g(){S!==X()&&s(vo)}function L(f,oe,he){if(!ae()){var fe=H(f),We=k(fe);We>-1&&(oe||We!==T)&&(ie(We),a.move(fe,We,M,he))}}function A(f,oe,he,fe){t.Scroll.scroll(f,oe,he,function(){var We=k(a.toIndex(d()));ie(v?kn(We,S):We),fe&&fe()})}function H(f){var oe=T;if(Rn(f)){var he=f.match(/([+\-<>])(\d+)?/)||[],fe=he[1],We=he[2];fe==="+"||fe==="-"?oe=se(T+ +(""+fe+(+We||1)),T):fe===">"?oe=We?q(+We):P(!0):fe==="<"&&(oe=$(!0))}else oe=m?f:ti(f,0,S);return oe}function U(f,oe){var he=W||(F()?1:b),fe=se(T+he*(f?-1:1),T,!(W||F()));return fe===-1&&y&&!is(d(),l(!f),1)?f?0:S:oe?fe:k(fe)}function se(f,oe,he){if(w()||F()){var fe=j(f);fe!==f&&(oe=f,f=fe,he=!1),f<0||f>S?!W&&(so(0,f,oe,!0)||so(S,oe,f,!0))?f=q(O(f)):m?f=he?f<0?-(I%b||b):I:f:n.rewind?f=f<0?S:0:f=-1:he&&f!==oe&&(f=q(O(oe)+(f<oe?-1:1)))}else f=-1;return f}function j(f){if(y&&n.trimSpace==="move"&&f!==T)for(var oe=d();oe===p(f,!0)&&so(f,0,e.length-1,!n.rewind);)f<T?--f:++f;return f}function k(f){return m?(f+I)%I||0:f}function X(){for(var f=I-(F()||m&&W?1:b);v&&f-- >0;)if(p(I-1,!0)!==p(f,!0)){f++;break}return ti(f,0,I-1)}function q(f){return ti(F()?f:b*f,0,S)}function O(f){return F()?kn(f,S):yo((f>=S?I-1:f)/b)}function Y(f){var oe=a.toIndex(f);return y?ti(oe,0,S):oe}function ie(f){f!==T&&(M=T,T=f)}function re(f){return f?M:T}function F(){return!Wi(n.focus)||n.isNavigation}function ae(){return e.state.is([fi,Mi])&&!!n.waitForTransition}return{mount:R,go:L,scroll:A,getNext:P,getPrev:$,getAdjacent:U,getEnd:X,setIndex:ie,getIndex:re,toIndex:q,toPage:O,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Ki=40;function fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,y=p.next,P,$,T={};function S(){I(),o(zt,M)}function M(){W(),S()}function I(){var A=n.arrows;A&&!(m&&y)&&V(),m&&y&&(Li(T,{prev:m,next:y}),Ei(v,A?"":"none"),ln(v,$=kr+"--"+n.direction),A&&(b(),L(),ze([m,y],Bi,x.id),a(ps,m,y)))}function W(){i.destroy(),hn(v,$),P?(Gn(w?[m,y]:v),m=y=null):cn([m,y],Rr)}function b(){o([Fn,yi,It,Yn,vo],L),s(y,"click",ht(R,">")),s(m,"click",ht(R,"<"))}function R(A){u.go(A,!0)}function V(){v=w||ri("div",d.arrows),m=g(!0),y=g(!1),P=!0,Ni(v,[m,y]),!w&&xr(v,x)}function g(A){var H='<button class="'+d.arrow+" "+(A?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Ki+" "+Ki+'" width="'+Ki+'" height="'+Ki+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function L(){if(m&&y){var A=e.index,H=u.getPrev(),U=u.getNext(),se=H>-1&&A<H?l.last:l.prev,j=U>-1&&A>U?l.first:l.next;m.disabled=H<0,y.disabled=U<0,ze(m,Gt,se),ze(y,Gt,j),a(ms,m,y,H,U)}}return{arrows:T,mount:S,destroy:W,update:L}}var yc=Sr+"-interval";function vc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=To(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,y,P=v==="pause";function $(){v&&(T(),x&&ze(x,Bi,p.track.id),P||S(),W())}function T(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",I()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){y=V.type==="focusin",I()}),x&&s(x,"click",function(){P?S():M(!0)}),o([xn,Co,It],d.rewind),o(xn,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=P=!1,W(),a(Er))}function M(V){V===void 0&&(V=!0),P=!!V,W(),l()||(d.pause(),a(Pr))}function I(){P||(m||y?M(!1):S())}function W(){x&&(gn(x,Xn,!P),ze(x,Gt,n.i18n[P?"play":"pause"]))}function b(V){var g=p.bar;g&&Qt(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+en(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Ir,ht(d,!0)),o([Fn,zt,It],ht(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=Hi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),Ei(p,l?"none":"")}return{mount:s,destroy:ht(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(di),v,m,y=1;function P(){o(xn,M),o([zt,It],I)}function $(b,R,V,g,L){var A=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),U=sr(b)*H*yo(Dt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+U}var se=is(A,b,1);y=1,R=se?0:R||fo(Dt(b-A)/$c,Cc),m=g,v=To(R,T,ht(S,A,b,L),1),a(Mi),s(Co),v.start()}function T(){a(li),m&&m(),s(Yn)}function S(b,R,V,g){var L=l(),A=b+(R-b)*W(g),H=(A-L)*y;w(L+H),x&&!V&&u()&&(y*=Sc,Dt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function I(){v&&!v.isPaused()&&(M(),T())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:P,destroy:M,scroll:$,cancel:I}}var ni={passive:!1,capture:!0};function Lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,y=m.resolve,P=m.orient,$=p.getPosition,T=p.exceededLimit,S,M,I,W,b,R=!1,V,g,L;function A(){a(x,Vo,rr,ni),a(x,Do,rr,ni),a(x,As,U,ni),a(x,"click",k,{capture:!0}),a(x,"dragstart",mn),o([Fn,zt],H)}function H(){var G=n.drag;ce(!G),W=G==="free"}function U(G){if(V=!1,!g){var B=We(G);fe(G.target)&&(B||!G.button)&&(w.isBusy()?mn(G,!0):(L=B?x:window,b=l.is([fi,Mi]),I=null,a(L,Vo,se,ni),a(L,Do,j,ni),p.cancel(),u.cancel(),X(G)))}}function se(G){if(l.is(ro)||(l.set(ro),s(cs)),G.cancelable)if(b){p.translate(S+he(F(G)));var B=ae(G)>oa,N=R!==(R=T());(B||N)&&X(G),V=!0,s(ds),mn(G)}else Y(G)&&(b=O(G),mn(G))}function j(G){l.is(ro)&&(l.set(li),s(us)),b&&(q(G),mn(G)),d(L,Vo,se),d(L,Do,j),b=!1}function k(G){!g&&V&&mn(G,!0)}function X(G){I=M,M=G,S=$()}function q(G){var B=ie(G),N=re(B),me=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(ji)?w.go(P(sr(B))<0?me?"<":"-":me?">":"+"):e.is(di)&&R&&me?w.go(T(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function O(G){var B=n.dragMinThreshold,N=$i(B),me=N&&B.mouse||0,Ce=(N?B.touch:+B)||10;return Dt(F(G))>(We(G)?Ce:me)}function Y(G){return Dt(F(G))>Dt(F(G,!0))}function ie(G){if(e.is(vi)||!R){var B=ae(G);if(B&&B<oa)return F(G)/B}return 0}function re(G){return $()+sr(G)*kn(Dt(G)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(G,B){return oe(G,B)-oe(f(G),B)}function ae(G){return ar(G)-ar(f(G))}function f(G){return M===G&&I||M}function oe(G,B){return(We(G)?G.changedTouches[0]:G)["page"+y(B?"Y":"X")]}function he(G){return G/(R&&e.is(di)?rc:1)}function fe(G){var B=n.noDrag;return!Ci(G,"."+Ls+", ."+Ao)&&(!B||!Ci(G,B))}function We(G){return typeof TouchEvent<"u"&&G instanceof TouchEvent}function Z(){return b}function ce(G){g=G}return{mount:A,disable:ce,isDragging:Z}}var Ec={Spacebar:" ",Right:Po,Left:Eo,Up:bs,Down:xs};function Mr(e){return e=Rn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(zt,v),o(zt,x),o(xn,y)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,P))}function v(){a(p,ra)}function m($){u=$}function y(){var $=u;u=!0,Ya(function(){u=$})}function P($){if(!u){var T=Mr($);T===l(Eo)?e.go("<"):T===l(Po)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var wi=Sr+"-lazy",lo=wi+"-srcset",Ic="["+wi+"], ["+lo+"]";function _c(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[yi,Yn],u=[];function w(){n.lazyLoad&&(x(),o(It,x))}function x(){bn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(T){wr(T.slide,Ic).forEach(function(S){var M=en(S,wi),I=en(S,lo);if(M!==S.src||I!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=Hi(b,"."+W)||ri("span",W,b);u.push([S,T,R]),S.src||Ei(S,"none")}})})}function m(){u=u.filter(function(T){var S=n.perPage*((n.preloadPages||1)+1)-1;return T[1].isWithin(e.index,S)?y(T):!0}),u.length||s(p)}function y(T){var S=T[0];ln(T[1].slide,ur),a(S,"load error",ht(P,T)),ze(S,"src",en(S,wi)),ze(S,"srcset",en(S,lo)),cn(S,wi),cn(S,lo)}function P(T,S){var M=T[0],I=T[1];hn(I.slide,ur),S.type!=="error"&&(Gn(T[2]),Ei(M,""),d(Ir,M,I),d(ci)),l&&$()}function $(){u.length&&y(u.shift())}return{mount:w,destroy:ht(bn,u),check:m}}function Ac(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,y=[],P,$;function T(){S(),o([zt,It,vo],T);var g=n.pagination;m&&Ei(m,g?"":"none"),g&&(o([xn,Co,Yn],V),M(),V(),s(gs,{list:P,items:y},R(e.index)))}function S(){P&&(Gn(m?Wn(P.children):P),hn(P,$),bn(y),P=null),i.destroy()}function M(){var g=e.length,L=n.classes,A=n.i18n,H=n.perPage,U=u()?p.getEnd()+1:Pi(g/H);P=m||ri("ul",L.pagination,l.track.parentElement),ln(P,$=Ro+"--"+b()),ze(P,fn,"tablist"),ze(P,Gt,A.select),ze(P,Ar,b()===Io?"vertical":"");for(var se=0;se<U;se++){var j=ri("li",null,P),k=ri("button",{class:L.page,type:"button"},j),X=d.getIn(se).map(function(O){return O.slide.id}),q=!u()&&H>1?A.pageX:A.slideX;a(k,"click",ht(I,se)),n.paginationKeyboard&&a(k,"keydown",ht(W,se)),ze(j,fn,"presentation"),ze(k,fn,"tab"),ze(k,Bi,X.join(" ")),ze(k,Gt,lr(q,se+1)),ze(k,ai,-1),y.push({li:j,button:k,page:se})}}function I(g){x(">"+g,!0)}function W(g,L){var A=y.length,H=Mr(L),U=b(),se=-1;H===v(Po,!1,U)?se=++g%A:H===v(Eo,!1,U)?se=(--g+A)%A:H==="Home"?se=0:H==="End"&&(se=A-1);var j=y[se];j&&(es(j.button),x(">"+se),mn(L,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return y[p.toPage(g)]}function V(){var g=R(w(!0)),L=R(w());if(g){var A=g.button;hn(A,Xn),cn(A,Qr),ze(A,ai,-1)}if(L){var H=L.button;ln(H,Xn),ze(H,Qr,!0),ze(H,ai,"")}s(hs,{list:P,items:y},g,L)}return{items:y,mount:T,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),bn(s)}function l(){d(),a()}function p(m,y){var P=wt(m);P.on(xn,function($,T,S){y.go(y.is(vi)?S:$)}),s.push(P)}function u(){var m=wt(e),y=m.on;y(Cr,x),y(ys,v),y([Fn,zt],w),s.push(m),m.emit(Lr,e.splides)}function w(){ze(t.Elements.list,Ar,n.direction===Io?"vertical":"")}function x(m){e.go(m.index)}function v(m,y){br(Rc,Mr(y))&&(x(m),mn(y))}return{setup:ht(t.Media.set,{slideFocus:Wi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ni)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=ar(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&mn(p)}}function l(p){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=ri("span",ec),l=To(Wc,ht(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),ze(s,na,!0),d.textContent="…",o(Er,ht(x,!0)),o(Pr,ht(x,!1)),o([yi,Yn],ht(u,!0)))}function u(v){ze(s,ta,v),v?(Ni(s,d),l.start()):(Gn(d),l.cancel())}function w(){cn(s,[ea,na,ta]),Gn(d)}function x(v){a&&ze(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:_c,Pagination:Ac,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Oc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bc(e,t,n){var i=t.Slides;function o(){wt(e).on([Fn,It],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:rr}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=ht(Qt,a,"transition"),l;function p(){wt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var y=i.toPosition(v,!0),P=i.getPosition(),$=x(v);Dt(y-P)>=1&&$>=1?n.useScroll?s.scroll(y,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(y,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(di)&&m){var y=o.getIndex(!0),P=o.getEnd();if(y===0&&v>=P||y>=P&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Vl(oi),this.splides=[],this._o={},this._E={};var o=Rn(n)?ns(document,n):n;xi(o,o+" is invalid."),this.root=o,i=An({label:en(o,Gt)||"",labelledby:en(o,_r)||""},Oc,e.defaults,i||{});try{An(i,JSON.parse(en(o,Sr)))}catch{xi(!1,"Invalid JSON")}this._o=Object.create(An({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;xi(a.is([oi,ho]),"Already mounted!"),a.set(oi),this._C=d,this._T=o||this._T||(this.is(ji)?Bc:jc),this._E=i||this._E;var l=Li({},Nc,this._E,{Transition:this._T});return Un(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Un(d,function(p){p.mount&&p.mount()}),this.emit(Fn),ln(this.root,tc),a.set(li),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(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(Wn(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(It),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(oi)?wt(this).on(cr,this.destroy.bind(this,i)):(Un(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Tr),o.destroy(),i&&bn(this.splides),s.set(ho)),this},Hl(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})(),Wr=zc;Wr.defaults={};Wr.STATES=Bl;var aa=[[Fn,"onMounted"],[cr,"onReady"],[xn,"onMove"],[yi,"onMoved"],[Cr,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[It,"onRefresh"],[zt,"onUpdated"],[ci,"onResize"],[$o,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Co,"onScroll"],[Yn,"onScrolled"],[Tr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Lr,"onNavigationMounted"],[Er,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Pr,"onAutoplayPause"],[Ir,"onLazyLoadLoaded"]];function Fr(...e){return e.filter(Boolean).join(" ")}function bo(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(bo(e)&&bo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(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 mr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():bo(i)?n[o]=mr(bo(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Fr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Nr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},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&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Vc(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){aa.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 c.createElement(t,{className:Fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Hr=({children:e,className:t,...n})=>c.createElement("li",{className:Fr("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 Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=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))},ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Xt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:ko(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:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(e){return{...e.fontFamily&&{fontFamily:ko(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 Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,tn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Ge(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ge(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Pe.topLeftAlignment,"top-center":Pe.topCenterAlignment,"top-right":Pe.topRightAlignment,"middle-left":Pe.middleLeftAlignment,"middle-center":Pe.middleCenterAlignment,"middle-right":Pe.middleRightAlignment,"bottom-left":Pe.bottomLeftAlignment,"bottom-center":Pe.bottomCenterAlignment,"bottom-right":Pe.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,y]=c.useState(void 0),[P,$]=c.useState(null),[T,S]=c.useState(0),[M,I]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:L}=e,_=c.useRef(b.type),{x:H,y:U}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!P)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;y({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(P),()=>j.unobserve(P)},[P]),c.useEffect(()=>{!o||_.current===b.type||(I(j=>j+1),_.current=b.type)},[b.type]),r.jsx("div",{className:Ge(Pe.wrapper,{[Pe.editor]:i}),ref:$,children:r.jsxs("div",{className:Pe.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ge(Pe.captionBlock),children:r.jsx("div",{className:Pe.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Ge(Pe.captionText,ed[g.alignment],{[Pe.withPointerEvents]:k===T&&i,[Pe.active]:k===T}),style:{fontFamily:ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":E.scalingValue(a.width,i),letterSpacing:E.scalingValue(l,i),wordSpacing:E.scalingValue(u,i),textAlign:p,fontSize:E.scalingValue(w.fontSize,i),lineHeight:E.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Pe.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:E.scalingValue(g.offset.y,i),left:E.scalingValue(g.offset.x,i)},children:r.jsx(ui,{content:j.imageCaption})})},k))})}),r.jsx(Nr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Hr,{children:r.jsx("div",{className:Pe.sliderItem,children:r.jsx("div",{className:Pe.imgWrapper,children:r.jsx("img",{className:Ge(Pe.sliderImage,{[Pe.contain]:j.image.objectFit==="contain",[Pe.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(Pe.arrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Pe.arrowInner,style:{transform:`translate(${E.scalingValue(H,i)}, ${E.scalingValue(U*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ge(Pe.arrowImg,Pe.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg,Pe.mirror)})]})}),r.jsx("div",{className:Ge(Pe.arrow,Pe.nextArrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Pe.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${E.scalingValue(H*(W==="horiz"?-1:1),i)}, ${E.scalingValue(U,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Pe.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg)})]})})]}),L.triggersList.click&&r.jsx("div",{className:Pe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Ge(Pe.pagination,{[Pe.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Pe.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Pe.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Pe.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Pe.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Pe.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Pe.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Pe.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Pe.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Pe.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${E.scalingValue(V.offset.x,i)}, ${E.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Ge(Pe.paginationItem),children:r.jsx("div",{className:Ge(Pe.dot,{[Pe.activeDot]:k===T}),style:{backgroundColor:k===T?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 nd={element:td,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",Zn={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await qo(e);s=a.height/a.width*o}else{const a=await qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,y]=c.useState("none"),P=c.useRef({x:0,y:0}),[$,T]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:I}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:L,hoverCursorScale:_,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,O)=>{const Y=i.getBoundingClientRect(),ie=q-Y.left,re=O-Y.top;if(w({x:ie,y:re}),R==="system"){y("none"),v(1);return}const F=ie,ae=re,f=document.elementFromPoint(Y.left+F,Y.top+ae);if(f&&f.closest("a")){y("none"),v(1);return}const oe=ca(F,ae,s)||V==="area"?{img:H??"none",scale:_}:{img:L??"none",scale:g};y(oe.img),v(oe.scale)},k=q=>{q.stopPropagation(),P.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(P.current.x,P.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,L,_,g,s]),c.useEffect(()=>{$||(y("none"),v(0))},[$]);const U=async(j,k,X,q={})=>{const{width:O,height:Y,finalWidth:ie}=await sd(j.image.url,S,M,I);let re=0,F=0;W==="same"?(re=k/2,F=X/2):(re=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(re,O/2),k-O/2),f=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:f,width:ie}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],ie=await U(Y,k,X);q.push(ie),a(q),l(1)})()},[S,M,I,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let O=0,Y=0;W==="on Click"?(O=X,Y=q):W==="same"?(O=k.width/2,Y=k.height/2):(O=Math.random()*k.width,Y=Math.random()*k.height);const ie=t[d],re=await U(ie,k.width,k.height,{x:O,y:Y});a(F=>b==="all"?[...F,re]:[re]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:Zn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:Zn.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:Zn.link,children:r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)},j.id)),$&&r.jsx("div",{className:Zn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",Ad="LightBox-module__thumbsContainerVertical___wttk5",_d="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Od="LightBox-module__slideInRight___S-pPp",Bd="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",pe={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:Ad,thumbsContainer:_d,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Od,slideInTop:Bd,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Ui=(e,t,n)=>{const i={},[o,s]=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"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="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)}))`:s==="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 Rs(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 da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return pe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return pe.fadeIn;if(e==="slide in")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return pe.fadeOut;if(e==="slide in")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})(),s=(()=>{if(e==="fade in")return pe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:pe.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Ne;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:y}=i.imageCaption??{},[P,$]=c.useState(0),[T,S]=c.useState(0),[M,I]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),L=c.useRef(null),_=c.useRef(null),H=c.useRef(!1),U=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[O,Y]=c.useState(!1),{appear:ie,triggers:re,slider:F,thumbnail:ae,controls:f,area:oe,caption:he,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:Z,backdropDisappearClass:ce,disappearClass:G}=Gd(ie.type,ie.direction),B=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var A,J;(J=(A=g.current)==null?void 0:A.splide)==null||J.refresh()},16)},ue=()=>{S(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",ue),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",ue)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const ue=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};ue();const A=new ResizeObserver(ue);return A.observe(z),()=>A.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,ue=pa(oe.color);z&&!a&&ue>.9&&(document.body.style.backgroundColor=""),I(!0),H.current=!0;const A=J=>{J.target===U.current&&J.animationName&&(U.current&&se.current&&U.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),I(!1))};U.current&&(se.current=A,U.current.addEventListener("animationend",A))},[t,oe.color,a]),me=(z,ue,A)=>{var J,D;if(z){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&P===n.length-1?N():(J=g.current)==null||J.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const ee=z.getBoundingClientRect(),ge=ue-ee.left,we=A-ee.top,De=ee.width,Ie=ee.height;let _e;F.direction==="horiz"?_e=ge<De/2?"-1":"+1":_e=we<Ie/2?"-1":"+1",(D=g.current)==null||D.go(_e)}}},Ce=z=>{if(X.current){X.current=!1;return}const ue=n[P],A=(ue==null?void 0:ue.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let ee;if(A&&_.current){const ge=ua(_.current);ee=J>=ge.left&&J<=ge.right&&D>=ge.top&&D<=ge.bottom}else{const ge=_.current?da(_.current):null;if(!ge){z.target===z.currentTarget&&N();return}ee=J>=ge.x&&J<=ge.x+ge.width&&D>=ge.y&&D<=ge.y+ge.height}ee?me(_.current,J,D):N()},Be=z=>{const ue=z.target;(ue.classList.contains(pe.thumbsWrapper)||ue.classList.contains(pe.thumbsContainer))&&Ce(z)};c.useEffect(()=>{if(!e)return;const z=ue=>{var A,J;if(ue.key==="Escape"){N();return}if(ue.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(A=g.current)==null||A.go("+1");return}ue.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(ue=>ue+1),H.current=!1,I(!1),b(!1),V({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{U.current&&se.current&&(U.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,B]),c.useEffect(()=>{L.current!==null&&L.current!==F.type&&S(z=>z+1),L.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,ue=window.matchMedia("(max-width: 768px)").matches,A=pa(oe.color);document.body.style.overflow="hidden",b(!1);const J=ee=>{ee.target===U.current&&!H.current&&ee.animationName&&(ue&&!a&&A>.9&&(document.body.style.backgroundColor=oe.color),b(!0),U.current&&j.current&&U.current.removeEventListener("animationend",j.current),j.current=null)};U.current&&(j.current=J,U.current.addEventListener("animationend",J));const D=ee=>{const ge=ee.target;ge&&(ge.closest(`.${pe.thumbsWrapper}`)||ge.closest(`.${pe.thumbsContainer}`))||F.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),U.current&&j.current&&(U.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,oe.color,F.type]),c.useEffect(()=>{if(!e)return;const z=ue=>{var J,D;if(H.current){ue.stopPropagation();return}if(X.current){X.current=!1;return}const A=ue.target;if(!(A&&(A.closest(`.${pe.thumbsContainer}`)||A.closest(`.${pe.thumbItem}`)||A.closest(`.${pe.arrow}`)||A.closest(`.${pe.closeButton}`)||A.closest(`.${pe.caption}`)))){if(F.type==="slide"&&re.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const ee=g.current.splide.root;if(A&&(ee.contains(A)||ee===A))return}if(ue.touches.length===0&&ue.changedTouches.length>0){const ee=n[P],ge=(ee==null?void 0:ee.image.objectFit)==="cover",we=ue.changedTouches[0];let De;if(ge&&_.current){const Ie=ua(_.current);De=we.clientX>=Ie.left&&we.clientX<=Ie.right&&we.clientY>=Ie.top&&we.clientY<=Ie.bottom}else{const Ie=_.current?da(_.current):null;if(!Ie)return;De=we.clientX>=Ie.x&&we.clientX<=Ie.x+Ie.width&&we.clientY>=Ie.y&&we.clientY<=Ie.y+Ie.height}if(!De){ue.stopPropagation(),H.current=!0;const Ie=_e=>{_e.stopPropagation(),_e.preventDefault(),document.removeEventListener("click",Ie,!0)};document.addEventListener("click",Ie,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,P,n]);const Ae=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&re.type==="drag";c.useEffect(()=>{var _e,Ke;if(!e||!Ae||!((Ke=(_e=g.current)==null?void 0:_e.splide)!=null&&Ke.root))return;const z=g.current.splide.root,ue=30,A=(de,ke)=>{if(k.current){const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);(Ve>0||Le>0)&&(X.current=!0)}},J=de=>{k.current&&(de.preventDefault(),A(de.clientX,de.clientY))},D=de=>{k.current&&de.touches.length>0&&(de.preventDefault(),A(de.touches[0].clientX,de.touches[0].clientY))},ee=(de,ke)=>{if(!k.current||!g.current){k.current=null;return}const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);Le>ue&&Le>Ve&&g.current.go(ke<k.current.y?"+1":"-1"),k.current=null},ge=de=>{k.current&&ee(de.clientX,de.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",J)},we=de=>{if(k.current){if(de.changedTouches.length>0){const ke=de.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),document.removeEventListener("touchmove",D)}},De=de=>{k.current={x:de.clientX,y:de.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},Ie=de=>{de.touches.length>0&&(k.current={x:de.touches[0].clientX,y:de.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",we),document.addEventListener("touchcancel",we))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",Ie),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",Ie),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),k.current=null,X.current=!1}},[e,Ae,T]);const Te={backgroundColor:oe.color,backdropFilter:`blur(${oe.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:ki.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:U,className:Ge(pe.background,M?ce:Z,{[pe.editor]:a},{[pe.hidden]:!e}),style:{...Te,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?U:null,className:Ge(pe.contentStyle,M?G:We,{[pe.editor]:a},{[pe.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Nr,{onMove:z=>$(z.index),ref:g,className:pe.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!Ae,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,ue)=>{const A=Ui(fe.position,fe.offset,a),J=`${E.scalingValue(fe.padding.top,a)} ${E.scalingValue(fe.padding.right,a)} ${E.scalingValue(fe.padding.bottom,a)} ${E.scalingValue(fe.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:ee,...ge}=A;return{...ge,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{...A,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Hr,{children:r.jsx("div",{className:pe.imgWrapper,onClick:Ce,children:r.jsx("img",{ref:ue===P?_:null,className:Ge(pe.imageStyle,{[pe.contain]:z.image.objectFit==="contain",[pe.cover]:z.image.objectFit==="cover",[pe.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},ue)})},T),f.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(pe.arrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x,a)}, ${E.scalingValue(f.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:Ge(pe.arrowImg,pe.mirror)}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg,pe.mirror)})]})}),r.jsx("div",{className:Ge(pe.arrow,pe.nextArrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x*(F.direction==="horiz"?-1:1),a)}, ${E.scalingValue(f.offset.y,a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:pe.arrowImg}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg)})]})})]}),oe.closeIconUrl&&(()=>{const z=Ui(oe.closeIconAlign,oe.closeIconOffset,a),ue=`scale(${oe.closeIconScale})`,A=z.transform?`${z.transform} ${ue}`:ue;return r.jsx("button",{className:pe.closeButton,style:{...z,transform:A},onClick:N,"aria-label":"Close lightbox",children:r.jsx(tn,{url:oe.closeIconUrl,fill:oe.closeIconColor??"#000000",hoverFill:oe.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&i.imageCaption&&((Ne=n[P])==null?void 0:Ne.imageCaption)&&r.jsx("div",{className:pe.caption,style:{...Ui(he.alignment,he.offset,a),fontFamily:ko(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,a),letterSpacing:E.scalingValue(u,a),wordSpacing:E.scalingValue(x,a),textAlign:w,fontSize:E.scalingValue(v.fontSize,a),lineHeight:E.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:pe.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:r.jsx(ui,{content:n[P].imageCaption})})}),ae.isActive&&(()=>{const[z,ue]=ae.position.split("-"),A=F.direction==="horiz"?`${z}-left`:ae.position,J=Ui(A,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(ue==="left")return"flex-start";if(ue==="center")return"center";if(ue==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:pe.thumbsWrapper,onClick:ee=>Be(ee),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ge(pe.thumbsContainer,{[pe.thumbsContainerVertical]:F.direction==="vert",[pe.thumbsAlignStart]:ae.align==="start",[pe.thumbsAlignCenter]:ae.align==="center",[pe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:E.scalingValue(ae.grid.gap,a),justifyContent:O?"flex-start":D()},children:n.map((ee,ge)=>{const we=ge===P,De=R[ge],_e=ae.grid.size*(we?ae.activeState.scale:1),Ke=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:E.scalingValue(_e,a)}:{width:E.scalingValue(_e,a)};const de=De.width/De.height;if(F.direction==="horiz"){const ke=_e,Ve=ke*de;return{width:E.scalingValue(Ve,a),height:E.scalingValue(ke,a)}}else{const ke=_e,Ve=ke/de;return{width:E.scalingValue(ke,a),height:E.scalingValue(Ve,a)}}};return r.jsx("button",{className:pe.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:E.scalingValue(_e,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:E.scalingValue(_e,a)}:{},...ae.fit==="cover"?{width:E.scalingValue(_e,a),height:E.scalingValue(_e,a)}:{},...Ke(),transition:we?"all 0.25s ease-out":"none",opacity:we?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:de=>{var ke;de.stopPropagation(),$(ge),(ke=g.current)==null||ke.go(ge)},onMouseEnter:()=>{var de;ae.triggers==="hov"&&((de=g.current)==null||de.go(ge))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:de=>{const ke=de.currentTarget;ke.naturalWidth&&ke.naturalHeight&&V(Ve=>({...Ve,[ge]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ge}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Jd={element:Xd,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(e){return`
|
|
6
|
+
*/const Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=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))},ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Xt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:ko(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:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(e){return{...e.fontFamily&&{fontFamily:ko(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 Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,tn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Ge(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ge(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Pe.topLeftAlignment,"top-center":Pe.topCenterAlignment,"top-right":Pe.topRightAlignment,"middle-left":Pe.middleLeftAlignment,"middle-center":Pe.middleCenterAlignment,"middle-right":Pe.middleRightAlignment,"bottom-left":Pe.bottomLeftAlignment,"bottom-center":Pe.bottomCenterAlignment,"bottom-right":Pe.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,y]=c.useState(void 0),[P,$]=c.useState(null),[T,S]=c.useState(0),[M,I]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:L}=e,A=c.useRef(b.type),{x:H,y:U}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!P)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;y({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(P),()=>j.unobserve(P)},[P]),c.useEffect(()=>{!o||A.current===b.type||(I(j=>j+1),A.current=b.type)},[b.type]),r.jsx("div",{className:Ge(Pe.wrapper,{[Pe.editor]:i}),ref:$,children:r.jsxs("div",{className:Pe.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ge(Pe.captionBlock),children:r.jsx("div",{className:Pe.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Ge(Pe.captionText,ed[g.alignment],{[Pe.withPointerEvents]:k===T&&i,[Pe.active]:k===T}),style:{fontFamily:ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":E.scalingValue(a.width,i),letterSpacing:E.scalingValue(l,i),wordSpacing:E.scalingValue(u,i),textAlign:p,fontSize:E.scalingValue(w.fontSize,i),lineHeight:E.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Pe.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:E.scalingValue(g.offset.y,i),left:E.scalingValue(g.offset.x,i)},children:r.jsx(ui,{content:j.imageCaption})})},k))})}),r.jsx(Nr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Hr,{children:r.jsx("div",{className:Pe.sliderItem,children:r.jsx("div",{className:Pe.imgWrapper,children:r.jsx("img",{className:Ge(Pe.sliderImage,{[Pe.contain]:j.image.objectFit==="contain",[Pe.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(Pe.arrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Pe.arrowInner,style:{transform:`translate(${E.scalingValue(H,i)}, ${E.scalingValue(U*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ge(Pe.arrowImg,Pe.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg,Pe.mirror)})]})}),r.jsx("div",{className:Ge(Pe.arrow,Pe.nextArrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Pe.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${E.scalingValue(H*(W==="horiz"?-1:1),i)}, ${E.scalingValue(U,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Pe.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg)})]})})]}),L.triggersList.click&&r.jsx("div",{className:Pe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Ge(Pe.pagination,{[Pe.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Pe.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Pe.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Pe.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Pe.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Pe.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Pe.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Pe.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Pe.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Pe.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${E.scalingValue(V.offset.x,i)}, ${E.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Ge(Pe.paginationItem),children:r.jsx("div",{className:Ge(Pe.dot,{[Pe.activeDot]:k===T}),style:{backgroundColor:k===T?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 nd={element:td,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",Zn={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await qo(e);s=a.height/a.width*o}else{const a=await qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,y]=c.useState("none"),P=c.useRef({x:0,y:0}),[$,T]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:I}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:L,hoverCursorScale:A,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,O)=>{const Y=i.getBoundingClientRect(),ie=q-Y.left,re=O-Y.top;if(w({x:ie,y:re}),R==="system"){y("none"),v(1);return}const F=ie,ae=re,f=document.elementFromPoint(Y.left+F,Y.top+ae);if(f&&f.closest("a")){y("none"),v(1);return}const oe=ca(F,ae,s)||V==="area"?{img:H??"none",scale:A}:{img:L??"none",scale:g};y(oe.img),v(oe.scale)},k=q=>{q.stopPropagation(),P.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(P.current.x,P.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,L,A,g,s]),c.useEffect(()=>{$||(y("none"),v(0))},[$]);const U=async(j,k,X,q={})=>{const{width:O,height:Y,finalWidth:ie}=await sd(j.image.url,S,M,I);let re=0,F=0;W==="same"?(re=k/2,F=X/2):(re=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(re,O/2),k-O/2),f=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:f,width:ie}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],ie=await U(Y,k,X);q.push(ie),a(q),l(1)})()},[S,M,I,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let O=0,Y=0;W==="on Click"?(O=X,Y=q):W==="same"?(O=k.width/2,Y=k.height/2):(O=Math.random()*k.width,Y=Math.random()*k.height);const ie=t[d],re=await U(ie,k.width,k.height,{x:O,y:Y});a(F=>b==="all"?[...F,re]:[re]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:Zn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:Zn.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:Zn.link,children:r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)},j.id)),$&&r.jsx("div",{className:Zn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",_d="LightBox-module__thumbsContainerVertical___wttk5",Ad="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Od="LightBox-module__slideInRight___S-pPp",Bd="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",pe={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:_d,thumbsContainer:Ad,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Od,slideInTop:Bd,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Ui=(e,t,n)=>{const i={},[o,s]=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"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="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)}))`:s==="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 Rs(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 da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return pe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return pe.fadeIn;if(e==="slide in")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return pe.fadeOut;if(e==="slide in")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})(),s=(()=>{if(e==="fade in")return pe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:pe.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Ne;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:y}=i.imageCaption??{},[P,$]=c.useState(0),[T,S]=c.useState(0),[M,I]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),L=c.useRef(null),A=c.useRef(null),H=c.useRef(!1),U=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[O,Y]=c.useState(!1),{appear:ie,triggers:re,slider:F,thumbnail:ae,controls:f,area:oe,caption:he,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:Z,backdropDisappearClass:ce,disappearClass:G}=Gd(ie.type,ie.direction),B=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var _,J;(J=(_=g.current)==null?void 0:_.splide)==null||J.refresh()},16)},ue=()=>{S(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",ue),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",ue)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const ue=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};ue();const _=new ResizeObserver(ue);return _.observe(z),()=>_.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,ue=pa(oe.color);z&&!a&&ue>.9&&(document.body.style.backgroundColor=""),I(!0),H.current=!0;const _=J=>{J.target===U.current&&J.animationName&&(U.current&&se.current&&U.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),I(!1))};U.current&&(se.current=_,U.current.addEventListener("animationend",_))},[t,oe.color,a]),me=(z,ue,_)=>{var J,D;if(z){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&P===n.length-1?N():(J=g.current)==null||J.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const ee=z.getBoundingClientRect(),ge=ue-ee.left,we=_-ee.top,De=ee.width,Ie=ee.height;let Ae;F.direction==="horiz"?Ae=ge<De/2?"-1":"+1":Ae=we<Ie/2?"-1":"+1",(D=g.current)==null||D.go(Ae)}}},Ce=z=>{if(X.current){X.current=!1;return}const ue=n[P],_=(ue==null?void 0:ue.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let ee;if(_&&A.current){const ge=ua(A.current);ee=J>=ge.left&&J<=ge.right&&D>=ge.top&&D<=ge.bottom}else{const ge=A.current?da(A.current):null;if(!ge){z.target===z.currentTarget&&N();return}ee=J>=ge.x&&J<=ge.x+ge.width&&D>=ge.y&&D<=ge.y+ge.height}ee?me(A.current,J,D):N()},Be=z=>{const ue=z.target;(ue.classList.contains(pe.thumbsWrapper)||ue.classList.contains(pe.thumbsContainer))&&Ce(z)};c.useEffect(()=>{if(!e)return;const z=ue=>{var _,J;if(ue.key==="Escape"){N();return}if(ue.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(_=g.current)==null||_.go("+1");return}ue.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(ue=>ue+1),H.current=!1,I(!1),b(!1),V({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{U.current&&se.current&&(U.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,B]),c.useEffect(()=>{L.current!==null&&L.current!==F.type&&S(z=>z+1),L.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,ue=window.matchMedia("(max-width: 768px)").matches,_=pa(oe.color);document.body.style.overflow="hidden",b(!1);const J=ee=>{ee.target===U.current&&!H.current&&ee.animationName&&(ue&&!a&&_>.9&&(document.body.style.backgroundColor=oe.color),b(!0),U.current&&j.current&&U.current.removeEventListener("animationend",j.current),j.current=null)};U.current&&(j.current=J,U.current.addEventListener("animationend",J));const D=ee=>{const ge=ee.target;ge&&(ge.closest(`.${pe.thumbsWrapper}`)||ge.closest(`.${pe.thumbsContainer}`))||F.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),U.current&&j.current&&(U.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,oe.color,F.type]),c.useEffect(()=>{if(!e)return;const z=ue=>{var J,D;if(H.current){ue.stopPropagation();return}if(X.current){X.current=!1;return}const _=ue.target;if(!(_&&(_.closest(`.${pe.thumbsContainer}`)||_.closest(`.${pe.thumbItem}`)||_.closest(`.${pe.arrow}`)||_.closest(`.${pe.closeButton}`)||_.closest(`.${pe.caption}`)))){if(F.type==="slide"&&re.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const ee=g.current.splide.root;if(_&&(ee.contains(_)||ee===_))return}if(ue.touches.length===0&&ue.changedTouches.length>0){const ee=n[P],ge=(ee==null?void 0:ee.image.objectFit)==="cover",we=ue.changedTouches[0];let De;if(ge&&A.current){const Ie=ua(A.current);De=we.clientX>=Ie.left&&we.clientX<=Ie.right&&we.clientY>=Ie.top&&we.clientY<=Ie.bottom}else{const Ie=A.current?da(A.current):null;if(!Ie)return;De=we.clientX>=Ie.x&&we.clientX<=Ie.x+Ie.width&&we.clientY>=Ie.y&&we.clientY<=Ie.y+Ie.height}if(!De){ue.stopPropagation(),H.current=!0;const Ie=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),document.removeEventListener("click",Ie,!0)};document.addEventListener("click",Ie,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,P,n]);const _e=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&re.type==="drag";c.useEffect(()=>{var Ae,Ke;if(!e||!_e||!((Ke=(Ae=g.current)==null?void 0:Ae.splide)!=null&&Ke.root))return;const z=g.current.splide.root,ue=30,_=(de,ke)=>{if(k.current){const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);(Ve>0||Le>0)&&(X.current=!0)}},J=de=>{k.current&&(de.preventDefault(),_(de.clientX,de.clientY))},D=de=>{k.current&&de.touches.length>0&&(de.preventDefault(),_(de.touches[0].clientX,de.touches[0].clientY))},ee=(de,ke)=>{if(!k.current||!g.current){k.current=null;return}const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);Le>ue&&Le>Ve&&g.current.go(ke<k.current.y?"+1":"-1"),k.current=null},ge=de=>{k.current&&ee(de.clientX,de.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",J)},we=de=>{if(k.current){if(de.changedTouches.length>0){const ke=de.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),document.removeEventListener("touchmove",D)}},De=de=>{k.current={x:de.clientX,y:de.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},Ie=de=>{de.touches.length>0&&(k.current={x:de.touches[0].clientX,y:de.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",we),document.addEventListener("touchcancel",we))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",Ie),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",Ie),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),k.current=null,X.current=!1}},[e,_e,T]);const Te={backgroundColor:oe.color,backdropFilter:`blur(${oe.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:ki.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:U,className:Ge(pe.background,M?ce:Z,{[pe.editor]:a},{[pe.hidden]:!e}),style:{...Te,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?U:null,className:Ge(pe.contentStyle,M?G:We,{[pe.editor]:a},{[pe.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Nr,{onMove:z=>$(z.index),ref:g,className:pe.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,ue)=>{const _=Ui(fe.position,fe.offset,a),J=`${E.scalingValue(fe.padding.top,a)} ${E.scalingValue(fe.padding.right,a)} ${E.scalingValue(fe.padding.bottom,a)} ${E.scalingValue(fe.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:ee,...ge}=_;return{...ge,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{..._,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Hr,{children:r.jsx("div",{className:pe.imgWrapper,onClick:Ce,children:r.jsx("img",{ref:ue===P?A:null,className:Ge(pe.imageStyle,{[pe.contain]:z.image.objectFit==="contain",[pe.cover]:z.image.objectFit==="cover",[pe.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},ue)})},T),f.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(pe.arrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x,a)}, ${E.scalingValue(f.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:Ge(pe.arrowImg,pe.mirror)}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg,pe.mirror)})]})}),r.jsx("div",{className:Ge(pe.arrow,pe.nextArrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x*(F.direction==="horiz"?-1:1),a)}, ${E.scalingValue(f.offset.y,a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:pe.arrowImg}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg)})]})})]}),oe.closeIconUrl&&(()=>{const z=Ui(oe.closeIconAlign,oe.closeIconOffset,a),ue=`scale(${oe.closeIconScale})`,_=z.transform?`${z.transform} ${ue}`:ue;return r.jsx("button",{className:pe.closeButton,style:{...z,transform:_},onClick:N,"aria-label":"Close lightbox",children:r.jsx(tn,{url:oe.closeIconUrl,fill:oe.closeIconColor??"#000000",hoverFill:oe.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&i.imageCaption&&((Ne=n[P])==null?void 0:Ne.imageCaption)&&r.jsx("div",{className:pe.caption,style:{...Ui(he.alignment,he.offset,a),fontFamily:ko(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,a),letterSpacing:E.scalingValue(u,a),wordSpacing:E.scalingValue(x,a),textAlign:w,fontSize:E.scalingValue(v.fontSize,a),lineHeight:E.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:pe.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:r.jsx(ui,{content:n[P].imageCaption})})}),ae.isActive&&(()=>{const[z,ue]=ae.position.split("-"),_=F.direction==="horiz"?`${z}-left`:ae.position,J=Ui(_,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(ue==="left")return"flex-start";if(ue==="center")return"center";if(ue==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:pe.thumbsWrapper,onClick:ee=>Be(ee),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ge(pe.thumbsContainer,{[pe.thumbsContainerVertical]:F.direction==="vert",[pe.thumbsAlignStart]:ae.align==="start",[pe.thumbsAlignCenter]:ae.align==="center",[pe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:E.scalingValue(ae.grid.gap,a),justifyContent:O?"flex-start":D()},children:n.map((ee,ge)=>{const we=ge===P,De=R[ge],Ae=ae.grid.size*(we?ae.activeState.scale:1),Ke=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:E.scalingValue(Ae,a)}:{width:E.scalingValue(Ae,a)};const de=De.width/De.height;if(F.direction==="horiz"){const ke=Ae,Ve=ke*de;return{width:E.scalingValue(Ve,a),height:E.scalingValue(ke,a)}}else{const ke=Ae,Ve=ke/de;return{width:E.scalingValue(ke,a),height:E.scalingValue(Ve,a)}}};return r.jsx("button",{className:pe.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:E.scalingValue(Ae,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:E.scalingValue(Ae,a)}:{},...ae.fit==="cover"?{width:E.scalingValue(Ae,a),height:E.scalingValue(Ae,a)}:{},...Ke(),transition:we?"all 0.25s ease-out":"none",opacity:we?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:de=>{var ke;de.stopPropagation(),$(ge),(ke=g.current)==null||ke.go(ge)},onMouseEnter:()=>{var de;ae.triggers==="hov"&&((de=g.current)==null||de.go(ge))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:de=>{const ke=de.currentTarget;ke.naturalWidth&&ke.naturalHeight&&V(Ve=>({...Ve,[ge]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ge}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.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 Jd={element:Xd,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(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 Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=E.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:y,buttonStroke:P,buttonPadding:$,isButtonFullWidth:T,inputCorners:S,inputStroke:M,inputPadding:I,inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V,buttonColor:g,buttonTextColor:L,buttonBorderColor:
|
|
158
|
+
`}function Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=E.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:y,buttonStroke:P,buttonPadding:$,isButtonFullWidth:T,inputCorners:S,inputStroke:M,inputPadding:I,inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V,buttonColor:g,buttonTextColor:L,buttonBorderColor:A,labelTextColor:H,successColor:U,errorColor:se,fontFamily:j,inputFontSettings:k,inputFontSize:X,inputLineHeight:q,inputLetterSpacing:O,inputWordSpacing:Y,inputTextAppearance:ie,buttonFontSettings:re,buttonFontSize:F,buttonLineHeight:ae,buttonLetterSpacing:f,buttonWordSpacing:oe,buttonTextAppearance:he,labelFontSettings:fe,labelFontSize:We,labelLineHeight:Z,labelLetterSpacing:ce,labelWordSpacing:G,labelTextAppearance:B,statusFontSettings:N,statusFontSize:me,statusLineHeight:Ce,statusLetterSpacing:Be,statusWordSpacing:_e,statusTextAppearance:Te,successMessage:Ne,errorMessage:z,stateOverrides:ue}=e,_=p==="B",J=w.slice(0,Math.min(u,w.length)),D={fontSettings:{fontFamily:j,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:X??.01,lineHeight:q,letterSpacing:O??0,wordSpacing:Y??0,textAppearance:ie,color:b},ee=Xt(kt(D,t)),ge=E.scalingValue(M??0,t),we=E.scalingValue((q??X??.01)+((I==null?void 0:I.top)??0)+((I==null?void 0:I.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),De={...ee,borderStyle:"solid",borderRadius:p==="C"?0:E.scalingValue(S??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:E.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:E.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:E.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:E.scalingValue((I==null?void 0:I.left)??0,t),height:we,minHeight:we},Ie={fontSettings:{fontFamily:j,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ae,letterSpacing:f??0,wordSpacing:oe??0,textAppearance:he,color:L},Ae=Xt(kt(Ie,t)),Ke=E.scalingValue(P??0,t),de={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:Z,letterSpacing:ce??0,wordSpacing:G??0,textAppearance:B,color:H},ke=kt(de,t),Ve={fontSettings:{fontFamily:j,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:me??.01,lineHeight:Ce,letterSpacing:Be??0,wordSpacing:_e??0,textAppearance:Te,color:U},Le=Xt(kt(Ve,t)),at=E.buildColorVars(l,{inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:g,buttonTextColor:L,buttonBorderColor:A,labelTextColor:H,successColor:U,errorColor:se},eu,tu,ue),[tt,xt]=c.useState(()=>Object.fromEntries(J.map(Oe=>[Oe.name,""]))),[qe,pt]=c.useState("idle"),[Et,_t]=c.useState(null),At=s==="success"?"success":s==="error"?"error":qe,ve=s==="error"?z:Et,He=s==="filled",Ue=c.useMemo(()=>{if(!He)return tt;let Oe=null;for(const Tt of J)(tt[Tt.name]??"").trim().length>0||(Oe=Oe??{...tt},Oe[Tt.name]="Filled");return Oe??tt},[tt,He,J]),nt=At==="error"?E.getFormFieldValidationError(J,Ue):null,Ht=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),Mt=o==null?void 0:o.submitUrl,qt=(Oe,Tt)=>{xt(bt=>({...bt,[Oe]:Tt}))},on=async Oe=>{if(Oe.preventDefault(),!d)return;const Tt=Object.fromEntries(J.map(it=>{var ft;return[it.name,((ft=tt[it.name])==null?void 0:ft.trim())??""]}).filter(([,it])=>it));if(!Mt){pt("error"),_t("No integrations were found for this form.");return}if(Object.keys(Tt).length===0)return;const bt=E.getFormFieldValidationError(J,tt);if(bt){pt("error"),_t(bt);return}pt("submitting"),_t(null);try{const it=await fetch(Mt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Tt)});if(!it.ok){const ft=await it.text();throw new Error(ft||`Request failed: ${it.status}`)}pt("success"),xt(Object.fromEntries(J.map(ft=>[ft.name,""])))}catch(it){pt("error"),_t(it instanceof Error?it.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${l}-type-${p} ${Ht}`.trim(),style:at,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zd(l)}}),r.jsxs("form",{onSubmit:on,className:`${l}-form`,children:[r.jsx("div",{className:`${l}-fields`,children:J.map((Oe,Tt)=>r.jsxs(c.Fragment,{children:[Tt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${l}-control`:void 0,style:{height:E.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${l}-field-group${_?` ${l}-labeled`:""}`,children:[_&&r.jsx("span",{className:`${l}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:Oe.label||Oe.name}),Oe.type==="textarea"?r.jsx("textarea",{name:Oe.name,autoComplete:"off",value:Ue[Oe.name]??"",onChange:bt=>qt(Oe.name,bt.target.value),placeholder:Oe.placeholder,className:`${l}-input`,style:De,rows:1,"data-filled":He||(Ue[Oe.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Oe.type==="phone"?"tel":Oe.type==="email"?"email":"text",name:Oe.name,autoComplete:"off",value:Ue[Oe.name]??"",onChange:bt=>qt(Oe.name,bt.target.value),placeholder:Oe.placeholder,required:Oe.isRequired??Oe.type==="email",className:`${l}-input`,style:De,"data-filled":He||(Ue[Oe.name]??"").trim().length>0})]})]},Tt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${l}-control`:void 0,style:{height:E.scalingValue(v??0,t)}}),r.jsx("div",{className:`${l}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${l}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(y??0,t),borderWidth:Ke,paddingTop:E.scalingValue(($==null?void 0:$.top)??0,t),paddingRight:E.scalingValue(($==null?void 0:$.right)??0,t),paddingBottom:E.scalingValue(($==null?void 0:$.bottom)??0,t),paddingLeft:E.scalingValue(($==null?void 0:$.left)??0,t),pointerEvents:d?"auto":void 0,...Ae,...T?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${l}-overlay-anchor`,style:T?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:qe==="submitting"?"...":x})})})]}),At==="success"&&r.jsx("p",{className:`${l}-success`,style:{...Le},children:Ne}),At==="error"&&r.jsx("p",{className:`${l}-error`,style:{...Le},role:"alert",children:nt??ve??z})]})}const eu={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"},tu=["hover","focus","filled","success","error"],nu=`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';
|
|
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
980
980
|
font-size: ${Yi(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=E.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:P,inputTextAppearance:$,buttonFontSettings:T,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:I,buttonWordSpacing:W,buttonTextAppearance:b,statusFontSettings:R,statusFontSize:V,statusLineHeight:g,statusLetterSpacing:L,statusWordSpacing:
|
|
983
|
+
`}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=E.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:P,inputTextAppearance:$,buttonFontSettings:T,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:I,buttonWordSpacing:W,buttonTextAppearance:b,statusFontSettings:R,statusFontSize:V,statusLineHeight:g,statusLetterSpacing:L,statusWordSpacing:A,statusTextAppearance:H,iconMaxWidth:U,minHeight:se,corners:j,stroke:k,stateOverrides:X,inputPadding:q,buttonPadding:O,successMessage:Y="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,re=d.slice(0,Math.min(u,d.length)),[F,ae]=c.useState(()=>Object.fromEntries(re.map(de=>[de.name,""]))),[f,oe]=c.useState("idle"),[he,fe]=c.useState(null),We=o==="success"?"success":o==="error"?"error":f,Z=o==="error"?ie:he,ce=o==="filled",G=c.useMemo(()=>{if(!ce)return F;let de=null;for(const ke of re)(F[ke.name]??"").trim().length>0||(de=de??{...F},de[ke.name]="Filled");return de??F},[ce,F,re]),B=We==="error"?E.getFormFieldValidationError(re,G):null,N=o&&o!=="default"?`${s}-state-${o}`:"",me=re.some(de=>(G[de.name]??"").trim().length>0),Ce=N!==`${s}-state-filled`&&me?`${s}-state-filled`:"",Be=`${N} ${Ce}`.trim(),_e=i==null?void 0:i.submitUrl,Te=p??"",Ne=(l==null?void 0:l.icon)??"",z=(l==null?void 0:l.mode)==="On",ue=Te||"Submit",_={fontSettings:{fontFamily:w,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:v??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:P??0,textAppearance:$,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:w,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:S??.01,lineHeight:M,letterSpacing:I??0,wordSpacing:W??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},D={fontSettings:{fontFamily:w,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:V??.01,lineHeight:g,letterSpacing:L??0,wordSpacing:A??0,textAppearance:H,color:e.successColor??"#22c55e"},ee=Xt(kt(_,t)),ge=Xt(kt(J,t)),we=Xt(kt(D,t)),De=E.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},cu,du,X),Ie={borderRadius:E.scalingValue(j,t),borderWidth:E.scalingValue(k,t),borderStyle:"solid"},Ae={borderLeftWidth:E.scalingValue(k,t)},Ke=async de=>{if(de.preventDefault(),!a)return;const ke=Object.fromEntries(re.map(Le=>{var at;return[Le.name,((at=F[Le.name])==null?void 0:at.trim())??""]}).filter(([,Le])=>Le));if(!_e){oe("error"),fe("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Ve=E.getFormFieldValidationError(re,F);if(Ve){oe("error"),fe(Ve);return}oe("submitting"),fe(null);try{const Le=await fetch(_e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Le.ok){const at=await Le.text();throw new Error(at||`Request failed: ${Le.status}`)}oe("success"),ae(Object.fromEntries(re.map(at=>[at.name,""])))}catch(Le){oe("error"),fe(Le instanceof Error?Le.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Be}`.trim(),style:De,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:su(s)}}),r.jsxs("form",{onSubmit:Ke,className:`${s}-form`,style:{...Ie,height:E.scalingValue(se,t),minHeight:E.scalingValue(se,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:G[de.name]??"",onChange:ke=>ae(Ve=>({...Ve,[de.name]:ke.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...ee,paddingRight:E.scalingValue(q.right,t),paddingLeft:E.scalingValue(q.left,t),paddingTop:E.scalingValue(q.top,t),paddingBottom:E.scalingValue(q.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":ue,style:{...ge,...Ae,paddingRight:E.scalingValue(O.right,t),paddingLeft:E.scalingValue(O.left,t),paddingTop:E.scalingValue(O.top,t),paddingBottom:E.scalingValue(O.bottom,t),pointerEvents:a?"auto":void 0},children:f==="submitting"?"...":z?Ne&&r.jsx(tn,{url:Ne,className:`${s}-submitBtnIcon`,style:{maxWidth:E.scalingValue(U??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Te})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...we},children:Y}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...we},role:"alert",children:B??Z??ie})]})},cu={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"},du=["hover","focus","filled","success","error"],uu=`import React, { useMemo, useState } from 'react';
|
|
984
984
|
import { CommonComponentProps } from '../props';
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover img {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const vu=30,bu=20,Uo=2,xu=2,wu=(e,t)=>Array.from({length:t},()=>e).flat(),Su=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},$u=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Su(i,e))},Cu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:l})=>{var b,R,V;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!a)return;const g=p.current;g!=null&&g.complete&&(l==null||l())},[a,(b=e.image)==null?void 0:b.url,l]);const u=n.display==="cover",w=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=w.split(":").map(Number),$=(x?m:v)/(x?v:m);let T=i,S=T/$;S>o&&(S=o,T=S*$);const M=d(T),I=d(S),W=((R=e.image)==null?void 0:R.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?l:void 0,onError:a?l:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:I,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ge(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:W}):W})})},Tu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=c.useMemo(()=>yu(s),[s]),{speed:d,direction:l,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,y=!!o,P=!n||!!i,$=P&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,T=n?!!i:!0,M=((t==null?void 0:t.length)??0)>0&&(T||!!n),I=Math.max(0,d)*vu,W=B=>E.scalingValue(B,n??!1),b=c.useRef(null),R=c.useRef(null),V=c.useRef(null),[g,L]=c.useState(0),[
|
|
1692
|
+
`}const vu=30,bu=20,Uo=2,xu=2,wu=(e,t)=>Array.from({length:t},()=>e).flat(),Su=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},$u=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Su(i,e))},Cu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:l})=>{var b,R,V;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!a)return;const g=p.current;g!=null&&g.complete&&(l==null||l())},[a,(b=e.image)==null?void 0:b.url,l]);const u=n.display==="cover",w=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=w.split(":").map(Number),$=(x?m:v)/(x?v:m);let T=i,S=T/$;S>o&&(S=o,T=S*$);const M=d(T),I=d(S),W=((R=e.image)==null?void 0:R.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?l:void 0,onError:a?l:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:I,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ge(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:W}):W})})},Tu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=c.useMemo(()=>yu(s),[s]),{speed:d,direction:l,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,y=!!o,P=!n||!!i,$=P&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,T=n?!!i:!0,M=((t==null?void 0:t.length)??0)>0&&(T||!!n),I=Math.max(0,d)*vu,W=B=>E.scalingValue(B,n??!1),b=c.useRef(null),R=c.useRef(null),V=c.useRef(null),[g,L]=c.useState(0),[A,H]=c.useState(0),U=T&&p==="on",[se,j]=c.useState(!1),[k,X]=c.useState({}),q=c.useRef(k);q.current=k;const O=c.useRef(null),Y=c.useRef(0),ie=c.useRef(null),re=c.useMemo(()=>(t??[]).map(B=>{var N;return((N=B.image)==null?void 0:N.url)??""}).join("\0"),[t]),[F,ae]=c.useState(Uo),f=c.useMemo(()=>{const B=t??[];return!T||B.length===0?B:wu(B,F)},[t,T,F]),oe=c.useMemo(()=>f.filter(B=>{var N;return!!((N=B.image)!=null&&N.url)}).length,[f]),he=M?xu:1;c.useLayoutEffect(()=>{Y.current=0,X({}),O.current=null,ae(Uo),L(0)},[re]),c.useEffect(()=>{if(!P||m!=="randomize")return;const B=b.current;if(!B)return;const N=_e=>{X(Te=>{let Ne=null;for(const z of _e)z in Te&&($u(B,z)||(Ne||(Ne={...Te}),delete Ne[z]));return Ne??Te})},me=new IntersectionObserver(_e=>{const Te=new Set;for(const Ne of _e){const z=Ne.target.dataset.marqueeItemIndex,ue=z!==void 0?Number(z):NaN;Number.isNaN(ue)||Te.add(ue)}Te.size>0&&N(Te)},{root:B,threshold:0});Object.keys(k).forEach(_e=>{const Te=Number(_e);B.querySelectorAll(`[data-marquee-item-index="${Te}"]`).forEach(Ne=>me.observe(Ne))});let Ce=0;const Be=()=>{const _e=Object.keys(q.current);_e.length!==0&&(N(_e.map(Number)),Ce=requestAnimationFrame(Be))};return Object.keys(q.current).length>0&&(Ce=requestAnimationFrame(Be)),()=>{cancelAnimationFrame(Ce),me.disconnect()}},[m,k,P]),c.useLayoutEffect(()=>{if(!M)return;const B=b.current,N=V.current;if(!B||!N)return;let me=0;const Ce=()=>{const Te=B.getBoundingClientRect().width,Ne=N.getBoundingClientRect().width,z=O.current,ue=typeof z=="number"&&Math.abs(z-Ne)<=.25;if(O.current=Ne,T&&Ne>0&&F>0){const _=Ne/F;if(_>0&&Te>0){const J=Math.max(Uo,Math.ceil(Te/_)+1);if(J!==F){ae(J);return}}}if(Ne>0&&g<=0){L(Ne);return}ue&&Ne!==g?L(Ne):!ue&&g<=0&&(cancelAnimationFrame(me),me=requestAnimationFrame(Ce))},Be=()=>{cancelAnimationFrame(me),me=requestAnimationFrame(Ce)};ie.current=Be,Be();const _e=new ResizeObserver(Be);return _e.observe(B),_e.observe(N),()=>{ie.current=null,cancelAnimationFrame(me),_e.disconnect()}},[T,M,g,re,F]),c.useLayoutEffect(()=>{const B=R.current;if(!M||!B)return;const N=g>0?g:0,me=N>0&&I>0?N/I*1e3:0,Ce=`${Math.max(0,me)/1e3}s`;B.style.setProperty("--marquee-distance",`${N}px`),B.style.setProperty("--marquee-duration",Ce)},[T,M,I,g]),c.useLayoutEffect(()=>{if(!M){H(0);return}if(g<=0){H(0);return}const B=R.current;if(!B)return;const N=()=>{const Ce=B.getBoundingClientRect().height;H(Ce>0?Ce:0)};N();const me=new ResizeObserver(N);return me.observe(B),()=>me.disconnect()},[M,he,f,n,u,w,x,g,v,k]);const fe=()=>{U&&j(!0)},We=()=>{U&&j(!1)},Z=c.useCallback(()=>{var B;Y.current=Math.min(oe,Y.current+1),(B=ie.current)==null||B.call(ie)},[oe]),ce=c.useCallback((B,N)=>{X(me=>{const Ce=me[B]??N,Be=(t??[]).filter(Te=>Te!==Ce);if(Be.length===0)return me;const _e=Be[Math.floor(Math.random()*Be.length)];return{...me,[B]:_e}})},[t]),G=(B,N,me,Ce)=>{const Be=P&&m==="randomize"&&v.display==="cover"?k[me]??B:B,_e=`max(${W(u)}, ${bu}px)`,Te=`calc(-0.5 * (${_e} + ${W(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:P&&m==="randomize"&&v.display==="cover"?()=>ce(me,B):void 0,children:[r.jsx(Cu,{item:Be,prefix:s,imageFit:v,imageMaxWidth:w,imageMaxHeight:x,imageHoverClass:$,isEditor:n,isFirstSet:Ce,scaled:W,onFirstSetImageDone:Z}),y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Te,width:_e,height:"100%"}})]},`${N}-${me}`)};if(M){const B=T?U&&se?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Ge(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:g>0&&A>0?{height:A}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:R,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:fe,onMouseLeave:We,style:{"--marquee-play-state":B},children:Array.from({length:he},(N,me)=>r.jsx("div",{ref:me===0?V:void 0,className:Ge(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(u),paddingRight:W(u)},"aria-hidden":me>0,children:f.map((Ce,Be)=>G(Ce,me,Be,me===0))},`set-${me}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Ge(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,N)=>G(B,0,N))},"marquee-static")]})},Lu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1693
1693
|
import cn from 'classnames';
|
|
1694
1694
|
import { CommonComponentProps } from '../props';
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
|
|
|
2407
2407
|
pointer-events: auto;
|
|
2408
2408
|
z-index: 10;
|
|
2409
2409
|
}
|
|
2410
|
-
`}const Iu=30,ha=2,
|
|
2410
|
+
`}const Iu=30,ha=2,_u=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),{align:a,speed:d,direction:l,pauseOnHover:p,gap:u,cardWidth:w,corners:x,stroke:v,strokeColor:m,bgColor:y,padding:P,logoMarginTop:$,logoWidth:T,logoHeight:S,captionMarginTop:M}=e,I=!!o,W=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),R=W&&(b||n),V=Math.max(0,d)*Iu,g=_=>E.scalingValue(_,n??!1),L=c.useRef(null),A=c.useRef(null),H=c.useRef(null),[U,se]=c.useState(0),[j,k]=c.useState(0),[X,q]=c.useState(0),O=b&&p==="on",[Y,ie]=c.useState(!1),re=c.useRef(null),[F,ae]=c.useState(0),[f,oe]=c.useState(0),he=c.useRef(null),fe=_=>{var D,ee,ge,we,De;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${_}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${_}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((we=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:we.textDecoration)??"none",fontVariant:((De=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:De.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},We=fe("text"),Z=fe("caption"),ce=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var J,D;return(((J=_.text)==null?void 0:J.length)??0)>0||(((D=_.caption)==null?void 0:D.length)??0)>0}),[t]),G=c.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:j<=0||U<=0?ha:Math.max(ha,Math.ceil(U/j)+1),[R,t==null?void 0:t.length,j,U]);c.useLayoutEffect(()=>{if(!R)return;const _=L.current,J=H.current;if(!_||!J)return;let D=0;const ee=()=>{const De=_.getBoundingClientRect().width,Ie=J.getBoundingClientRect().width,Ae=he.current,Ke=typeof Ae=="number"&&Math.abs(Ae-Ie)<=.25;if(he.current=Ie,se(De),typeof Ie=="number"&&Ie>0&&j<=0){k(Ie);return}Ke&&Ie!==j?k(Ie):!Ke&&j<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(ee))},ge=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(ee)};ge();const we=new ResizeObserver(ge);return we.observe(_),we.observe(J),()=>{cancelAnimationFrame(D),we.disconnect()}},[b,R,j]),c.useLayoutEffect(()=>{const _=A.current;if(!R||!_)return;const J=j>0?j:0,D=J>0&&V>0?J/V*1e3:0,ee=`${Math.max(0,D)/1e3}s`;_.style.setProperty("--marquee-distance",`${J}px`),_.style.setProperty("--marquee-duration",ee)},[b,R,V,j]),c.useLayoutEffect(()=>{if(!R){q(0);return}const _=H.current,J=A.current;if(!_||!J)return;const D=()=>{let ge=0;for(let we=0;we<_.children.length;we++){const Ie=_.children[we].firstElementChild;Ie&&(ge=Math.max(ge,Ie.offsetHeight))}ge<=0&&(ge=J.offsetHeight),q(ge>0?ge:0)};D();const ee=new ResizeObserver(D);return ee.observe(_),ee.observe(J),()=>{ee.disconnect()}},[R,G,t,n,u,w,P,v,x,T,S,F,f]);const B=()=>{O&&ie(!0)},N=()=>{O&&ie(!1)},me=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),Ce=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Be=c.useCallback((_,J,D,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":I?"y":void 0,className:I?`${s}-control`:void 0,style:{height:g((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...kt(_,n),textAlign:Ce,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(ui,{content:J})})]},D),[me,Ce,n,I,s,g]),_e=c.useCallback((_,J,D)=>{var ee,ge,we;return r.jsxs("div",{style:{padding:`${g(P.top)} ${g(P.right)} ${g(P.bottom)} ${g(P.left)}`,width:g(w+v*2),height:"100%",borderRadius:g(x),border:`${g(v)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:me,textAlign:Ce},children:[_.text&&Be(We,_.text,"text",D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(D==null?void 0:D.textMinHeightPx)=="number"&&D.textMinHeightPx>0?{minHeightPx:D.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I&&!(D!=null&&D.dataMeasureAttrs)?"logoMarginTop":void 0,className:I&&!(D!=null&&D.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:g($)}}),r.jsx("div",{style:{width:g(T),height:g(S)},children:((ee=_.logo)==null?void 0:ee.url)&&r.jsx("img",{src:_.logo.url,alt:((ge=_.logo)==null?void 0:ge.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((we=_.logo)==null?void 0:we.objectFit)||"contain"}})})]}),_.caption&&Be(Z,_.caption,"caption",{...D!=null&&D.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(D==null?void 0:D.captionMinHeightPx)=="number"&&D.captionMinHeightPx>0?{minHeightPx:D.captionMinHeightPx}:{}})]})]},J)},[y,M,Z,w,x,S,$,T,me,Ce,P.bottom,P.left,P.right,P.top,Be,v,m,We,n,I,s]),Te=c.useCallback(_=>{ae(_.maxTextPx),oe(_.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!ce){Te({maxTextPx:0,maxCaptionPx:0});return}const _=re.current;if(!_)return;const J=()=>{E.readTestimonialTextMeasure(_,Te)};J();const D=new ResizeObserver(J);return D.observe(_),()=>{D.disconnect()}},[ce,Te,t,_e]);const Ne=ce?{textMinHeightPx:F,captionMinHeightPx:f}:void 0,z=ce?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,J)=>_e(_,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,ue=(_,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[_e(_,`card-${J}`,Ne),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${g(u)})`,width:g(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(R){const _=b?O&&Y?"paused":"running":"paused";return r.jsxs("div",{ref:L,className:Ge(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...X>0?{height:X}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{ref:A,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:B,onMouseLeave:N,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":_},children:Array.from({length:G},(J,D)=>r.jsx("div",{ref:D===0?H:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:g(u),paddingRight:g(u)},"aria-hidden":D>0,children:t==null?void 0:t.map((ee,ge)=>ue(ee,`${D}-${ge}`))},`set-${D}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{style:{gap:g(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,J)=>ue(_,J))})]})},Au=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2411
2411
|
import cn from 'classnames';
|
|
2412
2412
|
import { CommonComponentProps } from '../props';
|
|
2413
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
|
|
|
3022
3022
|
logoHeight: number;
|
|
3023
3023
|
captionMarginTop: number;
|
|
3024
3024
|
};
|
|
3025
|
-
`,fa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ku={element:
|
|
3025
|
+
`,fa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ku={element:_u,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ru,sourceCode:Au,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mu(e){return`
|
|
3026
3026
|
.${e}-container {
|
|
3027
3027
|
position: relative;
|
|
3028
3028
|
overflow-x: clip;
|
|
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
|
|
|
3146
3146
|
width: 100%;
|
|
3147
3147
|
height: 100%;
|
|
3148
3148
|
}
|
|
3149
|
-
`}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:y,controlsColor:P,controlsHoverColor:$}=e,T=d>0&&(!n||!!i),[S,M]=c.useState(0),[I,W]=c.useState(null),[b,R]=c.useState(!1),V=c.useRef(null),g=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),L=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);c.useEffect(()=>{M(0),W(null),R(!1)},[a.length]);const
|
|
3149
|
+
`}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:y,controlsColor:P,controlsHoverColor:$}=e,T=d>0&&(!n||!!i),[S,M]=c.useState(0),[I,W]=c.useState(null),[b,R]=c.useState(!1),V=c.useRef(null),g=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),L=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);c.useEffect(()=>{M(0),W(null),R(!1)},[a.length]);const A=a[S],H=I===null?null:a[I],U=Z=>{var G,B,N,me,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((G=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:G.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((N=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:N.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},se=U("text"),j=U("caption"),k=a.length>1&&a.some(Z=>{var ce,G;return(((ce=Z.text)==null?void 0:ce.length)??0)>0||(((G=Z.caption)==null?void 0:G.length)??0)>0}),X=c.useRef(null),[q,O]=c.useState(0),[Y,ie]=c.useState(0),re=e.controls??{mode:"Off",icon:null},F=a.length>1,ae=c.useCallback((Z,ce)=>!F||ce===Z?Z:(V.current&&window.clearTimeout(V.current),W(Z),R(!0),V.current=window.setTimeout(()=>{W(null),R(!1),V.current=null},300),ce),[F]),f=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z-1+a.length)%a.length))},[F,ae,a.length]),oe=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z+1)%a.length))},[F,ae,a.length]);c.useEffect(()=>{if(!T||!F)return;const Z=Math.max(300,Wu/d),ce=window.setInterval(()=>{M(G=>ae(G,(G+1)%a.length))},Z);return()=>{window.clearInterval(ce)}},[T,F,ae,a.length,d]),c.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const he=(Z,ce)=>{var Ce,Be,_e,Te;const G=ce==null?void 0:ce.textMinHeightPx,B=ce==null?void 0:ce.captionMinHeightPx,N=ce==null?void 0:ce.dataMeasureAttrs,me=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"textMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(w??0,n??!1)}}),r.jsx("div",{...N&&{"data-testimonial-measure":"text"},style:{...kt(se,n),...G&&G>0?{minHeight:G}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"imageMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:E.scalingValue(v??0,n??!1),height:E.scalingValue(m??0,n??!1)},children:((Ce=Z.image)==null?void 0:Ce.url)&&r.jsx("img",{src:(Be=Z.image)==null?void 0:Be.url,alt:((_e=Z.image)==null?void 0:_e.name)??"",className:`${s}-icon`,style:{objectFit:((Te=Z.image)==null?void 0:Te.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"captionMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),r.jsx("div",{...N?{"data-testimonial-measure":"caption"}:{},style:{...kt(j,n),...B&&B>0?{minHeight:B}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.caption})})]})]})},fe=c.useCallback(Z=>{O(Z.maxTextPx),ie(Z.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!k){fe({maxTextPx:0,maxCaptionPx:0});return}const Z=X.current;if(!Z)return;const ce=()=>{E.readTestimonialTextMeasure(Z,fe)};ce();const G=new ResizeObserver(ce);return G.observe(Z),()=>{G.disconnect()}},[k,fe,t]),!A)return r.jsx(r.Fragment,{});const We=k?{textMinHeightPx:q,captionMinHeightPx:Y}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Mu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:E.scalingValue(p??0,n??!1),alignItems:g},children:[k&&r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,ce)=>r.jsx("div",{style:{width:"100%"},children:he(Z,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[H&&b&&r.jsx("div",{className:Ge(`${s}-fade-item-prev`,`${s}-fade-out`),children:he(H,{...We,hideControls:!0})}),r.jsx("div",{className:Ge(`${s}-fade-item-current`,b?`${s}-fade-in`:void 0),children:he(A,We)})]})]}),re.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:f,disabled:!F,"aria-label":"Previous testimonial",children:re.icon&&r.jsx(tn,{url:re.icon,fill:P,hoverFill:$,className:Ge(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Ge(`${s}-arrow`,`${s}-next-arrow`),style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:oe,disabled:!F,"aria-label":"Next testimonial",children:re.icon&&r.jsx(tn,{url:re.icon,fill:P,hoverFill:$,className:`${s}-arrow-img`})})})]})]})})},Nu=`import cn from 'classnames';
|
|
3150
3150
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3151
3151
|
import { CommonComponentProps } from '../props';
|
|
3152
3152
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const pn=500,Vu=750,En="cubic-bezier(0.22, 1, 0.36, 1)";function An(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return An(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[y,P]=c.useState(i?"opening":"open"),[$,T]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,L=x.current;if(!g||!L)return;const _=g.getBoundingClientRect(),H=_.width,U=_.height,se=L.naturalWidth,j=L.naturalHeight;if(!H||!U||!se||!j)return;if(n==="cover"){m({width:H,height:U,left:_.left,top:_.top});return}const k=se/j,X=H/U;if(k>X){const q=H/k;m({width:H,height:q,left:_.left,top:_.top+(U-q)/2})}else{const q=U*k;m({width:q,height:U,left:_.left+(H-q)/2,top:_.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const L=new ResizeObserver(()=>M());return L.observe(g),()=>L.disconnect()},[M,t]),c.useEffect(()=>{y==="opening"&&v&&P("open")},[y,v]),c.useEffect(()=>{if(y!=="closing")return;const g=setTimeout(()=>s(),pn);return()=>clearTimeout(g)},[y,s]),c.useEffect(()=>{S.current!==t&&T(!1),S.current=t},[t]),c.useEffect(()=>{const g=L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),y!=="closing"&&P("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[y]);const I=()=>{y!=="closing"&&P("closing")},W=y==="open",b=y==="closing",R=b&&o&&!!i,V=y==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:I,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${pn}ms ${En}`:R||$?`top ${pn}ms ${En}, left ${pn}ms ${En}, width ${pn}ms ${En}, height ${pn}ms ${En}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=E.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:y,lightboxImageDisplay:P,slider:$,sliderTiming:T,direction:S,transition:M,titleMarginTop:I,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:L,titleFontSize:_,titleLineHeight:H,titleLetterSpacing:U,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:O,subtitleLetterSpacing:Y,subtitleWordSpacing:ie,subtitleTextAppearance:re,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:f,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:fe,lightboxCounterTextAppearance:We,showText:Z="always",alignEntries:ce="off"}=e,G={fontSettings:{fontFamily:g,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:_??.01,lineHeight:H,letterSpacing:U??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Xt(kt(G,n))},me={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:ie??0,textAppearance:re,color:R},Be={...Xt(kt(me,n))},Ae={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:f??.01,lineHeight:oe,letterSpacing:he??0,wordSpacing:fe??0,textAppearance:We,color:V},Ne={...Xt(kt(Ae,n)),...Xo(f,oe,l,n)},z=Go(_,H,`${l}-item-title`,`${l}-text-tight-leading`),ue=Go(q,O,`${l}-item-subtitle`,`${l}-text-tight-leading`),A=Xo(_,H,l,n),J=Xo(q,O,l,n),D=Go(f,oe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ee=E.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),Ie=v===0?1/0:v,_e=(t??[]).slice(0,Ie),Ke=u.entryWidth??.2,de=(y==null?void 0:y.display)==="cover",ke=(y==null?void 0:y.ratioValue)??"1:1",Ve=(y==null?void 0:y.reversed)??!1,[Le,at]=ke.split(":").map(Number),qe=`${Ve?at:Le} / ${Ve?Le:at}`,pt=E.scalingValue(Ke??0,n),Et=!de&&$!=="off",At={width:pt,...de?{aspectRatio:qe,height:"auto",overflow:"hidden"}:{height:"auto"}},_t=`${l}-item-image-wrapper${Et?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",He=ve&&ce==="on",Ue=`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`,nt=E.scalingValue(Ke*w/100,n),vt=de?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ht,Mt]=c.useState("ltr"),[qt,on]=c.useState(0),Oe=c.useRef(null);c.useEffect(()=>{const Me=Oe.current;if(!Me)return;const ct=new ResizeObserver(Rt=>{on(Math.round(Rt[0].contentRect.width))});return ct.observe(Me),()=>ct.disconnect()},[]);const Tt=(()=>{const Me={...ee},ct=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return ct&&(Me["--cntrl-article-width"]=ct),Me})(),[bt,it]=c.useState(!1),[ft,Ot]=c.useState([]),[un,Ft]=c.useState(0),[wn,Qe]=c.useState(null),Bt=(Me,ct,Rt)=>{if(n&&!i||m==="off")return;const te=Me.currentTarget.getBoundingClientRect();Qe({top:te.top,left:te.left,width:te.width,height:te.height}),Ot(ct),Ft(Rt),it(!0)};c.useEffect(()=>{if(!bt||m!=="on"||typeof document>"u")return;const Me=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Me}},[bt,m]),c.useEffect(()=>{!n||i||(it(!1),Qe(null))},[n,i]);const rn=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:Oe,className:`${l}-wrapper ${l}-type-${p}${He?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:E.scalingValue(x??0,n),columnGap:E.scalingValue(u.horizontalGap??0,n),width:E.scalingValue(u.wrapperWidth??0,n),...He?{[`--${l}-align-entries-row-gap`]:E.scalingValue(x??0,n)}:{}},children:_e.map((Me,ct)=>{var St,$t;const Rt=va(Me.title),te=va(Me.subtitle),Se=(((St=Me.link)==null?void 0:St.length)??0)>0&&m==="off"?Me.link:void 0,Re=Math.floor(ct/u.columnsCount)===Math.ceil(_e.length/u.columnsCount)-1,je=ve?r.jsxs("div",{className:`${l}-item-text-block`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,...A},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}}),te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Xe=ve?r.jsxs("div",{className:`${l}-item-title-row`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,...A},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}})]}):null,et=ve?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Ee=Se?r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-text-link`,children:[Xe,et]}):r.jsxs(r.Fragment,{children:[Xe,et]}),Lt=r.jsx("div",{className:_t,style:At,children:((($t=Me.image)==null?void 0:$t.length)??0)===0?null:$==="off"?(()=>{const Fe=Me.image[0],dt=Me.image.filter(Ct=>!An(Ct)).map(Ct=>Ct.url);return r.jsx(ba,{media:Fe,className:`${l}-item-${An(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:An(Fe)?void 0:Ct=>Bt(Ct,dt,0)})})():r.jsxs(r.Fragment,{children:[Et&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Me.image.map(Fe=>An(Fe)?r.jsx("video",{src:Fe.url,muted:!0,playsInline:!0},`sizer-${Fe.url}`):r.jsx("img",{src:Fe.url,alt:""},`sizer-${Fe.url}`))}),r.jsx(Nr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:T*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ht},onMoved:Fe=>{if(S!=="random"||M==="fade")return;const ot=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(ot),setTimeout(()=>{Fe.refresh()},0)},children:Me.image.map((Fe,ot)=>{const dt=Me.image.filter(st=>!An(st)),Ct=dt.map(st=>st.url),an=dt.findIndex(st=>st.url===Fe.url);return r.jsx(Hr,{children:r.jsx(ba,{media:Fe,className:`${l}-item-${An(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:An(Fe)?void 0:st=>Bt(st,Ct,an)})},ot)})},`${M}-${Ke}-${S}-${T}-${qt}-${d}`)]})}),yt=ve?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Rt?"titleMarginTop":void 0,className:o&&Rt?`${l}-control`:void 0,style:{height:Rt?E.scalingValue(I??0,n):0,width:nt}}),r.jsx("p",{className:z,style:{width:Ue,...N,...A},children:Me.title}),r.jsx("div",{"data-controls":o&&te?"subtitleMarginTop":void 0,className:o&&te?`${l}-control`:void 0,style:{height:te?E.scalingValue(W??0,n):0,width:nt}}),r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${He&&Re?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`:E.scalingValue(Ke??0,n)},children:He?r.jsxs(r.Fragment,{children:[Ee,r.jsx("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:Lt})]}):r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:[je,Lt,yt]})})},ct)})})}),(!n||i)&&bt&&typeof document<"u"&&m==="on"&&ki.createPortal(r.jsx("div",{style:Tt,"data-selection":"none",children:r.jsx(Du,{images:ft,index:un,imageDisplay:qu(P),originRect:wn,reverseClose:$==="off",onClose:()=>it(!1),onPrev:()=>Ft(Me=>(Me-1+ft.length)%ft.length),onNext:()=>Ft(Me=>(Me+1)%ft.length),counterClassName:D,counterStyle:Ne})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3848
|
+
`}const pn=500,Vu=750,En="cubic-bezier(0.22, 1, 0.36, 1)";function _n(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return _n(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[y,P]=c.useState(i?"opening":"open"),[$,T]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,L=x.current;if(!g||!L)return;const A=g.getBoundingClientRect(),H=A.width,U=A.height,se=L.naturalWidth,j=L.naturalHeight;if(!H||!U||!se||!j)return;if(n==="cover"){m({width:H,height:U,left:A.left,top:A.top});return}const k=se/j,X=H/U;if(k>X){const q=H/k;m({width:H,height:q,left:A.left,top:A.top+(U-q)/2})}else{const q=U*k;m({width:q,height:U,left:A.left+(H-q)/2,top:A.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const L=new ResizeObserver(()=>M());return L.observe(g),()=>L.disconnect()},[M,t]),c.useEffect(()=>{y==="opening"&&v&&P("open")},[y,v]),c.useEffect(()=>{if(y!=="closing")return;const g=setTimeout(()=>s(),pn);return()=>clearTimeout(g)},[y,s]),c.useEffect(()=>{S.current!==t&&T(!1),S.current=t},[t]),c.useEffect(()=>{const g=L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),y!=="closing"&&P("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[y]);const I=()=>{y!=="closing"&&P("closing")},W=y==="open",b=y==="closing",R=b&&o&&!!i,V=y==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:I,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${pn}ms ${En}`:R||$?`top ${pn}ms ${En}, left ${pn}ms ${En}, width ${pn}ms ${En}, height ${pn}ms ${En}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=E.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:y,lightboxImageDisplay:P,slider:$,sliderTiming:T,direction:S,transition:M,titleMarginTop:I,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:L,titleFontSize:A,titleLineHeight:H,titleLetterSpacing:U,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:O,subtitleLetterSpacing:Y,subtitleWordSpacing:ie,subtitleTextAppearance:re,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:f,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:fe,lightboxCounterTextAppearance:We,showText:Z="always",alignEntries:ce="off"}=e,G={fontSettings:{fontFamily:g,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:A??.01,lineHeight:H,letterSpacing:U??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Xt(kt(G,n))},me={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:ie??0,textAppearance:re,color:R},Be={...Xt(kt(me,n))},_e={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:f??.01,lineHeight:oe,letterSpacing:he??0,wordSpacing:fe??0,textAppearance:We,color:V},Ne={...Xt(kt(_e,n)),...Xo(f,oe,l,n)},z=Go(A,H,`${l}-item-title`,`${l}-text-tight-leading`),ue=Go(q,O,`${l}-item-subtitle`,`${l}-text-tight-leading`),_=Xo(A,H,l,n),J=Xo(q,O,l,n),D=Go(f,oe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ee=E.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),Ie=v===0?1/0:v,Ae=(t??[]).slice(0,Ie),Ke=u.entryWidth??.2,de=(y==null?void 0:y.display)==="cover",ke=(y==null?void 0:y.ratioValue)??"1:1",Ve=(y==null?void 0:y.reversed)??!1,[Le,at]=ke.split(":").map(Number),qe=`${Ve?at:Le} / ${Ve?Le:at}`,pt=E.scalingValue(Ke??0,n),Et=!de&&$!=="off",_t={width:pt,...de?{aspectRatio:qe,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${l}-item-image-wrapper${Et?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",He=ve&&ce==="on",Ue=`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`,nt=E.scalingValue(Ke*w/100,n),vt=de?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ht,Mt]=c.useState("ltr"),[qt,on]=c.useState(0),Oe=c.useRef(null);c.useEffect(()=>{const Me=Oe.current;if(!Me)return;const ct=new ResizeObserver(Rt=>{on(Math.round(Rt[0].contentRect.width))});return ct.observe(Me),()=>ct.disconnect()},[]);const Tt=(()=>{const Me={...ee},ct=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return ct&&(Me["--cntrl-article-width"]=ct),Me})(),[bt,it]=c.useState(!1),[ft,Ot]=c.useState([]),[un,Ft]=c.useState(0),[wn,Qe]=c.useState(null),Bt=(Me,ct,Rt)=>{if(n&&!i||m==="off")return;const te=Me.currentTarget.getBoundingClientRect();Qe({top:te.top,left:te.left,width:te.width,height:te.height}),Ot(ct),Ft(Rt),it(!0)};c.useEffect(()=>{if(!bt||m!=="on"||typeof document>"u")return;const Me=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Me}},[bt,m]),c.useEffect(()=>{!n||i||(it(!1),Qe(null))},[n,i]);const rn=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:Oe,className:`${l}-wrapper ${l}-type-${p}${He?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:E.scalingValue(x??0,n),columnGap:E.scalingValue(u.horizontalGap??0,n),width:E.scalingValue(u.wrapperWidth??0,n),...He?{[`--${l}-align-entries-row-gap`]:E.scalingValue(x??0,n)}:{}},children:Ae.map((Me,ct)=>{var St,$t;const Rt=va(Me.title),te=va(Me.subtitle),Se=(((St=Me.link)==null?void 0:St.length)??0)>0&&m==="off"?Me.link:void 0,Re=Math.floor(ct/u.columnsCount)===Math.ceil(Ae.length/u.columnsCount)-1,je=ve?r.jsxs("div",{className:`${l}-item-text-block`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}}),te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Xe=ve?r.jsxs("div",{className:`${l}-item-title-row`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}})]}):null,et=ve?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Ee=Se?r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-text-link`,children:[Xe,et]}):r.jsxs(r.Fragment,{children:[Xe,et]}),Lt=r.jsx("div",{className:At,style:_t,children:((($t=Me.image)==null?void 0:$t.length)??0)===0?null:$==="off"?(()=>{const Fe=Me.image[0],dt=Me.image.filter(Ct=>!_n(Ct)).map(Ct=>Ct.url);return r.jsx(ba,{media:Fe,className:`${l}-item-${_n(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:_n(Fe)?void 0:Ct=>Bt(Ct,dt,0)})})():r.jsxs(r.Fragment,{children:[Et&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Me.image.map(Fe=>_n(Fe)?r.jsx("video",{src:Fe.url,muted:!0,playsInline:!0},`sizer-${Fe.url}`):r.jsx("img",{src:Fe.url,alt:""},`sizer-${Fe.url}`))}),r.jsx(Nr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:T*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ht},onMoved:Fe=>{if(S!=="random"||M==="fade")return;const ot=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(ot),setTimeout(()=>{Fe.refresh()},0)},children:Me.image.map((Fe,ot)=>{const dt=Me.image.filter(st=>!_n(st)),Ct=dt.map(st=>st.url),an=dt.findIndex(st=>st.url===Fe.url);return r.jsx(Hr,{children:r.jsx(ba,{media:Fe,className:`${l}-item-${_n(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:_n(Fe)?void 0:st=>Bt(st,Ct,an)})},ot)})},`${M}-${Ke}-${S}-${T}-${qt}-${d}`)]})}),yt=ve?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Rt?"titleMarginTop":void 0,className:o&&Rt?`${l}-control`:void 0,style:{height:Rt?E.scalingValue(I??0,n):0,width:nt}}),r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),r.jsx("div",{"data-controls":o&&te?"subtitleMarginTop":void 0,className:o&&te?`${l}-control`:void 0,style:{height:te?E.scalingValue(W??0,n):0,width:nt}}),r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${He&&Re?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`:E.scalingValue(Ke??0,n)},children:He?r.jsxs(r.Fragment,{children:[Ee,r.jsx("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:Lt})]}):r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:[je,Lt,yt]})})},ct)})})}),(!n||i)&&bt&&typeof document<"u"&&m==="on"&&ki.createPortal(r.jsx("div",{style:Tt,"data-selection":"none",children:r.jsx(Du,{images:ft,index:un,imageDisplay:qu(P),originRect:wn,reverseClose:$==="off",onClose:()=>it(!1),onPrev:()=>Ft(Me=>(Me-1+ft.length)%ft.length),onNext:()=>Ft(Me=>(Me+1)%ft.length),counterClassName:D,counterStyle:Ne})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';
|
|
3850
3850
|
import { CommonComponentProps } from '../props';
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -5445,7 +5445,7 @@ a.${e}-list-item {
|
|
|
5445
5445
|
overflow-wrap: anywhere;
|
|
5446
5446
|
word-break: break-word;
|
|
5447
5447
|
}
|
|
5448
|
-
`}const Mn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Br=[...Or,yn],Mo=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Mo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Mo.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function Ai(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Mo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return Ai(e);const i=Ai(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=Ai(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?Ai(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of Mo){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=Ai(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(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(),s=o-i;return n.remove(),s}function Jo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function xo(e,t){const n=i=>{const o=Je(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===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(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 Xt(kt(n,t))}function Ea(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((s-a)/2,i)}}const Yt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ii=.004,Zo=ii,zr=50,_i=1440,Ri=zr/_i;function Fs(e){const t=typeof e=="number"&&e>0?e:_i;return zr/t}function Sp(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 _i}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Si(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Yt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(gi.map(e=>[e,0]))}function Ji(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Ri,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function uo(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=Yt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Ri;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Ri;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Yt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Aa(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Mn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Yt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Yt[l],u=pi[l],w=mi[l],x=gi[l],v=Yt[a],m=pi[a],y=mi[a],P=gi[a],$=n[p],T=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof T=="number"&&(s[m]=T),typeof S=="number"&&(s[y]=S),typeof M=="number"&&(s[P]=M)}return s}function Os(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 Ap(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Si(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of gi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Os(e,a)?a:e}function _p(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Si(e),l=Si(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Mn.length,w=S=>{if(p)return S;const M=Ji({...t,...S}),I=Si(S),W=uo(u,I,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=Aa(e),v=Aa(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=Ji({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=Ji({...t,...e}),y=uo(u,l,Ji(t)),$=uo(u,d,m).some((S,M)=>S<(y[M]??S)),T=Yt.some(S=>{const M=e[S],I=t[S];return typeof M=="number"&&typeof I=="number"&&M!==I});return $||T?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Ri,i-o-s-Ri)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Qo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=pi[d],p=mi[d],u=gi[d];return{key:a,textPrefix:fp[a],widthKey:Yt[d],width:n[Yt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=E.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:y,showVisibility:P,cut:$,showCut:T,cutCellMinHeight:S,cutLabel:M,imageSize:I,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:L,columnsOrder:_,textPaddingLR:H,textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[O,Y]=c.useState(void 0),[ie,re]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,f=w==="b",oe=c.useRef(null),he=c.useRef(null),[fe,We]=c.useState(null),[Z,ce]=c.useState(_i),G=Fs(Z),B=Math.max(0,((x??0)-G)/2),N=Math.min(H??0,B),me=Math.max(N,ii),Ce=((x??0)+G)/2;c.useLayoutEffect(()=>{if(!n){ce(_i);return}const te=()=>{ce(Sp(oe.current))};te();const Se=oe.current;if(!Se)return;const Re=new ResizeObserver(te);Re.observe(Se);let je=Se;for(;je&&!je.style.getPropertyValue("--cntrl-article-width");)je=je.parentElement;return je&&Re.observe(je),()=>Re.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,T,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Be=E.buildColorVars(l,{textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),Ae=s&&s!=="default"?`${l}-state-${s}`:"",Ne=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${Ae}`.trim(),z=b==="reveal"&&(!n||i),ue=(P==null?void 0:P[0])??!1,A=(P==null?void 0:P[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const te=J.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){J.current=e;return}const Re=_p(e,te,{designWidth:Z});J.current=e,Os(e,Re)&&d(Re)},[e,d,n,a,Z]);const ee=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Qo(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=c.useMemo(()=>Qo(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Qo(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ie=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Mn],[_]),_e=c.useMemo(()=>Wp(Ie,u,ee,ge,we,De),[Ie,u,ee,ge,we,De]),Ke=Si(e),de=c.useMemo(()=>Yt.slice(0,u).map(te=>ee[te]),[u,ee]),ke=c.useMemo(()=>Vr(u,Ke,ee),[u,Ke,ee]),Ve=c.useMemo(()=>uo(u,Ke,ee),[u,Ke,ee]),Le=c.useMemo(()=>_e.map((te,Se)=>Hs(Ve[Se]??0,te.paddingLeft,te.paddingRight)),[_e,Ve]),at=c.useMemo(()=>{const te=v===0?1/0:v;return(t??[]).slice(0,te).map((Re,je)=>({id:je,cells:Object.fromEntries(Mn.map(Xe=>[Xe,Re[Xe]??""])),image:Re.image,link:Re.link}))},[t,v]),tt=ae?O??$:at.length,xt=c.useMemo(()=>ae?at.slice(0,tt):at,[at,ae,tt]),qe=ae&&tt<at.length,pt=xt.length>1||qe,Et=[ue?`${l}-divider-top`:"",A||pt?`${l}-divider-bottom`:""].filter(Boolean).join(" "),At=!n||i,_t=()=>{if(!At)return;const te=O??$;if(!T){Y(at.length);return}Y(Math.min(te+T,at.length))},ve=te=>E.scalingValue(te,n??!1),He=f?L??0:V??0,Ue=g??0,nt=m??0,vt=He+nt/2,Ht=Math.max(Ue,Zo),Mt=$a(0,xt.length,ue,A,qe,y??0,n??!1).borderTopWidth,qt=fe!=null?`${fe}px`:`calc(${Mt} + ${ve(vt)})`,on=f?"rowPaddingTopB":"rowPaddingTop",Oe=_e[0],Tt=_e[_e.length-1],bt=Le[0],it=Le[Le.length-1],ft=Oe&&bt?Math.max(bt.paddingLeft,ii):0,Ot=Tt&&it?Math.max(it.paddingRight,ii):0,un=Ke,Ft=te=>{const Se=oe.current;if(!Se)return{x:0,y:0};const Re=Se.getBoundingClientRect();return{x:te.clientX-Re.left+Ca,y:te.clientY-Re.top+Ca}},wn=(te,Se)=>{if(!F)return;const Re=te.image;if(!(Re!=null&&Re.url)){re(null);return}const{x:je,y:Xe}=Ft(Se),et=(I==null?void 0:I.min)??80,Ee=(I==null?void 0:I.max)??320,Lt=(ie==null?void 0:ie.rowId)===te.id?ie.widthPx:kp(et,Ee);re({rowId:te.id,url:Re.url,objectFit:"contain",isVideo:ep(Re),widthPx:Lt,x:je,y:Xe})},Qe=te=>{if(!F||!ie)return;const{x:Se,y:Re}=Ft(te);re(je=>!je||je.x===Se&&je.y===Re?je:{...je,x:Se,y:Re})},Bt=()=>{re(null)},rn=te=>{z&&wa(te,l),F&&re(null)},Me=te=>{z&&Sa(te,l)};c.useLayoutEffect(()=>{if(!p||f){We(null);return}const te=he.current,Se=te==null?void 0:te.parentElement;if(!te||!Se){We(null);return}const Re=()=>{const Xe=te.querySelector("[data-list-row]");if(!Xe){We(null);return}const et=Se.getBoundingClientRect(),Ee=Xe.getBoundingClientRect();We(Ee.top-et.top+Ee.height/2)};Re();const je=new ResizeObserver(Re);return je.observe(te),je.observe(Se),()=>je.disconnect()},[p,f,xt,He,Ue,nt,t,e,_e,Ve,Z,y,ue,A,qe]);const ct=c.useMemo(()=>!f&&Or.some(te=>{const Se=te.charAt(0),Re=e[`${te}VerticalAlign`];return Ws(Re,e,Se)}),[f,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var Lt;const te=oe.current;if(!te)return;const Se=()=>{te.querySelectorAll("[data-list-col]").forEach(yt=>{yt.style.transform="";const St=yt.querySelector(`.${l}-list-col`);St&&(St.style.minHeight="",St.style.height="");const $t=yt.querySelector(`.${l}-list-col-title`);$t&&($t.style.transform="")})};if(f||!ct){Se();return}const Re=()=>{const yt=Array.from(te.querySelectorAll("[data-list-row]")),St=`${l}-list-col`,$t=`${l}-baseline-probe`;yt.forEach(Fe=>{Fe.querySelectorAll("[data-list-col]").forEach(ot=>{ot.style.transform="";const dt=ot.querySelector(`.${St}`);dt&&(dt.style.minHeight="",dt.style.height="");const Ct=ot.querySelector(`.${l}-list-col-title`);Ct&&(Ct.style.transform="")})}),yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]"));gp(Fe,ot,St)}),te.offsetHeight,yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]")),dt=Fe.getBoundingClientRect().top,Ct=new Map,an=ot.map(Ze=>{const Nt=Ze.querySelector(`.${l}-list-col-title`),jt={el:Ze,titleEl:Nt,letter:Ze.getAttribute("data-col-letter")??"",kind:Ze.getAttribute("data-valign")??"top",anchor:Ze.getAttribute("data-valign-anchor")};return Ct.set(jt.letter,jt),jt}),st=new Map,Zt=(Ze,Nt)=>{const jt=st.get(Ze.letter);if(jt!==void 0)return jt;const Sn=Ze.anchor?Ct.get(Ze.anchor):void 0;if(Ze.kind!=="baseline"||!Sn||Nt.has(Ze.letter)){const Cn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Cn),Cn}Nt.add(Ze.letter);const Hn=Zt(Sn,Nt);Nt.delete(Ze.letter);const On=Jo(Ze,dt,St,$t),$n=Hn-On;hp(Ze.titleEl,$n);const Jn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Jn),Jn};an.forEach(Ze=>Zt(Ze,new Set))})};let je=null;const Xe=()=>{je===null&&(je=requestAnimationFrame(()=>{je=null,Re()}))};Re();const et=new ResizeObserver(()=>Xe());et.observe(te);let Ee=!1;return typeof document<"u"&&((Lt=document.fonts)!=null&&Lt.ready)&&document.fonts.ready.then(()=>{Ee||Xe()}),()=>{Ee=!0,je!==null&&(cancelAnimationFrame(je),je=null),et.disconnect(),Se()}},[ct,f,e,t,Z,xt,Ve]);const Rt=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rt}}),r.jsx("div",{style:Be,children:r.jsxs("div",{ref:oe,className:`${l}-wrapper ${Ne}${Et?` ${Et}`:""}${f?` ${l}-type-b`:""}`.trim(),style:{width:E.scalingValue(x??0,n),...!f&&p?{[`--${l}-first-entry-handle-top`]:qt}:{}},onMouseMove:F?Qe:void 0,onMouseLeave:F?Bt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[xt.map((te,Se)=>{var et;const Re=(((et=te.link)==null?void 0:et.length)??0)>0,je=Re&&(!n||i)?"a":"div",Xe=$a(Se,xt.length,ue,A,qe,y??0,n??!1);return r.jsxs(je,{ref:Se===0?Ee=>{he.current=Ee}:void 0,className:`${l}-list-item${Re||R==="always"?` ${l}-list-item-has-link`:""}`,...Re?{href:te.link,target:"_blank"}:{},style:Xe,onMouseEnter:Ee=>{z&&(Re||R==="always")&&wa(Ee,l),F&&wn(te,Ee)},onMouseLeave:Ee=>{z&&(Re||R==="always")&&Sa(Ee,l)},children:[He>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(He)}}),r.jsxs("div",{className:`${l}-list-cols-row${f?"":` ${l}-list-cols-row-h`}${p&&Se===0&&f?` ${l}-list-cols-row-controls`:""}`,...f?{}:{"data-list-row":""},style:f?void 0:{minHeight:ve(nt)},children:[_e.map((Ee,Lt)=>{const yt=Lt===_e.length-1,St=Le[Lt],$t=Ee.paddingBottom,Fe=np(te.cells[Ee.key]),ot=f&&Fe&&$t>0,dt=f?{minHeight:ve(nt)}:{width:ve(Ve[Lt])},Ct=f?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(St.paddingLeft),paddingRight:ve(St.paddingRight)},an=Ee.textPrefix.charAt(0),st=f?lp(e[`${Ee.textPrefix}VerticalAlign`]):sp(e[`${Ee.textPrefix}VerticalAlign`],e,an),Zt=f&&Fe&&p&&Se===0;return r.jsxs("div",{className:f?`${l}-list-col-wrap`:void 0,...f?{}:{"data-list-col":"","data-col-letter":an,"data-valign":st.kind,...st.kind==="baseline"?{"data-valign-anchor":st.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${yt?` ${l}-list-col-last`:""}`,style:{...Ct,...dt,...f?{justifyContent:Ta(st.kind)}:{}},"data-test":Ee.width,children:r.jsx("span",{className:Ea(e,Ee.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La(xo(e,Ee.textPrefix),n),...Pa(e,Ee.textPrefix,l,n),...f?{}:dp(st.kind)},children:te.cells[Ee.key]??null})}),ot&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve($t)}}),Zt&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max($t,Zo))}})]},Ee.key)}),p&&Se===0&&f&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(me),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(me,Ke-me)),width:ve(me),height:"100%"}})]})]}),!f&&Ue>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Ue)}}),p&&Se===0&&!f&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Ht)}})]},te.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":on,"data-controls-static-handle":"",...f?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:f?"center":"left-y",areaStyle:{position:"absolute",top:Mt,left:0,width:"100%",height:ve(Math.max(He,Zo))}})},"row-padding-handles"),p&&!f&&Oe&&Tt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[0]-((bt==null?void 0:bt.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(ft),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Tt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[_e.length-1]-((it==null?void 0:it.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(un-Ot),width:ve(Ot),height:"100%"}})]},"column-edge-padding-handles"),p&&!f&&_e.slice(0,-1).map((te,Se)=>{const Re=_e[Se+1],je=ke.slice(0,Se+1).reduce((yt,St)=>yt+St,0),Xe=Le[Se],et=Le[Se+1],Ee=Math.max(Xe.paddingRight,ii),Lt=Math.max(et.paddingLeft,ii);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se]-Xe.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je-Ee),width:ve(Ee),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Re.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se+1]-et.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je),width:ve(Lt),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!f&&_e.slice(0,-1).map((te,Se)=>{const Re=Rp(Se,ke,de,Ke),Xe=ke.slice(0,Se+1).reduce((et,Ee)=>et+Ee,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Xe),width:ve(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),qe&&(()=>{const te=xo(e,yn),Se=up(e.cutLabelVerticalAlign),Re=te.textTextAlign==="justify"||f;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ve(S??0),cursor:At?"pointer":"default",...ip(A,y??0,n??!1)},onClick:At?_t:void 0,onMouseEnter:z||F?rn:void 0,onMouseLeave:z?Me:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...f?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:pp(te.textTextAlign),alignItems:Ta(Se)},children:r.jsx("span",{className:Ea(e,yn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(te,n),...Pa(e,yn,l,n),...Re?{width:"100%"}:{}},children:M})})})})(),F&&ie&&(()=>{const te=co(ie.widthPx),Se={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:ie.x,top:ie.y,position:"absolute"};return r.jsx(tp,{media:ie,className:ie.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:Se},`${ie.rowId}-${ie.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
5448
|
+
`}const Mn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Br=[...Or,yn],Mo=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Mo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Mo.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function _i(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Mo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?_i(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of Mo){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=_i(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(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(),s=o-i;return n.remove(),s}function Jo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function xo(e,t){const n=i=>{const o=Je(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===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(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 Xt(kt(n,t))}function Ea(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((s-a)/2,i)}}const Yt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ii=.004,Zo=ii,zr=50,Ai=1440,Ri=zr/Ai;function Fs(e){const t=typeof e=="number"&&e>0?e:Ai;return zr/t}function Sp(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 Ai}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Si(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Yt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(gi.map(e=>[e,0]))}function Ji(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Ri,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function uo(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=Yt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Ri;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Ri;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Yt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function _a(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Mn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Yt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Yt[l],u=pi[l],w=mi[l],x=gi[l],v=Yt[a],m=pi[a],y=mi[a],P=gi[a],$=n[p],T=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof T=="number"&&(s[m]=T),typeof S=="number"&&(s[y]=S),typeof M=="number"&&(s[P]=M)}return s}function Os(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 _p(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Si(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of gi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Os(e,a)?a:e}function Ap(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Si(e),l=Si(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Mn.length,w=S=>{if(p)return S;const M=Ji({...t,...S}),I=Si(S),W=uo(u,I,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=_a(e),v=_a(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=Ji({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=Ji({...t,...e}),y=uo(u,l,Ji(t)),$=uo(u,d,m).some((S,M)=>S<(y[M]??S)),T=Yt.some(S=>{const M=e[S],I=t[S];return typeof M=="number"&&typeof I=="number"&&M!==I});return $||T?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Ri,i-o-s-Ri)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Qo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=pi[d],p=mi[d],u=gi[d];return{key:a,textPrefix:fp[a],widthKey:Yt[d],width:n[Yt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=E.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:y,showVisibility:P,cut:$,showCut:T,cutCellMinHeight:S,cutLabel:M,imageSize:I,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:L,columnsOrder:A,textPaddingLR:H,textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[O,Y]=c.useState(void 0),[ie,re]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,f=w==="b",oe=c.useRef(null),he=c.useRef(null),[fe,We]=c.useState(null),[Z,ce]=c.useState(Ai),G=Fs(Z),B=Math.max(0,((x??0)-G)/2),N=Math.min(H??0,B),me=Math.max(N,ii),Ce=((x??0)+G)/2;c.useLayoutEffect(()=>{if(!n){ce(Ai);return}const te=()=>{ce(Sp(oe.current))};te();const Se=oe.current;if(!Se)return;const Re=new ResizeObserver(te);Re.observe(Se);let je=Se;for(;je&&!je.style.getPropertyValue("--cntrl-article-width");)je=je.parentElement;return je&&Re.observe(je),()=>Re.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,T,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Be=E.buildColorVars(l,{textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),_e=s&&s!=="default"?`${l}-state-${s}`:"",Ne=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${_e}`.trim(),z=b==="reveal"&&(!n||i),ue=(P==null?void 0:P[0])??!1,_=(P==null?void 0:P[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const te=J.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){J.current=e;return}const Re=Ap(e,te,{designWidth:Z});J.current=e,Os(e,Re)&&d(Re)},[e,d,n,a,Z]);const ee=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Qo(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=c.useMemo(()=>Qo(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Qo(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ie=c.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Mn],[A]),Ae=c.useMemo(()=>Wp(Ie,u,ee,ge,we,De),[Ie,u,ee,ge,we,De]),Ke=Si(e),de=c.useMemo(()=>Yt.slice(0,u).map(te=>ee[te]),[u,ee]),ke=c.useMemo(()=>Vr(u,Ke,ee),[u,Ke,ee]),Ve=c.useMemo(()=>uo(u,Ke,ee),[u,Ke,ee]),Le=c.useMemo(()=>Ae.map((te,Se)=>Hs(Ve[Se]??0,te.paddingLeft,te.paddingRight)),[Ae,Ve]),at=c.useMemo(()=>{const te=v===0?1/0:v;return(t??[]).slice(0,te).map((Re,je)=>({id:je,cells:Object.fromEntries(Mn.map(Xe=>[Xe,Re[Xe]??""])),image:Re.image,link:Re.link}))},[t,v]),tt=ae?O??$:at.length,xt=c.useMemo(()=>ae?at.slice(0,tt):at,[at,ae,tt]),qe=ae&&tt<at.length,pt=xt.length>1||qe,Et=[ue?`${l}-divider-top`:"",_||pt?`${l}-divider-bottom`:""].filter(Boolean).join(" "),_t=!n||i,At=()=>{if(!_t)return;const te=O??$;if(!T){Y(at.length);return}Y(Math.min(te+T,at.length))},ve=te=>E.scalingValue(te,n??!1),He=f?L??0:V??0,Ue=g??0,nt=m??0,vt=He+nt/2,Ht=Math.max(Ue,Zo),Mt=$a(0,xt.length,ue,_,qe,y??0,n??!1).borderTopWidth,qt=fe!=null?`${fe}px`:`calc(${Mt} + ${ve(vt)})`,on=f?"rowPaddingTopB":"rowPaddingTop",Oe=Ae[0],Tt=Ae[Ae.length-1],bt=Le[0],it=Le[Le.length-1],ft=Oe&&bt?Math.max(bt.paddingLeft,ii):0,Ot=Tt&&it?Math.max(it.paddingRight,ii):0,un=Ke,Ft=te=>{const Se=oe.current;if(!Se)return{x:0,y:0};const Re=Se.getBoundingClientRect();return{x:te.clientX-Re.left+Ca,y:te.clientY-Re.top+Ca}},wn=(te,Se)=>{if(!F)return;const Re=te.image;if(!(Re!=null&&Re.url)){re(null);return}const{x:je,y:Xe}=Ft(Se),et=(I==null?void 0:I.min)??80,Ee=(I==null?void 0:I.max)??320,Lt=(ie==null?void 0:ie.rowId)===te.id?ie.widthPx:kp(et,Ee);re({rowId:te.id,url:Re.url,objectFit:"contain",isVideo:ep(Re),widthPx:Lt,x:je,y:Xe})},Qe=te=>{if(!F||!ie)return;const{x:Se,y:Re}=Ft(te);re(je=>!je||je.x===Se&&je.y===Re?je:{...je,x:Se,y:Re})},Bt=()=>{re(null)},rn=te=>{z&&wa(te,l),F&&re(null)},Me=te=>{z&&Sa(te,l)};c.useLayoutEffect(()=>{if(!p||f){We(null);return}const te=he.current,Se=te==null?void 0:te.parentElement;if(!te||!Se){We(null);return}const Re=()=>{const Xe=te.querySelector("[data-list-row]");if(!Xe){We(null);return}const et=Se.getBoundingClientRect(),Ee=Xe.getBoundingClientRect();We(Ee.top-et.top+Ee.height/2)};Re();const je=new ResizeObserver(Re);return je.observe(te),je.observe(Se),()=>je.disconnect()},[p,f,xt,He,Ue,nt,t,e,Ae,Ve,Z,y,ue,_,qe]);const ct=c.useMemo(()=>!f&&Or.some(te=>{const Se=te.charAt(0),Re=e[`${te}VerticalAlign`];return Ws(Re,e,Se)}),[f,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var Lt;const te=oe.current;if(!te)return;const Se=()=>{te.querySelectorAll("[data-list-col]").forEach(yt=>{yt.style.transform="";const St=yt.querySelector(`.${l}-list-col`);St&&(St.style.minHeight="",St.style.height="");const $t=yt.querySelector(`.${l}-list-col-title`);$t&&($t.style.transform="")})};if(f||!ct){Se();return}const Re=()=>{const yt=Array.from(te.querySelectorAll("[data-list-row]")),St=`${l}-list-col`,$t=`${l}-baseline-probe`;yt.forEach(Fe=>{Fe.querySelectorAll("[data-list-col]").forEach(ot=>{ot.style.transform="";const dt=ot.querySelector(`.${St}`);dt&&(dt.style.minHeight="",dt.style.height="");const Ct=ot.querySelector(`.${l}-list-col-title`);Ct&&(Ct.style.transform="")})}),yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]"));gp(Fe,ot,St)}),te.offsetHeight,yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]")),dt=Fe.getBoundingClientRect().top,Ct=new Map,an=ot.map(Ze=>{const Nt=Ze.querySelector(`.${l}-list-col-title`),jt={el:Ze,titleEl:Nt,letter:Ze.getAttribute("data-col-letter")??"",kind:Ze.getAttribute("data-valign")??"top",anchor:Ze.getAttribute("data-valign-anchor")};return Ct.set(jt.letter,jt),jt}),st=new Map,Zt=(Ze,Nt)=>{const jt=st.get(Ze.letter);if(jt!==void 0)return jt;const Sn=Ze.anchor?Ct.get(Ze.anchor):void 0;if(Ze.kind!=="baseline"||!Sn||Nt.has(Ze.letter)){const Cn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Cn),Cn}Nt.add(Ze.letter);const Hn=Zt(Sn,Nt);Nt.delete(Ze.letter);const On=Jo(Ze,dt,St,$t),$n=Hn-On;hp(Ze.titleEl,$n);const Jn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Jn),Jn};an.forEach(Ze=>Zt(Ze,new Set))})};let je=null;const Xe=()=>{je===null&&(je=requestAnimationFrame(()=>{je=null,Re()}))};Re();const et=new ResizeObserver(()=>Xe());et.observe(te);let Ee=!1;return typeof document<"u"&&((Lt=document.fonts)!=null&&Lt.ready)&&document.fonts.ready.then(()=>{Ee||Xe()}),()=>{Ee=!0,je!==null&&(cancelAnimationFrame(je),je=null),et.disconnect(),Se()}},[ct,f,e,t,Z,xt,Ve]);const Rt=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rt}}),r.jsx("div",{style:Be,children:r.jsxs("div",{ref:oe,className:`${l}-wrapper ${Ne}${Et?` ${Et}`:""}${f?` ${l}-type-b`:""}`.trim(),style:{width:E.scalingValue(x??0,n),...!f&&p?{[`--${l}-first-entry-handle-top`]:qt}:{}},onMouseMove:F?Qe:void 0,onMouseLeave:F?Bt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[xt.map((te,Se)=>{var et;const Re=(((et=te.link)==null?void 0:et.length)??0)>0,je=Re&&(!n||i)?"a":"div",Xe=$a(Se,xt.length,ue,_,qe,y??0,n??!1);return r.jsxs(je,{ref:Se===0?Ee=>{he.current=Ee}:void 0,className:`${l}-list-item${Re||R==="always"?` ${l}-list-item-has-link`:""}`,...Re?{href:te.link,target:"_blank"}:{},style:Xe,onMouseEnter:Ee=>{z&&(Re||R==="always")&&wa(Ee,l),F&&wn(te,Ee)},onMouseLeave:Ee=>{z&&(Re||R==="always")&&Sa(Ee,l)},children:[He>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(He)}}),r.jsxs("div",{className:`${l}-list-cols-row${f?"":` ${l}-list-cols-row-h`}${p&&Se===0&&f?` ${l}-list-cols-row-controls`:""}`,...f?{}:{"data-list-row":""},style:f?void 0:{minHeight:ve(nt)},children:[Ae.map((Ee,Lt)=>{const yt=Lt===Ae.length-1,St=Le[Lt],$t=Ee.paddingBottom,Fe=np(te.cells[Ee.key]),ot=f&&Fe&&$t>0,dt=f?{minHeight:ve(nt)}:{width:ve(Ve[Lt])},Ct=f?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(St.paddingLeft),paddingRight:ve(St.paddingRight)},an=Ee.textPrefix.charAt(0),st=f?lp(e[`${Ee.textPrefix}VerticalAlign`]):sp(e[`${Ee.textPrefix}VerticalAlign`],e,an),Zt=f&&Fe&&p&&Se===0;return r.jsxs("div",{className:f?`${l}-list-col-wrap`:void 0,...f?{}:{"data-list-col":"","data-col-letter":an,"data-valign":st.kind,...st.kind==="baseline"?{"data-valign-anchor":st.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${yt?` ${l}-list-col-last`:""}`,style:{...Ct,...dt,...f?{justifyContent:Ta(st.kind)}:{}},"data-test":Ee.width,children:r.jsx("span",{className:Ea(e,Ee.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La(xo(e,Ee.textPrefix),n),...Pa(e,Ee.textPrefix,l,n),...f?{}:dp(st.kind)},children:te.cells[Ee.key]??null})}),ot&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve($t)}}),Zt&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max($t,Zo))}})]},Ee.key)}),p&&Se===0&&f&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(me),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(me,Ke-me)),width:ve(me),height:"100%"}})]})]}),!f&&Ue>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Ue)}}),p&&Se===0&&!f&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Ht)}})]},te.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":on,"data-controls-static-handle":"",...f?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:f?"center":"left-y",areaStyle:{position:"absolute",top:Mt,left:0,width:"100%",height:ve(Math.max(He,Zo))}})},"row-padding-handles"),p&&!f&&Oe&&Tt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[0]-((bt==null?void 0:bt.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(ft),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Tt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[Ae.length-1]-((it==null?void 0:it.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(un-Ot),width:ve(Ot),height:"100%"}})]},"column-edge-padding-handles"),p&&!f&&Ae.slice(0,-1).map((te,Se)=>{const Re=Ae[Se+1],je=ke.slice(0,Se+1).reduce((yt,St)=>yt+St,0),Xe=Le[Se],et=Le[Se+1],Ee=Math.max(Xe.paddingRight,ii),Lt=Math.max(et.paddingLeft,ii);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se]-Xe.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je-Ee),width:ve(Ee),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Re.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se+1]-et.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je),width:ve(Lt),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!f&&Ae.slice(0,-1).map((te,Se)=>{const Re=Rp(Se,ke,de,Ke),Xe=ke.slice(0,Se+1).reduce((et,Ee)=>et+Ee,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Xe),width:ve(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),qe&&(()=>{const te=xo(e,yn),Se=up(e.cutLabelVerticalAlign),Re=te.textTextAlign==="justify"||f;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ve(S??0),cursor:_t?"pointer":"default",...ip(_,y??0,n??!1)},onClick:_t?At:void 0,onMouseEnter:z||F?rn:void 0,onMouseLeave:z?Me:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...f?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:pp(te.textTextAlign),alignItems:Ta(Se)},children:r.jsx("span",{className:Ea(e,yn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(te,n),...Pa(e,yn,l,n),...Re?{width:"100%"}:{}},children:M})})})})(),F&&ie&&(()=>{const te=co(ie.widthPx),Se={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:ie.x,top:ie.y,position:"absolute"};return r.jsx(tp,{media:ie,className:ie.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:Se},`${ie.rowId}-${ie.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
5449
5449
|
import { CommonComponentProps } from '../props';
|
|
5450
5450
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
5451
5451
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -8402,7 +8402,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8402
8402
|
</>
|
|
8403
8403
|
);
|
|
8404
8404
|
}
|
|
8405
|
-
`,bi=["A","B","C","D","E"],_a=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Zi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Op(){return Object.fromEntries(bi.map((e,t)=>{const n=Mn[t],i=`${e} column`;return[n,Hp(i)]}))}function Bp(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=Zi(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Zi(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Zi(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Zi(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Mn]};for(const s of bi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[..._a],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[..._a]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function po(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=po(),Up=bp();function Bs(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=Mn[n],o=Bs(t);for(let s=1;s<Mn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Bs(yn);const Yp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Vn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Vn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Vn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Vn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Vn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Vn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Vn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Vn[6],link:""}],Zp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Op(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bp(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...po({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...po({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...po({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ap(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,Pn=.004,tm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}function om(e){return`
|
|
8405
|
+
`,bi=["A","B","C","D","E"],Aa=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Zi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Op(){return Object.fromEntries(bi.map((e,t)=>{const n=Mn[t],i=`${e} column`;return[n,Hp(i)]}))}function Bp(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=Zi(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Zi(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Zi(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Zi(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Mn]};for(const s of bi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Aa],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Aa]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function po(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=po(),Up=bp();function Bs(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=Mn[n],o=Bs(t);for(let s=1;s<Mn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Bs(yn);const Yp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Vn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Vn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Vn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Vn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Vn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Vn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Vn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Vn[6],link:""}],Zp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Op(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bp(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...po({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...po({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...po({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>_p(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,Pn=.004,tm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}function om(e){return`
|
|
8406
8406
|
.${e}-wrapper {
|
|
8407
8407
|
box-sizing: border-box;
|
|
8408
8408
|
display: flex;
|
|
@@ -8595,7 +8595,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8595
8595
|
left: 20px;
|
|
8596
8596
|
transform: translateY(-50%);
|
|
8597
8597
|
}
|
|
8598
|
-
`}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=E.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:y=.00833,iconPaddingRight:P=0,iconAnimation:$="rotate 45",questionColor:T="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:I="#000000",questionHoverColor:W="#666666",iconHoverColor:b="#666666",iconActiveColor:R="#000000",dividerHoverColor:V="#000000",questionFontFamily:g,questionFontSettings:L,questionFontSize:
|
|
8598
|
+
`}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=E.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:y=.00833,iconPaddingRight:P=0,iconAnimation:$="rotate 45",questionColor:T="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:I="#000000",questionHoverColor:W="#666666",iconHoverColor:b="#666666",iconActiveColor:R="#000000",dividerHoverColor:V="#000000",questionFontFamily:g,questionFontSettings:L,questionFontSize:A,questionLineHeight:H,questionLetterSpacing:U,questionWordSpacing:se,questionTextAppearance:j,answerFontFamily:k,answerFontSettings:X,answerFontSize:q,answerLineHeight:O,answerLetterSpacing:Y,answerWordSpacing:ie,answerTextAppearance:re,questionPaddingLeft:F=0,questionPaddingTop:ae=0,questionPaddingBottom:f=0,answerPaddingLeft:oe=0,answerPaddingRight:he=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,Z=t??[],[ce,G]=c.useState(()=>new Set),B=!n||i;c.useEffect(()=>{G(new Set)},[v]),c.useEffect(()=>{n&&!o&&!i&&G(new Set)},[n,o,i]);const N=ve=>E.scalingValue(ve,n??!1),me=Math.max(F,Pn),Ce=Math.max(ae,Pn),Be=Math.max(f,Pn),_e=Math.max(oe,Pn),Te=Math.max(he,Pn),Ne=Math.max(fe,Pn),z=Math.max(We,Pn),ue=Math.max(0,(l??1)-P-y),_=Math.max(0,(l??1)-he),J=Math.max(0,(l??1)-oe),D=Math.max(P,Pn),ee=Math.max(0,(l??1)-F-y),ge=c.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),we=c.useCallback(ve=>ce.has(ve),[ce]),De=B&&x==="default"?`${a}-entry-hover-default`:"",Ie=m??"",Ae=Ie!=="",Ke=$.replace(/^rotate /,""),de=`${a}-icon-anim-${Ke}`,ke=Xt(kt(Na(g,L,A,H,U,se,j,T),n)),Ve=Xt(kt(Na(k,X,q,O,Y,ie,re,S),n)),Le=Wa(A,H,`${a}-question`,`${a}-text-tight-leading`),at=Wa(q,O,`${a}-answer-text`,`${a}-text-tight-leading`),tt=Fa(A,H,a,n),xt=Fa(q,O,a,n),qe=E.buildColorVars(a,{questionColor:T,answerColor:S,dividerColor:M,iconColor:I,questionHoverColor:W,iconHoverColor:b,iconActiveColor:R,dividerHoverColor:V},tm,nm),pt=s&&s!=="default"?`${a}-state-${s}`:"",Et=c.useCallback(ve=>{B&&G(He=>{if(He.has(ve)){const nt=new Set(He);return nt.delete(ve),nt}if(v==="on")return new Set([ve]);const Ue=new Set(He);return Ue.add(ve),Ue})},[B,v]),_t=c.useMemo(()=>om(a),[a]),At={[`--${a}-divider-width`]:E.scalingValue(u,n??!1),[`--${a}-divider-style`]:w,[`--${a}-icon-max-width`]:E.scalingValue(y,n??!1),...p>0?{[`--${a}-question-min-height`]:E.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_t}}),r.jsx("div",{style:qe,children:r.jsx("div",{className:Ge(`${a}-wrapper`,n&&!i&&`${a}-editor`,De,pt),style:{width:E.scalingValue(l,n??!1),maxWidth:"100%",...At},children:Z.map((ve,He)=>{var qt;const Ue=we(He),nt=((qt=ve.question)==null?void 0:qt.trim())??"",vt=ve.answer,Ht=((vt==null?void 0:vt.length)??0)>0,Mt=d&&He===ge;return r.jsxs("div",{className:Ge(`${a}-item`,Ue&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Mt&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Ce),zIndex:2}}),r.jsx(Wt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ue),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(me),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(D),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ue,style:{...ke,...tt,paddingLeft:N(F),paddingRight:N(P)},onClick:()=>Et(He),children:[ae>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Le,children:nt}),Ht&&(Ae?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(tn,{url:Ie,fill:I,hoverFill:b,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${de}`,"aria-hidden":"true"}))]}),f>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(f)},"aria-hidden":"true"})]}),Mt&&r.jsx(Wt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(Be),zIndex:2}})]}),Ht&&vt&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ue,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Mt&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Ne),zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(_e),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(Te),height:"100%",zIndex:2}})]}),fe>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(fe)}}),r.jsx("div",{className:`${a}-answer`,style:{...Ve,...xt,paddingLeft:N(oe),paddingRight:N(he)},children:r.jsx("div",{className:at,children:r.jsx(ui,{content:vt})})}),We>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(We)}}),Mt&&r.jsx(Wt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(z),zIndex:2}})]})})})]},He)})})})]})}const am=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8599
8599
|
import cn from 'classnames';
|
|
8600
8600
|
import { CommonComponentProps } from '../props';
|
|
8601
8601
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -9392,7 +9392,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9392
9392
|
</>
|
|
9393
9393
|
);
|
|
9394
9394
|
}
|
|
9395
|
-
`;function In(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:In("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:{...Ha.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:{...Ha.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:In("Question Padding Left"),questionPaddingTop:In("Question Padding Top"),questionPaddingBottom:In("Question Padding Bottom"),answerPaddingLeft:In("Answer Padding Left"),answerPaddingRight:In("Answer Padding Right"),answerPaddingTop:In("Answer Padding Top"),answerPaddingBottom:In("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,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"}]},schema:lm,sourceCode:am},vn=e=>e.display==="cover",Wo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Oa=100,dm=.2,Ba=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Oa:Math.max(Oa,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const L=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-g/L*.12);return`translateY(${g}px) scale(${_})`},[]),m=c.useCallback(()=>{l.current=null},[]),y=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),P=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),T=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const _=g.clientX-L.startX,H=g.clientY-L.startY;if(L.isLocked===null){if(Math.abs(_)<Ba&&Math.abs(H)<Ba)return;if(H>0&&H>Math.abs(_))L.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;g.preventDefault();const U=Math.max(0,H);p.current=U,s(U)},[e,m]),S=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const _=L.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!_){m();return}g.clientY-L.startY>=u?P():y()},[u,P,e,m,y]),M=c.useCallback(g=>{S(g)},[S]),I=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:T,onPointerUp:M,onPointerCancel:I}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,y)=>{mm(t),e.scrollLeft=m,y&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),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(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},si=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,mo=50,xm=2,wm=16,Sm=.05,$m=1,ja=.5,Cm=20,Qn=.004,zi=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},er=e=>`max(${e}, ${Cm}px)`,Pm=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]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},mt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Am=e=>[mt(e,"fontFamily"),mt(e,"fontSettings"),{type:"row",items:[mt(e,"fontSize"),mt(e,"lineHeight"),mt(e,"letterSpacing"),mt(e,"wordSpacing")]},mt(e,"textAlign"),mt(e,"textAppearance")],_m=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(zi.map(e=>[Tm[e],Am(e)]))}),Dr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Dr(e,t),Qi=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Dr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},tr=(e,t)=>{const n=i=>{const o=mt(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[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),nr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:P,thumbnailObjectFit:$,thumbnailActive:T,thumbnailActiveColor:S,title1Width:M,title2Width:I,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:L="desktop",contentMarginTop:_,iconMarginLeft:H}=n,U=h=>E.scalingValue(h,i??!1),se=U(l),j=U(p??.02),k=U(u??0),X=U(_??0),q=U(H??0),{title1:O,title2:Y,title3:ie}=Im(t),re=nr("title1",tr(n,"title1"),i),F=nr("title2",tr(n,"title2"),i),ae=nr("title3",tr(n,"title3"),i),f=L==="mobile",oe=!o&&(!i||s),he=oe,fe=oe,We=oe,Z=vn($),ce=Z?{"--image-aspect-ratio":Wo($)}:void 0,G=!!(O||Y||ie),B=c.useMemo(()=>Rm(e,O,Y,ie,re,F,ae),[e,O,Y,ie,re,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:I,title3Width:W}),[M,I,W]),me=c.useMemo(()=>B.map(h=>N[h.widthKey]),[B,N]),Ce=c.useMemo(()=>Dr(B.length,me),[B.length,me]),Be=c.useMemo(()=>Vs(B.length,me),[B.length,me]),Ae=c.useMemo(()=>B.filter(h=>h.prefix==="title1"),[B]),Te=c.useMemo(()=>B.filter(h=>h.prefix==="title2"||h.prefix==="title3"),[B]),Ne=c.useMemo(()=>za(Ae,N),[Ae,N]),z=c.useMemo(()=>za(Te,N),[Te,N]),ue=c.useCallback((h,K)=>{const Q=B.indexOf(h);if(!f||K==="single-row")return{effectiveWidth:Be[Q]??0,resolvedWidth:Ce[Q]??0,maxWidth:Qi(Q,Ce)};if(K==="two-row-top"){const ye=Ae.indexOf(h);return{effectiveWidth:Ne.effective[ye]??0,resolvedWidth:Ne.resolved[ye]??0,maxWidth:Qi(ye,Ne.resolved)}}const le=Te.indexOf(h);return{effectiveWidth:z.effective[le]??0,resolvedWidth:z.resolved[le]??0,maxWidth:Qi(le,z.resolved)}},[Te,z,Be,Ce,B,Ae,Ne,f]),A=c.useCallback(h=>E.scalingValue(h,i??!1),[i]),J=A(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),ee=c.useCallback(h=>B.slice(0,h+1).reduce((K,Q,le)=>K+(Q!=null&&Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(Ce[le]??0),0)+(f?0:b??0),[B,D,Ce,f,b]),ge=c.useCallback(()=>f?0:b??0,[f,b]),we=c.useCallback(h=>Te.slice(0,h).reduce((K,Q,le)=>K+(Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(z.resolved[le]??0),0),[Te,z.resolved,D]),De=c.useCallback(h=>{const K=Te[h];return we(h)+(K.marginLeftKey?D[K.marginLeftKey]??0:0)+(z.resolved[h]??0)},[Te,z.resolved,we,D]),Ie=(h,K)=>{const Q=h.marginLeftKey?D[h.marginLeftKey]??0:0,{effectiveWidth:le,resolvedWidth:ye,maxWidth:rt}=ue(h,K),Pt=o&&K==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":h.prefix,style:{...K==="single-row"?{gridArea:h.prefix}:{},width:A(le),...Q>0?{marginLeft:A(Q)}:{}},children:[r.jsx("p",{className:h.className,style:h.style,children:h.text}),Pt&&h.marginLeftKey&&r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(-Q),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Pt&&r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A(-Qn/2),width:A(Qn),height:"100%",pointerEvents:"auto"}})]},h.className)},_e=()=>{const h=f?-1:B.findIndex(le=>le.prefix==="title1"),K=!f&&(o||(b??0)>0)?(()=>{const le=b??0,ye=h>=0?Ce[h]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:`max(${A(le)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Q=B.flatMap((le,ye)=>{if(!le.marginLeftKey)return[];const rt=D[le.marginLeftKey]??0,Pt=km(B,Ce,D,ye)+ge();return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce[ye]),style:{position:"absolute",top:0,left:A(Pt),width:`max(${A(rt)}, 10px)`,height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return K?[K,...Q]:Q},Ke=()=>B.map((h,K)=>{const Q=Qi(K,Ce),ye=ee(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),de=()=>Te.flatMap((h,K)=>{if(!h.marginLeftKey)return[];const Q=D[h.marginLeftKey]??0,le=we(K),{resolvedWidth:ye}=ue(h,"two-row-bottom");return r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(le),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}},h.marginLeftKey)}),ke=()=>Te.map((h,K)=>{const{maxWidth:Q}=ue(h,"two-row-bottom"),ye=De(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),Ve=c.useRef(null),Le=c.useRef(null),at=c.useRef(null),tt=c.useRef([]),xt=c.useRef(0),qe=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),pt=c.useRef(null),Et=c.useRef(null),At=c.useRef(0),_t=c.useRef("forward"),ve=c.useRef(0),He=c.useRef(null),Ue=c.useRef(!1),nt=c.useRef(null),vt=t.length>1&&(!o||!!s),Ht=vt?3:1,Mt=c.useMemo(()=>Array.from({length:Ht},()=>t).flat(),[t,Ht]),[qt,on]=c.useState(!1),[Oe,Tt]=c.useState(!1),[bt,it]=c.useState(!0),[ft,Ot]=c.useState(0),un=c.useRef(ft);un.current=ft;const Ft=c.useRef(null),wn=c.useRef(!1),Qe=c.useRef(null),Bt=c.useRef(null),rn=he&&!bt,Me=c.useCallback(()=>{he&&(it(!0),Bt.current&&clearTimeout(Bt.current),Bt.current=setTimeout(()=>{qe.current.isActive||it(!1)},bm))},[he]),ct=c.useCallback(()=>{o||wn.current||(wn.current=!0,Tt(!1),Qe.current=setTimeout(()=>{a()},si))},[o,a]),Rt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:E.scalingValue(x??0,i),height:E.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ct,"aria-label":"Close",children:r.jsx(tn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),te=(h="two-row")=>r.jsx("div",{...h==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:A(b??0),flexShrink:0,...h==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...h==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Se=()=>{const h=B.find(le=>le.prefix==="title1"),K=B.filter(le=>le.prefix==="title2"||le.prefix==="title3"),Q=K.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?te():null,h&&Ie(h,"two-row-top"),w&&Rt()]}),Q?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[K.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[K.map(le=>Ie(le,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[de(),ke()]})]}):null,r.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:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Re=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?te("single-row"):null,B.map(h=>Ie(h,"single-row")),o?r.jsxs(r.Fragment,{children:[_e(),Ke()]}):null,w?Rt():null]}),je=c.useCallback(h=>!!(h.closest("[data-controls]")||h.closest(`.${e}-thumbnails`)||h.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Xe,backdropStyle:et,mediaAreaStyle:Ee,overlayContentStyle:Lt,swipeHandlers:yt,dismissAreaStyle:St}=js({enabled:oe??!1,onClose:ct,animMs:si,isBlockedTarget:je}),$t=()=>{if(!vt||t.length===0)return xt.current=0,0;const h=tt.current[0],K=tt.current[t.length];if(!h||!K)return xt.current;const Q=K.offsetLeft-h.offsetLeft;return Q>0&&(xt.current=Q),xt.current},Fe=(h=!1)=>{if(!vt)return;const K=Le.current,Q=$t();!K||Q<=0||(K.scrollLeft<=0?(K.scrollLeft+=Q,h&&(qe.current.scrollLeft+=Q),Ue.current&&(ve.current+=Q)):K.scrollLeft>=Q*2&&(K.scrollLeft-=Q,h&&(qe.current.scrollLeft-=Q),Ue.current&&(ve.current-=Q)))},ot=(h=(K=>(K=Le.current)==null?void 0:K.scrollLeft)()??0)=>{var Pt;const Q=((Pt=Le.current)==null?void 0:Pt.clientWidth)??0,le=h+Q/2;let ye=-1,rt={flatIndex:0,distance:1/0};return tt.current.forEach((C,ne)=>{if(!C)return;const $e=C.offsetLeft,be=$e+C.offsetWidth;ye===-1&&le>=$e&&le<be&&(ye=ne);const xe=Math.abs($e-h);xe<rt.distance&&(rt={flatIndex:ne,distance:xe})}),ye!==-1?ye:rt.flatIndex},dt=h=>{const K=Le.current;return!h||!K?!1:h.offsetWidth>K.clientWidth+1},Ct=h=>{Le.current&&tt.current.forEach(K=>{K&&(K.style.scrollSnapAlign=dt(K)&&h==="backward"?"end":"start")})},an=h=>{const K=Le.current;if(!h||!K||!dt(h))return!1;const Q=h.offsetLeft,le=Q+h.offsetWidth;return K.scrollLeft>=Q-1&&K.scrollLeft+K.clientWidth<=le+1},st=()=>{!Le.current||t.length===0||Ft.current===null&&Ot(ot()%t.length)},Zt=()=>{Ft.current=null;const h=Le.current;h&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"L",location:"LightboxOverlay.tsx:releaseActiveIndexLock",message:"index lock released",data:{scrollLeft:h.scrollLeft,nearestIndex:ot()%t.length,activeIndex:un.current},timestamp:Date.now()})}).catch(()=>{})},Ze=h=>{const K=Le.current;K&&(K.style.scrollSnapType=h?"":"none")},Nt=()=>{var h;(h=Et.current)==null||h.call(Et),Et.current=null},jt=()=>{He.current!==null&&(cancelAnimationFrame(He.current),He.current=null),Ue.current=!1},Sn=()=>{const h=Le.current;if(!h){He.current=null,Ue.current=!1;return}const K=ve.current-h.scrollLeft;if(Math.abs(K)<.5){h.scrollLeft=ve.current,Fe(),st(),He.current=null,Ue.current=!1;return}h.scrollLeft+=K*Sm,Fe(),st(),Me(),He.current=requestAnimationFrame(Sn)},Hn=()=>{const h=at.current;h&&(h.style.transition="",h.style.transform="",h.style.willChange="")},On=(h,K,Q,le)=>{Hn(),h.scrollLeft=K,At.current=h.scrollLeft,Fe(),Q!==void 0?Ot(Q):st();const ye=Q??ot()%t.length,rt=ot()%t.length;fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"K",location:"LightboxOverlay.tsx:finishStripScroll",message:"scroll settled",data:{targetLeft:K,scrollLeft:h.scrollLeft,intendedIndex:ye,actualIndex:rt,indexMismatch:ye!==rt},timestamp:Date.now()})}).catch(()=>{}),Ze(!0),le==null||le()},$n=(h,{behavior:K="smooth",activeIndex:Q,onComplete:le}={})=>{const ye=Le.current,rt=at.current;if(!ye||!rt)return;if(jt(),Nt(),Ze(!1),K==="auto"){On(ye,h,Q,le);return}const Pt=Math.abs(h-ye.scrollLeft),C=pm(Pt,fm,ym,ye.clientWidth*.55);Et.current=hm(ye,rt,h,{duration:C,easing:vm,onComplete:()=>{Et.current=null,On(ye,h,Q,le)}})},Jn=(h="smooth")=>{if(!Le.current||t.length===0)return;const Q=ot(),le=tt.current[Q];le&&$n(le.offsetLeft,{behavior:h,activeIndex:Q%t.length})},Cn=(h,K="smooth")=>{const Q=Le.current;if(!Q||t.length===0)return;const le=Q.scrollLeft-h,ye=ot(h),rt=tt.current[ye];if(an(rt)){Ze(!0),st();return}const Pt=tt.current[ye+1],C=rt?Pt?Pt.offsetLeft-rt.offsetLeft:rt.offsetWidth:0,ne=C>0?le>C*ja?1:le<-C*ja?-1:0:0,$e=vt?ye+ne:Math.max(0,Math.min(Mt.length-1,ye+ne)),be=tt.current[$e];if(!be){Jn(K);return}const lt=le<0&&dt(be)?be.offsetLeft+be.offsetWidth-Q.clientWidth:be.offsetLeft,ut=$e%t.length,Ye=ot(Q.scrollLeft);fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"B_J",location:"LightboxOverlay.tsx:snapAfterDrag",message:"drag snap decision",data:{startScrollLeft:h,scrollLeft:Q.scrollLeft,scrollDelta:le,startFlatIndex:ye,endFlatIndex:Ye,scrollAdjustment:ne,targetFlatIndex:$e,startIndex:ye%t.length,endIndex:Ye%t.length,targetIndex:ut,indexDelta:ut-ye%t.length,endMinusStart:Ye-ye},timestamp:Date.now()})}).catch(()=>{}),K==="smooth"&&(Ft.current=ut),Ot(ut),$n(lt,{behavior:K,activeIndex:ut,onComplete:K==="smooth"?Zt:void 0})},Tn=(h,K="smooth")=>{const Q=Le.current,le=vt?t.length+h:h,ye=tt.current[le];!Q||!ye||(K==="smooth"?Ft.current=h:Ft.current=null,Ot(h),$n(ye.offsetLeft,{behavior:K,activeIndex:h,onComplete:K==="smooth"?Zt:void 0}))},Ln=()=>{pt.current&&(window.removeEventListener("pointerup",pt.current),window.removeEventListener("pointercancel",pt.current),pt.current=null)},sn=h=>{if(!qe.current.isActive)return;Ln();const K=Le.current;if(!K)return;const Q=qe.current.hasMoved,le=qe.current.scrollLeft;Fe(!0),qe.current={isActive:!1,startX:0,scrollLeft:0,hasMoved:!1},on(!1),h!==void 0&&K.hasPointerCapture(h)&&K.releasePointerCapture(h),Q?Cn(le):(Ze(!0),st()),Me()},Ho=h=>{if(!fe)return;if(h.pointerType==="touch"){jt(),Ze(!0);return}if(h.pointerType!=="mouse"||h.button!==0||je(h.target))return;const K=Le.current;if(!K)return;jt(),Nt(),Hn(),Ft.current=null,qe.current={isActive:!0,startX:h.clientX,scrollLeft:K.scrollLeft,hasMoved:!1},nt.current=ot(K.scrollLeft)%t.length,Ze(!1),Me(),K.setPointerCapture(h.pointerId),Ln();const Q=le=>{le.pointerType==="mouse"&&sn(le.pointerId)};pt.current=Q,window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},Oo=h=>{if(!fe||h.pointerType!=="mouse")return;const K=Le.current;if(!K||!qe.current.isActive)return;if(h.buttons===0){sn(h.pointerId);return}const Q=h.clientX-qe.current.startX;if(Math.abs(Q)>$m&&(qe.current.hasMoved=!0,on(!0)),qe.current.hasMoved){if(h.preventDefault(),K.scrollLeft=qe.current.scrollLeft-Q,Fe(!0),st(),nt.current!==null){const le=ot()%t.length,ye=Math.abs(le-nt.current);ye>=2&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"J",location:"LightboxOverlay.tsx:onStripPointerMove",message:"during drag multi-index",data:{startIndex:nt.current,dragIndex:le,dragIndexDelta:ye,scrollLeft:K.scrollLeft,deltaX:Q},timestamp:Date.now()})}).catch(()=>{})}Me()}},Di=h=>{fe&&h.pointerType==="mouse"&&sn(h.pointerId)},Bo=h=>{!fe||h.pointerType!=="mouse"||sn(h.pointerId)};return zs(),c.useEffect(()=>{const h=requestAnimationFrame(()=>Tt(!0));return()=>{cancelAnimationFrame(h),Nt(),Ln(),Qe.current&&clearTimeout(Qe.current),Bt.current&&clearTimeout(Bt.current)}},[]),c.useEffect(()=>{if(!he){it(!0);return}Me();const h=Ve.current;if(!h)return;const K=()=>Me();return h.addEventListener("pointermove",K),h.addEventListener("pointerdown",K),()=>{h.removeEventListener("pointermove",K),h.removeEventListener("pointerdown",K),Bt.current&&clearTimeout(Bt.current)}},[he,Me]),c.useEffect(()=>{const h=K=>{K.key==="Escape"&&ct()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[ct]),c.useLayoutEffect(()=>{$t()},[k,t.length,vt]),c.useLayoutEffect(()=>{o||Tn(un.current,"auto")},[k,o]),c.useLayoutEffect(()=>{Tn(0,"auto")},[t.length,vt]),c.useEffect(()=>{const h=Le.current;if(!h||o||!oe)return;const K=Q=>{if(Q.preventDefault(),Math.abs(Q.deltaY)<=Math.abs(Q.deltaX))return;const le=Q.deltaMode===1?wm:Q.deltaMode===2?h.clientHeight:1,ye=Q.deltaY*le*xm;if(ye!==0){if(Nt(),Ue.current||(Ue.current=!0,ve.current=h.scrollLeft,Ft.current=null,Ze(!1)),ve.current+=ye,!vt){const rt=h.scrollWidth-h.clientWidth;ve.current=Math.max(0,Math.min(rt,ve.current))}Me(),He.current===null&&(He.current=requestAnimationFrame(Sn))}};return h.addEventListener("wheel",K,{passive:!1}),()=>{h.removeEventListener("wheel",K),jt()}},[o,oe,vt]),c.useEffect(()=>{const h=Le.current;if(!h)return;const K=()=>{Fe(qe.current.isActive);const le=h.scrollLeft,ye=le-At.current;At.current=le;const rt=xt.current>0?xt.current*.5:1/0;if(ye!==0&&Math.abs(ye)<rt){const Pt=ye>0?"forward":"backward";Pt!==_t.current&&(_t.current=Pt,Ct(Pt))}st()};h.addEventListener("scroll",K,{passive:!0});const Q=new ResizeObserver(()=>{$t(),Fe(qe.current.isActive),Ct(_t.current),st()});return Q.observe(h),()=>{Nt(),h.removeEventListener("scroll",K),Q.disconnect()}},[t.length,vt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Xe||ct()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Oe?1:0,transition:`opacity ${si}ms ease`,pointerEvents:Oe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...et}}),r.jsxs("div",{ref:Ve,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...St},...yt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ee,onClick:h=>h.stopPropagation(),children:r.jsx("div",{ref:Le,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":qt?"true":"false",onPointerDown:Ho,onPointerMove:Oo,onPointerUp:Di,onPointerCancel:Di,onLostPointerCapture:Bo,children:r.jsx("div",{ref:at,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Mt.map((h,K)=>{const Q=h.image.objectFit??"contain",le=K%t.length,ye=Math.floor(K/t.length),rt=er(k),Pt=`calc(-0.5 * (${rt} + ${k}))`;return r.jsxs("div",{ref:C=>tt.current[K]=C,className:`${e}-strip-item`,style:{height:L==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:h.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Q}}),o&&le<t.length-1&&ye===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pt,width:rt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye}-${h.image.url}-${le}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...Lt},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${f?` ${e}-lightbox-content-area-stacked`:""}`,children:(G||w)&&r.jsx("div",{className:`${e}-header ${f?`${e}-header-two-row`:`${e}-header-single-row`}`,children:f?Se():G||w?Re():null})})})]}),t.length>1&&P==="on"&&(()=>{const h=er(j),K=`calc(-0.5 * (${j} + ${h}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":T,"data-overlay-content-hidden":rn?"true":"false",onClick:Q=>Q.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...Lt},children:[t.map((Q,le)=>{const ye=er(se),rt=`calc(-0.5 * (${ye} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":ft===le?"true":"false",onClick:()=>oe&&y==="click"&&Tn(le),onMouseEnter:()=>We&&y==="hover"&&Tn(le),"aria-label":Q.image.name?`View ${Q.image.name}`:`View image ${le+1}`,"aria-current":ft===le?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:Q.image.url,alt:"",draggable:!1,style:{...ce,...$.display==="cover"?{width:mo}:{width:"100%"}}})}),o&&le<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:rt,width:ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Q.image.url}-${le}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:K,height:h,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
|
|
9395
|
+
`;function In(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:In("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:{...Ha.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:{...Ha.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:In("Question Padding Left"),questionPaddingTop:In("Question Padding Top"),questionPaddingBottom:In("Question Padding Bottom"),answerPaddingLeft:In("Answer Padding Left"),answerPaddingRight:In("Answer Padding Right"),answerPaddingTop:In("Answer Padding Top"),answerPaddingBottom:In("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,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"}]},schema:lm,sourceCode:am},vn=e=>e.display==="cover",Wo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Oa=100,dm=.2,Ba=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Oa:Math.max(Oa,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const L=typeof window<"u"?window.innerHeight:800,A=Math.max(.88,1-g/L*.12);return`translateY(${g}px) scale(${A})`},[]),m=c.useCallback(()=>{l.current=null},[]),y=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),P=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),T=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const A=g.clientX-L.startX,H=g.clientY-L.startY;if(L.isLocked===null){if(Math.abs(A)<Ba&&Math.abs(H)<Ba)return;if(H>0&&H>Math.abs(A))L.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;g.preventDefault();const U=Math.max(0,H);p.current=U,s(U)},[e,m]),S=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const A=L.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!A){m();return}g.clientY-L.startY>=u?P():y()},[u,P,e,m,y]),M=c.useCallback(g=>{S(g)},[S]),I=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:T,onPointerUp:M,onPointerCancel:I}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,y)=>{mm(t),e.scrollLeft=m,y&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),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(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},si=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,mo=50,xm=2,wm=16,Sm=.05,$m=1,ja=.5,Cm=20,Qn=.004,zi=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},er=e=>`max(${e}, ${Cm}px)`,Pm=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]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},mt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_m=e=>[mt(e,"fontFamily"),mt(e,"fontSettings"),{type:"row",items:[mt(e,"fontSize"),mt(e,"lineHeight"),mt(e,"letterSpacing"),mt(e,"wordSpacing")]},mt(e,"textAlign"),mt(e,"textAppearance")],Am=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(zi.map(e=>[Tm[e],_m(e)]))}),Dr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Dr(e,t),Qi=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Dr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},tr=(e,t)=>{const n=i=>{const o=mt(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[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),nr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:P,thumbnailObjectFit:$,thumbnailActive:T,thumbnailActiveColor:S,title1Width:M,title2Width:I,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:L="desktop",contentMarginTop:A,iconMarginLeft:H}=n,U=h=>E.scalingValue(h,i??!1),se=U(l),j=U(p??.02),k=U(u??0),X=U(A??0),q=U(H??0),{title1:O,title2:Y,title3:ie}=Im(t),re=nr("title1",tr(n,"title1"),i),F=nr("title2",tr(n,"title2"),i),ae=nr("title3",tr(n,"title3"),i),f=L==="mobile",oe=!o&&(!i||s),he=oe,fe=oe,We=oe,Z=vn($),ce=Z?{"--image-aspect-ratio":Wo($)}:void 0,G=!!(O||Y||ie),B=c.useMemo(()=>Rm(e,O,Y,ie,re,F,ae),[e,O,Y,ie,re,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:I,title3Width:W}),[M,I,W]),me=c.useMemo(()=>B.map(h=>N[h.widthKey]),[B,N]),Ce=c.useMemo(()=>Dr(B.length,me),[B.length,me]),Be=c.useMemo(()=>Vs(B.length,me),[B.length,me]),_e=c.useMemo(()=>B.filter(h=>h.prefix==="title1"),[B]),Te=c.useMemo(()=>B.filter(h=>h.prefix==="title2"||h.prefix==="title3"),[B]),Ne=c.useMemo(()=>za(_e,N),[_e,N]),z=c.useMemo(()=>za(Te,N),[Te,N]),ue=c.useCallback((h,K)=>{const Q=B.indexOf(h);if(!f||K==="single-row")return{effectiveWidth:Be[Q]??0,resolvedWidth:Ce[Q]??0,maxWidth:Qi(Q,Ce)};if(K==="two-row-top"){const ye=_e.indexOf(h);return{effectiveWidth:Ne.effective[ye]??0,resolvedWidth:Ne.resolved[ye]??0,maxWidth:Qi(ye,Ne.resolved)}}const le=Te.indexOf(h);return{effectiveWidth:z.effective[le]??0,resolvedWidth:z.resolved[le]??0,maxWidth:Qi(le,z.resolved)}},[Te,z,Be,Ce,B,_e,Ne,f]),_=c.useCallback(h=>E.scalingValue(h,i??!1),[i]),J=_(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),ee=c.useCallback(h=>B.slice(0,h+1).reduce((K,Q,le)=>K+(Q!=null&&Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(Ce[le]??0),0)+(f?0:b??0),[B,D,Ce,f,b]),ge=c.useCallback(()=>f?0:b??0,[f,b]),we=c.useCallback(h=>Te.slice(0,h).reduce((K,Q,le)=>K+(Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(z.resolved[le]??0),0),[Te,z.resolved,D]),De=c.useCallback(h=>{const K=Te[h];return we(h)+(K.marginLeftKey?D[K.marginLeftKey]??0:0)+(z.resolved[h]??0)},[Te,z.resolved,we,D]),Ie=(h,K)=>{const Q=h.marginLeftKey?D[h.marginLeftKey]??0:0,{effectiveWidth:le,resolvedWidth:ye,maxWidth:rt}=ue(h,K),Pt=o&&K==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":h.prefix,style:{...K==="single-row"?{gridArea:h.prefix}:{},width:_(le),...Q>0?{marginLeft:_(Q)}:{}},children:[r.jsx("p",{className:h.className,style:h.style,children:h.text}),Pt&&h.marginLeftKey&&r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:_(-Q),width:`max(${_(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Pt&&r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-Qn/2),width:_(Qn),height:"100%",pointerEvents:"auto"}})]},h.className)},Ae=()=>{const h=f?-1:B.findIndex(le=>le.prefix==="title1"),K=!f&&(o||(b??0)>0)?(()=>{const le=b??0,ye=h>=0?Ce[h]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:`max(${_(le)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Q=B.flatMap((le,ye)=>{if(!le.marginLeftKey)return[];const rt=D[le.marginLeftKey]??0,Pt=km(B,Ce,D,ye)+ge();return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce[ye]),style:{position:"absolute",top:0,left:_(Pt),width:`max(${_(rt)}, 10px)`,height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return K?[K,...Q]:Q},Ke=()=>B.map((h,K)=>{const Q=Qi(K,Ce),ye=ee(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(ye),width:_(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),de=()=>Te.flatMap((h,K)=>{if(!h.marginLeftKey)return[];const Q=D[h.marginLeftKey]??0,le=we(K),{resolvedWidth:ye}=ue(h,"two-row-bottom");return r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:_(le),width:`max(${_(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}},h.marginLeftKey)}),ke=()=>Te.map((h,K)=>{const{maxWidth:Q}=ue(h,"two-row-bottom"),ye=De(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(ye),width:_(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),Ve=c.useRef(null),Le=c.useRef(null),at=c.useRef(null),tt=c.useRef([]),xt=c.useRef(0),qe=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(0),At=c.useRef("forward"),ve=c.useRef(0),He=c.useRef(null),Ue=c.useRef(!1),nt=c.useRef(null),vt=t.length>1&&(!o||!!s),Ht=vt?3:1,Mt=c.useMemo(()=>Array.from({length:Ht},()=>t).flat(),[t,Ht]),[qt,on]=c.useState(!1),[Oe,Tt]=c.useState(!1),[bt,it]=c.useState(!0),[ft,Ot]=c.useState(0),un=c.useRef(ft);un.current=ft;const Ft=c.useRef(null),wn=c.useRef(!1),Qe=c.useRef(null),Bt=c.useRef(null),rn=he&&!bt,Me=c.useCallback(()=>{he&&(it(!0),Bt.current&&clearTimeout(Bt.current),Bt.current=setTimeout(()=>{qe.current.isActive||it(!1)},bm))},[he]),ct=c.useCallback(()=>{o||wn.current||(wn.current=!0,Tt(!1),Qe.current=setTimeout(()=>{a()},si))},[o,a]),Rt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:E.scalingValue(x??0,i),height:E.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ct,"aria-label":"Close",children:r.jsx(tn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),te=(h="two-row")=>r.jsx("div",{...h==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:_(b??0),flexShrink:0,...h==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...h==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Se=()=>{const h=B.find(le=>le.prefix==="title1"),K=B.filter(le=>le.prefix==="title2"||le.prefix==="title3"),Q=K.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?te():null,h&&Ie(h,"two-row-top"),w&&Rt()]}),Q?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[K.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[K.map(le=>Ie(le,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[de(),ke()]})]}):null,r.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:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Re=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?te("single-row"):null,B.map(h=>Ie(h,"single-row")),o?r.jsxs(r.Fragment,{children:[Ae(),Ke()]}):null,w?Rt():null]}),je=c.useCallback(h=>!!(h.closest("[data-controls]")||h.closest(`.${e}-thumbnails`)||h.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Xe,backdropStyle:et,mediaAreaStyle:Ee,overlayContentStyle:Lt,swipeHandlers:yt,dismissAreaStyle:St}=js({enabled:oe??!1,onClose:ct,animMs:si,isBlockedTarget:je}),$t=()=>{if(!vt||t.length===0)return xt.current=0,0;const h=tt.current[0],K=tt.current[t.length];if(!h||!K)return xt.current;const Q=K.offsetLeft-h.offsetLeft;return Q>0&&(xt.current=Q),xt.current},Fe=(h=!1)=>{if(!vt)return;const K=Le.current,Q=$t();!K||Q<=0||(K.scrollLeft<=0?(K.scrollLeft+=Q,h&&(qe.current.scrollLeft+=Q),Ue.current&&(ve.current+=Q)):K.scrollLeft>=Q*2&&(K.scrollLeft-=Q,h&&(qe.current.scrollLeft-=Q),Ue.current&&(ve.current-=Q)))},ot=(h=(K=>(K=Le.current)==null?void 0:K.scrollLeft)()??0)=>{var Pt;const Q=((Pt=Le.current)==null?void 0:Pt.clientWidth)??0,le=h+Q/2;let ye=-1,rt={flatIndex:0,distance:1/0};return tt.current.forEach((C,ne)=>{if(!C)return;const $e=C.offsetLeft,be=$e+C.offsetWidth;ye===-1&&le>=$e&&le<be&&(ye=ne);const xe=Math.abs($e-h);xe<rt.distance&&(rt={flatIndex:ne,distance:xe})}),ye!==-1?ye:rt.flatIndex},dt=h=>{const K=Le.current;return!h||!K?!1:h.offsetWidth>K.clientWidth+1},Ct=h=>{Le.current&&tt.current.forEach(K=>{K&&(K.style.scrollSnapAlign=dt(K)&&h==="backward"?"end":"start")})},an=h=>{const K=Le.current;if(!h||!K||!dt(h))return!1;const Q=h.offsetLeft,le=Q+h.offsetWidth;return K.scrollLeft>=Q-1&&K.scrollLeft+K.clientWidth<=le+1},st=()=>{!Le.current||t.length===0||Ft.current===null&&Ot(ot()%t.length)},Zt=()=>{Ft.current=null;const h=Le.current;h&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"L",location:"LightboxOverlay.tsx:releaseActiveIndexLock",message:"index lock released",data:{scrollLeft:h.scrollLeft,nearestIndex:ot()%t.length,activeIndex:un.current},timestamp:Date.now()})}).catch(()=>{})},Ze=h=>{const K=Le.current;K&&(K.style.scrollSnapType=h?"":"none")},Nt=()=>{var h;(h=Et.current)==null||h.call(Et),Et.current=null},jt=()=>{He.current!==null&&(cancelAnimationFrame(He.current),He.current=null),Ue.current=!1},Sn=()=>{const h=Le.current;if(!h){He.current=null,Ue.current=!1;return}const K=ve.current-h.scrollLeft;if(Math.abs(K)<.5){h.scrollLeft=ve.current,Fe(),st(),He.current=null,Ue.current=!1;return}h.scrollLeft+=K*Sm,Fe(),st(),Me(),He.current=requestAnimationFrame(Sn)},Hn=()=>{const h=at.current;h&&(h.style.transition="",h.style.transform="",h.style.willChange="")},On=(h,K,Q,le)=>{Hn(),h.scrollLeft=K,_t.current=h.scrollLeft,Fe(),Q!==void 0?Ot(Q):st();const ye=Q??ot()%t.length,rt=ot()%t.length;fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"K",location:"LightboxOverlay.tsx:finishStripScroll",message:"scroll settled",data:{targetLeft:K,scrollLeft:h.scrollLeft,intendedIndex:ye,actualIndex:rt,indexMismatch:ye!==rt},timestamp:Date.now()})}).catch(()=>{}),Ze(!0),le==null||le()},$n=(h,{behavior:K="smooth",activeIndex:Q,onComplete:le}={})=>{const ye=Le.current,rt=at.current;if(!ye||!rt)return;if(jt(),Nt(),Ze(!1),K==="auto"){On(ye,h,Q,le);return}const Pt=Math.abs(h-ye.scrollLeft),C=pm(Pt,fm,ym,ye.clientWidth*.55);Et.current=hm(ye,rt,h,{duration:C,easing:vm,onComplete:()=>{Et.current=null,On(ye,h,Q,le)}})},Jn=(h="smooth")=>{if(!Le.current||t.length===0)return;const Q=ot(),le=tt.current[Q];le&&$n(le.offsetLeft,{behavior:h,activeIndex:Q%t.length})},Cn=(h,K="smooth")=>{const Q=Le.current;if(!Q||t.length===0)return;const le=Q.scrollLeft-h,ye=ot(h),rt=tt.current[ye];if(an(rt)){Ze(!0),st();return}const Pt=tt.current[ye+1],C=rt?Pt?Pt.offsetLeft-rt.offsetLeft:rt.offsetWidth:0,ne=C>0?le>C*ja?1:le<-C*ja?-1:0:0,$e=vt?ye+ne:Math.max(0,Math.min(Mt.length-1,ye+ne)),be=tt.current[$e];if(!be){Jn(K);return}const lt=le<0&&dt(be)?be.offsetLeft+be.offsetWidth-Q.clientWidth:be.offsetLeft,ut=$e%t.length,Ye=ot(Q.scrollLeft);fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"B_J",location:"LightboxOverlay.tsx:snapAfterDrag",message:"drag snap decision",data:{startScrollLeft:h,scrollLeft:Q.scrollLeft,scrollDelta:le,startFlatIndex:ye,endFlatIndex:Ye,scrollAdjustment:ne,targetFlatIndex:$e,startIndex:ye%t.length,endIndex:Ye%t.length,targetIndex:ut,indexDelta:ut-ye%t.length,endMinusStart:Ye-ye},timestamp:Date.now()})}).catch(()=>{}),K==="smooth"&&(Ft.current=ut),Ot(ut),$n(lt,{behavior:K,activeIndex:ut,onComplete:K==="smooth"?Zt:void 0})},Tn=(h,K="smooth")=>{const Q=Le.current,le=vt?t.length+h:h,ye=tt.current[le];!Q||!ye||(K==="smooth"?Ft.current=h:Ft.current=null,Ot(h),$n(ye.offsetLeft,{behavior:K,activeIndex:h,onComplete:K==="smooth"?Zt:void 0}))},Ln=()=>{pt.current&&(window.removeEventListener("pointerup",pt.current),window.removeEventListener("pointercancel",pt.current),pt.current=null)},sn=h=>{if(!qe.current.isActive)return;Ln();const K=Le.current;if(!K)return;const Q=qe.current.hasMoved,le=qe.current.scrollLeft;Fe(!0),qe.current={isActive:!1,startX:0,scrollLeft:0,hasMoved:!1},on(!1),h!==void 0&&K.hasPointerCapture(h)&&K.releasePointerCapture(h),Q?Cn(le):(Ze(!0),st()),Me()},Ho=h=>{if(!fe)return;if(h.pointerType==="touch"){jt(),Ze(!0);return}if(h.pointerType!=="mouse"||h.button!==0||je(h.target))return;const K=Le.current;if(!K)return;jt(),Nt(),Hn(),Ft.current=null,qe.current={isActive:!0,startX:h.clientX,scrollLeft:K.scrollLeft,hasMoved:!1},nt.current=ot(K.scrollLeft)%t.length,Ze(!1),Me(),K.setPointerCapture(h.pointerId),Ln();const Q=le=>{le.pointerType==="mouse"&&sn(le.pointerId)};pt.current=Q,window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},Oo=h=>{if(!fe||h.pointerType!=="mouse")return;const K=Le.current;if(!K||!qe.current.isActive)return;if(h.buttons===0){sn(h.pointerId);return}const Q=h.clientX-qe.current.startX;if(Math.abs(Q)>$m&&(qe.current.hasMoved=!0,on(!0)),qe.current.hasMoved){if(h.preventDefault(),K.scrollLeft=qe.current.scrollLeft-Q,Fe(!0),st(),nt.current!==null){const le=ot()%t.length,ye=Math.abs(le-nt.current);ye>=2&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"J",location:"LightboxOverlay.tsx:onStripPointerMove",message:"during drag multi-index",data:{startIndex:nt.current,dragIndex:le,dragIndexDelta:ye,scrollLeft:K.scrollLeft,deltaX:Q},timestamp:Date.now()})}).catch(()=>{})}Me()}},Di=h=>{fe&&h.pointerType==="mouse"&&sn(h.pointerId)},Bo=h=>{!fe||h.pointerType!=="mouse"||sn(h.pointerId)};return zs(),c.useEffect(()=>{const h=requestAnimationFrame(()=>Tt(!0));return()=>{cancelAnimationFrame(h),Nt(),Ln(),Qe.current&&clearTimeout(Qe.current),Bt.current&&clearTimeout(Bt.current)}},[]),c.useEffect(()=>{if(!he){it(!0);return}Me();const h=Ve.current;if(!h)return;const K=()=>Me();return h.addEventListener("pointermove",K),h.addEventListener("pointerdown",K),()=>{h.removeEventListener("pointermove",K),h.removeEventListener("pointerdown",K),Bt.current&&clearTimeout(Bt.current)}},[he,Me]),c.useEffect(()=>{const h=K=>{K.key==="Escape"&&ct()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[ct]),c.useLayoutEffect(()=>{$t()},[k,t.length,vt]),c.useLayoutEffect(()=>{o||Tn(un.current,"auto")},[k,o]),c.useLayoutEffect(()=>{Tn(0,"auto")},[t.length,vt]),c.useEffect(()=>{const h=Le.current;if(!h||o||!oe)return;const K=Q=>{if(Q.preventDefault(),Math.abs(Q.deltaY)<=Math.abs(Q.deltaX))return;const le=Q.deltaMode===1?wm:Q.deltaMode===2?h.clientHeight:1,ye=Q.deltaY*le*xm;if(ye!==0){if(Nt(),Ue.current||(Ue.current=!0,ve.current=h.scrollLeft,Ft.current=null,Ze(!1)),ve.current+=ye,!vt){const rt=h.scrollWidth-h.clientWidth;ve.current=Math.max(0,Math.min(rt,ve.current))}Me(),He.current===null&&(He.current=requestAnimationFrame(Sn))}};return h.addEventListener("wheel",K,{passive:!1}),()=>{h.removeEventListener("wheel",K),jt()}},[o,oe,vt]),c.useEffect(()=>{const h=Le.current;if(!h)return;const K=()=>{Fe(qe.current.isActive);const le=h.scrollLeft,ye=le-_t.current;_t.current=le;const rt=xt.current>0?xt.current*.5:1/0;if(ye!==0&&Math.abs(ye)<rt){const Pt=ye>0?"forward":"backward";Pt!==At.current&&(At.current=Pt,Ct(Pt))}st()};h.addEventListener("scroll",K,{passive:!0});const Q=new ResizeObserver(()=>{$t(),Fe(qe.current.isActive),Ct(At.current),st()});return Q.observe(h),()=>{Nt(),h.removeEventListener("scroll",K),Q.disconnect()}},[t.length,vt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Xe||ct()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Oe?1:0,transition:`opacity ${si}ms ease`,pointerEvents:Oe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...et}}),r.jsxs("div",{ref:Ve,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...St},...yt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ee,onClick:h=>h.stopPropagation(),children:r.jsx("div",{ref:Le,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":qt?"true":"false",onPointerDown:Ho,onPointerMove:Oo,onPointerUp:Di,onPointerCancel:Di,onLostPointerCapture:Bo,children:r.jsx("div",{ref:at,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Mt.map((h,K)=>{const Q=h.image.objectFit??"contain",le=K%t.length,ye=Math.floor(K/t.length),rt=er(k),Pt=`calc(-0.5 * (${rt} + ${k}))`;return r.jsxs("div",{ref:C=>tt.current[K]=C,className:`${e}-strip-item`,style:{height:L==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:h.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Q}}),o&&le<t.length-1&&ye===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pt,width:rt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye}-${h.image.url}-${le}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...Lt},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${f?` ${e}-lightbox-content-area-stacked`:""}`,children:(G||w)&&r.jsx("div",{className:`${e}-header ${f?`${e}-header-two-row`:`${e}-header-single-row`}`,children:f?Se():G||w?Re():null})})})]}),t.length>1&&P==="on"&&(()=>{const h=er(j),K=`calc(-0.5 * (${j} + ${h}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":T,"data-overlay-content-hidden":rn?"true":"false",onClick:Q=>Q.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...Lt},children:[t.map((Q,le)=>{const ye=er(se),rt=`calc(-0.5 * (${ye} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":ft===le?"true":"false",onClick:()=>oe&&y==="click"&&Tn(le),onMouseEnter:()=>We&&y==="hover"&&Tn(le),"aria-label":Q.image.name?`View ${Q.image.name}`:`View image ${le+1}`,"aria-current":ft===le?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:Q.image.url,alt:"",draggable:!1,style:{...ce,...$.display==="cover"?{width:mo}:{width:"100%"}}})}),o&&le<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:rt,width:ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Q.image.url}-${le}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:K,height:h,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
|
|
9396
9396
|
.${e}-wrapper {
|
|
9397
9397
|
position: relative;
|
|
9398
9398
|
width: 100%;
|
|
@@ -10348,7 +10348,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10348
10348
|
</>
|
|
10349
10349
|
);
|
|
10350
10350
|
};
|
|
10351
|
-
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Dn={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 Om(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=zi.reduce((e,t)=>({...e,...Om(t)}),{}),jm=zi.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const zm=_m(),Vm={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:zi.map(e=>({path:`styles.${mt(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Fo=qr,hr=`${qr}-`,No=e=>`${qr}-${e}`,Kr=e=>e===Fo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(No(e)));if(i)return i}const n=qa(t.get(Fo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(No(t),String(e)):i.searchParams.set(Fo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===No(e)||i===Fo:Kr(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)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(No(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+hi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},go=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ei=.004,eo=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},to=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},wo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>wo(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},no=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:wo(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Vi=["title1","title2","title3","count"],gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[gt(e,"fontFamily"),gt(e,"fontSettings"),{type:"row",items:[gt(e,"fontSize"),gt(e,"lineHeight"),gt(e,"letterSpacing"),gt(e,"wordSpacing")]},gt(e,"textAlign"),gt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Vi.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},io=(e,t)=>{const n=i=>{const o=gt(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[rg[t]]}},oo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:P,textTransition:$,title1Width:T,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:L,closeIconMaxWidth:_,closeIconColor:H,closeIconHoverColor:U,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(C=>E.scalingValue(C,i??!1),[i]),X=k(m??0),q=`${y}%`,O=`${P}%`,Y=k(g),ie=k(se),re=k(j),F=oo("title1",io(n,"title1"),i),ae=oo("title2",io(n,"title2"),i),f=oo("title3",io(n,"title3"),i),oe=oo("count",io(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>go(t,w),[t,w]),[ce,G]=c.useState(a),B=Z[ce],N=B==null?void 0:B.entry,[me,Ce]=c.useState(!1),[Be,Ae]=c.useState(null),[Te,Ne]=c.useState(!1),[z,ue]=c.useState(null),[A,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,we]=c.useState(),[De,Ie]=c.useState(),[_e,Ke]=c.useState(null),de=c.useRef(null),ke=c.useRef(0),Ve=c.useRef(0),Le=c.useRef(0),at=c.useRef(!1),tt=c.useRef(null),xt=c.useRef(null),qe=c.useRef(null),pt=c.useRef(null),Et=c.useRef(null),At=c.useRef(null),_t=c.useRef(null),ve=c.useCallback(()=>{const C=xt.current;if(!C)return;const ne=C.closest(`.${e}-lightbox-content-area`);if(!ne)return C.getBoundingClientRect().width;const $e=Array.from(ne.children).reduce((be,xe)=>!(xe instanceof HTMLElement)||xe.contains(C)?be:be+xe.getBoundingClientRect().width,0);return ne.getBoundingClientRect().width-$e},[e]),He=c.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ue=c.useCallback(C=>{C===ke.current&&(ue(null),J(!1))},[]),nt=c.useCallback(()=>{o||at.current||(at.current=!0,p==null||p(),Ce(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),vt=c.useCallback(C=>!!(C.closest("[data-controls]")||C.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Mt,mediaAreaStyle:qt,overlayContentStyle:on,swipeHandlers:Oe,dismissAreaStyle:Tt}=js({enabled:We,onClose:nt,animMs:300,isBlockedTarget:vt}),bt=c.useCallback(C=>{d&&Ds(C+1,l,!0)},[d,l]),it=c.useCallback(C=>{if(C)return C.getBoundingClientRect().height},[]),ft=c.useCallback(C=>{if(Z.length===0)return;const ne=(C%Z.length+Z.length)%Z.length;if(ne===ce)return;const $e=Z[ce],be=Z[ne];ke.current+=1;const xe=ke.current,lt=$==="fade"&&Ga($e==null?void 0:$e.entry)!==Ga(be==null?void 0:be.entry),ut=it(qe.current),Ye=lt?(()=>{const Kt=ve();ki.flushSync(()=>{Ke(be.entry)}),qe.current&&Kt&&(qe.current.style.width=`${Kt}px`);const qi=it(qe.current);return qe.current&&(qe.current.style.width=""),{measuredIncomingTitlesHeight:qi,incomingTitlesMeasureWidth:Kt}})():void 0,Vt=Math.max(ut??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;ee(xe),ue(ce),J(!0),G(ne),bt(ne),Le.current=ne,lt?(He(),Vt&&we(Vt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&Ie(Ye.incomingTitlesMeasureWidth),Ae(($e==null?void 0:$e.entryIndex)??null),Ne(!0),Ve.current=be.entryIndex,de.current=setTimeout(()=>{Ae(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),de.current=null},400)):(He(),Ae(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),Ve.current=be.entryIndex)},[ce,He,ve,it,Z,bt,$]),Ot=c.useCallback(()=>{_t.current=null},[]),un=c.useCallback(C=>{!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0||C.target.closest("[data-controls]")||(_t.current={startX:C.clientX,startY:C.clientY,pointerId:C.pointerId})},[fe,Z.length]),Ft=c.useCallback(C=>{var Kt;if(!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0)return;if(Ht){Ot();return}const ne=_t.current;if(!ne||ne.pointerId!==C.pointerId||(Ot(),C.target.closest("[data-controls]")))return;const be=C.clientX-ne.startX,xe=C.clientY-ne.startY,lt=Math.abs(be),ut=Math.abs(xe);if(lt>=qm&<>ut){ft(be>0?ce-1:ce+1);return}if(lt>Da||ut>Da)return;const Ye=(Kt=pt.current)==null?void 0:Kt.getBoundingClientRect(),Vt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;ft(C.clientX<Vt?ce-1:ce+1)},[ce,fe,ft,Ht,Ot,Z.length]),wn=c.useCallback(C=>{const ne=_t.current;(ne==null?void 0:ne.pointerId)===C.pointerId&&Ot()},[Ot]);zs(),c.useEffect(()=>{At.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const C=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Et.current?Et.current.focus():pt.current&&pt.current.focus()})});return()=>{cancelAnimationFrame(C),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const ne=At.current;ne&&document.contains(ne)&&ne.focus()}},[]),c.useEffect(()=>{var C;$!=="fade"&&(Ve.current=((C=Z[ce])==null?void 0:C.entryIndex)??0,He(),Ae(null),Ne(!1),we(void 0),Ie(void 0))},[ce,He,Z,$]),c.useEffect(()=>{const C=ne=>{if(ne.key==="Escape"){nt();return}if(ne.key==="ArrowLeft"&&Z.length>1){ft(ce-1);return}if(ne.key==="ArrowRight"&&Z.length>1){ft(ce+1);return}if(ne.key==="Tab"&&pt.current){const $e=pt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),be=Array.from($e).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(be.length===0)return;const xe=be[0],lt=be[be.length-1],ut=document.activeElement;ne.shiftKey?(ut===xe||!pt.current.contains(ut))&&(ne.preventDefault(),lt.focus()):(ut===lt||!pt.current.contains(ut))&&(ne.preventDefault(),xe.focus())}};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[ft,nt,ce,Z.length]),c.useLayoutEffect(()=>{He(),ke.current=0,ee(0),ue(null),J(!1),Ae(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),G(C=>{const ne=Math.max(0,Z.length-1);return Math.min(C,ne)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var $e;const C=Math.max(0,Z.length-1),ne=Math.min(Math.max(0,a),C);Le.current=ne,Ve.current=(($e=Z[ne])==null?void 0:$e.entryIndex)??0,G(ne)},[a]);const Qe=Be!==null?t[Be]:null,Bt=z!==null?Z[z]:null,rn=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Qe==null?void 0:Qe.title1)||(Qe==null?void 0:Qe.title2)||(Qe==null?void 0:Qe.title3),Me=Qm(w,Z,t),ct=L!==null,Rt=rn||Me||ct,te=Me&&ct?{gap:Y}:void 0,Se=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Re=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,je=k(R),Xe=c.useMemo(()=>({title1Width:T??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[T,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ee=c.useMemo(()=>N?to(e,N,F,ae,f):[],[e,N,F,ae,f]),Lt=c.useMemo(()=>Ee.map(C=>Xe[C.widthKey]),[Ee,Xe]),yt=c.useMemo(()=>wo(Ee.length,Lt),[Ee.length,Lt]),St=c.useMemo(()=>fr(Ee.length,Lt),[Ee.length,Lt]),$t=c.useMemo(()=>Ee.filter(C=>C.prefix==="title1"),[Ee]),Fe=c.useMemo(()=>Ee.filter(C=>C.prefix==="title2"||C.prefix==="title3"),[Ee]),ot=c.useMemo(()=>no($t,Xe),[$t,Xe]),dt=c.useMemo(()=>no(Fe,Xe),[Fe,Xe]),Ct=c.useCallback((C,ne)=>{const $e=Ee.findIndex(xe=>xe.prefix===C.prefix);if(!he||ne==="single-row")return{effectiveWidth:St[$e]??0,resolvedWidth:yt[$e]??0,maxWidth:qn($e,yt)};if(ne==="two-row-top"){const xe=$t.findIndex(lt=>lt.prefix===C.prefix);return{effectiveWidth:ot.effective[xe]??0,resolvedWidth:ot.resolved[xe]??0,maxWidth:qn(xe,ot.resolved)}}const be=Fe.findIndex(xe=>xe.prefix===C.prefix);return{effectiveWidth:dt.effective[be]??0,resolvedWidth:dt.resolved[be]??0,maxWidth:qn(be,dt.resolved)}},[Ee,Fe,dt,St,yt,$t,ot,he]),an=c.useCallback(C=>tg(Ee,yt,et,C)+(he?0:I??0),[Ee,yt,et,he,I]),st=c.useCallback(()=>he?0:I??0,[he,I]),Zt=c.useCallback(C=>Fe.slice(0,C).reduce((ne,$e,be)=>ne+($e.marginLeftKey?et[$e.marginLeftKey]??0:0)+(dt.resolved[be]??0),0),[Fe,dt.resolved,et]),Ze=c.useCallback(C=>{const ne=Fe[C];return Zt(C)+(ne.marginLeftKey?et[ne.marginLeftKey]??0:0)+(dt.resolved[C]??0)},[Fe,dt.resolved,Zt,et]),Nt=c.useCallback((C,ne,$e)=>{if(!he||$e==="single-row"){const Ye=C.findIndex(Bn=>Bn.prefix===ne.prefix),Vt=C.map(Bn=>Xe[Bn.widthKey]),Kt=wo(C.length,Vt);return{effectiveWidth:fr(C.length,Vt)[Ye]??0,resolvedWidth:Kt[Ye]??0,maxWidth:qn(Ye,Kt)}}if($e==="two-row-top"){const Ye=C.filter(Bn=>Bn.prefix==="title1"),Vt=Ye.findIndex(Bn=>Bn.prefix===ne.prefix),{resolved:Kt,effective:qi}=no(Ye,Xe);return{effectiveWidth:qi[Vt]??0,resolvedWidth:Kt[Vt]??0,maxWidth:qn(Vt,Kt)}}const be=C.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),xe=be.findIndex(Ye=>Ye.prefix===ne.prefix),{resolved:lt,effective:ut}=no(be,Xe);return{effectiveWidth:ut[xe]??0,resolvedWidth:lt[xe]??0,maxWidth:qn(xe,lt)}},[Xe,he]),jt=(C,ne,$e)=>{const be=C.marginLeftKey?et[C.marginLeftKey]??0:0,{effectiveWidth:xe,resolvedWidth:lt,maxWidth:ut}=$e??Ct(C,ne),Ye=Math.max(be,eo),Vt=o&&ne==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":C.prefix,style:{width:k(xe),...be>0?{marginLeft:k(be)}:{}},children:[r.jsx("p",{className:C.className,style:C.style,children:C.text}),Vt&&C.marginLeftKey?r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(-be),width:k(Ye),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ei/2),width:k(ei),height:"100%",pointerEvents:"auto"}}):null]},C.className)},Sn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Hn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,ce,w,t)}),o&&ct&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),On=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(_??0,i),height:E.scalingValue(_??0,i),marginRight:re,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:Et,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:r.jsx(tn,{url:L??"",fill:H,hoverFill:i&&!s?H:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),$n=()=>!Me&&!ct?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Me?Hn():null,ct?On():null]}),Jn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f);return r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,ne.map($e=>jt($e,"single-row",Nt(ne,$e,"single-row")))]})},Cn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f),$e=ne.find(be=>be.prefix==="title1");return!$e&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,$e?jt($e,"two-row-top",Nt(ne,$e,"two-row-top")):null]})},Tn=(C,ne=!1)=>{const $e=C?to(e,C,F,ae,f):[],be=$e.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),xe=o&≠return be.length>0||xe||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[be.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[be.map(ut=>jt(ut,"two-row-bottom",Nt($e,ut,"two-row-bottom"))),ne&&o?r.jsxs(r.Fragment,{children:[Di(),Bo()]}):null]}):null,(R??0)>0||xe?r.jsx("div",{"data-controls":xe?"titleRowMarginBottom":void 0,"data-controls-axis":xe?"y":void 0,"data-controls-reverse":xe?"":void 0,className:xe?`${e}-control`:void 0,style:{height:je,width:"100%",flexShrink:0,pointerEvents:xe?"auto":"none"}}):null]}):null},Ln=(C,ne=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Cn(C),$n()]}),Tn(C,ne)]}),sn=C=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Ln(C)}):C?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(C)}):null,Ho=()=>{const C=he?-1:Ee.findIndex(be=>be.prefix==="title1"),ne=!he&&(o||(I??0)>0)?(()=>{const xe=Math.max(I??0,eo),lt=C>=0?yt[C]:T;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:k(xe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,$e=Ee.flatMap((be,xe)=>{if(!be.marginLeftKey)return[];const lt=et[be.marginLeftKey]??0,ut=eg(Ee,yt,et,xe)+st(),Ye=Math.max(lt,eo);return r.jsx("div",{"data-controls":be.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[xe]),style:{position:"absolute",top:0,left:k(ut),width:k(Ye),height:"100%",pointerEvents:"auto"}},be.marginLeftKey)});return ne?[ne,...$e]:$e},Oo=()=>Ee.map((C,ne)=>{const $e=qn(ne,yt),xe=an(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),Di=()=>Fe.flatMap((C,ne)=>{if(!C.marginLeftKey)return[];const $e=et[C.marginLeftKey]??0,be=Zt(ne),xe=Math.max($e,eo),{resolvedWidth:lt}=Ct(C,"two-row-bottom");return r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(be),width:k(xe),height:"100%",pointerEvents:"auto"}},C.marginLeftKey)}),Bo=()=>Fe.map((C,ne)=>{const{maxWidth:$e}=Ct(C,"two-row-bottom"),xe=Ze(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),h=()=>!o||he?null:r.jsxs(r.Fragment,{children:[Ho(),Oo()]}),K=C=>{const ne=!C.objectFit&&vn(x);return{className:`${e}-slide-image-cell${ne?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...ne?{"--image-aspect-ratio":Wo(x)}:{}}}},Q=C=>C.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":C.objectFit}}:vn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},le=C=>{if(C.length===0)return null;const ne=C.length>1,$e=ir(X),be=`calc(-0.5 * (${$e} + ${X}))`;if(C.length===1){const xe=C[0];return r.jsx("div",{...K(xe),children:r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ne?{gap:X}:void 0,children:C.map((xe,lt)=>r.jsxs("div",{...K(xe),children:[r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1}),o&&ne&<<C.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:be,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${xe.url}-${lt}`))})},ye=!!(N!=null&&N.title2||N!=null&&N.title3||Qe!=null&&Qe.title2||Qe!=null&&Qe.title3||(R??0)>0||o),rt=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Ln(_e||N)}),r.jsxs("div",{ref:xt,className:`${e}-titles-row-two-row`,style:{...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:Se,style:{position:"relative",flex:1,minWidth:0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:Cn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Cn(N)})]}),$n()]}),ye?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(N,!0)})]}):null]})]}),Pt=()=>{const C=ye;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...C?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:C?void 0:{flex:"0 0 auto",height:"auto"},children:Ln(N,!0)}),h()]})};return r.jsxs("div",{ref:pt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ct?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Mt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Tt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:C=>C.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?un:void 0,onPointerUp:fe?Ft:void 0,onPointerCancel:fe?wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&A?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:C=>{C.target===C.currentTarget&&Ue(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:le(Bt.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${A?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?le(B.images):null})},`slide-in-${D}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...on},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?Rt:rn)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?rt():Pt():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:sn(_e||N)}),r.jsxs("div",{ref:xt,className:Se,style:{width:"100%",...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:sn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(N)}),h()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[sn(N),h()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Me&&Hn(),ct&&On()]})]})})]})]})]})};function lg(e){return`
|
|
10351
|
+
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Dn={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 Om(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=zi.reduce((e,t)=>({...e,...Om(t)}),{}),jm=zi.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const zm=Am(),Vm={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"}}},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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,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:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:zi.map(e=>({path:`styles.${mt(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Fo=qr,hr=`${qr}-`,No=e=>`${qr}-${e}`,Kr=e=>e===Fo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(No(e)));if(i)return i}const n=qa(t.get(Fo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(No(t),String(e)):i.searchParams.set(Fo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===No(e)||i===Fo:Kr(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)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(No(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+hi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},go=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ei=.004,eo=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},to=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},wo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>wo(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},no=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:wo(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Vi=["title1","title2","title3","count"],gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[gt(e,"fontFamily"),gt(e,"fontSettings"),{type:"row",items:[gt(e,"fontSize"),gt(e,"lineHeight"),gt(e,"letterSpacing"),gt(e,"wordSpacing")]},gt(e,"textAlign"),gt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Vi.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},io=(e,t)=>{const n=i=>{const o=gt(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[rg[t]]}},oo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:P,textTransition:$,title1Width:T,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:L,closeIconMaxWidth:A,closeIconColor:H,closeIconHoverColor:U,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(C=>E.scalingValue(C,i??!1),[i]),X=k(m??0),q=`${y}%`,O=`${P}%`,Y=k(g),ie=k(se),re=k(j),F=oo("title1",io(n,"title1"),i),ae=oo("title2",io(n,"title2"),i),f=oo("title3",io(n,"title3"),i),oe=oo("count",io(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>go(t,w),[t,w]),[ce,G]=c.useState(a),B=Z[ce],N=B==null?void 0:B.entry,[me,Ce]=c.useState(!1),[Be,_e]=c.useState(null),[Te,Ne]=c.useState(!1),[z,ue]=c.useState(null),[_,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,we]=c.useState(),[De,Ie]=c.useState(),[Ae,Ke]=c.useState(null),de=c.useRef(null),ke=c.useRef(0),Ve=c.useRef(0),Le=c.useRef(0),at=c.useRef(!1),tt=c.useRef(null),xt=c.useRef(null),qe=c.useRef(null),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(null),At=c.useRef(null),ve=c.useCallback(()=>{const C=xt.current;if(!C)return;const ne=C.closest(`.${e}-lightbox-content-area`);if(!ne)return C.getBoundingClientRect().width;const $e=Array.from(ne.children).reduce((be,xe)=>!(xe instanceof HTMLElement)||xe.contains(C)?be:be+xe.getBoundingClientRect().width,0);return ne.getBoundingClientRect().width-$e},[e]),He=c.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ue=c.useCallback(C=>{C===ke.current&&(ue(null),J(!1))},[]),nt=c.useCallback(()=>{o||at.current||(at.current=!0,p==null||p(),Ce(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),vt=c.useCallback(C=>!!(C.closest("[data-controls]")||C.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Mt,mediaAreaStyle:qt,overlayContentStyle:on,swipeHandlers:Oe,dismissAreaStyle:Tt}=js({enabled:We,onClose:nt,animMs:300,isBlockedTarget:vt}),bt=c.useCallback(C=>{d&&Ds(C+1,l,!0)},[d,l]),it=c.useCallback(C=>{if(C)return C.getBoundingClientRect().height},[]),ft=c.useCallback(C=>{if(Z.length===0)return;const ne=(C%Z.length+Z.length)%Z.length;if(ne===ce)return;const $e=Z[ce],be=Z[ne];ke.current+=1;const xe=ke.current,lt=$==="fade"&&Ga($e==null?void 0:$e.entry)!==Ga(be==null?void 0:be.entry),ut=it(qe.current),Ye=lt?(()=>{const Kt=ve();ki.flushSync(()=>{Ke(be.entry)}),qe.current&&Kt&&(qe.current.style.width=`${Kt}px`);const qi=it(qe.current);return qe.current&&(qe.current.style.width=""),{measuredIncomingTitlesHeight:qi,incomingTitlesMeasureWidth:Kt}})():void 0,Vt=Math.max(ut??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;ee(xe),ue(ce),J(!0),G(ne),bt(ne),Le.current=ne,lt?(He(),Vt&&we(Vt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&Ie(Ye.incomingTitlesMeasureWidth),_e(($e==null?void 0:$e.entryIndex)??null),Ne(!0),Ve.current=be.entryIndex,de.current=setTimeout(()=>{_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),de.current=null},400)):(He(),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),Ve.current=be.entryIndex)},[ce,He,ve,it,Z,bt,$]),Ot=c.useCallback(()=>{At.current=null},[]),un=c.useCallback(C=>{!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0||C.target.closest("[data-controls]")||(At.current={startX:C.clientX,startY:C.clientY,pointerId:C.pointerId})},[fe,Z.length]),Ft=c.useCallback(C=>{var Kt;if(!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0)return;if(Ht){Ot();return}const ne=At.current;if(!ne||ne.pointerId!==C.pointerId||(Ot(),C.target.closest("[data-controls]")))return;const be=C.clientX-ne.startX,xe=C.clientY-ne.startY,lt=Math.abs(be),ut=Math.abs(xe);if(lt>=qm&<>ut){ft(be>0?ce-1:ce+1);return}if(lt>Da||ut>Da)return;const Ye=(Kt=pt.current)==null?void 0:Kt.getBoundingClientRect(),Vt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;ft(C.clientX<Vt?ce-1:ce+1)},[ce,fe,ft,Ht,Ot,Z.length]),wn=c.useCallback(C=>{const ne=At.current;(ne==null?void 0:ne.pointerId)===C.pointerId&&Ot()},[Ot]);zs(),c.useEffect(()=>{_t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const C=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Et.current?Et.current.focus():pt.current&&pt.current.focus()})});return()=>{cancelAnimationFrame(C),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const ne=_t.current;ne&&document.contains(ne)&&ne.focus()}},[]),c.useEffect(()=>{var C;$!=="fade"&&(Ve.current=((C=Z[ce])==null?void 0:C.entryIndex)??0,He(),_e(null),Ne(!1),we(void 0),Ie(void 0))},[ce,He,Z,$]),c.useEffect(()=>{const C=ne=>{if(ne.key==="Escape"){nt();return}if(ne.key==="ArrowLeft"&&Z.length>1){ft(ce-1);return}if(ne.key==="ArrowRight"&&Z.length>1){ft(ce+1);return}if(ne.key==="Tab"&&pt.current){const $e=pt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),be=Array.from($e).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(be.length===0)return;const xe=be[0],lt=be[be.length-1],ut=document.activeElement;ne.shiftKey?(ut===xe||!pt.current.contains(ut))&&(ne.preventDefault(),lt.focus()):(ut===lt||!pt.current.contains(ut))&&(ne.preventDefault(),xe.focus())}};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[ft,nt,ce,Z.length]),c.useLayoutEffect(()=>{He(),ke.current=0,ee(0),ue(null),J(!1),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),G(C=>{const ne=Math.max(0,Z.length-1);return Math.min(C,ne)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var $e;const C=Math.max(0,Z.length-1),ne=Math.min(Math.max(0,a),C);Le.current=ne,Ve.current=(($e=Z[ne])==null?void 0:$e.entryIndex)??0,G(ne)},[a]);const Qe=Be!==null?t[Be]:null,Bt=z!==null?Z[z]:null,rn=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Qe==null?void 0:Qe.title1)||(Qe==null?void 0:Qe.title2)||(Qe==null?void 0:Qe.title3),Me=Qm(w,Z,t),ct=L!==null,Rt=rn||Me||ct,te=Me&&ct?{gap:Y}:void 0,Se=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Re=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,je=k(R),Xe=c.useMemo(()=>({title1Width:T??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[T,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ee=c.useMemo(()=>N?to(e,N,F,ae,f):[],[e,N,F,ae,f]),Lt=c.useMemo(()=>Ee.map(C=>Xe[C.widthKey]),[Ee,Xe]),yt=c.useMemo(()=>wo(Ee.length,Lt),[Ee.length,Lt]),St=c.useMemo(()=>fr(Ee.length,Lt),[Ee.length,Lt]),$t=c.useMemo(()=>Ee.filter(C=>C.prefix==="title1"),[Ee]),Fe=c.useMemo(()=>Ee.filter(C=>C.prefix==="title2"||C.prefix==="title3"),[Ee]),ot=c.useMemo(()=>no($t,Xe),[$t,Xe]),dt=c.useMemo(()=>no(Fe,Xe),[Fe,Xe]),Ct=c.useCallback((C,ne)=>{const $e=Ee.findIndex(xe=>xe.prefix===C.prefix);if(!he||ne==="single-row")return{effectiveWidth:St[$e]??0,resolvedWidth:yt[$e]??0,maxWidth:qn($e,yt)};if(ne==="two-row-top"){const xe=$t.findIndex(lt=>lt.prefix===C.prefix);return{effectiveWidth:ot.effective[xe]??0,resolvedWidth:ot.resolved[xe]??0,maxWidth:qn(xe,ot.resolved)}}const be=Fe.findIndex(xe=>xe.prefix===C.prefix);return{effectiveWidth:dt.effective[be]??0,resolvedWidth:dt.resolved[be]??0,maxWidth:qn(be,dt.resolved)}},[Ee,Fe,dt,St,yt,$t,ot,he]),an=c.useCallback(C=>tg(Ee,yt,et,C)+(he?0:I??0),[Ee,yt,et,he,I]),st=c.useCallback(()=>he?0:I??0,[he,I]),Zt=c.useCallback(C=>Fe.slice(0,C).reduce((ne,$e,be)=>ne+($e.marginLeftKey?et[$e.marginLeftKey]??0:0)+(dt.resolved[be]??0),0),[Fe,dt.resolved,et]),Ze=c.useCallback(C=>{const ne=Fe[C];return Zt(C)+(ne.marginLeftKey?et[ne.marginLeftKey]??0:0)+(dt.resolved[C]??0)},[Fe,dt.resolved,Zt,et]),Nt=c.useCallback((C,ne,$e)=>{if(!he||$e==="single-row"){const Ye=C.findIndex(Bn=>Bn.prefix===ne.prefix),Vt=C.map(Bn=>Xe[Bn.widthKey]),Kt=wo(C.length,Vt);return{effectiveWidth:fr(C.length,Vt)[Ye]??0,resolvedWidth:Kt[Ye]??0,maxWidth:qn(Ye,Kt)}}if($e==="two-row-top"){const Ye=C.filter(Bn=>Bn.prefix==="title1"),Vt=Ye.findIndex(Bn=>Bn.prefix===ne.prefix),{resolved:Kt,effective:qi}=no(Ye,Xe);return{effectiveWidth:qi[Vt]??0,resolvedWidth:Kt[Vt]??0,maxWidth:qn(Vt,Kt)}}const be=C.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),xe=be.findIndex(Ye=>Ye.prefix===ne.prefix),{resolved:lt,effective:ut}=no(be,Xe);return{effectiveWidth:ut[xe]??0,resolvedWidth:lt[xe]??0,maxWidth:qn(xe,lt)}},[Xe,he]),jt=(C,ne,$e)=>{const be=C.marginLeftKey?et[C.marginLeftKey]??0:0,{effectiveWidth:xe,resolvedWidth:lt,maxWidth:ut}=$e??Ct(C,ne),Ye=Math.max(be,eo),Vt=o&&ne==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":C.prefix,style:{width:k(xe),...be>0?{marginLeft:k(be)}:{}},children:[r.jsx("p",{className:C.className,style:C.style,children:C.text}),Vt&&C.marginLeftKey?r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(-be),width:k(Ye),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ei/2),width:k(ei),height:"100%",pointerEvents:"auto"}}):null]},C.className)},Sn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Hn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,ce,w,t)}),o&&ct&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),On=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(A??0,i),height:E.scalingValue(A??0,i),marginRight:re,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:Et,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:r.jsx(tn,{url:L??"",fill:H,hoverFill:i&&!s?H:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),$n=()=>!Me&&!ct?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Me?Hn():null,ct?On():null]}),Jn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f);return r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,ne.map($e=>jt($e,"single-row",Nt(ne,$e,"single-row")))]})},Cn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f),$e=ne.find(be=>be.prefix==="title1");return!$e&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,$e?jt($e,"two-row-top",Nt(ne,$e,"two-row-top")):null]})},Tn=(C,ne=!1)=>{const $e=C?to(e,C,F,ae,f):[],be=$e.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),xe=o&≠return be.length>0||xe||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[be.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[be.map(ut=>jt(ut,"two-row-bottom",Nt($e,ut,"two-row-bottom"))),ne&&o?r.jsxs(r.Fragment,{children:[Di(),Bo()]}):null]}):null,(R??0)>0||xe?r.jsx("div",{"data-controls":xe?"titleRowMarginBottom":void 0,"data-controls-axis":xe?"y":void 0,"data-controls-reverse":xe?"":void 0,className:xe?`${e}-control`:void 0,style:{height:je,width:"100%",flexShrink:0,pointerEvents:xe?"auto":"none"}}):null]}):null},Ln=(C,ne=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Cn(C),$n()]}),Tn(C,ne)]}),sn=C=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Ln(C)}):C?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(C)}):null,Ho=()=>{const C=he?-1:Ee.findIndex(be=>be.prefix==="title1"),ne=!he&&(o||(I??0)>0)?(()=>{const xe=Math.max(I??0,eo),lt=C>=0?yt[C]:T;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:k(xe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,$e=Ee.flatMap((be,xe)=>{if(!be.marginLeftKey)return[];const lt=et[be.marginLeftKey]??0,ut=eg(Ee,yt,et,xe)+st(),Ye=Math.max(lt,eo);return r.jsx("div",{"data-controls":be.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[xe]),style:{position:"absolute",top:0,left:k(ut),width:k(Ye),height:"100%",pointerEvents:"auto"}},be.marginLeftKey)});return ne?[ne,...$e]:$e},Oo=()=>Ee.map((C,ne)=>{const $e=qn(ne,yt),xe=an(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),Di=()=>Fe.flatMap((C,ne)=>{if(!C.marginLeftKey)return[];const $e=et[C.marginLeftKey]??0,be=Zt(ne),xe=Math.max($e,eo),{resolvedWidth:lt}=Ct(C,"two-row-bottom");return r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(be),width:k(xe),height:"100%",pointerEvents:"auto"}},C.marginLeftKey)}),Bo=()=>Fe.map((C,ne)=>{const{maxWidth:$e}=Ct(C,"two-row-bottom"),xe=Ze(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),h=()=>!o||he?null:r.jsxs(r.Fragment,{children:[Ho(),Oo()]}),K=C=>{const ne=!C.objectFit&&vn(x);return{className:`${e}-slide-image-cell${ne?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...ne?{"--image-aspect-ratio":Wo(x)}:{}}}},Q=C=>C.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":C.objectFit}}:vn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},le=C=>{if(C.length===0)return null;const ne=C.length>1,$e=ir(X),be=`calc(-0.5 * (${$e} + ${X}))`;if(C.length===1){const xe=C[0];return r.jsx("div",{...K(xe),children:r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ne?{gap:X}:void 0,children:C.map((xe,lt)=>r.jsxs("div",{...K(xe),children:[r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1}),o&&ne&<<C.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:be,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${xe.url}-${lt}`))})},ye=!!(N!=null&&N.title2||N!=null&&N.title3||Qe!=null&&Qe.title2||Qe!=null&&Qe.title3||(R??0)>0||o),rt=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Ln(Ae||N)}),r.jsxs("div",{ref:xt,className:`${e}-titles-row-two-row`,style:{...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:Se,style:{position:"relative",flex:1,minWidth:0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:Cn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Cn(N)})]}),$n()]}),ye?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(N,!0)})]}):null]})]}),Pt=()=>{const C=ye;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...C?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:C?void 0:{flex:"0 0 auto",height:"auto"},children:Ln(N,!0)}),h()]})};return r.jsxs("div",{ref:pt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ct?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Mt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Tt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:C=>C.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?un:void 0,onPointerUp:fe?Ft:void 0,onPointerCancel:fe?wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&_?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:C=>{C.target===C.currentTarget&&Ue(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:le(Bt.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${_?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?le(B.images):null})},`slide-in-${D}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...on},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?Rt:rn)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?rt():Pt():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:sn(Ae||N)}),r.jsxs("div",{ref:xt,className:Se,style:{width:"100%",...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:sn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(N)}),h()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[sn(N),h()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Me&&Hn(),ct&&On()]})]})})]})]})]})};function lg(e){return`
|
|
10352
10352
|
.${e}-wrapper {
|
|
10353
10353
|
position: relative;
|
|
10354
10354
|
width: 100%;
|
|
@@ -10865,7 +10865,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10865
10865
|
pointer-events: auto;
|
|
10866
10866
|
z-index: 10;
|
|
10867
10867
|
}
|
|
10868
|
-
`}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=E.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[y,P]=c.useState(0),$=c.useRef(!1),T=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>hi(g).length>0),[t]),I=v&&M.length>0,W=!n,b=c.useCallback(()=>{W&&(S.current=!0,Um(T.current,l),T.current=!1)},[W,l]),R=(g=0)=>{if(M.length===0||n&&!i&&!o)return;const L=go(M,w),
|
|
10868
|
+
`}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=E.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[y,P]=c.useState(0),$=c.useRef(!1),T=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>hi(g).length>0),[t]),I=v&&M.length>0,W=!n,b=c.useCallback(()=>{W&&(S.current=!0,Um(T.current,l),T.current=!1)},[W,l]),R=(g=0)=>{if(M.length===0||n&&!i&&!o)return;const L=go(M,w),A=Math.max(0,Math.min(g,L.length-1));if(P(A),W){const H=qs();Ds(A+1,l,H),T.current=!H}m(!0)},V=c.useCallback(()=>{m(!1),S.current=!1},[]);return c.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),c.useEffect(()=>{if(!W||$.current)return;$.current=!0;const g=Ka(l);if(!g)return;const L=Ua(g,go(M,w).length);L<0||(P(L),m(!0))},[M,l,W,w]),c.useEffect(()=>{if(!W)return;const g=()=>{if(S.current){S.current=!1,m(!1);return}const L=Ka(l);if(!L){m(!1);return}const A=Ua(L,go(M,w).length);if(A<0){m(!1);return}T.current=!1,P(A),m(!0)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[M,l,W,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${vn(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...vn(u)?{"--image-aspect-ratio":Wo(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${vn(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),I&&typeof document<"u"&&(()=>{const g=(s?document.getElementById(s):null)??document.body;return ki.createPortal(r.jsx(sg,{prefix:d,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:W,journalItemId:l,onBeforeClose:b,onClose:V}),g)})()]})},dg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
10869
10869
|
import { createPortal } from 'react-dom';
|
|
10870
10870
|
import { CommonComponentProps } from '../props';
|
|
10871
10871
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -11616,4 +11616,4 @@ export type LightboxJournalSettings = {
|
|
|
11616
11616
|
closeIconColor: string;
|
|
11617
11617
|
closeIconHoverColor: string;
|
|
11618
11618
|
};
|
|
11619
|
-
`,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Kn={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 pg(e){const t={};return t[gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[gt(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[gt(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[gt(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[gt(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[gt(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mg=Vi.reduce((e,t)=>({...e,...pg(t)}),{}),gg=Vi.reduce((e,t)=>({...e,[gt(t,"fontFamily")]:"Arial",[gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[gt(t,"letterSpacing")]:0,[gt(t,"wordSpacing")]:0,[gt(t,"textAlign")]:"left",[gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xa(e){return Vi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[gt(n,"fontSize")]=i),o!==void 0&&(t[gt(n,"lineHeight")]=o),t},{})}const hg=og(),fg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...mg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/
|
|
11619
|
+
`,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Kn={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 pg(e){const t={};return t[gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[gt(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[gt(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[gt(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[gt(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[gt(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mg=Vi.reduce((e,t)=>({...e,...pg(t)}),{}),gg=Vi.reduce((e,t)=>({...e,[gt(t,"fontFamily")]:"Arial",[gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[gt(t,"letterSpacing")]:0,[gt(t,"wordSpacing")]:0,[gt(t,"textAlign")]:"left",[gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xa(e){return Vi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[gt(n,"fontSize")]=i),o!==void 0&&(t[gt(n,"lineHeight")]=o),t},{})}const hg=og(),fg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...mg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ug,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...gg},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Xa({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Xa({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_4.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_6.jpg",name:"",objectFit:"contain"}]}]}},yg={element:cg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:fg,sourceCode:dg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Vi.map(e=>({path:`styles.${gt(e,"fontSettings")}`}))}},vg=[nd,cd,Jd,au,fu,Pu,ku,Bu,Zu,em,cm,Dm,yg];exports.components=vg;exports.isSchemaV1=Us;
|