@cntrl-site/components 1.0.7-1 → 1.0.7-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),V=require("react"),yt=require("classnames"),E=require("./useScopedStyles-DpVdqfXj.js"),Lr=require("react-dom");function bo(t){return t.type==="object"&&t.version===1}const vo="ControlSlider-module__wrapper___sHEkd",So="ControlSlider-module__hoverArrow___A-dOH",xo="ControlSlider-module__sliderItem___QQSkR",Co="ControlSlider-module__sliderImage___9hRl-",$o="ControlSlider-module__arrow___05ghY",wo="ControlSlider-module__arrowVertical___tBfVN",_o="ControlSlider-module__nextArrow___-30Yc",To="ControlSlider-module__arrowInner___aEra3",Lo="ControlSlider-module__arrowIcon___S4ztF",Eo="ControlSlider-module__arrowImg___2dwJW",Ao="ControlSlider-module__mirror___brd6U",Io="ControlSlider-module__pagination___bicLF",Fo="ControlSlider-module__paginationInner___bT-P-",ko="ControlSlider-module__paginationVertical___zYqKw",Ro="ControlSlider-module__paginationItem___nTRbk",Oo="ControlSlider-module__dot___p1Qun",Po="ControlSlider-module__activeDot___LHFaj",Bo="ControlSlider-module__paginationInsideBottom___R3FWn",Wo="ControlSlider-module__paginationInsideTop___V-qb-",Vo="ControlSlider-module__paginationOutsideBottom___14w8D",zo="ControlSlider-module__paginationOutsideTop___SCLqB",No="ControlSlider-module__paginationInsideLeft___yOBRZ",jo="ControlSlider-module__paginationInsideRight___Rtt3o",Mo="ControlSlider-module__paginationOutsideLeft___lahaw",Ho="ControlSlider-module__paginationOutsideRight___EtuQa",Do="ControlSlider-module__imgWrapper___UjEgB",Go="ControlSlider-module__captionBlock___dJ6-j",Uo="ControlSlider-module__captionTextWrapper___HFlpf",Xo="ControlSlider-module__captionText___uGBVc",qo="ControlSlider-module__active___WZK4G",Yo="ControlSlider-module__withPointerEvents___t-18M",Ko="ControlSlider-module__topLeftAlignment___zjnGM",Jo="ControlSlider-module__topCenterAlignment___gD1xW",Zo="ControlSlider-module__topRightAlignment___NMapS",Qo="ControlSlider-module__middleLeftAlignment___OnUrY",ti="ControlSlider-module__middleCenterAlignment___Tdkl0",ei="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",ri="ControlSlider-module__bottomCenterAlignment___c54fB",oi="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",U={wrapper:vo,hoverArrow:So,sliderItem:xo,sliderImage:Co,arrow:$o,arrowVertical:wo,nextArrow:_o,arrowInner:To,arrowIcon:Lo,arrowImg:Eo,mirror:Ao,pagination:Io,paginationInner:Fo,paginationVertical:ko,paginationItem:Ro,dot:Oo,activeDot:Po,paginationInsideBottom:Bo,paginationInsideTop:Wo,paginationOutsideBottom:Vo,paginationOutsideTop:zo,paginationInsideLeft:No,paginationInsideRight:jo,paginationOutsideLeft:Mo,paginationOutsideRight:Ho,imgWrapper:Do,captionBlock:Go,captionTextWrapper:Uo,captionText:Xo,active:qo,withPointerEvents:Yo,topLeftAlignment:Ko,topCenterAlignment:Jo,topRightAlignment:Zo,middleLeftAlignment:Qo,middleCenterAlignment:ti,middleRightAlignment:ei,bottomLeftAlignment:ni,bottomCenterAlignment:ri,bottomRightAlignment:oi,clickOverlay:ii,contain:ai,cover:li};function si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ci(t,e,n){return e&&si(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var ir="(prefers-reduced-motion: reduce)",fe=1,ui=2,ve=3,Ce=4,Be=5,Ze=6,nn=7,pi={CREATED:fe,MOUNTED:ui,IDLE:ve,MOVING:Ce,SCROLLING:Be,DRAGGING:Ze,DESTROYED:nn};function Xt(t){t.length=0}function ee(t,e,n){return Array.prototype.slice.call(t,e,n)}function mt(t){return t.bind.apply(t,[null].concat(ee(arguments,1)))}var Er=setTimeout,Tn=function(){};function ar(t){return requestAnimationFrame(t)}function sn(t,e){return typeof e===t}function Ae(t){return!Bn(t)&&sn("object",t)}var Pn=Array.isArray,Ar=mt(sn,"function"),Qt=mt(sn,"string"),We=mt(sn,"undefined");function Bn(t){return t===null}function Ir(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ve(t){return Pn(t)?t:[t]}function It(t,e){Ve(t).forEach(e)}function Wn(t,e){return t.indexOf(e)>-1}function Qe(t,e){return t.push.apply(t,Ve(e)),t}function Ht(t,e,n){t&&It(e,function(r){r&&t.classList[n?"add":"remove"](r)})}function Wt(t,e){Ht(t,Qt(e)?e.split(" "):e,!0)}function ze(t,e){It(e,t.appendChild.bind(t))}function Vn(t,e){It(t,function(n){var r=(e||n).parentNode;r&&r.insertBefore(n,e)})}function Ie(t,e){return Ir(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Fr(t,e){var n=t?ee(t.children):[];return e?n.filter(function(r){return Ie(r,e)}):n}function Ne(t,e){return e?Fr(t,e)[0]:t.firstElementChild}var Fe=Object.keys;function le(t,e,n){return t&&(n?Fe(t).reverse():Fe(t)).forEach(function(r){r!=="__proto__"&&e(t[r],r)}),t}function ke(t){return ee(arguments,1).forEach(function(e){le(e,function(n,r){t[r]=e[r]})}),t}function Jt(t){return ee(arguments,1).forEach(function(e){le(e,function(n,r){Pn(n)?t[r]=n.slice():Ae(n)?t[r]=Jt({},Ae(t[r])?t[r]:{},n):t[r]=n})}),t}function lr(t,e){It(e||Fe(t),function(n){delete t[n]})}function Vt(t,e){It(t,function(n){It(e,function(r){n&&n.removeAttribute(r)})})}function tt(t,e,n){Ae(e)?le(e,function(r,o){tt(t,o,r)}):It(t,function(r){Bn(n)||n===""?Vt(r,e):r.setAttribute(e,String(n))})}function he(t,e,n){var r=document.createElement(t);return e&&(Qt(e)?Wt(r,e):tt(r,e)),n&&ze(n,r),r}function kt(t,e,n){if(We(n))return getComputedStyle(t)[e];Bn(n)||(t.style[e]=""+n)}function Re(t,e){kt(t,"display",e)}function kr(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Rt(t,e){return t.getAttribute(e)}function sr(t,e){return t&&t.classList.contains(e)}function Et(t){return t.getBoundingClientRect()}function se(t){It(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Rr(t){return Ne(new DOMParser().parseFromString(t,"text/html").body)}function Mt(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Or(t,e){return t&&t.querySelector(e)}function zn(t,e){return e?ee(t.querySelectorAll(e)):[]}function Dt(t,e){Ht(t,e,!1)}function Ln(t){return t.timeStamp}function ie(t){return Qt(t)?t:t?t+"px":""}var je="splide",Nn="data-"+je;function Le(t,e){if(!t)throw new Error("["+je+"] "+(e||""))}var te=Math.min,rn=Math.max,on=Math.floor,Oe=Math.ceil,Tt=Math.abs;function Pr(t,e,n){return Tt(t-e)<n}function tn(t,e,n,r){var o=te(e,n),a=rn(e,n);return r?o<t&&t<a:o<=t&&t<=a}function ge(t,e,n){var r=te(e,n),o=rn(e,n);return te(rn(r,t),o)}function En(t){return+(t>0)-+(t<0)}function An(t,e){return It(e,function(n){t=t.replace("%s",""+n)}),t}function jn(t){return t<10?"0"+t:""+t}var cr={};function di(t){return""+t+jn(cr[t]=(cr[t]||0)+1)}function Br(){var t=[];function e(i,c,s,d){o(i,c,function(l,w,b){var g="addEventListener"in l,u=g?l.removeEventListener.bind(l,w,s,d):l.removeListener.bind(l,s);g?l.addEventListener(w,s,d):l.addListener(s),t.push([l,w,b,s,u])})}function n(i,c,s){o(i,c,function(d,l,w){t=t.filter(function(b){return b[0]===d&&b[1]===l&&b[2]===w&&(!s||b[3]===s)?(b[4](),!1):!0})})}function r(i,c,s){var d,l=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:l,detail:s}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,l,!1,s)),i.dispatchEvent(d),d}function o(i,c,s){It(i,function(d){d&&It(c,function(l){l.split(" ").forEach(function(w){var b=w.split(".");s(d,b[0],b[1])})})})}function a(){t.forEach(function(i){i[4]()}),Xt(t)}return{bind:e,unbind:n,dispatch:r,destroy:a}}var ne="mounted",In="ready",qt="move",$e="moved",Mn="click",Wr="active",Vr="inactive",zr="visible",Nr="hidden",vt="refresh",$t="updated",Se="resize",cn="resized",jr="drag",Mr="dragging",Hr="dragged",un="scroll",ue="scrolled",gi="overflow",Hn="destroy",Dr="arrows:mounted",Gr="arrows:updated",Ur="pagination:mounted",Xr="pagination:updated",Dn="navigation:mounted",Gn="autoplay:play",qr="autoplay:playing",Un="autoplay:pause",Xn="lazyload:loaded",Yr="sk",Kr="sh",an="ei";function bt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Br();function r(a,i){n.bind(e,Ve(a).join(" "),function(c){i.apply(i,Pn(c.detail)?c.detail:[])})}function o(a){n.dispatch(e,a,ee(arguments,1))}return t&&t.event.on(Hn,n.destroy),ke(n,{bus:e,on:r,off:mt(n.unbind,e),emit:o})}function pn(t,e,n,r){var o=Date.now,a,i=0,c,s=!0,d=0;function l(){if(!s){if(i=t?te((o()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=o(),r&&++d>=r))return b();c=ar(l)}}function w(y){y||u(),a=o()-(y?i*t:0),s=!1,c=ar(l)}function b(){s=!0}function g(){a=o(),i=0,n&&n(i)}function u(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function m(y){t=y}function S(){return s}return{start:w,rewind:g,pause:b,cancel:u,set:m,isPaused:S}}function mi(t){var e=t;function n(o){e=o}function r(o){return Wn(Ve(o),e)}return{set:n,is:r}}function fi(t,e){var n=pn(0,t,null,1);return function(){n.isPaused()&&n.start()}}function hi(t,e,n){var r=t.state,o=n.breakpoints||{},a=n.reducedMotion||{},i=Br(),c=[];function s(){var u=n.mediaQuery==="min";Fe(o).sort(function(m,S){return u?+m-+S:+S-+m}).forEach(function(m){l(o[m],"("+(u?"min":"max")+"-width:"+m+"px)")}),l(a,ir),w()}function d(u){u&&i.destroy()}function l(u,m){var S=matchMedia(m);i.bind(S,"change",w),c.push([u,S])}function w(){var u=r.is(nn),m=n.direction,S=c.reduce(function(y,v){return Jt(y,v[1].matches?v[0]:{})},{});lr(n),g(S),n.destroy?t.destroy(n.destroy==="completely"):u?(d(!0),t.mount()):m!==n.direction&&t.refresh()}function b(u){matchMedia(ir).matches&&(u?Jt(n,a):lr(n,Fe(a)))}function g(u,m,S){Jt(n,u),m&&Jt(Object.getPrototypeOf(n),u),(S||!r.is(fe))&&t.emit($t,n)}return{setup:s,destroy:d,reduce:b,set:g}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Jr=dn+"Up",Zr=dn+"Down",ur="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jr,mn],ArrowRight:[Zr,gn]};function yi(t,e,n){function r(a,i,c){c=c||n.direction;var s=c===ur&&!i?1:c===fn?0:-1;return Sn[a]&&Sn[a][s]||a.replace(/width|left|right/i,function(d,l){var w=Sn[d.toLowerCase()][s]||d;return l>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(a){return a*(n.direction===ur?1:-1)}return{resolve:r,orient:o}}var Ut="role",ye="tabindex",bi="disabled",Ot="aria-",Me=Ot+"controls",Qr=Ot+"current",pr=Ot+"selected",At=Ot+"label",qn=Ot+"labelledby",to=Ot+"hidden",Yn=Ot+"orientation",Pe=Ot+"roledescription",dr=Ot+"live",gr=Ot+"busy",mr=Ot+"atomic",Kn=[Ut,ye,bi,Me,Qr,At,qn,to,Yn,Pe],zt=je+"__",re="is-",xn=je,fr=zt+"track",vi=zt+"list",hn=zt+"slide",eo=hn+"--clone",Si=hn+"__container",Jn=zt+"arrows",yn=zt+"arrow",no=yn+"--prev",ro=yn+"--next",bn=zt+"pagination",oo=bn+"__page",xi=zt+"progress",Ci=xi+"__bar",$i=zt+"toggle",wi=zt+"spinner",_i=zt+"sr",Ti=re+"initialized",ce=re+"active",io=re+"prev",ao=re+"next",Fn=re+"visible",kn=re+"loading",lo=re+"focus-in",so=re+"overflow",Li=[ce,Fn,io,ao,kn,lo,so],Ei={slide:hn,clone:eo,arrows:Jn,arrow:yn,prev:no,next:ro,pagination:bn,page:oo,spinner:wi};function Ai(t,e){if(Ar(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!Ie(n,e);)n=n.parentElement;return n}var Ii=5,hr=200,co="touchstart mousedown",Cn="touchmove mousemove",$n="touchend touchcancel mouseup click";function Fi(t,e,n){var r=bt(t),o=r.on,a=r.bind,i=t.root,c=n.i18n,s={},d=[],l=[],w=[],b,g,u;function m(){C(),M(),v()}function S(){o(vt,y),o(vt,m),o($t,v),a(document,co+" keydown",function(f){u=f.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Ht(i,lo,!!u)})}function y(f){var T=Kn.concat("style");Xt(d),Dt(i,l),Dt(b,w),Vt([b,g],T),Vt(i,f?T:["style",Pe])}function v(){Dt(i,l),Dt(b,w),l=$(xn),w=$(fr),Wt(i,l),Wt(b,w),tt(i,At,n.label),tt(i,qn,n.labelledby)}function C(){b=B("."+fr),g=Ne(b,"."+vi),Le(b&&g,"A track/list element is missing."),Qe(d,Fr(g,"."+hn+":not(."+eo+")")),le({arrows:Jn,pagination:bn,prev:no,next:ro,bar:Ci,toggle:$i},function(f,T){s[T]=B("."+f)}),ke(s,{root:i,track:b,list:g,slides:d})}function M(){var f=i.id||di(je),T=n.role;i.id=f,b.id=b.id||f+"-track",g.id=g.id||f+"-list",!Rt(i,Ut)&&i.tagName!=="SECTION"&&T&&tt(i,Ut,T),tt(i,Pe,c.carousel),tt(g,Ut,"presentation")}function B(f){var T=Or(i,f);return T&&Ai(T,"."+xn)===i?T:void 0}function $(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===xn&&ce]}return ke(s,{setup:m,mount:S,destroy:y})}var xe="slide",we="loop",He="fade";function ki(t,e,n,r){var o=bt(t),a=o.on,i=o.emit,c=o.bind,s=t.Components,d=t.root,l=t.options,w=l.isNavigation,b=l.updateOnMove,g=l.i18n,u=l.pagination,m=l.slideFocus,S=s.Direction.resolve,y=Rt(r,"style"),v=Rt(r,At),C=n>-1,M=Ne(r,"."+Si),B;function $(){C||(r.id=d.id+"-slide"+jn(e+1),tt(r,Ut,u?"tabpanel":"group"),tt(r,Pe,g.slide),tt(r,At,v||An(g.slideLabel,[e+1,t.length]))),f()}function f(){c(r,"click",mt(i,Mn,F)),c(r,"keydown",mt(i,Yr,F)),a([$e,Kr,ue],L),a(Dn,A),b&&a(qt,z)}function T(){B=!0,o.destroy(),Dt(r,Li),Vt(r,Kn),tt(r,"style",y),tt(r,At,v||"")}function A(){var I=t.splides.map(function(_){var P=_.splide.Components.Slides.getAt(e);return P?P.slide.id:""}).join(" ");tt(r,At,An(g.slideX,(C?n:e)+1)),tt(r,Me,I),tt(r,Ut,m?"button":""),m&&Vt(r,Pe)}function z(){B||L()}function L(){if(!B){var I=t.index;k(),W(),Ht(r,io,e===I-1),Ht(r,ao,e===I+1)}}function k(){var I=H();I!==sr(r,ce)&&(Ht(r,ce,I),tt(r,Qr,w&&I||""),i(I?Wr:Vr,F))}function W(){var I=h(),_=!I&&(!H()||C);if(t.state.is([Ce,Be])||tt(r,to,_||""),tt(zn(r,l.focusableNodes||""),ye,_?-1:""),m&&tt(r,ye,_?-1:0),I!==sr(r,Fn)&&(Ht(r,Fn,I),i(I?zr:Nr,F)),!I&&document.activeElement===r){var P=s.Slides.getAt(t.index);P&&kr(P.slide)}}function D(I,_,P){kt(P&&M||r,I,_)}function H(){var I=t.index;return I===e||l.cloneStatus&&I===n}function h(){if(t.is(He))return H();var I=Et(s.Elements.track),_=Et(r),P=S("left",!0),X=S("right",!0);return on(I[P])<=Oe(_[P])&&on(_[X])<=Oe(I[X])}function O(I,_){var P=Tt(I-e);return!C&&(l.rewind||t.is(we))&&(P=te(P,t.length-P)),P<=_}var F={index:e,slideIndex:n,slide:r,container:M,isClone:C,mount:$,destroy:T,update:L,style:D,isWithin:O};return F}function Ri(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=r.bind,c=e.Elements,s=c.slides,d=c.list,l=[];function w(){b(),o(vt,g),o(vt,b)}function b(){s.forEach(function(L,k){m(L,k,-1)})}function g(){B(function(L){L.destroy()}),Xt(l)}function u(){B(function(L){L.update()})}function m(L,k,W){var D=ki(t,k,W,L);D.mount(),l.push(D),l.sort(function(H,h){return H.index-h.index})}function S(L){return L?$(function(k){return!k.isClone}):l}function y(L){var k=e.Controller,W=k.toIndex(L),D=k.hasFocus()?1:n.perPage;return $(function(H){return tn(H.index,W,W+D-1)})}function v(L){return $(L)[0]}function C(L,k){It(L,function(W){if(Qt(W)&&(W=Rr(W)),Ir(W)){var D=s[k];D?Vn(W,D):ze(d,W),Wt(W,n.classes.slide),T(W,mt(a,Se))}}),a(vt)}function M(L){se($(L).map(function(k){return k.slide})),a(vt)}function B(L,k){S(k).forEach(L)}function $(L){return l.filter(Ar(L)?L:function(k){return Qt(L)?Ie(k.slide,L):Wn(Ve(L),k.index)})}function f(L,k,W){B(function(D){D.style(L,k,W)})}function T(L,k){var W=zn(L,"img"),D=W.length;D?W.forEach(function(H){i(H,"load error",function(){--D||k()})}):k()}function A(L){return L?s.length:l.length}function z(){return l.length>n.perPage}return{mount:w,destroy:g,update:u,register:m,get:S,getIn:y,getAt:v,add:C,remove:M,forEach:B,filter:$,style:f,getLength:A,isEnough:z}}function Oi(t,e,n){var r=bt(t),o=r.on,a=r.bind,i=r.emit,c=e.Slides,s=e.Direction.resolve,d=e.Elements,l=d.root,w=d.track,b=d.list,g=c.getAt,u=c.style,m,S,y;function v(){C(),a(window,"resize load",fi(mt(i,Se))),o([$t,vt],C),o(Se,M)}function C(){m=n.direction===fn,kt(l,"maxWidth",ie(n.width)),kt(w,s("paddingLeft"),B(!1)),kt(w,s("paddingRight"),B(!0)),M(!0)}function M(F){var I=Et(l);(F||S.width!==I.width||S.height!==I.height)&&(kt(w,"height",$()),u(s("marginRight"),ie(n.gap)),u("width",T()),u("height",A(),!0),S=I,i(cn),y!==(y=O())&&(Ht(l,so,y),i(gi,y)))}function B(F){var I=n.padding,_=s(F?"right":"left");return I&&ie(I[_]||(Ae(I)?0:I))||"0px"}function $(){var F="";return m&&(F=f(),Le(F,"height or heightRatio is missing."),F="calc("+F+" - "+B(!1)+" - "+B(!0)+")"),F}function f(){return ie(n.height||Et(b).width*n.heightRatio)}function T(){return n.autoWidth?null:ie(n.fixedWidth)||(m?"":z())}function A(){return ie(n.fixedHeight)||(m?n.autoHeight?null:z():f())}function z(){var F=ie(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function L(){return Et(b)[s("width")]}function k(F,I){var _=g(F||0);return _?Et(_.slide)[s("width")]+(I?0:H()):0}function W(F,I){var _=g(F);if(_){var P=Et(_.slide)[s("right")],X=Et(b)[s("left")];return Tt(P-X)+(I?0:H())}return 0}function D(F){return W(t.length-1)-W(0)+k(0,F)}function H(){var F=g(0);return F&&parseFloat(kt(F.slide,s("marginRight")))||0}function h(F){return parseFloat(kt(w,s("padding"+(F?"Right":"Left"))))||0}function O(){return t.is(He)||D(!0)>L()}return{mount:v,resize:M,listSize:L,slideSize:k,sliderSize:D,totalSize:W,getPadding:h,isOverflow:O}}var Pi=2;function Bi(t,e,n){var r=bt(t),o=r.on,a=e.Elements,i=e.Slides,c=e.Direction.resolve,s=[],d;function l(){o(vt,w),o([$t,Se],g),(d=S())&&(u(d),e.Layout.resize(!0))}function w(){b(),l()}function b(){se(s),Xt(s),r.destroy()}function g(){var y=S();d!==y&&(d<y||!y)&&r.emit(vt)}function u(y){var v=i.get().slice(),C=v.length;if(C){for(;v.length<y;)Qe(v,v);Qe(v.slice(-y),v.slice(0,y)).forEach(function(M,B){var $=B<y,f=m(M.slide,B);$?Vn(f,v[0].slide):ze(a.list,f),Qe(s,f),i.register(f,B-y+($?0:C),M.index)})}}function m(y,v){var C=y.cloneNode(!0);return Wt(C,n.classes.clone),C.id=t.root.id+"-clone"+jn(v+1),C}function S(){var y=n.clones;if(!t.is(we))y=0;else if(We(y)){var v=n[c("fixedWidth")]&&e.Layout.slideSize(0),C=v&&Oe(Et(a.track)[c("width")]/v);y=C||n[c("autoWidth")]&&t.length||n.perPage*Pi}return y}return{mount:l,destroy:b}}function Wi(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=t.state.set,c=e.Layout,s=c.slideSize,d=c.getPadding,l=c.totalSize,w=c.listSize,b=c.sliderSize,g=e.Direction,u=g.resolve,m=g.orient,S=e.Elements,y=S.list,v=S.track,C;function M(){C=e.Transition,o([ne,cn,$t,vt],B)}function B(){e.Controller.isBusy()||(e.Scroll.cancel(),f(t.index),e.Slides.update())}function $(_,P,X,it){_!==P&&F(_>X)&&(L(),T(z(D(),_>X),!0)),i(Ce),a(qt,P,X,_),C.start(P,function(){i(ve),a($e,P,X,_),it&&it()})}function f(_){T(W(_,!0))}function T(_,P){if(!t.is(He)){var X=P?_:A(_);kt(y,"transform","translate"+u("X")+"("+X+"px)"),_!==X&&a(Kr)}}function A(_){if(t.is(we)){var P=k(_),X=P>e.Controller.getEnd(),it=P<0;(it||X)&&(_=z(_,X))}return _}function z(_,P){var X=_-O(P),it=b();return _-=m(it*(Oe(Tt(X)/it)||1))*(P?1:-1),_}function L(){T(D(),!0),C.cancel()}function k(_){for(var P=e.Slides.get(),X=0,it=1/0,et=0;et<P.length;et++){var st=P[et].index,R=Tt(W(st,!0)-_);if(R<=it)it=R,X=st;else break}return X}function W(_,P){var X=m(l(_-1)-h(_));return P?H(X):X}function D(){var _=u("left");return Et(y)[_]-Et(v)[_]+m(d(!1))}function H(_){return n.trimSpace&&t.is(xe)&&(_=ge(_,0,m(b(!0)-w()))),_}function h(_){var P=n.focus;return P==="center"?(w()-s(_,!0))/2:+P*s(_)||0}function O(_){return W(_?e.Controller.getEnd():0,!!n.trimSpace)}function F(_){var P=m(z(D(),_));return _?P>=0:P<=y[u("scrollWidth")]-Et(v)[u("width")]}function I(_,P){P=We(P)?D():P;var X=_!==!0&&m(P)<m(O(!1)),it=_!==!1&&m(P)>m(O(!0));return X||it}return{mount:M,move:$,jump:f,translate:T,shift:z,cancel:L,toIndex:k,toPosition:W,getPosition:D,getLimit:O,exceededLimit:I,reposition:B}}function Vi(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=e.Move,c=i.getPosition,s=i.getLimit,d=i.toPosition,l=e.Slides,w=l.isEnough,b=l.getLength,g=n.omitEnd,u=t.is(we),m=t.is(xe),S=mt(D,!1),y=mt(D,!0),v=n.start||0,C,M=v,B,$,f;function T(){A(),o([$t,vt,an],A),o(cn,z)}function A(){B=b(!0),$=n.perMove,f=n.perPage,C=F();var R=ge(v,0,g?C:B-1);R!==v&&(v=R,i.reposition())}function z(){C!==F()&&a(an)}function L(R,K,ft){if(!st()){var ct=W(R),dt=O(ct);dt>-1&&(K||dt!==v)&&(X(dt),i.move(ct,dt,M,ft))}}function k(R,K,ft,ct){e.Scroll.scroll(R,K,ft,function(){var dt=O(i.toIndex(c()));X(g?te(dt,C):dt),ct&&ct()})}function W(R){var K=v;if(Qt(R)){var ft=R.match(/([+\-<>])(\d+)?/)||[],ct=ft[1],dt=ft[2];ct==="+"||ct==="-"?K=H(v+ +(""+ct+(+dt||1)),v):ct===">"?K=dt?I(+dt):S(!0):ct==="<"&&(K=y(!0))}else K=u?R:ge(R,0,C);return K}function D(R,K){var ft=$||(et()?1:f),ct=H(v+ft*(R?-1:1),v,!($||et()));return ct===-1&&m&&!Pr(c(),s(!R),1)?R?0:C:K?ct:O(ct)}function H(R,K,ft){if(w()||et()){var ct=h(R);ct!==R&&(K=R,R=ct,ft=!1),R<0||R>C?!$&&(tn(0,R,K,!0)||tn(C,K,R,!0))?R=I(_(R)):u?R=ft?R<0?-(B%f||f):B:R:n.rewind?R=R<0?C:0:R=-1:ft&&R!==K&&(R=I(_(K)+(R<K?-1:1)))}else R=-1;return R}function h(R){if(m&&n.trimSpace==="move"&&R!==v)for(var K=c();K===d(R,!0)&&tn(R,0,t.length-1,!n.rewind);)R<v?--R:++R;return R}function O(R){return u?(R+B)%B||0:R}function F(){for(var R=B-(et()||u&&$?1:f);g&&R-- >0;)if(d(B-1,!0)!==d(R,!0)){R++;break}return ge(R,0,B-1)}function I(R){return ge(et()?R:f*R,0,C)}function _(R){return et()?te(R,C):on((R>=C?B-1:R)/f)}function P(R){var K=i.toIndex(R);return m?ge(K,0,C):K}function X(R){R!==v&&(M=v,v=R)}function it(R){return R?M:v}function et(){return!We(n.focus)||n.isNavigation}function st(){return t.state.is([Ce,Be])&&!!n.waitForTransition}return{mount:T,go:L,scroll:k,getNext:S,getPrev:y,getAdjacent:D,getEnd:F,setIndex:X,getIndex:it,toIndex:I,toPage:_,toDest:P,hasFocus:et,isBusy:st}}var zi="http://www.w3.org/2000/svg",Ni="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",Xe=40;function ji(t,e,n){var r=bt(t),o=r.on,a=r.bind,i=r.emit,c=n.classes,s=n.i18n,d=e.Elements,l=e.Controller,w=d.arrows,b=d.track,g=w,u=d.prev,m=d.next,S,y,v={};function C(){B(),o($t,M)}function M(){$(),C()}function B(){var k=n.arrows;k&&!(u&&m)&&A(),u&&m&&(ke(v,{prev:u,next:m}),Re(g,k?"":"none"),Wt(g,y=Jn+"--"+n.direction),k&&(f(),L(),tt([u,m],Me,b.id),i(Dr,u,m)))}function $(){r.destroy(),Dt(g,y),S?(se(w?[u,m]:g),u=m=null):Vt([u,m],Kn)}function f(){o([ne,$e,vt,ue,an],L),a(m,"click",mt(T,">")),a(u,"click",mt(T,"<"))}function T(k){l.go(k,!0)}function A(){g=w||he("div",c.arrows),u=z(!0),m=z(!1),S=!0,ze(g,[u,m]),!w&&Vn(g,b)}function z(k){var W='<button class="'+c.arrow+" "+(k?c.prev:c.next)+'" type="button"><svg xmlns="'+zi+'" viewBox="0 0 '+Xe+" "+Xe+'" width="'+Xe+'" height="'+Xe+'" focusable="false"><path d="'+(n.arrowPath||Ni)+'" />';return Rr(W)}function L(){if(u&&m){var k=t.index,W=l.getPrev(),D=l.getNext(),H=W>-1&&k<W?s.last:s.prev,h=D>-1&&k>D?s.first:s.next;u.disabled=W<0,m.disabled=D<0,tt(u,At,H),tt(m,At,h),i(Gr,u,m,W,D)}}return{arrows:v,mount:C,destroy:$,update:L}}var Mi=Nn+"-interval";function Hi(t,e,n){var r=bt(t),o=r.on,a=r.bind,i=r.emit,c=pn(n.interval,t.go.bind(t,">"),f),s=c.isPaused,d=e.Elements,l=e.Elements,w=l.root,b=l.toggle,g=n.autoplay,u,m,S=g==="pause";function y(){g&&(v(),b&&tt(b,Me,d.track.id),S||C(),$())}function v(){n.pauseOnHover&&a(w,"mouseenter mouseleave",function(A){u=A.type==="mouseenter",B()}),n.pauseOnFocus&&a(w,"focusin focusout",function(A){m=A.type==="focusin",B()}),b&&a(b,"click",function(){S?C():M(!0)}),o([qt,un,vt],c.rewind),o(qt,T)}function C(){s()&&e.Slides.isEnough()&&(c.start(!n.resetProgress),m=u=S=!1,$(),i(Gn))}function M(A){A===void 0&&(A=!0),S=!!A,$(),s()||(c.pause(),i(Un))}function B(){S||(u||m?M(!1):C())}function $(){b&&(Ht(b,ce,!S),tt(b,At,n.i18n[S?"play":"pause"]))}function f(A){var z=d.bar;z&&kt(z,"width",A*100+"%"),i(qr,A)}function T(A){var z=e.Slides.getAt(A);c.set(z&&+Rt(z.slide,Mi)||n.interval)}return{mount:y,destroy:c.cancel,play:C,pause:M,isPaused:s}}function Di(t,e,n){var r=bt(t),o=r.on;function a(){n.cover&&(o(Xn,mt(c,!0)),o([ne,$t,vt],mt(i,!0)))}function i(s){e.Slides.forEach(function(d){var l=Ne(d.container||d.slide,"img");l&&l.src&&c(s,l,d)})}function c(s,d,l){l.style("background",s?'center/cover no-repeat url("'+d.src+'")':"",!0),Re(d,s?"none":"")}return{mount:a,destroy:mt(i,!1)}}var Gi=10,Ui=600,Xi=.6,qi=1.5,Yi=800;function Ki(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=t.state.set,c=e.Move,s=c.getPosition,d=c.getLimit,l=c.exceededLimit,w=c.translate,b=t.is(xe),g,u,m=1;function S(){o(qt,M),o([$t,vt],B)}function y(f,T,A,z,L){var k=s();if(M(),A&&(!b||!l())){var W=e.Layout.sliderSize(),D=En(f)*W*on(Tt(f)/W)||0;f=c.toPosition(e.Controller.toDest(f%W))+D}var H=Pr(k,f,1);m=1,T=H?0:T||rn(Tt(f-k)/qi,Yi),u=z,g=pn(T,v,mt(C,k,f,L),1),i(Be),a(un),g.start()}function v(){i(ve),u&&u(),a(ue)}function C(f,T,A,z){var L=s(),k=f+(T-f)*$(z),W=(k-L)*m;w(L+W),b&&!A&&l()&&(m*=Xi,Tt(W)<Gi&&y(d(l(!0)),Ui,!1,u,!0))}function M(){g&&g.cancel()}function B(){g&&!g.isPaused()&&(M(),v())}function $(f){var T=n.easingFunc;return T?T(f):1-Math.pow(1-f,4)}return{mount:S,destroy:M,scroll:y,cancel:B}}var me={passive:!1,capture:!0};function Ji(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=r.bind,c=r.unbind,s=t.state,d=e.Move,l=e.Scroll,w=e.Controller,b=e.Elements.track,g=e.Media.reduce,u=e.Direction,m=u.resolve,S=u.orient,y=d.getPosition,v=d.exceededLimit,C,M,B,$,f,T=!1,A,z,L;function k(){i(b,Cn,Tn,me),i(b,$n,Tn,me),i(b,co,D,me),i(b,"click",O,{capture:!0}),i(b,"dragstart",Mt),o([ne,$t],W)}function W(){var j=n.drag;Pt(!j),$=j==="free"}function D(j){if(A=!1,!z){var x=dt(j);ct(j.target)&&(x||!j.button)&&(w.isBusy()?Mt(j,!0):(L=x?b:window,f=s.is([Ce,Be]),B=null,i(L,Cn,H,me),i(L,$n,h,me),d.cancel(),l.cancel(),F(j)))}}function H(j){if(s.is(Ze)||(s.set(Ze),a(jr)),j.cancelable)if(f){d.translate(C+ft(et(j)));var x=st(j)>hr,G=T!==(T=v());(x||G)&&F(j),A=!0,a(Mr),Mt(j)}else P(j)&&(f=_(j),Mt(j))}function h(j){s.is(Ze)&&(s.set(ve),a(Hr)),f&&(I(j),Mt(j)),c(L,Cn,H),c(L,$n,h),f=!1}function O(j){!z&&A&&Mt(j,!0)}function F(j){B=M,M=j,C=y()}function I(j){var x=X(j),G=it(x),q=n.rewind&&n.rewindByDrag;g(!1),$?w.scroll(G,0,n.snap):t.is(He)?w.go(S(En(x))<0?q?"<":"-":q?">":"+"):t.is(xe)&&T&&q?w.go(v(!0)?">":"<"):w.go(w.toDest(G),!0),g(!0)}function _(j){var x=n.dragMinThreshold,G=Ae(x),q=G&&x.mouse||0,J=(G?x.touch:+x)||10;return Tt(et(j))>(dt(j)?J:q)}function P(j){return Tt(et(j))>Tt(et(j,!0))}function X(j){if(t.is(we)||!T){var x=st(j);if(x&&x<hr)return et(j)/x}return 0}function it(j){return y()+En(j)*te(Tt(j)*(n.flickPower||600),$?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function et(j,x){return K(j,x)-K(R(j),x)}function st(j){return Ln(j)-Ln(R(j))}function R(j){return M===j&&B||M}function K(j,x){return(dt(j)?j.changedTouches[0]:j)["page"+m(x?"Y":"X")]}function ft(j){return j/(T&&t.is(xe)?Ii:1)}function ct(j){var x=n.noDrag;return!Ie(j,"."+oo+", ."+yn)&&(!x||!Ie(j,x))}function dt(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function St(){return f}function Pt(j){z=j}return{mount:k,disable:Pt,isDragging:St}}var Zi={Spacebar:" ",Right:mn,Left:gn,Up:Jr,Down:Zr};function Zn(t){return t=Qt(t)?t:t.key,Zi[t]||t}var yr="keydown";function Qi(t,e,n){var r=bt(t),o=r.on,a=r.bind,i=r.unbind,c=t.root,s=e.Direction.resolve,d,l;function w(){b(),o($t,g),o($t,b),o(qt,m)}function b(){var y=n.keyboard;y&&(d=y==="global"?window:c,a(d,yr,S))}function g(){i(d,yr)}function u(y){l=y}function m(){var y=l;l=!0,Er(function(){l=y})}function S(y){if(!l){var v=Zn(y);v===s(gn)?t.go("<"):v===s(mn)&&t.go(">")}}return{mount:w,destroy:g,disable:u}}var Ee=Nn+"-lazy",en=Ee+"-srcset",ta="["+Ee+"], ["+en+"]";function ea(t,e,n){var r=bt(t),o=r.on,a=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",d=[$e,ue],l=[];function w(){n.lazyLoad&&(b(),o(vt,b))}function b(){Xt(l),g(),s?y():(a(d),o(d,u),u())}function g(){e.Slides.forEach(function(v){zn(v.slide,ta).forEach(function(C){var M=Rt(C,Ee),B=Rt(C,en);if(M!==C.src||B!==C.srcset){var $=n.classes.spinner,f=C.parentElement,T=Ne(f,"."+$)||he("span",$,f);l.push([C,v,T]),C.src||Re(C,"none")}})})}function u(){l=l.filter(function(v){var C=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(t.index,C)?m(v):!0}),l.length||a(d)}function m(v){var C=v[0];Wt(v[1].slide,kn),i(C,"load error",mt(S,v)),tt(C,"src",Rt(C,Ee)),tt(C,"srcset",Rt(C,en)),Vt(C,Ee),Vt(C,en)}function S(v,C){var M=v[0],B=v[1];Dt(B.slide,kn),C.type!=="error"&&(se(v[2]),Re(M,""),c(Xn,M,B),c(Se)),s&&y()}function y(){l.length&&m(l.shift())}return{mount:w,destroy:mt(Xt,l),check:u}}function na(t,e,n){var r=bt(t),o=r.on,a=r.emit,i=r.bind,c=e.Slides,s=e.Elements,d=e.Controller,l=d.hasFocus,w=d.getIndex,b=d.go,g=e.Direction.resolve,u=s.pagination,m=[],S,y;function v(){C(),o([$t,vt,an],v);var z=n.pagination;u&&Re(u,z?"":"none"),z&&(o([qt,un,ue],A),M(),A(),a(Ur,{list:S,items:m},T(t.index)))}function C(){S&&(se(u?ee(S.children):S),Dt(S,y),Xt(m),S=null),r.destroy()}function M(){var z=t.length,L=n.classes,k=n.i18n,W=n.perPage,D=l()?d.getEnd()+1:Oe(z/W);S=u||he("ul",L.pagination,s.track.parentElement),Wt(S,y=bn+"--"+f()),tt(S,Ut,"tablist"),tt(S,At,k.select),tt(S,Yn,f()===fn?"vertical":"");for(var H=0;H<D;H++){var h=he("li",null,S),O=he("button",{class:L.page,type:"button"},h),F=c.getIn(H).map(function(_){return _.slide.id}),I=!l()&&W>1?k.pageX:k.slideX;i(O,"click",mt(B,H)),n.paginationKeyboard&&i(O,"keydown",mt($,H)),tt(h,Ut,"presentation"),tt(O,Ut,"tab"),tt(O,Me,F.join(" ")),tt(O,At,An(I,H+1)),tt(O,ye,-1),m.push({li:h,button:O,page:H})}}function B(z){b(">"+z,!0)}function $(z,L){var k=m.length,W=Zn(L),D=f(),H=-1;W===g(mn,!1,D)?H=++z%k:W===g(gn,!1,D)?H=(--z+k)%k:W==="Home"?H=0:W==="End"&&(H=k-1);var h=m[H];h&&(kr(h.button),b(">"+H),Mt(L,!0))}function f(){return n.paginationDirection||n.direction}function T(z){return m[d.toPage(z)]}function A(){var z=T(w(!0)),L=T(w());if(z){var k=z.button;Dt(k,ce),Vt(k,pr),tt(k,ye,-1)}if(L){var W=L.button;Wt(W,ce),tt(W,pr,!0),tt(W,ye,"")}a(Xr,{list:S,items:m},z,L)}return{items:m,mount:v,destroy:C,getAt:T,update:A}}var ra=[" ","Enter"];function oa(t,e,n){var r=n.isNavigation,o=n.slideFocus,a=[];function i(){t.splides.forEach(function(u){u.isParent||(d(t,u.splide),d(u.splide,t))}),r&&l()}function c(){a.forEach(function(u){u.destroy()}),Xt(a)}function s(){c(),i()}function d(u,m){var S=bt(u);S.on(qt,function(y,v,C){m.go(m.is(we)?C:y)}),a.push(S)}function l(){var u=bt(t),m=u.on;m(Mn,b),m(Yr,g),m([ne,$t],w),a.push(u),u.emit(Dn,t.splides)}function w(){tt(e.Elements.list,Yn,n.direction===fn?"vertical":"")}function b(u){t.go(u.index)}function g(u,m){Wn(ra,Zn(m))&&(b(u),Mt(m))}return{setup:mt(e.Media.set,{slideFocus:We(o)?r:o},!0),mount:i,destroy:c,remount:s}}function ia(t,e,n){var r=bt(t),o=r.bind,a=0;function i(){n.wheel&&o(e.Elements.track,"wheel",c,me)}function c(d){if(d.cancelable){var l=d.deltaY,w=l<0,b=Ln(d),g=n.wheelMinThreshold||0,u=n.wheelSleep||0;Tt(l)>g&&b-a>u&&(t.go(w?"<":">"),a=b),s(w)&&Mt(d)}}function s(d){return!n.releaseWheel||t.state.is(Ce)||e.Controller.getAdjacent(d)!==-1}return{mount:i}}var aa=90;function la(t,e,n){var r=bt(t),o=r.on,a=e.Elements.track,i=n.live&&!n.isNavigation,c=he("span",_i),s=pn(aa,mt(l,!1));function d(){i&&(b(!e.Autoplay.isPaused()),tt(a,mr,!0),c.textContent="…",o(Gn,mt(b,!0)),o(Un,mt(b,!1)),o([$e,ue],mt(l,!0)))}function l(g){tt(a,gr,g),g?(ze(a,c),s.start()):(se(c),s.cancel())}function w(){Vt(a,[dr,mr,gr]),se(c)}function b(g){i&&tt(a,dr,g?"off":"polite")}return{mount:d,disable:b,destroy:w}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:Fi,Slides:Ri,Layout:Oi,Clones:Bi,Move:Wi,Controller:Vi,Arrows:ji,Autoplay:Hi,Cover:Di,Scroll:Ki,Drag:Ji,Keyboard:Qi,LazyLoad:ea,Pagination:na,Sync:oa,Wheel:ia,Live:la}),ca={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"},ua={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:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(t,e,n){var r=e.Slides;function o(){bt(t).on([ne,vt],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Er(s)}return{mount:o,start:i,cancel:Tn}}function da(t,e,n){var r=e.Move,o=e.Controller,a=e.Scroll,i=e.Elements.list,c=mt(kt,i,"transition"),s;function d(){bt(t).bind(i,"transitionend",function(g){g.target===i&&s&&(w(),s())})}function l(g,u){var m=r.toPosition(g,!0),S=r.getPosition(),y=b(g);Tt(m-S)>=1&&y>=1?n.useScroll?a.scroll(m,y,!1,u):(c("transform "+y+"ms "+n.easing),r.translate(m,!0),s=u):(r.jump(g),u())}function w(){c(""),a.cancel()}function b(g){var u=n.rewindSpeed;if(t.is(xe)&&u){var m=o.getIndex(!0),S=o.getEnd();if(m===0&&g>=S||m>=S&&g===0)return u}return n.speed}return{mount:d,start:l,cancel:w}}var ga=(function(){function t(n,r){this.event=bt(),this.Components={},this.state=mi(fe),this.splides=[],this._o={},this._E={};var o=Qt(n)?Or(document,n):n;Le(o,o+" is invalid."),this.root=o,r=Jt({label:Rt(o,At)||"",labelledby:Rt(o,qn)||""},ua,t.defaults,r||{});try{Jt(r,JSON.parse(Rt(o,Nn)))}catch{Le(!1,"Invalid JSON")}this._o=Object.create(Jt({},r))}var e=t.prototype;return e.mount=function(r,o){var a=this,i=this.state,c=this.Components;Le(i.is([fe,nn]),"Already mounted!"),i.set(fe),this._C=c,this._T=o||this._T||(this.is(He)?pa:da),this._E=r||this._E;var s=ke({},sa,this._E,{Transition:this._T});return le(s,function(d,l){var w=d(a,c,a._o);c[l]=w,w.setup&&w.setup()}),le(c,function(d){d.mount&&d.mount()}),this.emit(ne),Wt(this.root,Ti),i.set(ve),this.emit(In),this},e.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(ve)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},e.go=function(r){return this._C.Controller.go(r),this},e.on=function(r,o){return this.event.on(r,o),this},e.off=function(r){return this.event.off(r),this},e.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(ee(arguments,1))),this},e.add=function(r,o){return this._C.Slides.add(r,o),this},e.remove=function(r){return this._C.Slides.remove(r),this},e.is=function(r){return this._o.type===r},e.refresh=function(){return this.emit(vt),this},e.destroy=function(r){r===void 0&&(r=!0);var o=this.event,a=this.state;return a.is(fe)?bt(this).on(In,this.destroy.bind(this,r)):(le(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Hn),o.destroy(),r&&Xt(this.splides),a.set(nn)),this},ci(t,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),Qn=ga;Qn.defaults={};Qn.STATES=pi;var br=[[ne,"onMounted"],[In,"onReady"],[qt,"onMove"],[$e,"onMoved"],[Mn,"onClick"],[Wr,"onActive"],[Vr,"onInactive"],[zr,"onVisible"],[Nr,"onHidden"],[vt,"onRefresh"],[$t,"onUpdated"],[Se,"onResize"],[cn,"onResized"],[jr,"onDrag"],[Mr,"onDragging"],[Hr,"onDragged"],[un,"onScroll"],[ue,"onScrolled"],[Hn,"onDestroy"],[Dr,"onArrowsMounted"],[Gr,"onArrowsUpdated"],[Ur,"onPaginationMounted"],[Xr,"onPaginationUpdated"],[Dn,"onNavigationMounted"],[Gn,"onAutoplayPlay"],[qr,"onAutoplayPlaying"],[Un,"onAutoplayPause"],[Xn,"onLazyLoadLoaded"]];function tr(...t){return t.filter(Boolean).join(" ")}function ln(t){return t!==null&&typeof t=="object"}function Rn(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,r)=>!Rn(n,e[r]));if(ln(t)&&ln(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(e,o)||!Rn(t[o],e[o]))}return t===e}function ma(t,e){return t.length===e.length&&!t.some((n,r)=>n!==e[r])}function fa(t,e){if(t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function On(t,e){const n=t;return fa(e,(r,o)=>{Array.isArray(r)?n[o]=r.slice():ln(r)?n[o]=On(ln(n[o])?n[o]:{},r):n[o]=r}),n}var ha=({children:t,className:e,...n})=>V.createElement("div",{className:tr("splide__track",e),...n},V.createElement("ul",{className:"splide__list"},t)),er=class extends V.Component{constructor(){super(...arguments),this.splideRef=V.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Qn(r,t),this.bind(this.splide),this.splide.mount(e,n),this.options=On({},t||{}),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:t}=this.props;t&&!Rn(this.options,t)&&(this.splide.options=t,this.options=On({},t));const e=this.getSlides();ma(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){br.forEach(([e,n])=>{const r=this.props[n];typeof r=="function"&&t.on(e,(...o)=>{r(t,...o)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:r,...o}=this.props;return V.createElement(e,{className:tr("splide",t),ref:this.splideRef,...this.omit(o,["options",...br.map(a=>a[1])])},n?V.createElement(ha,null,r):r)}},nr=({children:t,className:e,...n})=>V.createElement("li",{className:tr("splide__slide",e),...n},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),B=require("react"),ht=require("classnames"),E=require("./useScopedStyles-DpVdqfXj.js"),Ln=require("react-dom");function bo(t){return t.type==="object"&&t.version===1}const vo="ControlSlider-module__wrapper___sHEkd",So="ControlSlider-module__hoverArrow___A-dOH",xo="ControlSlider-module__sliderItem___QQSkR",Co="ControlSlider-module__sliderImage___9hRl-",$o="ControlSlider-module__arrow___05ghY",wo="ControlSlider-module__arrowVertical___tBfVN",_o="ControlSlider-module__nextArrow___-30Yc",To="ControlSlider-module__arrowInner___aEra3",Lo="ControlSlider-module__arrowIcon___S4ztF",Eo="ControlSlider-module__arrowImg___2dwJW",Ao="ControlSlider-module__mirror___brd6U",Io="ControlSlider-module__pagination___bicLF",Fo="ControlSlider-module__paginationInner___bT-P-",ko="ControlSlider-module__paginationVertical___zYqKw",Ro="ControlSlider-module__paginationItem___nTRbk",Oo="ControlSlider-module__dot___p1Qun",Wo="ControlSlider-module__activeDot___LHFaj",Po="ControlSlider-module__paginationInsideBottom___R3FWn",Bo="ControlSlider-module__paginationInsideTop___V-qb-",Vo="ControlSlider-module__paginationOutsideBottom___14w8D",No="ControlSlider-module__paginationOutsideTop___SCLqB",zo="ControlSlider-module__paginationInsideLeft___yOBRZ",jo="ControlSlider-module__paginationInsideRight___Rtt3o",Mo="ControlSlider-module__paginationOutsideLeft___lahaw",Ho="ControlSlider-module__paginationOutsideRight___EtuQa",Do="ControlSlider-module__imgWrapper___UjEgB",Go="ControlSlider-module__captionBlock___dJ6-j",Uo="ControlSlider-module__captionTextWrapper___HFlpf",Xo="ControlSlider-module__captionText___uGBVc",qo="ControlSlider-module__active___WZK4G",Yo="ControlSlider-module__withPointerEvents___t-18M",Ko="ControlSlider-module__topLeftAlignment___zjnGM",Jo="ControlSlider-module__topCenterAlignment___gD1xW",Zo="ControlSlider-module__topRightAlignment___NMapS",Qo="ControlSlider-module__middleLeftAlignment___OnUrY",ti="ControlSlider-module__middleCenterAlignment___Tdkl0",ei="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ni="ControlSlider-module__bottomCenterAlignment___c54fB",oi="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",U={wrapper:vo,hoverArrow:So,sliderItem:xo,sliderImage:Co,arrow:$o,arrowVertical:wo,nextArrow:_o,arrowInner:To,arrowIcon:Lo,arrowImg:Eo,mirror:Ao,pagination:Io,paginationInner:Fo,paginationVertical:ko,paginationItem:Ro,dot:Oo,activeDot:Wo,paginationInsideBottom:Po,paginationInsideTop:Bo,paginationOutsideBottom:Vo,paginationOutsideTop:No,paginationInsideLeft:zo,paginationInsideRight:jo,paginationOutsideLeft:Mo,paginationOutsideRight:Ho,imgWrapper:Do,captionBlock:Go,captionTextWrapper:Uo,captionText:Xo,active:qo,withPointerEvents:Yo,topLeftAlignment:Ko,topCenterAlignment:Jo,topRightAlignment:Zo,middleLeftAlignment:Qo,middleCenterAlignment:ti,middleRightAlignment:ei,bottomLeftAlignment:ri,bottomCenterAlignment:ni,bottomRightAlignment:oi,clickOverlay:ii,contain:ai,cover:li};function si(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ci(t,e,r){return e&&si(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var on="(prefers-reduced-motion: reduce)",fe=1,ui=2,ve=3,Ce=4,Pe=5,Je=6,er=7,pi={CREATED:fe,MOUNTED:ui,IDLE:ve,MOVING:Ce,SCROLLING:Pe,DRAGGING:Je,DESTROYED:er};function Yt(t){t.length=0}function re(t,e,r){return Array.prototype.slice.call(t,e,r)}function dt(t){return t.bind.apply(t,[null].concat(re(arguments,1)))}var En=setTimeout,wr=function(){};function an(t){return requestAnimationFrame(t)}function ar(t,e){return typeof e===t}function Ae(t){return!Or(t)&&ar("object",t)}var Rr=Array.isArray,An=dt(ar,"function"),te=dt(ar,"string"),Be=dt(ar,"undefined");function Or(t){return t===null}function In(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ve(t){return Rr(t)?t:[t]}function At(t,e){Ve(t).forEach(e)}function Wr(t,e){return t.indexOf(e)>-1}function Ze(t,e){return t.push.apply(t,Ve(e)),t}function Gt(t,e,r){t&&At(e,function(n){n&&t.classList[r?"add":"remove"](n)})}function Vt(t,e){Gt(t,te(e)?e.split(" "):e,!0)}function Ne(t,e){At(e,t.appendChild.bind(t))}function Pr(t,e){At(t,function(r){var n=(e||r).parentNode;n&&n.insertBefore(r,e)})}function Ie(t,e){return In(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Fn(t,e){var r=t?re(t.children):[];return e?r.filter(function(n){return Ie(n,e)}):r}function ze(t,e){return e?Fn(t,e)[0]:t.firstElementChild}var Fe=Object.keys;function le(t,e,r){return t&&(r?Fe(t).reverse():Fe(t)).forEach(function(n){n!=="__proto__"&&e(t[n],n)}),t}function ke(t){return re(arguments,1).forEach(function(e){le(e,function(r,n){t[n]=e[n]})}),t}function Zt(t){return re(arguments,1).forEach(function(e){le(e,function(r,n){Rr(r)?t[n]=r.slice():Ae(r)?t[n]=Zt({},Ae(t[n])?t[n]:{},r):t[n]=r})}),t}function ln(t,e){At(e||Fe(t),function(r){delete t[r]})}function Nt(t,e){At(t,function(r){At(e,function(n){r&&r.removeAttribute(n)})})}function tt(t,e,r){Ae(e)?le(e,function(n,o){tt(t,o,n)}):At(t,function(n){Or(r)||r===""?Nt(n,e):n.setAttribute(e,String(r))})}function he(t,e,r){var n=document.createElement(t);return e&&(te(e)?Vt(n,e):tt(n,e)),r&&Ne(r,n),n}function Wt(t,e,r){if(Be(r))return getComputedStyle(t)[e];Or(r)||(t.style[e]=""+r)}function Re(t,e){Wt(t,"display",e)}function kn(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Pt(t,e){return t.getAttribute(e)}function sn(t,e){return t&&t.classList.contains(e)}function Lt(t){return t.getBoundingClientRect()}function se(t){At(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Rn(t){return ze(new DOMParser().parseFromString(t,"text/html").body)}function Dt(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function On(t,e){return t&&t.querySelector(e)}function Br(t,e){return e?re(t.querySelectorAll(e)):[]}function Ut(t,e){Gt(t,e,!1)}function _r(t){return t.timeStamp}function ie(t){return te(t)?t:t?t+"px":""}var je="splide",Vr="data-"+je;function Le(t,e){if(!t)throw new Error("["+je+"] "+(e||""))}var ee=Math.min,rr=Math.max,nr=Math.floor,Oe=Math.ceil,Tt=Math.abs;function Wn(t,e,r){return Tt(t-e)<r}function Qe(t,e,r,n){var o=ee(e,r),a=rr(e,r);return n?o<t&&t<a:o<=t&&t<=a}function ge(t,e,r){var n=ee(e,r),o=rr(e,r);return ee(rr(n,t),o)}function Tr(t){return+(t>0)-+(t<0)}function Lr(t,e){return At(e,function(r){t=t.replace("%s",""+r)}),t}function Nr(t){return t<10?"0"+t:""+t}var cn={};function di(t){return""+t+Nr(cn[t]=(cn[t]||0)+1)}function Pn(){var t=[];function e(i,s,c,d){o(i,s,function(l,C,m){var y="addEventListener"in l,u=y?l.removeEventListener.bind(l,C,c,d):l.removeListener.bind(l,c);y?l.addEventListener(C,c,d):l.addListener(c),t.push([l,C,m,c,u])})}function r(i,s,c){o(i,s,function(d,l,C){t=t.filter(function(m){return m[0]===d&&m[1]===l&&m[2]===C&&(!c||m[3]===c)?(m[4](),!1):!0})})}function n(i,s,c){var d,l=!0;return typeof CustomEvent=="function"?d=new CustomEvent(s,{bubbles:l,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(s,l,!1,c)),i.dispatchEvent(d),d}function o(i,s,c){At(i,function(d){d&&At(s,function(l){l.split(" ").forEach(function(C){var m=C.split(".");c(d,m[0],m[1])})})})}function a(){t.forEach(function(i){i[4]()}),Yt(t)}return{bind:e,unbind:r,dispatch:n,destroy:a}}var ne="mounted",Er="ready",Kt="move",$e="moved",zr="click",Bn="active",Vn="inactive",Nn="visible",zn="hidden",xt="refresh",wt="updated",Se="resize",lr="resized",jn="drag",Mn="dragging",Hn="dragged",sr="scroll",ue="scrolled",gi="overflow",jr="destroy",Dn="arrows:mounted",Gn="arrows:updated",Un="pagination:mounted",Xn="pagination:updated",Mr="navigation:mounted",Hr="autoplay:play",qn="autoplay:playing",Dr="autoplay:pause",Gr="lazyload:loaded",Yn="sk",Kn="sh",or="ei";function yt(t){var e=t?t.event.bus:document.createDocumentFragment(),r=Pn();function n(a,i){r.bind(e,Ve(a).join(" "),function(s){i.apply(i,Rr(s.detail)?s.detail:[])})}function o(a){r.dispatch(e,a,re(arguments,1))}return t&&t.event.on(jr,r.destroy),ke(r,{bus:e,on:n,off:dt(r.unbind,e),emit:o})}function cr(t,e,r,n){var o=Date.now,a,i=0,s,c=!0,d=0;function l(){if(!c){if(i=t?ee((o()-a)/t,1):1,r&&r(i),i>=1&&(e(),a=o(),n&&++d>=n))return m();s=an(l)}}function C(b){b||u(),a=o()-(b?i*t:0),c=!1,s=an(l)}function m(){c=!0}function y(){a=o(),i=0,r&&r(i)}function u(){s&&cancelAnimationFrame(s),i=0,s=0,c=!0}function g(b){t=b}function S(){return c}return{start:C,rewind:y,pause:m,cancel:u,set:g,isPaused:S}}function mi(t){var e=t;function r(o){e=o}function n(o){return Wr(Ve(o),e)}return{set:r,is:n}}function fi(t,e){var r=cr(0,t,null,1);return function(){r.isPaused()&&r.start()}}function hi(t,e,r){var n=t.state,o=r.breakpoints||{},a=r.reducedMotion||{},i=Pn(),s=[];function c(){var u=r.mediaQuery==="min";Fe(o).sort(function(g,S){return u?+g-+S:+S-+g}).forEach(function(g){l(o[g],"("+(u?"min":"max")+"-width:"+g+"px)")}),l(a,on),C()}function d(u){u&&i.destroy()}function l(u,g){var S=matchMedia(g);i.bind(S,"change",C),s.push([u,S])}function C(){var u=n.is(er),g=r.direction,S=s.reduce(function(b,v){return Zt(b,v[1].matches?v[0]:{})},{});ln(r),y(S),r.destroy?t.destroy(r.destroy==="completely"):u?(d(!0),t.mount()):g!==r.direction&&t.refresh()}function m(u){matchMedia(on).matches&&(u?Zt(r,a):ln(r,Fe(a)))}function y(u,g,S){Zt(r,u),g&&Zt(Object.getPrototypeOf(r),u),(S||!n.is(fe))&&t.emit(wt,r)}return{setup:c,destroy:d,reduce:m,set:y}}var ur="Arrow",pr=ur+"Left",dr=ur+"Right",Jn=ur+"Up",Zn=ur+"Down",un="rtl",gr="ttb",br={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jn,dr],ArrowRight:[Zn,pr]};function yi(t,e,r){function n(a,i,s){s=s||r.direction;var c=s===un&&!i?1:s===gr?0:-1;return br[a]&&br[a][c]||a.replace(/width|left|right/i,function(d,l){var C=br[d.toLowerCase()][c]||d;return l>0?C.charAt(0).toUpperCase()+C.slice(1):C})}function o(a){return a*(r.direction===un?1:-1)}return{resolve:n,orient:o}}var qt="role",ye="tabindex",bi="disabled",Bt="aria-",Me=Bt+"controls",Qn=Bt+"current",pn=Bt+"selected",Et=Bt+"label",Ur=Bt+"labelledby",to=Bt+"hidden",Xr=Bt+"orientation",We=Bt+"roledescription",dn=Bt+"live",gn=Bt+"busy",mn=Bt+"atomic",qr=[qt,ye,bi,Me,Qn,Et,Ur,to,Xr,We],zt=je+"__",oe="is-",vr=je,fn=zt+"track",vi=zt+"list",mr=zt+"slide",eo=mr+"--clone",Si=mr+"__container",Yr=zt+"arrows",fr=zt+"arrow",ro=fr+"--prev",no=fr+"--next",hr=zt+"pagination",oo=hr+"__page",xi=zt+"progress",Ci=xi+"__bar",$i=zt+"toggle",wi=zt+"spinner",_i=zt+"sr",Ti=oe+"initialized",ce=oe+"active",io=oe+"prev",ao=oe+"next",Ar=oe+"visible",Ir=oe+"loading",lo=oe+"focus-in",so=oe+"overflow",Li=[ce,Ar,io,ao,Ir,lo,so],Ei={slide:mr,clone:eo,arrows:Yr,arrow:fr,prev:ro,next:no,pagination:hr,page:oo,spinner:wi};function Ai(t,e){if(An(t.closest))return t.closest(e);for(var r=t;r&&r.nodeType===1&&!Ie(r,e);)r=r.parentElement;return r}var Ii=5,hn=200,co="touchstart mousedown",Sr="touchmove mousemove",xr="touchend touchcancel mouseup click";function Fi(t,e,r){var n=yt(t),o=n.on,a=n.bind,i=t.root,s=r.i18n,c={},d=[],l=[],C=[],m,y,u;function g(){$(),z(),v()}function S(){o(xt,b),o(xt,g),o(wt,v),a(document,co+" keydown",function(f){u=f.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Gt(i,lo,!!u)})}function b(f){var L=qr.concat("style");Yt(d),Ut(i,l),Ut(m,C),Nt([m,y],L),Nt(i,f?L:["style",We])}function v(){Ut(i,l),Ut(m,C),l=w(vr),C=w(fn),Vt(i,l),Vt(m,C),tt(i,Et,r.label),tt(i,Ur,r.labelledby)}function $(){m=V("."+fn),y=ze(m,"."+vi),Le(m&&y,"A track/list element is missing."),Ze(d,Fn(y,"."+mr+":not(."+eo+")")),le({arrows:Yr,pagination:hr,prev:ro,next:no,bar:Ci,toggle:$i},function(f,L){c[L]=V("."+f)}),ke(c,{root:i,track:m,list:y,slides:d})}function z(){var f=i.id||di(je),L=r.role;i.id=f,m.id=m.id||f+"-track",y.id=y.id||f+"-list",!Pt(i,qt)&&i.tagName!=="SECTION"&&L&&tt(i,qt,L),tt(i,We,s.carousel),tt(y,qt,"presentation")}function V(f){var L=On(i,f);return L&&Ai(L,"."+vr)===i?L:void 0}function w(f){return[f+"--"+r.type,f+"--"+r.direction,r.drag&&f+"--draggable",r.isNavigation&&f+"--nav",f===vr&&ce]}return ke(c,{setup:g,mount:S,destroy:b})}var xe="slide",we="loop",He="fade";function ki(t,e,r,n){var o=yt(t),a=o.on,i=o.emit,s=o.bind,c=t.Components,d=t.root,l=t.options,C=l.isNavigation,m=l.updateOnMove,y=l.i18n,u=l.pagination,g=l.slideFocus,S=c.Direction.resolve,b=Pt(n,"style"),v=Pt(n,Et),$=r>-1,z=ze(n,"."+Si),V;function w(){$||(n.id=d.id+"-slide"+Nr(e+1),tt(n,qt,u?"tabpanel":"group"),tt(n,We,y.slide),tt(n,Et,v||Lr(y.slideLabel,[e+1,t.length]))),f()}function f(){s(n,"click",dt(i,zr,F)),s(n,"keydown",dt(i,Yn,F)),a([$e,Kn,ue],_),a(Mr,A),m&&a(Kt,N)}function L(){V=!0,o.destroy(),Ut(n,Li),Nt(n,qr),tt(n,"style",b),tt(n,Et,v||"")}function A(){var I=t.splides.map(function(T){var O=T.splide.Components.Slides.getAt(e);return O?O.slide.id:""}).join(" ");tt(n,Et,Lr(y.slideX,($?r:e)+1)),tt(n,Me,I),tt(n,qt,g?"button":""),g&&Nt(n,We)}function N(){V||_()}function _(){if(!V){var I=t.index;W(),P(),Gt(n,io,e===I-1),Gt(n,ao,e===I+1)}}function W(){var I=H();I!==sn(n,ce)&&(Gt(n,ce,I),tt(n,Qn,C&&I||""),i(I?Bn:Vn,F))}function P(){var I=h(),T=!I&&(!H()||$);if(t.state.is([Ce,Pe])||tt(n,to,T||""),tt(Br(n,l.focusableNodes||""),ye,T?-1:""),g&&tt(n,ye,T?-1:0),I!==sn(n,Ar)&&(Gt(n,Ar,I),i(I?Nn:zn,F)),!I&&document.activeElement===n){var O=c.Slides.getAt(t.index);O&&kn(O.slide)}}function D(I,T,O){Wt(O&&z||n,I,T)}function H(){var I=t.index;return I===e||l.cloneStatus&&I===r}function h(){if(t.is(He))return H();var I=Lt(c.Elements.track),T=Lt(n),O=S("left",!0),X=S("right",!0);return nr(I[O])<=Oe(T[O])&&nr(T[X])<=Oe(I[X])}function R(I,T){var O=Tt(I-e);return!$&&(l.rewind||t.is(we))&&(O=ee(O,t.length-O)),O<=T}var F={index:e,slideIndex:r,slide:n,container:z,isClone:$,mount:w,destroy:L,update:_,style:D,isWithin:R};return F}function Ri(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=n.bind,s=e.Elements,c=s.slides,d=s.list,l=[];function C(){m(),o(xt,y),o(xt,m)}function m(){c.forEach(function(_,W){g(_,W,-1)})}function y(){V(function(_){_.destroy()}),Yt(l)}function u(){V(function(_){_.update()})}function g(_,W,P){var D=ki(t,W,P,_);D.mount(),l.push(D),l.sort(function(H,h){return H.index-h.index})}function S(_){return _?w(function(W){return!W.isClone}):l}function b(_){var W=e.Controller,P=W.toIndex(_),D=W.hasFocus()?1:r.perPage;return w(function(H){return Qe(H.index,P,P+D-1)})}function v(_){return w(_)[0]}function $(_,W){At(_,function(P){if(te(P)&&(P=Rn(P)),In(P)){var D=c[W];D?Pr(P,D):Ne(d,P),Vt(P,r.classes.slide),L(P,dt(a,Se))}}),a(xt)}function z(_){se(w(_).map(function(W){return W.slide})),a(xt)}function V(_,W){S(W).forEach(_)}function w(_){return l.filter(An(_)?_:function(W){return te(_)?Ie(W.slide,_):Wr(Ve(_),W.index)})}function f(_,W,P){V(function(D){D.style(_,W,P)})}function L(_,W){var P=Br(_,"img"),D=P.length;D?P.forEach(function(H){i(H,"load error",function(){--D||W()})}):W()}function A(_){return _?c.length:l.length}function N(){return l.length>r.perPage}return{mount:C,destroy:y,update:u,register:g,get:S,getIn:b,getAt:v,add:$,remove:z,forEach:V,filter:w,style:f,getLength:A,isEnough:N}}function Oi(t,e,r){var n=yt(t),o=n.on,a=n.bind,i=n.emit,s=e.Slides,c=e.Direction.resolve,d=e.Elements,l=d.root,C=d.track,m=d.list,y=s.getAt,u=s.style,g,S,b;function v(){$(),a(window,"resize load",fi(dt(i,Se))),o([wt,xt],$),o(Se,z)}function $(){g=r.direction===gr,Wt(l,"maxWidth",ie(r.width)),Wt(C,c("paddingLeft"),V(!1)),Wt(C,c("paddingRight"),V(!0)),z(!0)}function z(F){var I=Lt(l);(F||S.width!==I.width||S.height!==I.height)&&(Wt(C,"height",w()),u(c("marginRight"),ie(r.gap)),u("width",L()),u("height",A(),!0),S=I,i(lr),b!==(b=R())&&(Gt(l,so,b),i(gi,b)))}function V(F){var I=r.padding,T=c(F?"right":"left");return I&&ie(I[T]||(Ae(I)?0:I))||"0px"}function w(){var F="";return g&&(F=f(),Le(F,"height or heightRatio is missing."),F="calc("+F+" - "+V(!1)+" - "+V(!0)+")"),F}function f(){return ie(r.height||Lt(m).width*r.heightRatio)}function L(){return r.autoWidth?null:ie(r.fixedWidth)||(g?"":N())}function A(){return ie(r.fixedHeight)||(g?r.autoHeight?null:N():f())}function N(){var F=ie(r.gap);return"calc((100%"+(F&&" + "+F)+")/"+(r.perPage||1)+(F&&" - "+F)+")"}function _(){return Lt(m)[c("width")]}function W(F,I){var T=y(F||0);return T?Lt(T.slide)[c("width")]+(I?0:H()):0}function P(F,I){var T=y(F);if(T){var O=Lt(T.slide)[c("right")],X=Lt(m)[c("left")];return Tt(O-X)+(I?0:H())}return 0}function D(F){return P(t.length-1)-P(0)+W(0,F)}function H(){var F=y(0);return F&&parseFloat(Wt(F.slide,c("marginRight")))||0}function h(F){return parseFloat(Wt(C,c("padding"+(F?"Right":"Left"))))||0}function R(){return t.is(He)||D(!0)>_()}return{mount:v,resize:z,listSize:_,slideSize:W,sliderSize:D,totalSize:P,getPadding:h,isOverflow:R}}var Wi=2;function Pi(t,e,r){var n=yt(t),o=n.on,a=e.Elements,i=e.Slides,s=e.Direction.resolve,c=[],d;function l(){o(xt,C),o([wt,Se],y),(d=S())&&(u(d),e.Layout.resize(!0))}function C(){m(),l()}function m(){se(c),Yt(c),n.destroy()}function y(){var b=S();d!==b&&(d<b||!b)&&n.emit(xt)}function u(b){var v=i.get().slice(),$=v.length;if($){for(;v.length<b;)Ze(v,v);Ze(v.slice(-b),v.slice(0,b)).forEach(function(z,V){var w=V<b,f=g(z.slide,V);w?Pr(f,v[0].slide):Ne(a.list,f),Ze(c,f),i.register(f,V-b+(w?0:$),z.index)})}}function g(b,v){var $=b.cloneNode(!0);return Vt($,r.classes.clone),$.id=t.root.id+"-clone"+Nr(v+1),$}function S(){var b=r.clones;if(!t.is(we))b=0;else if(Be(b)){var v=r[s("fixedWidth")]&&e.Layout.slideSize(0),$=v&&Oe(Lt(a.track)[s("width")]/v);b=$||r[s("autoWidth")]&&t.length||r.perPage*Wi}return b}return{mount:l,destroy:m}}function Bi(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=t.state.set,s=e.Layout,c=s.slideSize,d=s.getPadding,l=s.totalSize,C=s.listSize,m=s.sliderSize,y=e.Direction,u=y.resolve,g=y.orient,S=e.Elements,b=S.list,v=S.track,$;function z(){$=e.Transition,o([ne,lr,wt,xt],V)}function V(){e.Controller.isBusy()||(e.Scroll.cancel(),f(t.index),e.Slides.update())}function w(T,O,X,ot){T!==O&&F(T>X)&&(_(),L(N(D(),T>X),!0)),i(Ce),a(Kt,O,X,T),$.start(O,function(){i(ve),a($e,O,X,T),ot&&ot()})}function f(T){L(P(T,!0))}function L(T,O){if(!t.is(He)){var X=O?T:A(T);Wt(b,"transform","translate"+u("X")+"("+X+"px)"),T!==X&&a(Kn)}}function A(T){if(t.is(we)){var O=W(T),X=O>e.Controller.getEnd(),ot=O<0;(ot||X)&&(T=N(T,X))}return T}function N(T,O){var X=T-R(O),ot=m();return T-=g(ot*(Oe(Tt(X)/ot)||1))*(O?1:-1),T}function _(){L(D(),!0),$.cancel()}function W(T){for(var O=e.Slides.get(),X=0,ot=1/0,nt=0;nt<O.length;nt++){var at=O[nt].index,k=Tt(P(at,!0)-T);if(k<=ot)ot=k,X=at;else break}return X}function P(T,O){var X=g(l(T-1)-h(T));return O?H(X):X}function D(){var T=u("left");return Lt(b)[T]-Lt(v)[T]+g(d(!1))}function H(T){return r.trimSpace&&t.is(xe)&&(T=ge(T,0,g(m(!0)-C()))),T}function h(T){var O=r.focus;return O==="center"?(C()-c(T,!0))/2:+O*c(T)||0}function R(T){return P(T?e.Controller.getEnd():0,!!r.trimSpace)}function F(T){var O=g(N(D(),T));return T?O>=0:O<=b[u("scrollWidth")]-Lt(v)[u("width")]}function I(T,O){O=Be(O)?D():O;var X=T!==!0&&g(O)<g(R(!1)),ot=T!==!1&&g(O)>g(R(!0));return X||ot}return{mount:z,move:w,jump:f,translate:L,shift:N,cancel:_,toIndex:W,toPosition:P,getPosition:D,getLimit:R,exceededLimit:I,reposition:V}}function Vi(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=e.Move,s=i.getPosition,c=i.getLimit,d=i.toPosition,l=e.Slides,C=l.isEnough,m=l.getLength,y=r.omitEnd,u=t.is(we),g=t.is(xe),S=dt(D,!1),b=dt(D,!0),v=r.start||0,$,z=v,V,w,f;function L(){A(),o([wt,xt,or],A),o(lr,N)}function A(){V=m(!0),w=r.perMove,f=r.perPage,$=F();var k=ge(v,0,y?$:V-1);k!==v&&(v=k,i.reposition())}function N(){$!==F()&&a(or)}function _(k,K,st){if(!at()){var lt=P(k),mt=R(lt);mt>-1&&(K||mt!==v)&&(X(mt),i.move(lt,mt,z,st))}}function W(k,K,st,lt){e.Scroll.scroll(k,K,st,function(){var mt=R(i.toIndex(s()));X(y?ee(mt,$):mt),lt&&lt()})}function P(k){var K=v;if(te(k)){var st=k.match(/([+\-<>])(\d+)?/)||[],lt=st[1],mt=st[2];lt==="+"||lt==="-"?K=H(v+ +(""+lt+(+mt||1)),v):lt===">"?K=mt?I(+mt):S(!0):lt==="<"&&(K=b(!0))}else K=u?k:ge(k,0,$);return K}function D(k,K){var st=w||(nt()?1:f),lt=H(v+st*(k?-1:1),v,!(w||nt()));return lt===-1&&g&&!Wn(s(),c(!k),1)?k?0:$:K?lt:R(lt)}function H(k,K,st){if(C()||nt()){var lt=h(k);lt!==k&&(K=k,k=lt,st=!1),k<0||k>$?!w&&(Qe(0,k,K,!0)||Qe($,K,k,!0))?k=I(T(k)):u?k=st?k<0?-(V%f||f):V:k:r.rewind?k=k<0?$:0:k=-1:st&&k!==K&&(k=I(T(K)+(k<K?-1:1)))}else k=-1;return k}function h(k){if(g&&r.trimSpace==="move"&&k!==v)for(var K=s();K===d(k,!0)&&Qe(k,0,t.length-1,!r.rewind);)k<v?--k:++k;return k}function R(k){return u?(k+V)%V||0:k}function F(){for(var k=V-(nt()||u&&w?1:f);y&&k-- >0;)if(d(V-1,!0)!==d(k,!0)){k++;break}return ge(k,0,V-1)}function I(k){return ge(nt()?k:f*k,0,$)}function T(k){return nt()?ee(k,$):nr((k>=$?V-1:k)/f)}function O(k){var K=i.toIndex(k);return g?ge(K,0,$):K}function X(k){k!==v&&(z=v,v=k)}function ot(k){return k?z:v}function nt(){return!Be(r.focus)||r.isNavigation}function at(){return t.state.is([Ce,Pe])&&!!r.waitForTransition}return{mount:L,go:_,scroll:W,getNext:S,getPrev:b,getAdjacent:D,getEnd:F,setIndex:X,getIndex:ot,toIndex:I,toPage:T,toDest:O,hasFocus:nt,isBusy:at}}var Ni="http://www.w3.org/2000/svg",zi="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",Ue=40;function ji(t,e,r){var n=yt(t),o=n.on,a=n.bind,i=n.emit,s=r.classes,c=r.i18n,d=e.Elements,l=e.Controller,C=d.arrows,m=d.track,y=C,u=d.prev,g=d.next,S,b,v={};function $(){V(),o(wt,z)}function z(){w(),$()}function V(){var W=r.arrows;W&&!(u&&g)&&A(),u&&g&&(ke(v,{prev:u,next:g}),Re(y,W?"":"none"),Vt(y,b=Yr+"--"+r.direction),W&&(f(),_(),tt([u,g],Me,m.id),i(Dn,u,g)))}function w(){n.destroy(),Ut(y,b),S?(se(C?[u,g]:y),u=g=null):Nt([u,g],qr)}function f(){o([ne,$e,xt,ue,or],_),a(g,"click",dt(L,">")),a(u,"click",dt(L,"<"))}function L(W){l.go(W,!0)}function A(){y=C||he("div",s.arrows),u=N(!0),g=N(!1),S=!0,Ne(y,[u,g]),!C&&Pr(y,m)}function N(W){var P='<button class="'+s.arrow+" "+(W?s.prev:s.next)+'" type="button"><svg xmlns="'+Ni+'" viewBox="0 0 '+Ue+" "+Ue+'" width="'+Ue+'" height="'+Ue+'" focusable="false"><path d="'+(r.arrowPath||zi)+'" />';return Rn(P)}function _(){if(u&&g){var W=t.index,P=l.getPrev(),D=l.getNext(),H=P>-1&&W<P?c.last:c.prev,h=D>-1&&W>D?c.first:c.next;u.disabled=P<0,g.disabled=D<0,tt(u,Et,H),tt(g,Et,h),i(Gn,u,g,P,D)}}return{arrows:v,mount:$,destroy:w,update:_}}var Mi=Vr+"-interval";function Hi(t,e,r){var n=yt(t),o=n.on,a=n.bind,i=n.emit,s=cr(r.interval,t.go.bind(t,">"),f),c=s.isPaused,d=e.Elements,l=e.Elements,C=l.root,m=l.toggle,y=r.autoplay,u,g,S=y==="pause";function b(){y&&(v(),m&&tt(m,Me,d.track.id),S||$(),w())}function v(){r.pauseOnHover&&a(C,"mouseenter mouseleave",function(A){u=A.type==="mouseenter",V()}),r.pauseOnFocus&&a(C,"focusin focusout",function(A){g=A.type==="focusin",V()}),m&&a(m,"click",function(){S?$():z(!0)}),o([Kt,sr,xt],s.rewind),o(Kt,L)}function $(){c()&&e.Slides.isEnough()&&(s.start(!r.resetProgress),g=u=S=!1,w(),i(Hr))}function z(A){A===void 0&&(A=!0),S=!!A,w(),c()||(s.pause(),i(Dr))}function V(){S||(u||g?z(!1):$())}function w(){m&&(Gt(m,ce,!S),tt(m,Et,r.i18n[S?"play":"pause"]))}function f(A){var N=d.bar;N&&Wt(N,"width",A*100+"%"),i(qn,A)}function L(A){var N=e.Slides.getAt(A);s.set(N&&+Pt(N.slide,Mi)||r.interval)}return{mount:b,destroy:s.cancel,play:$,pause:z,isPaused:c}}function Di(t,e,r){var n=yt(t),o=n.on;function a(){r.cover&&(o(Gr,dt(s,!0)),o([ne,wt,xt],dt(i,!0)))}function i(c){e.Slides.forEach(function(d){var l=ze(d.container||d.slide,"img");l&&l.src&&s(c,l,d)})}function s(c,d,l){l.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),Re(d,c?"none":"")}return{mount:a,destroy:dt(i,!1)}}var Gi=10,Ui=600,Xi=.6,qi=1.5,Yi=800;function Ki(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=t.state.set,s=e.Move,c=s.getPosition,d=s.getLimit,l=s.exceededLimit,C=s.translate,m=t.is(xe),y,u,g=1;function S(){o(Kt,z),o([wt,xt],V)}function b(f,L,A,N,_){var W=c();if(z(),A&&(!m||!l())){var P=e.Layout.sliderSize(),D=Tr(f)*P*nr(Tt(f)/P)||0;f=s.toPosition(e.Controller.toDest(f%P))+D}var H=Wn(W,f,1);g=1,L=H?0:L||rr(Tt(f-W)/qi,Yi),u=N,y=cr(L,v,dt($,W,f,_),1),i(Pe),a(sr),y.start()}function v(){i(ve),u&&u(),a(ue)}function $(f,L,A,N){var _=c(),W=f+(L-f)*w(N),P=(W-_)*g;C(_+P),m&&!A&&l()&&(g*=Xi,Tt(P)<Gi&&b(d(l(!0)),Ui,!1,u,!0))}function z(){y&&y.cancel()}function V(){y&&!y.isPaused()&&(z(),v())}function w(f){var L=r.easingFunc;return L?L(f):1-Math.pow(1-f,4)}return{mount:S,destroy:z,scroll:b,cancel:V}}var me={passive:!1,capture:!0};function Ji(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=n.bind,s=n.unbind,c=t.state,d=e.Move,l=e.Scroll,C=e.Controller,m=e.Elements.track,y=e.Media.reduce,u=e.Direction,g=u.resolve,S=u.orient,b=d.getPosition,v=d.exceededLimit,$,z,V,w,f,L=!1,A,N,_;function W(){i(m,Sr,wr,me),i(m,xr,wr,me),i(m,co,D,me),i(m,"click",R,{capture:!0}),i(m,"dragstart",Dt),o([ne,wt],P)}function P(){var M=r.drag;It(!M),w=M==="free"}function D(M){if(A=!1,!N){var x=mt(M);lt(M.target)&&(x||!M.button)&&(C.isBusy()?Dt(M,!0):(_=x?m:window,f=c.is([Ce,Pe]),V=null,i(_,Sr,H,me),i(_,xr,h,me),d.cancel(),l.cancel(),F(M)))}}function H(M){if(c.is(Je)||(c.set(Je),a(jn)),M.cancelable)if(f){d.translate($+st(nt(M)));var x=at(M)>hn,G=L!==(L=v());(x||G)&&F(M),A=!0,a(Mn),Dt(M)}else O(M)&&(f=T(M),Dt(M))}function h(M){c.is(Je)&&(c.set(ve),a(Hn)),f&&(I(M),Dt(M)),s(_,Sr,H),s(_,xr,h),f=!1}function R(M){!N&&A&&Dt(M,!0)}function F(M){V=z,z=M,$=b()}function I(M){var x=X(M),G=ot(x),q=r.rewind&&r.rewindByDrag;y(!1),w?C.scroll(G,0,r.snap):t.is(He)?C.go(S(Tr(x))<0?q?"<":"-":q?">":"+"):t.is(xe)&&L&&q?C.go(v(!0)?">":"<"):C.go(C.toDest(G),!0),y(!0)}function T(M){var x=r.dragMinThreshold,G=Ae(x),q=G&&x.mouse||0,J=(G?x.touch:+x)||10;return Tt(nt(M))>(mt(M)?J:q)}function O(M){return Tt(nt(M))>Tt(nt(M,!0))}function X(M){if(t.is(we)||!L){var x=at(M);if(x&&x<hn)return nt(M)/x}return 0}function ot(M){return b()+Tr(M)*ee(Tt(M)*(r.flickPower||600),w?1/0:e.Layout.listSize()*(r.flickMaxPages||1))}function nt(M,x){return K(M,x)-K(k(M),x)}function at(M){return _r(M)-_r(k(M))}function k(M){return z===M&&V||z}function K(M,x){return(mt(M)?M.changedTouches[0]:M)["page"+g(x?"Y":"X")]}function st(M){return M/(L&&t.is(xe)?Ii:1)}function lt(M){var x=r.noDrag;return!Ie(M,"."+oo+", ."+fr)&&(!x||!Ie(M,x))}function mt(M){return typeof TouchEvent<"u"&&M instanceof TouchEvent}function Ct(){return f}function It(M){N=M}return{mount:W,disable:It,isDragging:Ct}}var Zi={Spacebar:" ",Right:dr,Left:pr,Up:Jn,Down:Zn};function Kr(t){return t=te(t)?t:t.key,Zi[t]||t}var yn="keydown";function Qi(t,e,r){var n=yt(t),o=n.on,a=n.bind,i=n.unbind,s=t.root,c=e.Direction.resolve,d,l;function C(){m(),o(wt,y),o(wt,m),o(Kt,g)}function m(){var b=r.keyboard;b&&(d=b==="global"?window:s,a(d,yn,S))}function y(){i(d,yn)}function u(b){l=b}function g(){var b=l;l=!0,En(function(){l=b})}function S(b){if(!l){var v=Kr(b);v===c(pr)?t.go("<"):v===c(dr)&&t.go(">")}}return{mount:C,destroy:y,disable:u}}var Ee=Vr+"-lazy",tr=Ee+"-srcset",ta="["+Ee+"], ["+tr+"]";function ea(t,e,r){var n=yt(t),o=n.on,a=n.off,i=n.bind,s=n.emit,c=r.lazyLoad==="sequential",d=[$e,ue],l=[];function C(){r.lazyLoad&&(m(),o(xt,m))}function m(){Yt(l),y(),c?b():(a(d),o(d,u),u())}function y(){e.Slides.forEach(function(v){Br(v.slide,ta).forEach(function($){var z=Pt($,Ee),V=Pt($,tr);if(z!==$.src||V!==$.srcset){var w=r.classes.spinner,f=$.parentElement,L=ze(f,"."+w)||he("span",w,f);l.push([$,v,L]),$.src||Re($,"none")}})})}function u(){l=l.filter(function(v){var $=r.perPage*((r.preloadPages||1)+1)-1;return v[1].isWithin(t.index,$)?g(v):!0}),l.length||a(d)}function g(v){var $=v[0];Vt(v[1].slide,Ir),i($,"load error",dt(S,v)),tt($,"src",Pt($,Ee)),tt($,"srcset",Pt($,tr)),Nt($,Ee),Nt($,tr)}function S(v,$){var z=v[0],V=v[1];Ut(V.slide,Ir),$.type!=="error"&&(se(v[2]),Re(z,""),s(Gr,z,V),s(Se)),c&&b()}function b(){l.length&&g(l.shift())}return{mount:C,destroy:dt(Yt,l),check:u}}function ra(t,e,r){var n=yt(t),o=n.on,a=n.emit,i=n.bind,s=e.Slides,c=e.Elements,d=e.Controller,l=d.hasFocus,C=d.getIndex,m=d.go,y=e.Direction.resolve,u=c.pagination,g=[],S,b;function v(){$(),o([wt,xt,or],v);var N=r.pagination;u&&Re(u,N?"":"none"),N&&(o([Kt,sr,ue],A),z(),A(),a(Un,{list:S,items:g},L(t.index)))}function $(){S&&(se(u?re(S.children):S),Ut(S,b),Yt(g),S=null),n.destroy()}function z(){var N=t.length,_=r.classes,W=r.i18n,P=r.perPage,D=l()?d.getEnd()+1:Oe(N/P);S=u||he("ul",_.pagination,c.track.parentElement),Vt(S,b=hr+"--"+f()),tt(S,qt,"tablist"),tt(S,Et,W.select),tt(S,Xr,f()===gr?"vertical":"");for(var H=0;H<D;H++){var h=he("li",null,S),R=he("button",{class:_.page,type:"button"},h),F=s.getIn(H).map(function(T){return T.slide.id}),I=!l()&&P>1?W.pageX:W.slideX;i(R,"click",dt(V,H)),r.paginationKeyboard&&i(R,"keydown",dt(w,H)),tt(h,qt,"presentation"),tt(R,qt,"tab"),tt(R,Me,F.join(" ")),tt(R,Et,Lr(I,H+1)),tt(R,ye,-1),g.push({li:h,button:R,page:H})}}function V(N){m(">"+N,!0)}function w(N,_){var W=g.length,P=Kr(_),D=f(),H=-1;P===y(dr,!1,D)?H=++N%W:P===y(pr,!1,D)?H=(--N+W)%W:P==="Home"?H=0:P==="End"&&(H=W-1);var h=g[H];h&&(kn(h.button),m(">"+H),Dt(_,!0))}function f(){return r.paginationDirection||r.direction}function L(N){return g[d.toPage(N)]}function A(){var N=L(C(!0)),_=L(C());if(N){var W=N.button;Ut(W,ce),Nt(W,pn),tt(W,ye,-1)}if(_){var P=_.button;Vt(P,ce),tt(P,pn,!0),tt(P,ye,"")}a(Xn,{list:S,items:g},N,_)}return{items:g,mount:v,destroy:$,getAt:L,update:A}}var na=[" ","Enter"];function oa(t,e,r){var n=r.isNavigation,o=r.slideFocus,a=[];function i(){t.splides.forEach(function(u){u.isParent||(d(t,u.splide),d(u.splide,t))}),n&&l()}function s(){a.forEach(function(u){u.destroy()}),Yt(a)}function c(){s(),i()}function d(u,g){var S=yt(u);S.on(Kt,function(b,v,$){g.go(g.is(we)?$:b)}),a.push(S)}function l(){var u=yt(t),g=u.on;g(zr,m),g(Yn,y),g([ne,wt],C),a.push(u),u.emit(Mr,t.splides)}function C(){tt(e.Elements.list,Xr,r.direction===gr?"vertical":"")}function m(u){t.go(u.index)}function y(u,g){Wr(na,Kr(g))&&(m(u),Dt(g))}return{setup:dt(e.Media.set,{slideFocus:Be(o)?n:o},!0),mount:i,destroy:s,remount:c}}function ia(t,e,r){var n=yt(t),o=n.bind,a=0;function i(){r.wheel&&o(e.Elements.track,"wheel",s,me)}function s(d){if(d.cancelable){var l=d.deltaY,C=l<0,m=_r(d),y=r.wheelMinThreshold||0,u=r.wheelSleep||0;Tt(l)>y&&m-a>u&&(t.go(C?"<":">"),a=m),c(C)&&Dt(d)}}function c(d){return!r.releaseWheel||t.state.is(Ce)||e.Controller.getAdjacent(d)!==-1}return{mount:i}}var aa=90;function la(t,e,r){var n=yt(t),o=n.on,a=e.Elements.track,i=r.live&&!r.isNavigation,s=he("span",_i),c=cr(aa,dt(l,!1));function d(){i&&(m(!e.Autoplay.isPaused()),tt(a,mn,!0),s.textContent="…",o(Hr,dt(m,!0)),o(Dr,dt(m,!1)),o([$e,ue],dt(l,!0)))}function l(y){tt(a,gn,y),y?(Ne(a,s),c.start()):(se(s),c.cancel())}function C(){Nt(a,[dn,mn,gn]),se(s)}function m(y){i&&tt(a,dn,y?"off":"polite")}return{mount:d,disable:m,destroy:C}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:Fi,Slides:Ri,Layout:Oi,Clones:Pi,Move:Bi,Controller:Vi,Arrows:ji,Autoplay:Hi,Cover:Di,Scroll:Ki,Drag:Ji,Keyboard:Qi,LazyLoad:ea,Pagination:ra,Sync:oa,Wheel:ia,Live:la}),ca={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"},ua={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:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(t,e,r){var n=e.Slides;function o(){yt(t).on([ne,xt],a)}function a(){n.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function i(s,c){n.style("transition","opacity "+r.speed+"ms "+r.easing),En(c)}return{mount:o,start:i,cancel:wr}}function da(t,e,r){var n=e.Move,o=e.Controller,a=e.Scroll,i=e.Elements.list,s=dt(Wt,i,"transition"),c;function d(){yt(t).bind(i,"transitionend",function(y){y.target===i&&c&&(C(),c())})}function l(y,u){var g=n.toPosition(y,!0),S=n.getPosition(),b=m(y);Tt(g-S)>=1&&b>=1?r.useScroll?a.scroll(g,b,!1,u):(s("transform "+b+"ms "+r.easing),n.translate(g,!0),c=u):(n.jump(y),u())}function C(){s(""),a.cancel()}function m(y){var u=r.rewindSpeed;if(t.is(xe)&&u){var g=o.getIndex(!0),S=o.getEnd();if(g===0&&y>=S||g>=S&&y===0)return u}return r.speed}return{mount:d,start:l,cancel:C}}var ga=(function(){function t(r,n){this.event=yt(),this.Components={},this.state=mi(fe),this.splides=[],this._o={},this._E={};var o=te(r)?On(document,r):r;Le(o,o+" is invalid."),this.root=o,n=Zt({label:Pt(o,Et)||"",labelledby:Pt(o,Ur)||""},ua,t.defaults,n||{});try{Zt(n,JSON.parse(Pt(o,Vr)))}catch{Le(!1,"Invalid JSON")}this._o=Object.create(Zt({},n))}var e=t.prototype;return e.mount=function(n,o){var a=this,i=this.state,s=this.Components;Le(i.is([fe,er]),"Already mounted!"),i.set(fe),this._C=s,this._T=o||this._T||(this.is(He)?pa:da),this._E=n||this._E;var c=ke({},sa,this._E,{Transition:this._T});return le(c,function(d,l){var C=d(a,s,a._o);s[l]=C,C.setup&&C.setup()}),le(s,function(d){d.mount&&d.mount()}),this.emit(ne),Vt(this.root,Ti),i.set(ve),this.emit(Er),this},e.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(ve)&&(this._C.Sync.remount(),n.Components.Sync.remount()),this},e.go=function(n){return this._C.Controller.go(n),this},e.on=function(n,o){return this.event.on(n,o),this},e.off=function(n){return this.event.off(n),this},e.emit=function(n){var o;return(o=this.event).emit.apply(o,[n].concat(re(arguments,1))),this},e.add=function(n,o){return this._C.Slides.add(n,o),this},e.remove=function(n){return this._C.Slides.remove(n),this},e.is=function(n){return this._o.type===n},e.refresh=function(){return this.emit(xt),this},e.destroy=function(n){n===void 0&&(n=!0);var o=this.event,a=this.state;return a.is(fe)?yt(this).on(Er,this.destroy.bind(this,n)):(le(this._C,function(i){i.destroy&&i.destroy(n)},!0),o.emit(jr),o.destroy(),n&&Yt(this.splides),a.set(er)),this},ci(t,[{key:"options",get:function(){return this._o},set:function(n){this._C.Media.set(n,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),Jr=ga;Jr.defaults={};Jr.STATES=pi;var bn=[[ne,"onMounted"],[Er,"onReady"],[Kt,"onMove"],[$e,"onMoved"],[zr,"onClick"],[Bn,"onActive"],[Vn,"onInactive"],[Nn,"onVisible"],[zn,"onHidden"],[xt,"onRefresh"],[wt,"onUpdated"],[Se,"onResize"],[lr,"onResized"],[jn,"onDrag"],[Mn,"onDragging"],[Hn,"onDragged"],[sr,"onScroll"],[ue,"onScrolled"],[jr,"onDestroy"],[Dn,"onArrowsMounted"],[Gn,"onArrowsUpdated"],[Un,"onPaginationMounted"],[Xn,"onPaginationUpdated"],[Mr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[qn,"onAutoplayPlaying"],[Dr,"onAutoplayPause"],[Gr,"onLazyLoadLoaded"]];function Zr(...t){return t.filter(Boolean).join(" ")}function ir(t){return t!==null&&typeof t=="object"}function Fr(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((r,n)=>!Fr(r,e[n]));if(ir(t)&&ir(e)){const r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&!r.some(o=>!Object.prototype.hasOwnProperty.call(e,o)||!Fr(t[o],e[o]))}return t===e}function ma(t,e){return t.length===e.length&&!t.some((r,n)=>r!==e[n])}function fa(t,e){if(t){const r=Object.keys(t);for(let n=0;n<r.length;n++){const o=r[n];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function kr(t,e){const r=t;return fa(e,(n,o)=>{Array.isArray(n)?r[o]=n.slice():ir(n)?r[o]=kr(ir(r[o])?r[o]:{},n):r[o]=n}),r}var ha=({children:t,className:e,...r})=>B.createElement("div",{className:Zr("splide__track",e),...r},B.createElement("ul",{className:"splide__list"},t)),Qr=class extends B.Component{constructor(){super(...arguments),this.splideRef=B.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:r}=this.props,{current:n}=this.splideRef;n&&(this.splide=new Jr(n,t),this.bind(this.splide),this.splide.mount(e,r),this.options=kr({},t||{}),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:t}=this.props;t&&!Fr(this.options,t)&&(this.splide.options=t,this.options=kr({},t));const e=this.getSlides();ma(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){bn.forEach(([e,r])=>{const n=this.props[r];typeof n=="function"&&t.on(e,(...o)=>{n(t,...o)})})}omit(t,e){return e.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&delete t[r]}),t}render(){const{className:t,tag:e="div",hasTrack:r=!0,children:n,...o}=this.props;return B.createElement(e,{className:Zr("splide",t),ref:this.splideRef,...this.omit(o,["options",...bn.map(a=>a[1])])},r?B.createElement(ha,null,n):n)}},tn=({children:t,className:e,...r})=>B.createElement("li",{className:Zr("splide__slide",e),...r},t);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const ya="RichTextRenderer-module__link___BWeZ2",ba={link:ya},uo=({content:t})=>{const e=n=>n.map((r,o)=>r.type==="link"?p.jsx("a",{className:ba.link,href:r.value,target:r.target,children:e(r.children)},o):p.jsx("span",{style:va(r),children:r.text},o));return p.jsx(p.Fragment,{children:t.map((n,r)=>{const o=n.children;return p.jsx("div",{children:e(o)},r)})})};function va(t){return{...t.fontFamily&&{fontFamily:t.fontFamily},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Sa="SvgImage-module__svg___q3xE-",xa="SvgImage-module__img___VsTm-",vr={svg:Sa,img:xa},Ca=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},$a=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,be=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[a,i]=V.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return V.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ca(t)||!a?p.jsx("img",{src:t,alt:"",className:yt(vr.img,r),style:o}):p.jsx("span",{"data-supports-mask":a,className:yt(vr.svg,r),style:{"--svg":$a(t),"--fill":e,"--hover-fill":n,...o??{}}})},wa={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function _a({settings:t,content:e,styles:n,isEditor:r}){const[o,a]=V.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:d,wordSpacing:l,fontSizeLineHeight:w,textAppearance:b,color:g}=n.imageCaption,[u,m]=V.useState(void 0),[S,y]=V.useState(null),[v,C]=V.useState(0),[M,B]=V.useState(0),{direction:$,transition:f,controls:T,pagination:A,imageCaption:z,triggers:L}=t,k=V.useRef(f.type),{x:W,y:D}=t.controls.offset,H=h=>{o&&o.go(h)};return V.useEffect(()=>{if(!S)return;const h=new ResizeObserver(O=>{if(!o)return;const[F]=O;m({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return h.observe(S),()=>h.unobserve(S)},[S]),V.useEffect(()=>{!o||k.current===f.type||(B(h=>h+1),k.current=f.type)},[f.type]),p.jsx("div",{className:yt(U.wrapper,{[U.editor]:r}),ref:y,children:p.jsxs("div",{className:U.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&p.jsx("div",{className:yt(U.captionBlock),children:p.jsx("div",{className:U.captionTextWrapper,children:e.map((h,O)=>p.jsx("div",{className:yt(U.captionText,wa[z.alignment],{[U.withPointerEvents]:O===v&&r,[U.active]:O===v}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,r),letterSpacing:E.scalingValue(s,r),wordSpacing:E.scalingValue(l,r),textAlign:d,fontSize:E.scalingValue(w.fontSize,r),lineHeight:E.scalingValue(w.lineHeight,r),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:g,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:p.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":z.linkHoverColor,"--link-color":z.linkColor,position:"relative",top:E.scalingValue(z.offset.y,r),left:E.scalingValue(z.offset.x,r)},children:p.jsx(uo,{content:h.imageCaption})})},O))})}),p.jsx(er,{onMove:h=>{C(h.index)},ref:a,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:$==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((h,O)=>p.jsx(nr,{children:p.jsx("div",{className:U.sliderItem,children:p.jsx("div",{className:U.imgWrapper,children:p.jsx("img",{className:yt(U.sliderImage,{[U.contain]:h.image.objectFit==="contain",[U.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},O))},M),T.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:yt(U.arrow,{[U.arrowVertical]:$==="vert",[U.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:p.jsxs("button",{onClick:()=>{H("-1")},className:U.arrowInner,style:{transform:`translate(${E.scalingValue(W,r)}, ${E.scalingValue(D*($==="horiz"?1:-1),r)}) scale(${t.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&p.jsx(be,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:yt(U.arrowImg,U.mirror)}),!T.arrowsImgUrl&&p.jsx(Sr,{color:T.color,className:yt(U.arrowIcon,U.arrowImg,U.mirror)})]})}),p.jsx("div",{className:yt(U.arrow,U.nextArrow,{[U.arrowVertical]:$==="vert",[U.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:p.jsxs("button",{className:U.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${E.scalingValue(W*($==="horiz"?-1:1),r)}, ${E.scalingValue(D,r)}) scale(${t.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&p.jsx(be,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:U.arrowImg}),!T.arrowsImgUrl&&p.jsx(Sr,{color:T.color,className:yt(U.arrowIcon,U.arrowImg)})]})})]}),L.triggersList.click&&p.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),A.isActive&&p.jsx("div",{className:yt(U.pagination,{[U.paginationInsideBottom]:A.position==="inside-1"&&$==="horiz",[U.paginationInsideTop]:A.position==="inside-2"&&$==="horiz",[U.paginationOutsideBottom]:A.position==="outside-1"&&$==="horiz",[U.paginationOutsideTop]:A.position==="outside-2"&&$==="horiz",[U.paginationInsideLeft]:A.position==="inside-1"&&$==="vert",[U.paginationInsideRight]:A.position==="inside-2"&&$==="vert",[U.paginationOutsideLeft]:A.position==="outside-1"&&$==="vert",[U.paginationOutsideRight]:A.position==="outside-2"&&$==="vert",[U.paginationVertical]:$==="vert"}),children:p.jsx("div",{className:U.paginationInner,style:{backgroundColor:A.colors[2],transform:`scale(${A.scale/100}) translate(${E.scalingValue(A.offset.x,r)}, ${E.scalingValue(A.offset.y,r)}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:e.map((h,O)=>p.jsx("button",{onClick:()=>{o&&o.go(O)},className:yt(U.paginationItem),children:p.jsx("div",{className:yt(U.dot,{[U.activeDot]:O===v}),style:{backgroundColor:O===v?A.colors[0]:A.colors[1],"--pagination-hover-color":A.hover}})},O))})})]})})}function Sr({color:t,className:e}){return p.jsx("svg",{viewBox:"0 0 10 18",className:e,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ta={element:_a,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ea="ImageRevealSlider-module__image___Qjt-e",Aa="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",de={imageRevealSlider:La,image:Ea,link:Aa,cursor:Ia};function xr(t,e,n){for(const r of n){const o=new Image;o.src=r.url;const a=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,c=a/2,s=i/2;if(t>=r.x-c&&t<=r.x+c&&e>=r.y-s&&e<=r.y+s)return!0}return!1}function wn(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Fa(t,e,n,r){let o,a;if(e==="custom"){o=n;const i=await wn(t);a=i.height/i.width*o}else if(e==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await wn(t);a=i.height/i.width*o}else{const i=await wn(t);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function ka({settings:t,content:e,isEditor:n}){const[r,o]=V.useState(null),[a,i]=V.useState([]),[c,s]=V.useState(0),d=V.useRef(0),[l,w]=V.useState({x:0,y:0}),[b,g]=V.useState(1),[u,m]=V.useState("none"),S=V.useRef({x:0,y:0}),[y,v]=V.useState(!1),{sizeType:C,imageWidth:M,randomRangeImageWidth:B}=t.imageSize,{revealPosition:$,visible:f}=t.position,{cursorType:T,target:A,defaultCursorScale:z,defaultCursor:L,hoverCursorScale:k,hoverCursor:W}=t.cursor;V.useEffect(()=>{if(!r)return;const h=(I,_)=>{const P=r.getBoundingClientRect(),X=I-P.left,it=_-P.top;if(w({x:X,y:it}),T==="system"){m("none"),g(1);return}const et=X,st=it,R=document.elementFromPoint(P.left+et,P.top+st);if(R&&R.closest("a")){m("none"),g(1);return}const K=xr(et,st,a)||A==="area"?{img:W??"none",scale:k}:{img:L??"none",scale:z};m(K.img),g(K.scale)},O=I=>{I.stopPropagation(),S.current={x:I.clientX,y:I.clientY},h(I.clientX,I.clientY)},F=()=>{y&&h(S.current.x,S.current.y)};return r.addEventListener("mousemove",O),window.addEventListener("scroll",F,!0),()=>{r.removeEventListener("mousemove",O),window.removeEventListener("scroll",F,!0)}},[r,y,l,T,A,W,L,k,z,a]),V.useEffect(()=>{y||(m("none"),g(0))},[y]);const D=async(h,O,F,I={})=>{const{width:_,height:P,finalWidth:X}=await Fa(h.image.url,C,M,B);let it=0,et=0;$==="same"?(it=O/2,et=F/2):(it=I.x??Math.random()*O,et=I.y??Math.random()*F);const st=Math.min(Math.max(it,_/2),O-_/2),R=Math.min(Math.max(et,P/2),F-P/2);return{id:d.current++,url:h.image.url,link:h.link,name:h.image.name,x:st,y:R,width:X}};V.useEffect(()=>{if(!r||e.length===0)return;const h=r.getBoundingClientRect(),O=h.width,F=h.height,I=[];(async()=>{const P=e[0],X=await D(P,O,F);I.push(X),i(I),s(1)})()},[C,M,B,$,r]),V.useEffect(()=>{f==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[f]);const H=async h=>{if(!r)return;const O=r.getBoundingClientRect(),F=h.clientX-O.left,I=h.clientY-O.top;if(A==="image"&&!xr(F,I,a))return;let _=0,P=0;$==="on Click"?(_=F,P=I):$==="same"?(_=O.width/2,P=O.height/2):(_=Math.random()*O.width,P=Math.random()*O.height);const X=e[c],it=await D(X,O.width,O.height,{x:_,y:P});i(et=>f==="all"?[...et,it]:[it]),s(et=>et>=e.length-1?0:et+1)};return p.jsxs("div",{ref:o,onClick:H,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:de.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(h=>p.jsx("div",{className:de.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:A==="area"&&h.link?p.jsx("a",{href:h.link,target:"_blank",className:de.link,children:p.jsx("img",{src:h.url,alt:h.name,className:de.image},h.id)}):p.jsx("img",{src:h.url,alt:h.name,className:de.image},h.id)},h.id)),y&&p.jsx("div",{className:de.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ra={element:ka,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},Oa="LightBox-module__hidden___9s-9x",Pa="LightBox-module__heroImage___sTxNF",Ba="LightBox-module__background___rm9ml",Wa="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Na="LightBox-module__imgWrapper___LuFUp",ja="LightBox-module__contain___8-yaS",Ma="LightBox-module__cover___hNvOG",Ha="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",qa="LightBox-module__nextArrow___zkAQN",Ya="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Ja="LightBox-module__arrowImg___pNV88",Za="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",tl="LightBox-module__thumbsContainerVertical___wttk5",el="LightBox-module__thumbsContainer___osSma",nl="LightBox-module__thumbsAlignStart___MO6tY",rl="LightBox-module__thumbsAlignCenter___Q4sUx",ol="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",N={hidden:Oa,heroImage:Pa,background:Ba,editor:Wa,contentStyle:Va,imageStyle:za,imgWrapper:Na,contain:ja,cover:Ma,caption:Ha,captionTextInner:Da,lightboxSplide:Ga,arrow:Ua,arrowVertical:Xa,nextArrow:qa,arrowInner:Ya,arrowIcon:Ka,arrowImg:Ja,mirror:Za,thumbsWrapper:Qa,thumbsContainerVertical:tl,thumbsContainer:el,thumbsAlignStart:nl,thumbsAlignCenter:rl,thumbsAlignEnd:ol,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},qe=(t,e,n)=>{const r={},[o,a]=t.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),o==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(e.x,n)}), calc(-50% + ${E.scalingValue(e.y,n)}))`:o==="middle"?r.transform=`translate(${E.scalingValue(e.x,n)}, calc(-50% + ${E.scalingValue(e.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(e.x,n)}), ${E.scalingValue(e.y,n)})`:r.transform=`translate(${E.scalingValue(e.x,n)}, ${E.scalingValue(e.y,n)})`,r};function po(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function Cr(t){const e=t.getBoundingClientRect(),n=po(t),r=Math.max(0,e.width-n.left-n.right),o=Math.max(0,e.height-n.top-n.bottom),a=t.naturalWidth,i=t.naturalHeight,c=r/o,s=a/i;let d,l;s>c?(d=r,l=r/s):(l=o,d=o*s);const w=e.left+n.left,b=e.top+n.top,g=(r-d)/2+w,u=(o-l)/2+b;return{x:g,y:u,width:d,height:l}}function $r(t){const e=t.getBoundingClientRect(),n=po(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function wr(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const r=e[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function bl(t,e){const n=(()=>{if(t==="fade in")return N.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return N.fadeIn;if(t==="slide in")switch(e){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return N.fadeOut;if(t==="slide in")switch(e){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})(),a=(()=>{if(t==="fade in")return N.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:a}}const vl=({settings:t,content:e,styles:n,portalId:r,activeEvent:o,isEditor:a})=>{const[i,c]=V.useState(!1),{url:s}=t.thumbnailBlock.cover;return V.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),p.jsxs(p.Fragment,{children:[p.jsx("img",{src:s,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),p.jsx(Sl,{isOpen:i,onClose:()=>c(!1),content:e,settings:t,lightboxStyles:n,portalId:r,isEditor:a})]})},Sl=({isOpen:t,onClose:e,content:n,lightboxStyles:r,settings:o,portalId:a,isEditor:i,metadata:c})=>{var j;const[s,d]=V.useState(0),[l,w]=V.useState(0),[b,g]=V.useState(!1),[u,m]=V.useState(!1),[S,y]=V.useState({}),v=V.useRef(null),C=V.useRef(null),M=V.useRef(null),B=V.useRef(!1),$=V.useRef(null),f=V.useRef(null),T=V.useRef(null),A=V.useRef(null),z=V.useRef(!1),L=V.useRef(null),[k,W]=V.useState(!1),{appear:D,triggers:H,slider:h,thumbnail:O,controls:F,area:I,caption:_,layout:P}=o.lightboxBlock,{appearClass:X,backdropAppearClass:it,backdropDisappearClass:et,disappearClass:st}=bl(D.type,D.direction),R=(c==null?void 0:c.itemId)??null;V.useEffect(()=>{const x=()=>{setTimeout(()=>{var q,J;(J=(q=v.current)==null?void 0:q.splide)==null||J.refresh()},16)},G=()=>{w(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",x),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",x),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),V.useEffect(()=>{if(!t||!O.isActive){W(!1);return}const x=L.current;if(!x)return;const G=()=>{h.direction==="horiz"?W(x.scrollWidth>x.clientWidth):W(x.scrollHeight>x.clientHeight)};G();const q=new ResizeObserver(G);return q.observe(x),()=>q.disconnect()},[t,O.isActive,n.length,S,h.direction]);const K=V.useCallback(()=>{const x=window.matchMedia("(max-width: 768px)").matches,G=wr(I.color);x&&!i&&G>.9&&(document.body.style.backgroundColor=""),g(!0),B.current=!0;const q=J=>{J.target===$.current&&J.animationName&&($.current&&f.current&&$.current.removeEventListener("animationend",f.current),f.current=null,B.current&&(B.current=!1,e()),g(!1))};$.current&&(f.current=q,$.current.addEventListener("animationend",q))},[e,I.color,i]),ft=(x,G,q)=>{var J,nt;if(x){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?K():(J=v.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Z=x.getBoundingClientRect(),Y=G-Z.left,ot=q-Z.top,ht=Z.width,lt=Z.height;let gt;h.direction==="horiz"?gt=Y<ht/2?"-1":"+1":gt=ot<lt/2?"-1":"+1",(nt=v.current)==null||nt.go(gt)}}},ct=x=>{if(z.current){z.current=!1;return}const G=n[s],q=(G==null?void 0:G.image.objectFit)==="cover";let J,nt;if("changedTouches"in x&&x.changedTouches.length>0)J=x.changedTouches[0].clientX,nt=x.changedTouches[0].clientY;else if("clientX"in x)J=x.clientX,nt=x.clientY;else return;let Z;if(q&&M.current){const Y=$r(M.current);Z=J>=Y.left&&J<=Y.right&&nt>=Y.top&&nt<=Y.bottom}else{const Y=M.current?Cr(M.current):null;if(!Y){x.target===x.currentTarget&&K();return}Z=J>=Y.x&&J<=Y.x+Y.width&&nt>=Y.y&&nt<=Y.y+Y.height}Z?ft(M.current,J,nt):K()},dt=x=>{const G=x.target;(G.classList.contains(N.thumbsWrapper)||G.classList.contains(N.thumbsContainer))&&ct(x)};V.useEffect(()=>{if(!t)return;const x=G=>{var q,J;if(G.key==="Escape"){K();return}if(G.key==="ArrowRight"){d(nt=>(nt+1)%Math.max(n.length,1)),(q=v.current)==null||q.go("+1");return}G.key==="ArrowLeft"&&(d(nt=>(nt-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=v.current)==null||J.go("-1"))};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[t,K,n.length]),V.useEffect(()=>{if(t){if(d(0),w(G=>G+1),B.current=!1,g(!1),m(!1),y({}),!R)return;const x=new CustomEvent("page-overlay",{detail:{itemId:R}});window.dispatchEvent(x)}return()=>{$.current&&f.current&&($.current.removeEventListener("animationend",f.current),f.current=null),m(!1)}},[t,R]),V.useEffect(()=>{C.current!==null&&C.current!==h.type&&w(x=>x+1),C.current=h.type},[h.type]),V.useEffect(()=>{if(!t)return;const x=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,q=wr(I.color);document.body.style.overflow="hidden",m(!1);const J=Z=>{Z.target===$.current&&!B.current&&Z.animationName&&(G&&!i&&q>.9&&(document.body.style.backgroundColor=I.color),m(!0),$.current&&T.current&&$.current.removeEventListener("animationend",T.current),T.current=null)};$.current&&(T.current=J,$.current.addEventListener("animationend",J));const nt=Z=>{const Y=Z.target;Y&&(Y.closest(`.${N.thumbsWrapper}`)||Y.closest(`.${N.thumbsContainer}`))||h.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",nt,{passive:!1}),()=>{document.body.style.overflow=x,document.removeEventListener("touchmove",nt),$.current&&T.current&&($.current.removeEventListener("animationend",T.current),T.current=null),m(!1)}},[t,i,I.color,h.type]),V.useEffect(()=>{if(!t)return;const x=G=>{var J,nt;if(B.current){G.stopPropagation();return}if(z.current){z.current=!1;return}const q=G.target;if(!(q&&(q.closest(`.${N.thumbsContainer}`)||q.closest(`.${N.thumbItem}`)))){if(h.type==="slide"&&H.type==="drag"&&((nt=(J=v.current)==null?void 0:J.splide)!=null&&nt.root)){const Z=v.current.splide.root;if(q&&(Z.contains(q)||Z===q))return}if(G.touches.length===0&&G.changedTouches.length>0){const Z=n[s],Y=(Z==null?void 0:Z.image.objectFit)==="cover",ot=G.changedTouches[0];let ht;if(Y&&M.current){const lt=$r(M.current);ht=ot.clientX>=lt.left&&ot.clientX<=lt.right&&ot.clientY>=lt.top&&ot.clientY<=lt.bottom}else{const lt=M.current?Cr(M.current):null;if(!lt)return;ht=ot.clientX>=lt.x&&ot.clientX<=lt.x+lt.width&&ot.clientY>=lt.y&&ot.clientY<=lt.y+lt.height}if(!ht){G.stopPropagation(),B.current=!0;const lt=gt=>{gt.stopPropagation(),gt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0),K()}}}};return document.addEventListener("touchend",x,{passive:!0}),()=>{document.removeEventListener("touchend",x)}},[t,K,s,n]);const St=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&H.type==="drag";V.useEffect(()=>{var gt,wt;if(!t||!St||!((wt=(gt=v.current)==null?void 0:gt.splide)!=null&&wt.root))return;const x=v.current.splide.root,G=30,q=(Q,ut)=>{if(A.current){const xt=Math.abs(Q-A.current.x),Bt=Math.abs(ut-A.current.y);(xt>0||Bt>0)&&(z.current=!0)}},J=Q=>{A.current&&(Q.preventDefault(),q(Q.clientX,Q.clientY))},nt=Q=>{A.current&&Q.touches.length>0&&(Q.preventDefault(),q(Q.touches[0].clientX,Q.touches[0].clientY))},Z=(Q,ut)=>{if(!A.current||!v.current){A.current=null;return}const xt=Math.abs(Q-A.current.x),Bt=Math.abs(ut-A.current.y);Bt>G&&Bt>xt&&v.current.go(ut<A.current.y?"+1":"-1"),A.current=null},Y=Q=>{A.current&&Z(Q.clientX,Q.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",J)},ot=Q=>{if(A.current){if(Q.changedTouches.length>0){const ut=Q.changedTouches[0];Z(ut.clientX,ut.clientY)}document.removeEventListener("touchend",ot),document.removeEventListener("touchcancel",ot),document.removeEventListener("touchmove",nt)}},ht=Q=>{A.current={x:Q.clientX,y:Q.clientY},z.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},lt=Q=>{Q.touches.length>0&&(A.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",nt,{passive:!1}),document.addEventListener("touchend",ot),document.addEventListener("touchcancel",ot))};return x.addEventListener("pointerdown",ht),x.addEventListener("touchstart",lt),()=>{x.removeEventListener("pointerdown",ht),x.removeEventListener("touchstart",lt),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",nt),document.removeEventListener("touchend",ot),document.removeEventListener("touchcancel",ot),A.current=null,z.current=!1}},[t,St,l]);const Pt={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:Lr.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:i?null:$,className:yt(N.background,b?et:it,{[N.editor]:i},{[N.hidden]:!t}),style:{...Pt,...u&&!i&&!b?{position:"absolute"}:{}}}),p.jsxs("div",{ref:i?$:null,className:yt(N.contentStyle,b?st:X,{[N.editor]:i},{[N.hidden]:!t}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[p.jsx(er,{onMove:x=>d(x.index),ref:v,className:N.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!St,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:n.map((x,G)=>{const q=qe(P.position,P.offset,i),J=`${E.scalingValue(P.padding.top,i)} ${E.scalingValue(P.padding.right,i)} ${E.scalingValue(P.padding.bottom,i)} ${E.scalingValue(P.padding.left,i)}`,nt=h.type==="scale"?(()=>{const{transform:Z,...Y}=q;return{...Y,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Z||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return p.jsx(nr,{children:p.jsx("div",{className:N.imgWrapper,onClick:ct,children:p.jsx("img",{ref:G===s?M:null,className:yt(N.imageStyle,{[N.contain]:x.image.objectFit==="contain",[N.cover]:x.image.objectFit==="cover",[N.scaleSlide]:h.type==="scale"}),src:x.image.url,alt:x.image.name??"",style:{...nt,pointerEvents:x.image.objectFit==="contain"?"none":"auto"}})})},G)})},l),F.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:yt(N.arrow,{[N.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x,i)}, ${E.scalingValue(F.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&p.jsx(be,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:yt(N.arrowImg,N.mirror)}),!F.arrowsImgUrl&&p.jsx(_r,{color:F.color,className:yt(N.arrowIcon,N.arrowImg,N.mirror)})]})}),p.jsx("div",{className:yt(N.arrow,N.nextArrow,{[N.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x*(h.direction==="horiz"?-1:1),i)}, ${E.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&p.jsx(be,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:N.arrowImg}),!F.arrowsImgUrl&&p.jsx(_r,{color:F.color,className:yt(N.arrowIcon,N.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const x=qe(I.closeIconAlign,I.closeIconOffset,i),G=`scale(${I.closeIconScale})`,q=x.transform?`${x.transform} ${G}`:G;return p.jsx("button",{className:N.closeButton,style:{...x,transform:q},onClick:K,"aria-label":"Close lightbox",children:p.jsx(be,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&r.imageCaption&&((j=n[s])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:x,fontSettings:G,letterSpacing:q,textAlign:J,wordSpacing:nt,fontSizeLineHeight:Z,textAppearance:Y,color:ot}=r.imageCaption;return p.jsx("div",{className:N.caption,style:{...qe(_.alignment,_.offset,i),fontFamily:G.fontFamily,fontWeight:G.fontWeight,fontStyle:G.fontStyle,width:x.sizing==="auto"?"max-content":E.scalingValue(x.width,i),letterSpacing:E.scalingValue(q,i),wordSpacing:E.scalingValue(nt,i),textAlign:J,fontSize:E.scalingValue(Z.fontSize,i),lineHeight:E.scalingValue(Z.lineHeight,i),textTransform:Y.textTransform??"none",textDecoration:Y.textDecoration??"none",fontVariant:Y.fontVariant??"normal",color:ot},onClick:ht=>ht.stopPropagation(),children:p.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:p.jsx(uo,{content:n[s].imageCaption})})})})(),O.isActive&&(()=>{const[x,G]=O.position.split("-"),q=h.direction==="horiz"?`${x}-left`:O.position,J=qe(q,O.offset,i),nt=()=>{if(h.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(x==="top")return"flex-start";if(x==="middle")return"center";if(x==="bottom")return"flex-end"}return"flex-start"};return p.jsx("div",{ref:L,className:N.thumbsWrapper,onClick:Z=>dt(Z),style:{position:i?"absolute":"fixed",...J,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:p.jsx("div",{className:yt(N.thumbsContainer,{[N.thumbsContainerVertical]:h.direction==="vert",[N.thumbsAlignStart]:O.align==="start",[N.thumbsAlignCenter]:O.align==="center",[N.thumbsAlignEnd]:O.align==="end"}),style:{gap:E.scalingValue(O.grid.gap,i),justifyContent:k?"flex-start":nt()},children:n.map((Z,Y)=>{const ot=Y===s,ht=S[Y],gt=O.grid.size*(ot?O.activeState.scale:1),wt=()=>{if(O.fit!=="fit")return{};if(!ht)return h.direction==="horiz"?{height:E.scalingValue(gt,i)}:{width:E.scalingValue(gt,i)};const Q=ht.width/ht.height;if(h.direction==="horiz"){const ut=gt,xt=ut*Q;return{width:E.scalingValue(xt,i),height:E.scalingValue(ut,i)}}else{const ut=gt,xt=ut/Q;return{width:E.scalingValue(ut,i),height:E.scalingValue(xt,i)}}};return p.jsx("button",{className:N.thumbItem,style:{...h.direction==="horiz"&&O.fit!=="fit"?{height:E.scalingValue(gt,i)}:{},...h.direction==="vert"&&O.fit!=="fit"?{width:E.scalingValue(gt,i)}:{},...O.fit==="cover"?{width:E.scalingValue(gt,i),height:E.scalingValue(gt,i)}:{},...wt(),transition:ot?"all 0.25s ease-out":"none",opacity:ot?O.activeState.opacity/100:O.opacity/100,"--thumb-hover":O.activeState.opacity/100},onClick:Q=>{var ut;Q.stopPropagation(),d(Y),(ut=v.current)==null||ut.go(Y)},onMouseEnter:()=>{var Q;O.triggers==="hov"&&((Q=v.current)==null||Q.go(Y))},children:p.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:Q=>{const ut=Q.currentTarget;ut.naturalWidth&&ut.naturalHeight&&y(xt=>({...xt,[Y]:{width:ut.naturalWidth,height:ut.naturalHeight}}))},style:{objectFit:O.fit==="cover"?"cover":"contain",...O.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...O.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${Y}`)})})})})()]})]}),document.getElementById(a))};function _r({color:t,className:e}){return p.jsx("svg",{viewBox:"0 0 10 18",className:e,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xl={element:vl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 Zt(t){const{color:e,...n}=t;return n}function Gt(t,e){var n,r,o;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:E.scalingValue(t.letterSpacing,e),wordSpacing:E.scalingValue(t.wordSpacing,e),fontSize:E.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?E.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=t.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=t.textAppearance)==null?void 0:o.fontVariant,color:t.color}}function Ye(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Cl(t){return`
6
+ */const ya="RichTextRenderer-module__link___BWeZ2",ba={link:ya},uo=({content:t})=>{const e=r=>r.map((n,o)=>n.type==="link"?p.jsx("a",{className:ba.link,href:n.value,target:n.target,children:e(n.children)},o):p.jsx("span",{style:va(n),children:n.text},o));return p.jsx(p.Fragment,{children:t.map((r,n)=>{const o=r.children;return p.jsx("div",{children:e(o)},n)})})};function va(t){return{...t.fontFamily&&{fontFamily:t.fontFamily},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Sa="SvgImage-module__svg___q3xE-",xa="SvgImage-module__img___VsTm-",vn={svg:Sa,img:xa},Ca=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},$a=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,be=({url:t,fill:e="#000000",hoverFill:r="#CCCCCC",className:n="",style:o})=>{const[a,i]=B.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return B.useEffect(()=>{if(typeof window<"u"&&window.CSS){const s=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(s)}},[]),!Ca(t)||!a?p.jsx("img",{src:t,alt:"",className:ht(vn.img,n),style:o}):p.jsx("span",{"data-supports-mask":a,className:ht(vn.svg,n),style:{"--svg":$a(t),"--fill":e,"--hover-fill":r,...o??{}}})},wa={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function _a({settings:t,content:e,styles:r,isEditor:n}){const[o,a]=B.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:c,textAlign:d,wordSpacing:l,fontSizeLineHeight:C,textAppearance:m,color:y}=r.imageCaption,[u,g]=B.useState(void 0),[S,b]=B.useState(null),[v,$]=B.useState(0),[z,V]=B.useState(0),{direction:w,transition:f,controls:L,pagination:A,imageCaption:N,triggers:_}=t,W=B.useRef(f.type),{x:P,y:D}=t.controls.offset,H=h=>{o&&o.go(h)};return B.useEffect(()=>{if(!S)return;const h=new ResizeObserver(R=>{if(!o)return;const[F]=R;g({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return h.observe(S),()=>h.unobserve(S)},[S]),B.useEffect(()=>{!o||W.current===f.type||(V(h=>h+1),W.current=f.type)},[f.type]),p.jsx("div",{className:ht(U.wrapper,{[U.editor]:n}),ref:b,children:p.jsxs("div",{className:U.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&p.jsx("div",{className:ht(U.captionBlock),children:p.jsx("div",{className:U.captionTextWrapper,children:e.map((h,R)=>p.jsx("div",{className:ht(U.captionText,wa[N.alignment],{[U.withPointerEvents]:R===v&&n,[U.active]:R===v}),style:{fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,n),letterSpacing:E.scalingValue(c,n),wordSpacing:E.scalingValue(l,n),textAlign:d,fontSize:E.scalingValue(C.fontSize,n),lineHeight:E.scalingValue(C.lineHeight,n),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:p.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:E.scalingValue(N.offset.y,n),left:E.scalingValue(N.offset.x,n)},children:p.jsx(uo,{content:h.imageCaption})})},R))})}),p.jsx(Qr,{onMove:h=>{$(h.index)},ref:a,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:_.autoPlay!==null,..._.autoPlay!==null&&{interval:parseInt(_.autoPlay)*1e3},direction:w==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:_.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((h,R)=>p.jsx(tn,{children:p.jsx("div",{className:U.sliderItem,children:p.jsx("div",{className:U.imgWrapper,children:p.jsx("img",{className:ht(U.sliderImage,{[U.contain]:h.image.objectFit==="contain",[U.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},R))},z),L.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:ht(U.arrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:p.jsxs("button",{onClick:()=>{H("-1")},className:U.arrowInner,style:{transform:`translate(${E.scalingValue(P,n)}, ${E.scalingValue(D*(w==="horiz"?1:-1),n)}) scale(${t.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&p.jsx(be,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ht(U.arrowImg,U.mirror)}),!L.arrowsImgUrl&&p.jsx(Sn,{color:L.color,className:ht(U.arrowIcon,U.arrowImg,U.mirror)})]})}),p.jsx("div",{className:ht(U.arrow,U.nextArrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:p.jsxs("button",{className:U.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${E.scalingValue(P*(w==="horiz"?-1:1),n)}, ${E.scalingValue(D,n)}) scale(${t.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&p.jsx(be,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:U.arrowImg}),!L.arrowsImgUrl&&p.jsx(Sn,{color:L.color,className:ht(U.arrowIcon,U.arrowImg)})]})})]}),_.triggersList.click&&p.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),A.isActive&&p.jsx("div",{className:ht(U.pagination,{[U.paginationInsideBottom]:A.position==="inside-1"&&w==="horiz",[U.paginationInsideTop]:A.position==="inside-2"&&w==="horiz",[U.paginationOutsideBottom]:A.position==="outside-1"&&w==="horiz",[U.paginationOutsideTop]:A.position==="outside-2"&&w==="horiz",[U.paginationInsideLeft]:A.position==="inside-1"&&w==="vert",[U.paginationInsideRight]:A.position==="inside-2"&&w==="vert",[U.paginationOutsideLeft]:A.position==="outside-1"&&w==="vert",[U.paginationOutsideRight]:A.position==="outside-2"&&w==="vert",[U.paginationVertical]:w==="vert"}),children:p.jsx("div",{className:U.paginationInner,style:{backgroundColor:A.colors[2],transform:`scale(${A.scale/100}) translate(${E.scalingValue(A.offset.x,n)}, ${E.scalingValue(A.offset.y,n)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:e.map((h,R)=>p.jsx("button",{onClick:()=>{o&&o.go(R)},className:ht(U.paginationItem),children:p.jsx("div",{className:ht(U.dot,{[U.activeDot]:R===v}),style:{backgroundColor:R===v?A.colors[0]:A.colors[1],"--pagination-hover-color":A.hover}})},R))})})]})})}function Sn({color:t,className:e}){return p.jsx("svg",{viewBox:"0 0 10 18",className:e,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ta={element:_a,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ea="ImageRevealSlider-module__image___Qjt-e",Aa="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",de={imageRevealSlider:La,image:Ea,link:Aa,cursor:Ia};function xn(t,e,r){for(const n of r){const o=new Image;o.src=n.url;const a=n.width?Number.parseFloat(n.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,s=a/2,c=i/2;if(t>=n.x-s&&t<=n.x+s&&e>=n.y-c&&e<=n.y+c)return!0}return!1}function Cr(t){return new Promise(e=>{const r=new Image;r.src=t,r.onload=()=>{e({width:r.naturalWidth,height:r.naturalHeight})}})}async function Fa(t,e,r,n){let o,a;if(e==="custom"){o=r;const i=await Cr(t);a=i.height/i.width*o}else if(e==="random"){o=Math.random()*(n.max-n.min)+n.min;const i=await Cr(t);a=i.height/i.width*o}else{const i=await Cr(t);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function ka({settings:t,content:e,isEditor:r}){const[n,o]=B.useState(null),[a,i]=B.useState([]),[s,c]=B.useState(0),d=B.useRef(0),[l,C]=B.useState({x:0,y:0}),[m,y]=B.useState(1),[u,g]=B.useState("none"),S=B.useRef({x:0,y:0}),[b,v]=B.useState(!1),{sizeType:$,imageWidth:z,randomRangeImageWidth:V}=t.imageSize,{revealPosition:w,visible:f}=t.position,{cursorType:L,target:A,defaultCursorScale:N,defaultCursor:_,hoverCursorScale:W,hoverCursor:P}=t.cursor;B.useEffect(()=>{if(!n)return;const h=(I,T)=>{const O=n.getBoundingClientRect(),X=I-O.left,ot=T-O.top;if(C({x:X,y:ot}),L==="system"){g("none"),y(1);return}const nt=X,at=ot,k=document.elementFromPoint(O.left+nt,O.top+at);if(k&&k.closest("a")){g("none"),y(1);return}const K=xn(nt,at,a)||A==="area"?{img:P??"none",scale:W}:{img:_??"none",scale:N};g(K.img),y(K.scale)},R=I=>{I.stopPropagation(),S.current={x:I.clientX,y:I.clientY},h(I.clientX,I.clientY)},F=()=>{b&&h(S.current.x,S.current.y)};return n.addEventListener("mousemove",R),window.addEventListener("scroll",F,!0),()=>{n.removeEventListener("mousemove",R),window.removeEventListener("scroll",F,!0)}},[n,b,l,L,A,P,_,W,N,a]),B.useEffect(()=>{b||(g("none"),y(0))},[b]);const D=async(h,R,F,I={})=>{const{width:T,height:O,finalWidth:X}=await Fa(h.image.url,$,z,V);let ot=0,nt=0;w==="same"?(ot=R/2,nt=F/2):(ot=I.x??Math.random()*R,nt=I.y??Math.random()*F);const at=Math.min(Math.max(ot,T/2),R-T/2),k=Math.min(Math.max(nt,O/2),F-O/2);return{id:d.current++,url:h.image.url,link:h.link,name:h.image.name,x:at,y:k,width:X}};B.useEffect(()=>{if(!n||e.length===0)return;const h=n.getBoundingClientRect(),R=h.width,F=h.height,I=[];(async()=>{const O=e[0],X=await D(O,R,F);I.push(X),i(I),c(1)})()},[$,z,V,w,n]),B.useEffect(()=>{f==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[f]);const H=async h=>{if(!n)return;const R=n.getBoundingClientRect(),F=h.clientX-R.left,I=h.clientY-R.top;if(A==="image"&&!xn(F,I,a))return;let T=0,O=0;w==="on Click"?(T=F,O=I):w==="same"?(T=R.width/2,O=R.height/2):(T=Math.random()*R.width,O=Math.random()*R.height);const X=e[s],ot=await D(X,R.width,R.height,{x:T,y:O});i(nt=>f==="all"?[...nt,ot]:[ot]),c(nt=>nt>=e.length-1?0:nt+1)};return p.jsxs("div",{ref:o,onClick:H,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:de.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(h=>p.jsx("div",{className:de.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:A==="area"&&h.link?p.jsx("a",{href:h.link,target:"_blank",className:de.link,children:p.jsx("img",{src:h.url,alt:h.name,className:de.image},h.id)}):p.jsx("img",{src:h.url,alt:h.name,className:de.image},h.id)},h.id)),b&&p.jsx("div",{className:de.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${m})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ra={element:ka,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},Oa="LightBox-module__hidden___9s-9x",Wa="LightBox-module__heroImage___sTxNF",Pa="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",Na="LightBox-module__imageStyle___tLIlB",za="LightBox-module__imgWrapper___LuFUp",ja="LightBox-module__contain___8-yaS",Ma="LightBox-module__cover___hNvOG",Ha="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",qa="LightBox-module__nextArrow___zkAQN",Ya="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Ja="LightBox-module__arrowImg___pNV88",Za="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",tl="LightBox-module__thumbsContainerVertical___wttk5",el="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",nl="LightBox-module__thumbsAlignCenter___Q4sUx",ol="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",j={hidden:Oa,heroImage:Wa,background:Pa,editor:Ba,contentStyle:Va,imageStyle:Na,imgWrapper:za,contain:ja,cover:Ma,caption:Ha,captionTextInner:Da,lightboxSplide:Ga,arrow:Ua,arrowVertical:Xa,nextArrow:qa,arrowInner:Ya,arrowIcon:Ka,arrowImg:Ja,mirror:Za,thumbsWrapper:Qa,thumbsContainerVertical:tl,thumbsContainer:el,thumbsAlignStart:rl,thumbsAlignCenter:nl,thumbsAlignEnd:ol,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},Xe=(t,e,r)=>{const n={},[o,a]=t.split("-");return o==="top"?(n.top="0",n.bottom="auto"):o==="middle"?(n.top="50%",n.bottom="auto"):o==="bottom"&&(n.top="auto",n.bottom="0"),a==="left"?(n.left="0",n.right="auto"):a==="center"?(n.left="50%",n.right="auto"):a==="right"&&(n.left="auto",n.right="0"),o==="middle"&&a==="center"?n.transform=`translate(calc(-50% + ${E.scalingValue(e.x,r)}), calc(-50% + ${E.scalingValue(e.y,r)}))`:o==="middle"?n.transform=`translate(${E.scalingValue(e.x,r)}, calc(-50% + ${E.scalingValue(e.y,r)}))`:a==="center"?n.transform=`translate(calc(-50% + ${E.scalingValue(e.x,r)}), ${E.scalingValue(e.y,r)})`:n.transform=`translate(${E.scalingValue(e.x,r)}, ${E.scalingValue(e.y,r)})`,n};function po(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function Cn(t){const e=t.getBoundingClientRect(),r=po(t),n=Math.max(0,e.width-r.left-r.right),o=Math.max(0,e.height-r.top-r.bottom),a=t.naturalWidth,i=t.naturalHeight,s=n/o,c=a/i;let d,l;c>s?(d=n,l=n/c):(l=o,d=o*c);const C=e.left+r.left,m=e.top+r.top,y=(n-d)/2+C,u=(o-l)/2+m;return{x:y,y:u,width:d,height:l}}function $n(t){const e=t.getBoundingClientRect(),r=po(t);return{left:e.left+r.left,right:e.right-r.right,top:e.top+r.top,bottom:e.bottom-r.bottom}}function wn(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const n=e[1].split(",").map(o=>parseFloat(o.trim()));return n.length===4?n[3]:1}const r=t.match(/^#([0-9a-fA-F]{8})$/);if(r){const n=r[1].substring(6,8);return parseInt(n,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function bl(t,e){const r=(()=>{if(t==="fade in")return j.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return j.slideInLeft;case"right":return j.slideInRight;case"top":return j.slideInTop;case"bottom":return j.slideInBottom;default:return j.slideInRight}return j.fadeIn})(),n=(()=>{if(t==="fade in"||t==="mix")return j.fadeIn;if(t==="slide in")switch(e){case"left":return j.slideInLeft;case"right":return j.slideInRight;case"top":return j.slideInTop;case"bottom":return j.slideInBottom;default:return j.slideInRight}return j.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return j.fadeOut;if(t==="slide in")switch(e){case"left":return j.slideOutLeft;case"right":return j.slideOutRight;case"top":return j.slideOutTop;case"bottom":return j.slideOutBottom;default:return j.slideOutRight}return j.fadeOut})(),a=(()=>{if(t==="fade in")return j.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return j.slideOutLeft;case"right":return j.slideOutRight;case"top":return j.slideOutTop;case"bottom":return j.slideOutBottom;default:return j.slideOutRight}return j.fadeOut})();return{appearClass:r,backdropAppearClass:n,backdropDisappearClass:o,disappearClass:a}}const vl=({settings:t,content:e,styles:r,portalId:n,activeEvent:o,isEditor:a})=>{const[i,s]=B.useState(!1),{url:c}=t.thumbnailBlock.cover;return B.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),p.jsxs(p.Fragment,{children:[p.jsx("img",{src:c,alt:"Cover",className:j.heroImage,onClick:()=>s(!0)}),p.jsx(Sl,{isOpen:i,onClose:()=>s(!1),content:e,settings:t,lightboxStyles:r,portalId:n,isEditor:a})]})},Sl=({isOpen:t,onClose:e,content:r,lightboxStyles:n,settings:o,portalId:a,isEditor:i,metadata:s})=>{var M;const[c,d]=B.useState(0),[l,C]=B.useState(0),[m,y]=B.useState(!1),[u,g]=B.useState(!1),[S,b]=B.useState({}),v=B.useRef(null),$=B.useRef(null),z=B.useRef(null),V=B.useRef(!1),w=B.useRef(null),f=B.useRef(null),L=B.useRef(null),A=B.useRef(null),N=B.useRef(!1),_=B.useRef(null),[W,P]=B.useState(!1),{appear:D,triggers:H,slider:h,thumbnail:R,controls:F,area:I,caption:T,layout:O}=o.lightboxBlock,{appearClass:X,backdropAppearClass:ot,backdropDisappearClass:nt,disappearClass:at}=bl(D.type,D.direction),k=(s==null?void 0:s.itemId)??null;B.useEffect(()=>{const x=()=>{setTimeout(()=>{var q,J;(J=(q=v.current)==null?void 0:q.splide)==null||J.refresh()},16)},G=()=>{C(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",x),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",x),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),B.useEffect(()=>{if(!t||!R.isActive){P(!1);return}const x=_.current;if(!x)return;const G=()=>{h.direction==="horiz"?P(x.scrollWidth>x.clientWidth):P(x.scrollHeight>x.clientHeight)};G();const q=new ResizeObserver(G);return q.observe(x),()=>q.disconnect()},[t,R.isActive,r.length,S,h.direction]);const K=B.useCallback(()=>{const x=window.matchMedia("(max-width: 768px)").matches,G=wn(I.color);x&&!i&&G>.9&&(document.body.style.backgroundColor=""),y(!0),V.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&f.current&&w.current.removeEventListener("animationend",f.current),f.current=null,V.current&&(V.current=!1,e()),y(!1))};w.current&&(f.current=q,w.current.addEventListener("animationend",q))},[e,I.color,i]),st=(x,G,q)=>{var J,et;if(x){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&c===r.length-1?K():(J=v.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Q=x.getBoundingClientRect(),Y=G-Q.left,rt=q-Q.top,ft=Q.width,it=Q.height;let gt;h.direction==="horiz"?gt=Y<ft/2?"-1":"+1":gt=rt<it/2?"-1":"+1",(et=v.current)==null||et.go(gt)}}},lt=x=>{if(N.current){N.current=!1;return}const G=r[c],q=(G==null?void 0:G.image.objectFit)==="cover";let J,et;if("changedTouches"in x&&x.changedTouches.length>0)J=x.changedTouches[0].clientX,et=x.changedTouches[0].clientY;else if("clientX"in x)J=x.clientX,et=x.clientY;else return;let Q;if(q&&z.current){const Y=$n(z.current);Q=J>=Y.left&&J<=Y.right&&et>=Y.top&&et<=Y.bottom}else{const Y=z.current?Cn(z.current):null;if(!Y){x.target===x.currentTarget&&K();return}Q=J>=Y.x&&J<=Y.x+Y.width&&et>=Y.y&&et<=Y.y+Y.height}Q?st(z.current,J,et):K()},mt=x=>{const G=x.target;(G.classList.contains(j.thumbsWrapper)||G.classList.contains(j.thumbsContainer))&&lt(x)};B.useEffect(()=>{if(!t)return;const x=G=>{var q,J;if(G.key==="Escape"){K();return}if(G.key==="ArrowRight"){d(et=>(et+1)%Math.max(r.length,1)),(q=v.current)==null||q.go("+1");return}G.key==="ArrowLeft"&&(d(et=>(et-1+Math.max(r.length,1))%Math.max(r.length,1)),(J=v.current)==null||J.go("-1"))};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[t,K,r.length]),B.useEffect(()=>{if(t){if(d(0),C(G=>G+1),V.current=!1,y(!1),g(!1),b({}),!k)return;const x=new CustomEvent("page-overlay",{detail:{itemId:k}});window.dispatchEvent(x)}return()=>{w.current&&f.current&&(w.current.removeEventListener("animationend",f.current),f.current=null),g(!1)}},[t,k]),B.useEffect(()=>{$.current!==null&&$.current!==h.type&&C(x=>x+1),$.current=h.type},[h.type]),B.useEffect(()=>{if(!t)return;const x=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,q=wn(I.color);document.body.style.overflow="hidden",g(!1);const J=Q=>{Q.target===w.current&&!V.current&&Q.animationName&&(G&&!i&&q>.9&&(document.body.style.backgroundColor=I.color),g(!0),w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null)};w.current&&(L.current=J,w.current.addEventListener("animationend",J));const et=Q=>{const Y=Q.target;Y&&(Y.closest(`.${j.thumbsWrapper}`)||Y.closest(`.${j.thumbsContainer}`))||h.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",et,{passive:!1}),()=>{document.body.style.overflow=x,document.removeEventListener("touchmove",et),w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),g(!1)}},[t,i,I.color,h.type]),B.useEffect(()=>{if(!t)return;const x=G=>{var J,et;if(V.current){G.stopPropagation();return}if(N.current){N.current=!1;return}const q=G.target;if(!(q&&(q.closest(`.${j.thumbsContainer}`)||q.closest(`.${j.thumbItem}`)))){if(h.type==="slide"&&H.type==="drag"&&((et=(J=v.current)==null?void 0:J.splide)!=null&&et.root)){const Q=v.current.splide.root;if(q&&(Q.contains(q)||Q===q))return}if(G.touches.length===0&&G.changedTouches.length>0){const Q=r[c],Y=(Q==null?void 0:Q.image.objectFit)==="cover",rt=G.changedTouches[0];let ft;if(Y&&z.current){const it=$n(z.current);ft=rt.clientX>=it.left&&rt.clientX<=it.right&&rt.clientY>=it.top&&rt.clientY<=it.bottom}else{const it=z.current?Cn(z.current):null;if(!it)return;ft=rt.clientX>=it.x&&rt.clientX<=it.x+it.width&&rt.clientY>=it.y&&rt.clientY<=it.y+it.height}if(!ft){G.stopPropagation(),V.current=!0;const it=gt=>{gt.stopPropagation(),gt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0),K()}}}};return document.addEventListener("touchend",x,{passive:!0}),()=>{document.removeEventListener("touchend",x)}},[t,K,c,r]);const Ct=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&H.type==="drag";B.useEffect(()=>{var gt,Ft;if(!t||!Ct||!((Ft=(gt=v.current)==null?void 0:gt.splide)!=null&&Ft.root))return;const x=v.current.splide.root,G=30,q=(Z,ct)=>{if(A.current){const $t=Math.abs(Z-A.current.x),kt=Math.abs(ct-A.current.y);($t>0||kt>0)&&(N.current=!0)}},J=Z=>{A.current&&(Z.preventDefault(),q(Z.clientX,Z.clientY))},et=Z=>{A.current&&Z.touches.length>0&&(Z.preventDefault(),q(Z.touches[0].clientX,Z.touches[0].clientY))},Q=(Z,ct)=>{if(!A.current||!v.current){A.current=null;return}const $t=Math.abs(Z-A.current.x),kt=Math.abs(ct-A.current.y);kt>G&&kt>$t&&v.current.go(ct<A.current.y?"+1":"-1"),A.current=null},Y=Z=>{A.current&&Q(Z.clientX,Z.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",J)},rt=Z=>{if(A.current){if(Z.changedTouches.length>0){const ct=Z.changedTouches[0];Q(ct.clientX,ct.clientY)}document.removeEventListener("touchend",rt),document.removeEventListener("touchcancel",rt),document.removeEventListener("touchmove",et)}},ft=Z=>{A.current={x:Z.clientX,y:Z.clientY},N.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},it=Z=>{Z.touches.length>0&&(A.current={x:Z.touches[0].clientX,y:Z.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",et,{passive:!1}),document.addEventListener("touchend",rt),document.addEventListener("touchcancel",rt))};return x.addEventListener("pointerdown",ft),x.addEventListener("touchstart",it),()=>{x.removeEventListener("pointerdown",ft),x.removeEventListener("touchstart",it),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",et),document.removeEventListener("touchend",rt),document.removeEventListener("touchcancel",rt),A.current=null,N.current=!1}},[t,Ct,l]);const It={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:Ln.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:i?null:w,className:ht(j.background,m?nt:ot,{[j.editor]:i},{[j.hidden]:!t}),style:{...It,...u&&!i&&!m?{position:"absolute"}:{}}}),p.jsxs("div",{ref:i?w:null,className:ht(j.contentStyle,m?at:X,{[j.editor]:i},{[j.hidden]:!t}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[p.jsx(Qr,{onMove:x=>d(x.index),ref:v,className:j.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!Ct,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:r.map((x,G)=>{const q=Xe(O.position,O.offset,i),J=`${E.scalingValue(O.padding.top,i)} ${E.scalingValue(O.padding.right,i)} ${E.scalingValue(O.padding.bottom,i)} ${E.scalingValue(O.padding.left,i)}`,et=h.type==="scale"?(()=>{const{transform:Q,...Y}=q;return{...Y,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Q||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return p.jsx(tn,{children:p.jsx("div",{className:j.imgWrapper,onClick:lt,children:p.jsx("img",{ref:G===c?z:null,className:ht(j.imageStyle,{[j.contain]:x.image.objectFit==="contain",[j.cover]:x.image.objectFit==="cover",[j.scaleSlide]:h.type==="scale"}),src:x.image.url,alt:x.image.name??"",style:{...et,pointerEvents:x.image.objectFit==="contain"?"none":"auto"}})})},G)})},l),F.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:ht(j.arrow,{[j.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:j.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x,i)}, ${E.scalingValue(F.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&p.jsx(be,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ht(j.arrowImg,j.mirror)}),!F.arrowsImgUrl&&p.jsx(_n,{color:F.color,className:ht(j.arrowIcon,j.arrowImg,j.mirror)})]})}),p.jsx("div",{className:ht(j.arrow,j.nextArrow,{[j.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:j.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x*(h.direction==="horiz"?-1:1),i)}, ${E.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&p.jsx(be,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:j.arrowImg}),!F.arrowsImgUrl&&p.jsx(_n,{color:F.color,className:ht(j.arrowIcon,j.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const x=Xe(I.closeIconAlign,I.closeIconOffset,i),G=`scale(${I.closeIconScale})`,q=x.transform?`${x.transform} ${G}`:G;return p.jsx("button",{className:j.closeButton,style:{...x,transform:q},onClick:K,"aria-label":"Close lightbox",children:p.jsx(be,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),T&&T.isActive&&n.imageCaption&&((M=r[c])==null?void 0:M.imageCaption)&&(()=>{const{widthSettings:x,fontSettings:G,letterSpacing:q,textAlign:J,wordSpacing:et,fontSizeLineHeight:Q,textAppearance:Y,color:rt}=n.imageCaption;return p.jsx("div",{className:j.caption,style:{...Xe(T.alignment,T.offset,i),fontFamily:G.fontFamily,fontWeight:G.fontWeight,fontStyle:G.fontStyle,width:x.sizing==="auto"?"max-content":E.scalingValue(x.width,i),letterSpacing:E.scalingValue(q,i),wordSpacing:E.scalingValue(et,i),textAlign:J,fontSize:E.scalingValue(Q.fontSize,i),lineHeight:E.scalingValue(Q.lineHeight,i),textTransform:Y.textTransform??"none",textDecoration:Y.textDecoration??"none",fontVariant:Y.fontVariant??"normal",color:rt},onClick:ft=>ft.stopPropagation(),children:p.jsx("div",{"data-styles":"imageCaption",className:j.captionTextInner,style:{"--link-color":T.linkColor,"--link-hover-color":T.linkHoverColor},children:p.jsx(uo,{content:r[c].imageCaption})})})})(),R.isActive&&(()=>{const[x,G]=R.position.split("-"),q=h.direction==="horiz"?`${x}-left`:R.position,J=Xe(q,R.offset,i),et=()=>{if(h.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(x==="top")return"flex-start";if(x==="middle")return"center";if(x==="bottom")return"flex-end"}return"flex-start"};return p.jsx("div",{ref:_,className:j.thumbsWrapper,onClick:Q=>mt(Q),style:{position:i?"absolute":"fixed",...J,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:p.jsx("div",{className:ht(j.thumbsContainer,{[j.thumbsContainerVertical]:h.direction==="vert",[j.thumbsAlignStart]:R.align==="start",[j.thumbsAlignCenter]:R.align==="center",[j.thumbsAlignEnd]:R.align==="end"}),style:{gap:E.scalingValue(R.grid.gap,i),justifyContent:W?"flex-start":et()},children:r.map((Q,Y)=>{const rt=Y===c,ft=S[Y],gt=R.grid.size*(rt?R.activeState.scale:1),Ft=()=>{if(R.fit!=="fit")return{};if(!ft)return h.direction==="horiz"?{height:E.scalingValue(gt,i)}:{width:E.scalingValue(gt,i)};const Z=ft.width/ft.height;if(h.direction==="horiz"){const ct=gt,$t=ct*Z;return{width:E.scalingValue($t,i),height:E.scalingValue(ct,i)}}else{const ct=gt,$t=ct/Z;return{width:E.scalingValue(ct,i),height:E.scalingValue($t,i)}}};return p.jsx("button",{className:j.thumbItem,style:{...h.direction==="horiz"&&R.fit!=="fit"?{height:E.scalingValue(gt,i)}:{},...h.direction==="vert"&&R.fit!=="fit"?{width:E.scalingValue(gt,i)}:{},...R.fit==="cover"?{width:E.scalingValue(gt,i),height:E.scalingValue(gt,i)}:{},...Ft(),transition:rt?"all 0.25s ease-out":"none",opacity:rt?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:Z=>{var ct;Z.stopPropagation(),d(Y),(ct=v.current)==null||ct.go(Y)},onMouseEnter:()=>{var Z;R.triggers==="hov"&&((Z=v.current)==null||Z.go(Y))},children:p.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:Z=>{const ct=Z.currentTarget;ct.naturalWidth&&ct.naturalHeight&&b($t=>({...$t,[Y]:{width:ct.naturalWidth,height:ct.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${Y}`)})})})})()]})]}),document.getElementById(a))};function _n({color:t,className:e}){return p.jsx("svg",{viewBox:"0 0 10 18",className:e,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xl={element:vl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 Qt(t){const{color:e,...r}=t;return r}function Xt(t,e){var r,n,o;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:E.scalingValue(t.letterSpacing,e),wordSpacing:E.scalingValue(t.wordSpacing,e),fontSize:E.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?E.scalingValue(t.lineHeight,e):void 0,textTransform:(r=t.textAppearance)==null?void 0:r.textTransform,textDecoration:(n=t.textAppearance)==null?void 0:n.textDecoration,fontVariant:(o=t.textAppearance)==null?void 0:o.fontVariant,color:t.color}}function qe(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Cl(t){return`
7
7
  .${t}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Ye(48)};
11
+ min-height: ${qe(48)};
12
12
  }
13
13
  .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
14
  .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${t}-field-group.${t}-labeled {
35
- gap: ${Ye(4)};
35
+ gap: ${qe(4)};
36
36
  }
37
37
  .${t}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${t}-success {
131
- margin-top: ${Ye(8)};
131
+ margin-top: ${qe(8)};
132
132
  color: var(--${t}-success-success-color, var(--${t}-success-color));
133
133
  }
134
134
  .${t}-error {
135
- margin-top: ${Ye(8)};
135
+ margin-top: ${qe(8)};
136
136
  color: var(--${t}-error-error-color, var(--${t}-error-color));
137
137
  }
138
138
  .${t}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function $l({settings:t,isEditor:e,metadata:n,activeEvent:r}){const{prefix:o}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:d,fieldsGap:l,buttonCorners:w,buttonStroke:b,buttonPadding:g,isButtonFullWidth:u,inputCorners:m,inputStroke:S,inputPadding:y,inputColor:v,inputTextColor:C,inputBorderColor:M,placeholderColor:B,buttonColor:$,buttonTextColor:f,buttonBorderColor:T,labelTextColor:A,successColor:z,errorColor:L,fontFamily:k,inputFontSettings:W,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:h,inputWordSpacing:O,inputTextAppearance:F,buttonFontSettings:I,buttonFontSize:_,buttonLineHeight:P,buttonLetterSpacing:X,buttonWordSpacing:it,buttonTextAppearance:et,labelFontSettings:st,labelFontSize:R,labelLineHeight:K,labelLetterSpacing:ft,labelWordSpacing:ct,labelTextAppearance:dt,statusFontSettings:St,statusFontSize:Pt,statusLineHeight:j,statusLetterSpacing:x,statusWordSpacing:G,statusTextAppearance:q,successMessage:J,errorMessage:nt,stateOverrides:Z}=t,Y=a==="B",ot=c.slice(0,Math.min(i,c.length)),ht={fontSettings:{fontFamily:k,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:h??0,wordSpacing:O??0,textAppearance:F,color:C},lt=Zt(Gt(ht,e)),gt=E.scalingValue(S??0,e),wt=E.scalingValue((H??D??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(a==="C"?S??0:(S??0)*2),e),Q={...lt,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(m??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:gt,borderLeftWidth:0}:{borderWidth:gt},paddingTop:E.scalingValue((y==null?void 0:y.top)??0,e),paddingRight:E.scalingValue((y==null?void 0:y.right)??0,e),paddingBottom:E.scalingValue((y==null?void 0:y.bottom)??0,e),paddingLeft:E.scalingValue((y==null?void 0:y.left)??0,e),height:wt,minHeight:wt},ut={fontSettings:{fontFamily:k,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:_??.01,lineHeight:P,letterSpacing:X??0,wordSpacing:it??0,textAppearance:et,color:f},xt=Zt(Gt(ut,e)),Bt=E.scalingValue(b??0,e),_e={fontSettings:{fontFamily:k,fontWeight:(st==null?void 0:st.fontWeight)??400,fontStyle:(st==null?void 0:st.fontStyle)??"normal"},fontSize:R??.01,lineHeight:K,letterSpacing:ft??0,wordSpacing:ct??0,textAppearance:dt,color:A},Yt=Gt(_e,e),rt={fontSettings:{fontFamily:k,fontWeight:(St==null?void 0:St.fontWeight)??400,fontStyle:(St==null?void 0:St.fontStyle)??"normal"},fontSize:Pt??.01,lineHeight:j,letterSpacing:x??0,wordSpacing:G??0,textAppearance:q,color:z},_t=Zt(Gt(rt,e)),Lt=E.buildColorVars(o,{inputColor:v,inputTextColor:C,inputBorderColor:M,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:$,buttonTextColor:f,buttonBorderColor:T,labelTextColor:A,successColor:z,errorColor:L},wl,_l,Z),[at,Ct]=V.useState(()=>Object.fromEntries(ot.map(pt=>[pt.name,""]))),[De,oe]=V.useState("idle"),[go,Ge]=V.useState(null),vn=r==="success"?"success":r==="error"?"error":De,mo=r==="error"?nt:go,Ue=r==="filled",Te=V.useMemo(()=>{if(!Ue)return at;let pt=null;for(const Nt of ot)(at[Nt.name]??"").trim().length>0||(pt=pt??{...at},pt[Nt.name]="Filled");return pt??at},[at,Ue,ot]),fo=vn==="error"?E.getFormFieldValidationError(ot,Te):null,ho=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),rr=n==null?void 0:n.submitUrl,or=(pt,Nt)=>{Ct(jt=>({...jt,[pt]:Nt}))},yo=async pt=>{pt.preventDefault();const Nt=Object.fromEntries(ot.map(Ft=>{var pe;return[Ft.name,((pe=at[Ft.name])==null?void 0:pe.trim())??""]}).filter(([,Ft])=>Ft));if(!rr){oe("error"),Ge("No integrations were found for this form.");return}if(Object.keys(Nt).length===0)return;const jt=E.getFormFieldValidationError(ot,at);if(jt){oe("error"),Ge(jt);return}oe("submitting"),Ge(null);try{const Ft=await fetch(rr,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Nt)});if(!Ft.ok){const pe=await Ft.text();throw new Error(pe||`Request failed: ${Ft.status}`)}oe("success"),Ct(Object.fromEntries(ot.map(pe=>[pe.name,""])))}catch(Ft){oe("error"),Ge(Ft instanceof Error?Ft.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${o}-type-${a} ${ho}`.trim(),style:Lt,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(o)}}),p.jsxs("form",{onSubmit:yo,className:`${o}-form`,style:{gap:E.scalingValue(d??0,e)},children:[p.jsx("div",{className:`${o}-fields`,style:{gap:E.scalingValue(l??0,e)},children:ot.map((pt,Nt)=>p.jsxs("div",{className:`${o}-field-group${Y?` ${o}-labeled`:""}`,children:[Y&&p.jsx("span",{className:`${o}-field-label`,style:Yt?{...Yt,lineHeight:Yt.fontSize}:void 0,children:pt.label||pt.name}),pt.type==="textarea"?p.jsx("textarea",{name:pt.name,autoComplete:"off",value:Te[pt.name]??"",onChange:jt=>or(pt.name,jt.target.value),placeholder:pt.placeholder,className:`${o}-input`,style:Q,rows:1,"data-filled":Ue||(Te[pt.name]??"").trim().length>0,"data-field-type":"textarea"}):p.jsx("input",{type:pt.type==="phone"?"tel":pt.type==="email"?"email":"text",name:pt.name,autoComplete:"off",value:Te[pt.name]??"",onChange:jt=>or(pt.name,jt.target.value),placeholder:pt.placeholder,required:pt.isRequired??pt.type==="email",className:`${o}-input`,style:Q,"data-filled":Ue||(Te[pt.name]??"").trim().length>0})]},Nt))}),p.jsx("div",{className:`${o}-overlay-anchor`,children:p.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(w??0,e),borderWidth:Bt,paddingTop:E.scalingValue((g==null?void 0:g.top)??0,e),paddingRight:E.scalingValue((g==null?void 0:g.right)??0,e),paddingBottom:E.scalingValue((g==null?void 0:g.bottom)??0,e),paddingLeft:E.scalingValue((g==null?void 0:g.left)??0,e),...xt,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:p.jsx("span",{className:`${o}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:De==="submitting"?"...":s})})})]}),vn==="success"&&p.jsx("p",{className:`${o}-success`,style:{..._t},children:J}),vn==="error"&&p.jsx("p",{className:`${o}-error`,style:{..._t},role:"alert",children:fo??mo??nt})]})}const wl={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"},_l=["hover","focus","filled","success","error"],Tl=`import React, { useMemo, useState } from 'react';\r
142
+ `}function $l({settings:t,isEditor:e,metadata:r,activeEvent:n}){const{prefix:o}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:s=[],buttonLabel:c,gap:d,fieldsGap:l,buttonCorners:C,buttonStroke:m,buttonPadding:y,isButtonFullWidth:u,inputCorners:g,inputStroke:S,inputPadding:b,inputColor:v,inputTextColor:$,inputBorderColor:z,placeholderColor:V,buttonColor:w,buttonTextColor:f,buttonBorderColor:L,labelTextColor:A,successColor:N,errorColor:_,fontFamily:W,inputFontSettings:P,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:h,inputWordSpacing:R,inputTextAppearance:F,buttonFontSettings:I,buttonFontSize:T,buttonLineHeight:O,buttonLetterSpacing:X,buttonWordSpacing:ot,buttonTextAppearance:nt,labelFontSettings:at,labelFontSize:k,labelLineHeight:K,labelLetterSpacing:st,labelWordSpacing:lt,labelTextAppearance:mt,statusFontSettings:Ct,statusFontSize:It,statusLineHeight:M,statusLetterSpacing:x,statusWordSpacing:G,statusTextAppearance:q,successMessage:J,errorMessage:et,stateOverrides:Q}=t,Y=a==="B",rt=s.slice(0,Math.min(i,s.length)),ft={fontSettings:{fontFamily:W,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:h??0,wordSpacing:R??0,textAppearance:F,color:$},it=Qt(Xt(ft,e)),gt=E.scalingValue(S??0,e),Ft=E.scalingValue((H??D??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(a==="C"?S??0:(S??0)*2),e),Z={...it,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(g??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:gt,borderLeftWidth:0}:{borderWidth:gt},paddingTop:E.scalingValue((b==null?void 0:b.top)??0,e),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,e),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,e),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,e),height:Ft,minHeight:Ft},ct={fontSettings:{fontFamily:W,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:T??.01,lineHeight:O,letterSpacing:X??0,wordSpacing:ot??0,textAppearance:nt,color:f},$t=Qt(Xt(ct,e)),kt=E.scalingValue(m??0,e),St={fontSettings:{fontFamily:W,fontWeight:(at==null?void 0:at.fontWeight)??400,fontStyle:(at==null?void 0:at.fontStyle)??"normal"},fontSize:k??.01,lineHeight:K,letterSpacing:st??0,wordSpacing:lt??0,textAppearance:mt,color:A},jt=Xt(St,e),pt={fontSettings:{fontFamily:W,fontWeight:(Ct==null?void 0:Ct.fontWeight)??400,fontStyle:(Ct==null?void 0:Ct.fontStyle)??"normal"},fontSize:It??.01,lineHeight:M,letterSpacing:x??0,wordSpacing:G??0,textAppearance:q,color:N},bt=Qt(Xt(pt,e)),_t=E.buildColorVars(o,{inputColor:v,inputTextColor:$,inputBorderColor:z,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:w,buttonTextColor:f,buttonBorderColor:L,labelTextColor:A,successColor:N,errorColor:_},wl,_l,Q),[vt,Rt]=B.useState(()=>Object.fromEntries(rt.map(ut=>[ut.name,""]))),[en,_e]=B.useState("idle"),[go,De]=B.useState(null),yr=n==="success"?"success":n==="error"?"error":en,mo=n==="error"?et:go,Ge=n==="filled",Te=B.useMemo(()=>{if(!Ge)return vt;let ut=null;for(const Mt of rt)(vt[Mt.name]??"").trim().length>0||(ut=ut??{...vt},ut[Mt.name]="Filled");return ut??vt},[vt,Ge,rt]),fo=yr==="error"?E.getFormFieldValidationError(rt,Te):null,ho=`${n&&n!=="default"?`${o}-state-${n}`:""}`.trim(),rn=r==null?void 0:r.submitUrl,nn=(ut,Mt)=>{Rt(Ht=>({...Ht,[ut]:Mt}))},yo=async ut=>{ut.preventDefault();const Mt=Object.fromEntries(rt.map(Ot=>{var pe;return[Ot.name,((pe=vt[Ot.name])==null?void 0:pe.trim())??""]}).filter(([,Ot])=>Ot));if(!rn){_e("error"),De("No integrations were found for this form.");return}if(Object.keys(Mt).length===0)return;const Ht=E.getFormFieldValidationError(rt,vt);if(Ht){_e("error"),De(Ht);return}_e("submitting"),De(null);try{const Ot=await fetch(rn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Mt)});if(!Ot.ok){const pe=await Ot.text();throw new Error(pe||`Request failed: ${Ot.status}`)}_e("success"),Rt(Object.fromEntries(rt.map(pe=>[pe.name,""])))}catch(Ot){_e("error"),De(Ot instanceof Error?Ot.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${o}-type-${a} ${ho}`.trim(),style:_t,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(o)}}),p.jsxs("form",{onSubmit:yo,className:`${o}-form`,style:{gap:E.scalingValue(d??0,e)},children:[p.jsx("div",{className:`${o}-fields`,style:{gap:E.scalingValue(l??0,e)},children:rt.map((ut,Mt)=>p.jsxs("div",{className:`${o}-field-group${Y?` ${o}-labeled`:""}`,children:[Y&&p.jsx("span",{className:`${o}-field-label`,style:jt?{...jt,lineHeight:jt.fontSize}:void 0,children:ut.label||ut.name}),ut.type==="textarea"?p.jsx("textarea",{name:ut.name,autoComplete:"off",value:Te[ut.name]??"",onChange:Ht=>nn(ut.name,Ht.target.value),placeholder:ut.placeholder,className:`${o}-input`,style:Z,rows:1,"data-filled":Ge||(Te[ut.name]??"").trim().length>0,"data-field-type":"textarea"}):p.jsx("input",{type:ut.type==="phone"?"tel":ut.type==="email"?"email":"text",name:ut.name,autoComplete:"off",value:Te[ut.name]??"",onChange:Ht=>nn(ut.name,Ht.target.value),placeholder:ut.placeholder,required:ut.isRequired??ut.type==="email",className:`${o}-input`,style:Z,"data-filled":Ge||(Te[ut.name]??"").trim().length>0})]},Mt))}),p.jsx("div",{className:`${o}-overlay-anchor`,children:p.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(C??0,e),borderWidth:kt,paddingTop:E.scalingValue((y==null?void 0:y.top)??0,e),paddingRight:E.scalingValue((y==null?void 0:y.right)??0,e),paddingBottom:E.scalingValue((y==null?void 0:y.bottom)??0,e),paddingLeft:E.scalingValue((y==null?void 0:y.left)??0,e),...$t,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:p.jsx("span",{className:`${o}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:en==="submitting"?"...":c})})})]}),yr==="success"&&p.jsx("p",{className:`${o}-success`,style:{...bt},children:J}),yr==="error"&&p.jsx("p",{className:`${o}-error`,style:{...bt},role:"alert",children:fo??mo??et})]})}const wl={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"},_l=["hover","focus","filled","success","error"],Tl=`import React, { useMemo, useState } from 'react';\r
143
143
  import { CommonComponentProps } from '../props';\r
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
740
740
  };\r
741
741
  \r
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
743
- `,Ll=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Ke={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Al={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Ke.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ke.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Ke.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Ke.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ll,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...El],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Il={element:$l,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Al,sourceCode:Tl};function Je(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Fl(t){return`
743
+ `,Ll=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Ye={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Al={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Ye.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Ye.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Ye.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Ye.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ll,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...El],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Il={element:$l,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Al,sourceCode:Tl};function Ke(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Fl(t){return`
744
744
  .${t}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
922
922
  align-items: center;
923
923
  }
924
924
  .${t}-success {
925
- margin-top: ${Je(8)};
926
- font-size: ${Je(14)};
925
+ margin-top: ${Ke(8)};
926
+ font-size: ${Ke(14)};
927
927
  color: var(--${t}-success-success-color, var(--${t}-success-color));
928
928
  }
929
929
  .${t}-error {
930
- margin-top: ${Je(8)};
931
- font-size: ${Je(14)};
930
+ margin-top: ${Ke(8)};
931
+ font-size: ${Ke(14)};
932
932
  color: var(--${t}-error-error-color, var(--${t}-error-color));
933
933
  }
934
- `}const kl=({settings:t,isEditor:e,metadata:n,activeEvent:r})=>{const{prefix:o}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:s=1,fontFamily:d,inputFontSettings:l,inputFontSize:w,inputLineHeight:b,inputLetterSpacing:g,inputWordSpacing:u,inputTextAppearance:m,buttonFontSettings:S,buttonFontSize:y,buttonLineHeight:v,buttonLetterSpacing:C,buttonWordSpacing:M,buttonTextAppearance:B,statusFontSettings:$,statusFontSize:f,statusLineHeight:T,statusLetterSpacing:A,statusWordSpacing:z,statusTextAppearance:L,iconMaxWidth:k,minHeight:W,corners:D,stroke:H,stateOverrides:h,inputPadding:O,buttonPadding:F,successMessage:I="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=t,P=a.slice(0,Math.min(s,a.length)),[X,it]=V.useState(()=>Object.fromEntries(P.map(rt=>[rt.name,""]))),[et,st]=V.useState("idle"),[R,K]=V.useState(null),ft=r==="success"?"success":r==="error"?"error":et,ct=r==="error"?_:R,dt=r==="filled",St=V.useMemo(()=>{if(!dt)return X;let rt=null;for(const _t of P)(X[_t.name]??"").trim().length>0||(rt=rt??{...X},rt[_t.name]="Filled");return rt??X},[dt,X,P]),Pt=ft==="error"?E.getFormFieldValidationError(P,St):null,j=r&&r!=="default"?`${o}-state-${r}`:"",x=P.some(rt=>(St[rt.name]??"").trim().length>0),G=j!==`${o}-state-filled`&&x?`${o}-state-filled`:"",q=`${j} ${G}`.trim(),J=n==null?void 0:n.submitUrl,nt=c??"",Z=(i==null?void 0:i.icon)??"",Y=(i==null?void 0:i.mode)==="On",ot=nt||"Submit",ht={fontSettings:{fontFamily:d,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:w??.01,lineHeight:b,letterSpacing:g??0,wordSpacing:u??0,textAppearance:m,color:t.inputTextColor??"#111111"},lt={fontSettings:{fontFamily:d,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:y??.01,lineHeight:v,letterSpacing:C??0,wordSpacing:M??0,textAppearance:B,color:t.buttonTextColor??"#ffffff"},gt={fontSettings:{fontFamily:d,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:f??.01,lineHeight:T,letterSpacing:A??0,wordSpacing:z??0,textAppearance:L,color:t.successColor??"#22c55e"},wt=Zt(Gt(ht,e)),Q=Zt(Gt(lt,e)),ut=Zt(Gt(gt,e)),xt=E.buildColorVars(o,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(ht==null?void 0:ht.color)??"#111111",buttonTextColor:t.buttonTextColor??(lt==null?void 0:lt.color)??"#ffffff"},Rl,Ol,h),Bt={borderRadius:E.scalingValue(D,e),borderWidth:E.scalingValue(H,e),borderStyle:"solid"},_e={borderLeftWidth:E.scalingValue(H,e)},Yt=async rt=>{rt.preventDefault();const _t=Object.fromEntries(P.map(at=>{var Ct;return[at.name,((Ct=X[at.name])==null?void 0:Ct.trim())??""]}).filter(([,at])=>at));if(!J){st("error"),K("No integrations were found for this form.");return}if(Object.keys(_t).length===0)return;const Lt=E.getFormFieldValidationError(P,X);if(Lt){st("error"),K(Lt);return}st("submitting"),K(null);try{const at=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_t)});if(!at.ok){const Ct=await at.text();throw new Error(Ct||`Request failed: ${at.status}`)}st("success"),it(Object.fromEntries(P.map(Ct=>[Ct.name,""])))}catch(at){st("error"),K(at instanceof Error?at.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:xt,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Fl(o)}}),p.jsxs("form",{onSubmit:Yt,className:`${o}-form`,style:{...Bt,height:E.scalingValue(W,e),minHeight:E.scalingValue(W,e)},children:[p.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:P.map(rt=>p.jsx("input",{type:rt.type==="email"?"email":rt.type==="phone"?"tel":"text",name:rt.name,autoComplete:"off",value:St[rt.name]??"",onChange:_t=>it(Lt=>({...Lt,[rt.name]:_t.target.value})),placeholder:rt.placeholder,required:rt.isRequired??rt.type==="email",className:`${o}-input`,style:{...wt,paddingRight:E.scalingValue(O.right,e),paddingLeft:E.scalingValue(O.left,e),paddingTop:E.scalingValue(O.top,e),paddingBottom:E.scalingValue(O.bottom,e)}},rt.name))}),p.jsx("div",{className:`${o}-overlayAnchor`,children:p.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":ot,style:{...Q,..._e,paddingRight:E.scalingValue(F.right,e),paddingLeft:E.scalingValue(F.left,e),paddingTop:E.scalingValue(F.top,e),paddingBottom:E.scalingValue(F.bottom,e)},children:et==="submitting"?"...":Y?Z&&p.jsx(be,{url:Z,className:`${o}-submitBtnIcon`,style:{maxWidth:E.scalingValue(k??0,e)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):nt})})]}),ft==="success"&&p.jsx("p",{className:`${o}-success`,style:{...ut},children:I}),ft==="error"&&p.jsx("p",{className:`${o}-error`,style:{...ut},role:"alert",children:Pt??ct??_})]})},Rl={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"},Ol=["hover","focus","filled","success","error"],Pl=`import React, { useMemo, useState } from 'react';\r
934
+ `}const kl=({settings:t,isEditor:e,metadata:r,activeEvent:n})=>{const{prefix:o}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:s,fieldsToShow:c=1,fontFamily:d,inputFontSettings:l,inputFontSize:C,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:u,inputTextAppearance:g,buttonFontSettings:S,buttonFontSize:b,buttonLineHeight:v,buttonLetterSpacing:$,buttonWordSpacing:z,buttonTextAppearance:V,statusFontSettings:w,statusFontSize:f,statusLineHeight:L,statusLetterSpacing:A,statusWordSpacing:N,statusTextAppearance:_,iconMaxWidth:W,minHeight:P,corners:D,stroke:H,stateOverrides:h,inputPadding:R,buttonPadding:F,successMessage:I="Thanks for subscribing!",errorMessage:T="Please, fill all required fields."}=t,O=a.slice(0,Math.min(c,a.length)),[X,ot]=B.useState(()=>Object.fromEntries(O.map(pt=>[pt.name,""]))),[nt,at]=B.useState("idle"),[k,K]=B.useState(null),st=n==="success"?"success":n==="error"?"error":nt,lt=n==="error"?T:k,mt=n==="filled",Ct=B.useMemo(()=>{if(!mt)return X;let pt=null;for(const bt of O)(X[bt.name]??"").trim().length>0||(pt=pt??{...X},pt[bt.name]="Filled");return pt??X},[mt,X,O]),It=st==="error"?E.getFormFieldValidationError(O,Ct):null,M=n&&n!=="default"?`${o}-state-${n}`:"",x=O.some(pt=>(Ct[pt.name]??"").trim().length>0),G=M!==`${o}-state-filled`&&x?`${o}-state-filled`:"",q=`${M} ${G}`.trim(),J=r==null?void 0:r.submitUrl,et=s??"",Q=(i==null?void 0:i.icon)??"",Y=(i==null?void 0:i.mode)==="On",rt=et||"Submit",ft={fontSettings:{fontFamily:d,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:C??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:u??0,textAppearance:g,color:t.inputTextColor??"#111111"},it={fontSettings:{fontFamily:d,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:b??.01,lineHeight:v,letterSpacing:$??0,wordSpacing:z??0,textAppearance:V,color:t.buttonTextColor??"#ffffff"},gt={fontSettings:{fontFamily:d,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:f??.01,lineHeight:L,letterSpacing:A??0,wordSpacing:N??0,textAppearance:_,color:t.successColor??"#22c55e"},Ft=Qt(Xt(ft,e)),Z=Qt(Xt(it,e)),ct=Qt(Xt(gt,e)),$t=E.buildColorVars(o,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(ft==null?void 0:ft.color)??"#111111",buttonTextColor:t.buttonTextColor??(it==null?void 0:it.color)??"#ffffff"},Rl,Ol,h),kt={borderRadius:E.scalingValue(D,e),borderWidth:E.scalingValue(H,e),borderStyle:"solid"},St={borderLeftWidth:E.scalingValue(H,e)},jt=async pt=>{pt.preventDefault();const bt=Object.fromEntries(O.map(vt=>{var Rt;return[vt.name,((Rt=X[vt.name])==null?void 0:Rt.trim())??""]}).filter(([,vt])=>vt));if(!J){at("error"),K("No integrations were found for this form.");return}if(Object.keys(bt).length===0)return;const _t=E.getFormFieldValidationError(O,X);if(_t){at("error"),K(_t);return}at("submitting"),K(null);try{const vt=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(bt)});if(!vt.ok){const Rt=await vt.text();throw new Error(Rt||`Request failed: ${vt.status}`)}at("success"),ot(Object.fromEntries(O.map(Rt=>[Rt.name,""])))}catch(vt){at("error"),K(vt instanceof Error?vt.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:$t,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Fl(o)}}),p.jsxs("form",{onSubmit:jt,className:`${o}-form`,style:{...kt,height:E.scalingValue(P,e),minHeight:E.scalingValue(P,e)},children:[p.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:O.map(pt=>p.jsx("input",{type:pt.type==="email"?"email":pt.type==="phone"?"tel":"text",name:pt.name,autoComplete:"off",value:Ct[pt.name]??"",onChange:bt=>ot(_t=>({..._t,[pt.name]:bt.target.value})),placeholder:pt.placeholder,required:pt.isRequired??pt.type==="email",className:`${o}-input`,style:{...Ft,paddingRight:E.scalingValue(R.right,e),paddingLeft:E.scalingValue(R.left,e),paddingTop:E.scalingValue(R.top,e),paddingBottom:E.scalingValue(R.bottom,e)}},pt.name))}),p.jsx("div",{className:`${o}-overlayAnchor`,children:p.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":rt,style:{...Z,...St,paddingRight:E.scalingValue(F.right,e),paddingLeft:E.scalingValue(F.left,e),paddingTop:E.scalingValue(F.top,e),paddingBottom:E.scalingValue(F.bottom,e)},children:nt==="submitting"?"...":Y?Q&&p.jsx(be,{url:Q,className:`${o}-submitBtnIcon`,style:{maxWidth:E.scalingValue(W??0,e)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):et})})]}),st==="success"&&p.jsx("p",{className:`${o}-success`,style:{...ct},children:I}),st==="error"&&p.jsx("p",{className:`${o}-error`,style:{...ct},role:"alert",children:It??lt??T})]})},Rl={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"},Ol=["hover","focus","filled","success","error"],Wl=`import React, { useMemo, useState } from 'react';\r
935
935
  import { CommonComponentProps } from '../props';\r
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1503,13 +1503,11 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1503
1503
  };\r
1504
1504
  \r
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1506
- `,Bl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Wl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],_n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{..._n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{..._n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{..._n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Wl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Nl={element:kl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:zl,sourceCode:Pl};function jl(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Ml(t){return`
1506
+ `,Pl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Bl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Nl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$r.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$r.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$r.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Bl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Pl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},zl={element:kl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Nl,sourceCode:Wl};function jl(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function Ml(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Hl(t){return`
1507
1507
  .${t}-wrapper {
1508
1508
  display: grid;
1509
1509
  align-items: start;
1510
- width: 100%;
1511
- column-gap: 10%;
1512
- min-height: ${jl(48)};
1510
+ min-height: ${Ml(48)};
1513
1511
  }
1514
1512
  .${t}-item {
1515
1513
  display: flex;
@@ -1558,576 +1556,592 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1558
1556
  margin-top: 0px;
1559
1557
  color: var(--${t}-subtitle-color);
1560
1558
  }
1561
- `}const Kt=500,ae="cubic-bezier(0.22, 1, 0.36, 1)";function Hl({images:t,index:e,imageDisplay:n,originRect:r,reverseClose:o,onClose:a,onPrev:i,onNext:c}){const s=V.useRef(null),d=V.useRef(null),[l,w]=V.useState(null),[b,g]=V.useState(r?"opening":"open"),[u,m]=V.useState(!0),S=V.useRef(e),y=V.useCallback(()=>{const f=s.current,T=d.current;if(!f||!T)return;const A=f.getBoundingClientRect(),z=A.width,L=A.height,k=T.naturalWidth,W=T.naturalHeight;if(!z||!L||!k||!W)return;if(n==="Cover"){w({width:z,height:L,left:A.left,top:A.top});return}const D=k/W,H=z/L;if(D>H){const h=z/D;w({width:z,height:h,left:A.left,top:A.top+(L-h)/2})}else{const h=L*D;w({width:h,height:L,left:A.left+(z-h)/2,top:A.top})}},[n]);V.useEffect(()=>{y();const f=s.current;if(!f)return;const T=new ResizeObserver(()=>y());return T.observe(f),()=>T.disconnect()},[y,e]),V.useEffect(()=>{if(b!=="opening"||!l)return;const f={id:0};return f.id=requestAnimationFrame(()=>{f.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(f.id)},[b,l]),V.useEffect(()=>{if(b!=="closing")return;const f=setTimeout(()=>a(),Kt);return()=>clearTimeout(f)},[b,a]),V.useEffect(()=>{S.current!==e&&m(!1),S.current=e},[e]);const v=()=>{b!=="closing"&&g("closing")},C=b==="open",M=b==="closing",B=M&&o&&!!r,$=b==="opening"?r??l:B?r:l;return p.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:v,children:[p.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:C?1:0,transition:`opacity ${Kt}ms ${ae}`,pointerEvents:"none"}}),p.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[p.jsx("div",{style:{height:"10%"}}),p.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}),p.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:C?1:0,transition:`opacity ${Kt}ms ${ae}`},children:[p.jsx("p",{children:e+1}),p.jsx("p",{children:"/"}),p.jsx("p",{children:t.length})]})]}),$&&p.jsx("img",{ref:d,src:t[e],onLoad:y,style:{position:"fixed",top:$.top,left:$.left,width:$.width,height:$.height,objectFit:n==="Cover"?"cover":"contain",opacity:M&&!B?0:1,transition:M&&!B?`opacity ${Kt}ms ${ae}`:B||u?`top ${Kt}ms ${ae}, left ${Kt}ms ${ae}, width ${Kt}ms ${ae}, height ${Kt}ms ${ae}`:"none",pointerEvents:"none",zIndex:9998}}),C&&l&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,width:l.width/2,height:l.height,cursor:"w-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),i()}}),p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left+l.width/2,width:l.width/2,height:l.height,cursor:"e-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),c()}})]})]})}function Dl({settings:t,content:e,isEditor:n,metadata:r,activeEvent:o}){const{prefix:a}=E.useScopedStyles(),{type:i="A",fieldsToShow:c=2,textBoxWidth:s,verticalGap:d,entriesCount:l,lightbox:w,imageSize:b,imageDisplay:g,slider:u,sliderTiming:m,direction:S,transition:y,titleColor:v,subtitleColor:C,titleFontFamily:M,titleFontSettings:B,titleFontSize:$,titleLineHeight:f,titleLetterSpacing:T,titleWordSpacing:A,titleTextAppearance:z,subtitleFontFamily:L,subtitleFontSettings:k,subtitleFontSize:W,subtitleLineHeight:D,subtitleLetterSpacing:H,subtitleWordSpacing:h,subtitleTextAppearance:O}=t,F={fontSettings:{fontFamily:M,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:$??.01,lineHeight:f,letterSpacing:T??0,wordSpacing:A??0,textAppearance:z,color:v},_={...Zt(Gt(F,n))},P={fontSettings:{fontFamily:L,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:W??.01,lineHeight:D,letterSpacing:H??0,wordSpacing:h??0,textAppearance:O,color:C},it={...Zt(Gt(P,n))},et=E.buildColorVars(a,{titleColor:v,subtitleColor:C},Gl,Ul),R=`${o&&o!=="default"?`${a}-state-${o}`:""}`.trim(),K=l===0?1/0:l,ft=(e??[]).slice(0,K),dt={Small:.1,Medium:.2,Big:.3}[b]??.2,St=(g==null?void 0:g.display)==="Cover",Pt=(g==null?void 0:g.ratioValue)??"1:1",j=(g==null?void 0:g.reversed)??!1,[x,G]=Pt.split(":").map(Number),q=j?G:x,J=j?x:G,nt=`${q} / ${J}`,Z=q>=J,Y={objectFit:St?"cover":"contain",...St&&{aspectRatio:nt,width:Z?"100%":"auto",height:Z?"auto":"100%"}},[ot,ht]=V.useState("ltr"),[lt,gt]=V.useState(!1),[wt,Q]=V.useState([]),[ut,xt]=V.useState(0),[Bt,_e]=V.useState(null),Yt=(rt,_t,Lt)=>{if(w==="Off")return;const at=rt.currentTarget.getBoundingClientRect();_e({top:at.top,left:at.left,width:at.width,height:at.height}),Q(_t),xt(Lt),gt(!0)};return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Ml(a)}}),p.jsx("div",{style:et,children:p.jsx("div",{className:`${a}-wrapper ${a}-type-${i} ${R}`.trim(),style:{gridTemplateColumns:`repeat(${c}, 1fr)`,rowGap:E.scalingValue(d??0,n)},children:ft.map((rt,_t)=>{var Lt;return p.jsxs("div",{className:`${a}-item`.trim(),children:[p.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:E.scalingValue(dt??0,n),height:E.scalingValue(dt??0,n)},children:(((Lt=rt.image)==null?void 0:Lt.length)??0)===0?null:u==="Off"?p.jsx("img",{src:rt.image[0].url,alt:rt.image[0].name,className:`${a}-item-image`.trim(),style:Y,onClick:at=>Yt(at,rt.image.map(Ct=>Ct.url),0)}):p.jsx(er,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:m*1e3,width:"100%",height:"100%",speed:500,type:y==="Fade"?"fade":"loop",rewind:y==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:y==="Fade"?"ltr":S!=="Random"?S==="Horizontal"?"ltr":"ttb":ot},onMoved:at=>{if(S!=="Random"||y==="Fade")return;const Ct=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";ht(Ct),setTimeout(()=>{at.refresh()},0)},children:rt.image.map((at,Ct)=>p.jsx(nr,{children:p.jsx("img",{src:at.url,alt:at.name,className:`${a}-item-image`.trim(),style:Y,onClick:De=>Yt(De,rt.image.map(oe=>oe.url),Ct)})},Ct))},`${y}-${b}-${S}-${m}`)}),p.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${E.scalingValue(dt??0,n)} * (${s} / 100))`,..._},children:rt.title}),i==="B"&&p.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(dt??0,n)} * (${s} / 100))`,...it},children:rt.subtitle})]},_t)})})}),lt&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&w==="On"&&Lr.createPortal(p.jsx("div",{"data-selection":"none",children:p.jsx(Hl,{images:wt,index:ut,imageDisplay:g.display,originRect:Bt,reverseClose:u==="Off",onClose:()=>gt(!1),onPrev:()=>xt(rt=>(rt-1+wt.length)%wt.length),onNext:()=>xt(rt=>(rt+1)%wt.length)})}),document.body)]})}const Gl={titleColor:"title-color",subtitleColor:"subtitle-color"},Ul=["hover","focus","filled","success","error"],Xl=`import { Splide, SplideSlide } from '@splidejs/react-splide';
1562
- import '@splidejs/react-splide/css/core';
1563
- import { CommonComponentProps } from '../props';
1564
- import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
1565
- import { useCallback, useEffect, useRef, useState } from 'react';
1566
- import { createPortal } from 'react-dom';
1567
- import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
1568
-
1569
- function sv(px: number): string {
1570
- return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
1571
- }
1572
-
1573
- function getCSS(P: string): string {
1574
- return \`
1575
- .\${P}-wrapper {
1576
- display: grid;
1577
- align-items: start;
1578
- width: 100%;
1579
- column-gap: 10%;
1580
- min-height: \${sv(48)};
1581
- }
1582
- .\${P}-item {
1583
- display: flex;
1584
- flex-direction: column;
1585
- justify-content: center;
1586
- align-items: center;
1587
- gap: 12px;
1588
- }
1589
- .\${P}-item-image-wrapper {
1590
- display: flex;
1591
- justify-content: center;
1592
- align-items: center;
1593
- }
1594
- .\${P}-item-image {
1595
- width: 100%;
1596
- height: 100%;
1597
- display: block;
1598
- }
1599
- .\${P}-item-slider,
1600
- .\${P}-item-slider .splide__track,
1601
- .\${P}-item-slider .splide__list,
1602
- .\${P}-item-slider .splide__slide {
1603
- width: 100%;
1604
- height: 100%;
1605
- }
1606
- .\${P}-item-slider .splide__slide {
1607
- display: flex;
1608
- justify-content: center;
1609
- align-items: center;
1610
- }
1611
- .\${P}-item-title {
1612
- white-space: normal;
1613
- overflow-wrap: anywhere;
1614
- word-break: break-word;
1615
- text-align: center;
1616
- margin-bottom: 0px;
1617
- margin-top: 0px;
1618
- color: var(--\${P}-title-color);
1619
- }
1620
- .\${P}-item-subtitle {
1621
- white-space: normal;
1622
- overflow-wrap: anywhere;
1623
- word-break: break-word;
1624
- text-align: center;
1625
- margin-bottom: 0px;
1626
- margin-top: 0px;
1627
- color: var(--\${P}-subtitle-color);
1628
- }
1629
- \`;
1630
- }
1631
-
1632
- type GridProps = {
1633
- settings: GridSettings;
1634
- content?: any;
1635
- isEditor?: boolean;
1636
- activeEvent: string | undefined;
1637
- onUpdateSettings?: (settings: GridSettings) => void;
1638
- } & CommonComponentProps;
1639
-
1640
- type AnimRect = { top: number; left: number; width: number; height: number };
1641
-
1642
- type LightboxProps = {
1643
- images: string[];
1644
- index: number;
1645
- imageDisplay: 'Fit' | 'Cover';
1646
- originRect: AnimRect | null;
1647
- reverseClose: boolean;
1648
- onClose: () => void;
1649
- onPrev: () => void;
1650
- onNext: () => void;
1651
- };
1652
-
1653
- const LIGHTBOX_ANIM_MS = 500;
1654
- const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
1655
-
1656
- function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext }: LightboxProps) {
1657
- const ghostRef = useRef<HTMLDivElement>(null);
1658
- const imgRef = useRef<HTMLImageElement>(null);
1659
- const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
1660
- const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');
1661
- const [transitionsEnabled, setTransitionsEnabled] = useState(true);
1662
- const prevIndexRef = useRef(index);
1663
-
1664
- const computeFinalRect = useCallback(() => {
1665
- const ghost = ghostRef.current;
1666
- const img = imgRef.current;
1667
- if (!ghost || !img) return;
1668
- const cb = ghost.getBoundingClientRect();
1669
- const cw = cb.width;
1670
- const ch = cb.height;
1671
- const nw = img.naturalWidth;
1672
- const nh = img.naturalHeight;
1673
- if (!cw || !ch || !nw || !nh) return;
1674
- if (imageDisplay === 'Cover') {
1675
- setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
1676
- return;
1677
- }
1678
- const ir = nw / nh;
1679
- const cr = cw / ch;
1680
- if (ir > cr) {
1681
- const dh = cw / ir;
1682
- setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });
1683
- } else {
1684
- const dw = ch * ir;
1685
- setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });
1686
- }
1687
- }, [imageDisplay]);
1688
-
1689
- useEffect(() => {
1690
- computeFinalRect();
1691
- const c = ghostRef.current;
1692
- if (!c) return;
1693
- const ro = new ResizeObserver(() => computeFinalRect());
1694
- ro.observe(c);
1695
- return () => ro.disconnect();
1696
- }, [computeFinalRect, index]);
1697
-
1698
- useEffect(() => {
1699
- if (phase !== 'opening' || !finalRect) return;
1700
- const handle = { id: 0 };
1701
- handle.id = requestAnimationFrame(() => {
1702
- handle.id = requestAnimationFrame(() => setPhase('open'));
1703
- });
1704
- return () => cancelAnimationFrame(handle.id);
1705
- }, [phase, finalRect]);
1706
-
1707
- useEffect(() => {
1708
- if (phase !== 'closing') return;
1709
- const t = setTimeout(() => onClose(), LIGHTBOX_ANIM_MS);
1710
- return () => clearTimeout(t);
1711
- }, [phase, onClose]);
1712
-
1713
- useEffect(() => {
1714
- if (prevIndexRef.current !== index) {
1715
- setTransitionsEnabled(false);
1716
- }
1717
- prevIndexRef.current = index;
1718
- }, [index]);
1719
-
1720
- const handleClose = () => {
1721
- if (phase === 'closing') return;
1722
- setPhase('closing');
1723
- };
1724
-
1725
- const isOpen = phase === 'open';
1726
- const isClosing = phase === 'closing';
1727
- const reverseAnimateClose = isClosing && reverseClose && !!originRect;
1728
- const animatedRect = phase === 'opening'
1729
- ? (originRect ?? finalRect)
1730
- : reverseAnimateClose
1731
- ? originRect
1732
- : finalRect;
1733
-
1734
- return (
1735
- <div
1736
- style={{
1737
- position: 'fixed',
1738
- top: 0,
1739
- left: 0,
1740
- width: '100vw',
1741
- height: '100vh',
1742
- zIndex: 9997,
1743
- }}
1744
- onClick={handleClose}
1745
- >
1746
- <div
1747
- style={{
1748
- position: 'absolute',
1749
- inset: 0,
1750
- background: 'rgba(28,31,34,0.9)',
1751
- opacity: isOpen ? 1 : 0,
1752
- transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
1753
- pointerEvents: 'none',
1754
- }}
1755
- />
1756
- <div
1757
- style={{
1758
- position: 'relative',
1759
- width: '100%',
1760
- height: '100%',
1761
- display: 'flex',
1762
- flexDirection: 'column',
1763
- alignItems: 'center',
1764
- justifyContent: 'center',
1765
- }}
1766
- >
1767
- <div style={{ height: '10%' }}></div>
1768
- <div
1769
- style={{
1770
- width: '70%',
1771
- height: '80%',
1772
- display: 'flex',
1773
- justifyContent: 'center',
1774
- alignItems: 'center'
1775
- }}>
1776
- <div ref={ghostRef} style={{ width: '100%', height: '100%' }} />
1777
- </div>
1778
- <div
1779
- style={{
1780
- display: 'flex',
1781
- flexDirection: 'row',
1782
- justifyContent: 'center',
1783
- alignItems: 'center',
1784
- height: '10%',
1785
- color: '#E6E6E6',
1786
- letterSpacing: '-0.6px',
1787
- lineHeight: '16px',
1788
- opacity: isOpen ? 1 : 0,
1789
- transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
1790
- }}
1791
- >
1792
- <p>{index + 1}</p>
1793
- <p>/</p>
1794
- <p>{images.length}</p>
1795
- </div>
1796
- </div>
1797
-
1798
- {animatedRect && (
1799
- <img
1800
- ref={imgRef}
1801
- src={images[index]}
1802
- onLoad={computeFinalRect}
1803
- style={{
1804
- position: 'fixed',
1805
- top: animatedRect.top,
1806
- left: animatedRect.left,
1807
- width: animatedRect.width,
1808
- height: animatedRect.height,
1809
- objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain',
1810
- opacity: isClosing && !reverseAnimateClose ? 0 : 1,
1811
- transition: isClosing && !reverseAnimateClose
1812
- ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
1813
- : (reverseAnimateClose || transitionsEnabled)
1814
- ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
1815
- : 'none',
1816
- pointerEvents: 'none',
1817
- zIndex: 9998,
1818
- }}
1819
- />
1820
- )}
1821
-
1822
- {isOpen && finalRect && (
1823
- <>
1824
- <div
1825
- style={{
1826
- position: 'fixed',
1827
- top: finalRect.top,
1828
- left: finalRect.left,
1829
- width: finalRect.width / 2,
1830
- height: finalRect.height,
1831
- cursor: 'w-resize',
1832
- zIndex: 9999,
1833
- }}
1834
- onClick={(e) => {
1835
- e.stopPropagation();
1836
- onPrev();
1837
- }}
1838
- />
1839
- <div
1840
- style={{
1841
- position: 'fixed',
1842
- top: finalRect.top,
1843
- left: finalRect.left + finalRect.width / 2,
1844
- width: finalRect.width / 2,
1845
- height: finalRect.height,
1846
- cursor: 'e-resize',
1847
- zIndex: 9999,
1848
- }}
1849
- onClick={(e) => {
1850
- e.stopPropagation();
1851
- onNext();
1852
- }}
1853
- />
1854
- </>
1855
- )}
1856
- </div>
1857
- );
1858
- }
1859
-
1860
- export function Grid({ settings, content, isEditor, metadata, activeEvent }: GridProps) {
1861
- const { prefix: P } = useScopedStyles();
1862
- const {
1863
- type = 'A',
1864
- fieldsToShow = 2,
1865
- textBoxWidth,
1866
- verticalGap,
1867
- entriesCount,
1868
- lightbox,
1869
- imageSize,
1870
- imageDisplay,
1871
- slider,
1872
- sliderTiming,
1873
- direction,
1874
- transition,
1875
- titleColor,
1876
- subtitleColor,
1877
- titleFontFamily,
1878
- titleFontSettings,
1879
- titleFontSize,
1880
- titleLineHeight,
1881
- titleLetterSpacing,
1882
- titleWordSpacing,
1883
- titleTextAppearance,
1884
- subtitleFontFamily,
1885
- subtitleFontSettings,
1886
- subtitleFontSize,
1887
- subtitleLineHeight,
1888
- subtitleLetterSpacing,
1889
- subtitleWordSpacing,
1890
- subtitleTextAppearance,
1891
- } = settings;
1892
-
1893
- const resolvedTitleTextStyle: TextStyles = {
1894
- fontSettings: {
1895
- fontFamily: titleFontFamily,
1896
- fontWeight: titleFontSettings?.fontWeight ?? 400,
1897
- fontStyle: titleFontSettings?.fontStyle ?? 'normal',
1898
- },
1899
- fontSize: titleFontSize ?? 0.01,
1900
- lineHeight: titleLineHeight,
1901
- letterSpacing: titleLetterSpacing ?? 0,
1902
- wordSpacing: titleWordSpacing ?? 0,
1903
- textAppearance: titleTextAppearance,
1904
- color: titleColor,
1905
- };
1906
- const titleTypographyCss = omitTextColors(textStylesToCss(resolvedTitleTextStyle, isEditor));
1907
- const titleFieldCss = {
1908
- ...titleTypographyCss,
1909
- } as React.CSSProperties;
1910
-
1911
- const resolvedSubtitleTextStyle: TextStyles = {
1912
- fontSettings: {
1913
- fontFamily: subtitleFontFamily,
1914
- fontWeight: subtitleFontSettings?.fontWeight ?? 400,
1915
- fontStyle: subtitleFontSettings?.fontStyle ?? 'normal',
1916
- },
1917
- fontSize: subtitleFontSize ?? 0.01,
1918
- lineHeight: subtitleLineHeight,
1919
- letterSpacing: subtitleLetterSpacing ?? 0,
1920
- wordSpacing: subtitleWordSpacing ?? 0,
1921
- textAppearance: subtitleTextAppearance,
1922
- color: subtitleColor,
1923
- };
1924
- const subtitleTypographyCss = omitTextColors(textStylesToCss(resolvedSubtitleTextStyle, isEditor));
1925
- const subtitleFieldCss = {
1926
- ...subtitleTypographyCss,
1927
- } as React.CSSProperties;
1928
-
1929
- const colorVars = buildColorVars(P, {
1930
- titleColor,
1931
- subtitleColor,
1932
- }, COLOR_VAR_MAP, STATE_KEYS);
1933
-
1934
- const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
1935
- const wrapperStateClasses = \`\${stateClass}\`.trim();
1936
-
1937
- const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;
1938
-
1939
- const cropContent = (content ?? []).slice(0, resEntriesCount);
1940
-
1941
- const imageSizeMap = {
1942
- Small: 0.1,
1943
- Medium: 0.2,
1944
- Big: 0.3,
1945
- } as const;
1946
-
1947
- const size = imageSizeMap[imageSize] ?? 0.2;
1948
-
1949
- const isCover = imageDisplay?.display === 'Cover';
1950
- const ratioValue = imageDisplay?.ratioValue ?? '1:1';
1951
- const ratioReversed = imageDisplay?.reversed ?? false;
1952
- const [rW, rH] = ratioValue.split(':').map(Number);
1953
- const effW = ratioReversed ? rH : rW;
1954
- const effH = ratioReversed ? rW : rH;
1955
- const aspectRatio = \`\${effW} / \${effH}\`;
1956
- const isLandscape = effW >= effH;
1957
-
1958
- const imageStyle: React.CSSProperties = {
1959
- objectFit: isCover ? 'cover' : 'contain',
1960
- ...(isCover && {
1961
- aspectRatio,
1962
- width: isLandscape ? '100%' : 'auto',
1963
- height: isLandscape ? 'auto' : '100%',
1964
- }),
1965
- };
1966
-
1967
- const [dir, setDir] = useState('ltr');
1968
-
1969
- const [lightboxOpen, setLightboxOpen] = useState(false);
1970
- const [lightboxImages, setLightboxImages] = useState<string[]>([]);
1971
- const [lightboxIndex, setLightboxIndex] = useState(0);
1972
- const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);
1973
-
1974
- const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {
1975
- if (lightbox === 'Off') return;
1976
- const r = e.currentTarget.getBoundingClientRect();
1977
- setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });
1978
- setLightboxImages(urls);
1979
- setLightboxIndex(idx);
1980
- setLightboxOpen(true);
1981
- };
1982
-
1983
- return (
1984
- <>
1985
- <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
1986
- <div style={colorVars}>
1987
- <div
1988
- className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()}
1989
- style={{
1990
- gridTemplateColumns: \`repeat(\${fieldsToShow}, 1fr)\`,
1991
- rowGap: scalingValue(verticalGap ?? 0, isEditor),
1992
- }}>
1993
- {cropContent.map((item, index) => (
1994
- <div
1995
- key={index}
1996
- className={\`\${P}-item\`.trim()}
1997
- >
1998
- <div className={\`\${P}-item-image-wrapper\`} style={{ width: scalingValue(size ?? 0, isEditor), height: scalingValue(size ?? 0, isEditor) }}>
1999
- {(item.image?.length ?? 0) === 0
2000
- ? null
2001
- : slider === 'Off'
2002
- ?
2003
- <img
2004
- src={item.image[0].url}
2005
- alt={item.image[0].name}
2006
- className={\`\${P}-item-image\`.trim()}
2007
- style={imageStyle}
2008
- onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), 0)}
2009
- />
2010
- :
2011
- <Splide
2012
- key={\`\${transition}-\${imageSize}-\${direction}-\${sliderTiming}\`}
2013
- className={\`\${P}-item-slider\`}
2014
- options={{
2015
- arrows: false,
2016
- pagination: false,
2017
- drag: false,
2018
- perPage: 1,
2019
- autoplay: true,
2020
- interval: sliderTiming * 1000,
2021
- width: '100%',
2022
- height: '100%',
2023
- speed: 500,
2024
- type: transition === 'Fade' ? 'fade' : 'loop',
2025
- rewind: transition === 'Fade',
2026
- pauseOnHover: false,
2027
- pauseOnFocus: false,
2028
- direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'
2029
- ? direction === 'Horizontal'
2030
- ? 'ltr'
2031
- : 'ttb'
2032
- : dir,
2033
- }}
2034
- onMoved={(splide) => {
2035
- if (direction !== 'Random' || transition === 'Fade') return;
2036
- const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';
2037
- setDir(next);
2038
-
2039
- setTimeout(() => {
2040
- splide.refresh();
2041
- }, 0);
2042
- }}
2043
- >
2044
- {item.image.map((img: { url: string; name?: string }, imgIndex: number) => (
2045
- <SplideSlide key={imgIndex}>
2046
- <img
2047
- src={img.url}
2048
- alt={img.name}
2049
- className={\`\${P}-item-image\`.trim()}
2050
- style={imageStyle}
2051
- onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), imgIndex)}
2052
- />
2053
- </SplideSlide>
2054
- ))}
2055
- </Splide>
2056
- }
2057
- </div>
2058
- <p className={\`\${P}-item-title\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...titleFieldCss }}>
2059
- {item.title}
2060
- </p>
2061
- {type === 'B' && <p className={\`\${P}-item-subtitle\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...subtitleFieldCss }}>
2062
- {item.subtitle}
2063
- </p>}
2064
- </div>
2065
- ))}
2066
- </div>
2067
- </div>
2068
- {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&
2069
- createPortal(
2070
- <div data-selection="none">
2071
- <Lightbox
2072
- images={lightboxImages}
2073
- index={lightboxIndex}
2074
- imageDisplay={imageDisplay.display}
2075
- originRect={lightboxOriginRect}
2076
- reverseClose={slider === 'Off'}
2077
- onClose={() => setLightboxOpen(false)}
2078
- onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}
2079
- onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}
2080
- />
2081
- </div>,
2082
- document.body
2083
- )}
2084
- </>
2085
- );
2086
- }
2087
-
2088
- type GridSettings = {
2089
- type: 'A' | 'B';
2090
- fieldsToShow: number;
2091
- textBoxWidth: number;
2092
- verticalGap: number;
2093
- entriesCount: number;
2094
- lightbox: 'On' | 'Off';
2095
- imageSize: 'Small' | 'Medium' | 'Big';
2096
- imageDisplay: {
2097
- display: 'Fit' | 'Cover';
2098
- ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
2099
- reversed: boolean;
2100
- };
2101
- slider: 'On' | 'Off';
2102
- sliderTiming: number;
2103
- direction: 'Horizontal' | 'Vertical' | 'Random',
2104
- transition: 'Fade' | 'Slide',
2105
- titleColor: string;
2106
- subtitleColor: string;
2107
- titleFontFamily: string;
2108
- titleFontSettings?: { fontWeight: number; fontStyle: string };
2109
- titleFontSize?: number;
2110
- titleLineHeight?: number;
2111
- titleLetterSpacing?: number;
2112
- titleWordSpacing?: number;
2113
- titleTextAppearance?: TextStyles['textAppearance'];
2114
- subtitleFontFamily: string;
2115
- subtitleFontSettings?: { fontWeight: number; fontStyle: string };
2116
- subtitleFontSize?: number;
2117
- subtitleLineHeight?: number;
2118
- subtitleLetterSpacing?: number;
2119
- subtitleWordSpacing?: number;
2120
- subtitleTextAppearance?: TextStyles['textAppearance'];
2121
- };
2122
-
2123
- type ColorKeys =
2124
- | 'titleColor'
2125
- | 'subtitleColor'
2126
-
2127
- const COLOR_VAR_MAP: Record<ColorKeys, string> = {
2128
- titleColor: 'title-color',
2129
- subtitleColor: 'subtitle-color',
2130
- };
2131
-
2132
- const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
2133
- `,Tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ql=["titleColor","subtitleColor"],Yl={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}]},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}]},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}]}]}},settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},textBoxWidth:{type:"number",scope:"layout",title:"Textbox Width",display:{type:"percentage-input"},min:0,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"string",scope:"layout",title:"Size",display:{type:"toggle-cycle",enum:["Small","Medium","Big"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (S)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["textBoxWidth"]},{type:"row",title:"",items:["verticalGap"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["entriesCount"]},{type:"row",title:"",items:["lightbox"]}]}]},{type:"group",title:"Image",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["imageDisplay"]}]}]},{type:"group",title:"Slider",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["slider"]},{type:"row",title:"",items:["sliderTiming"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["direction"]},{type:"row",title:"",items:["transition"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...ql],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Kl={element:Dl,id:"grid",name:"Neptune",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Yl,sourceCode:Xl},Jl=[Ta,Ra,xl,Il,Nl,Kl];exports.components=Jl;exports.isSchemaV1=bo;
1559
+ `}const Jt=500,ae="cubic-bezier(0.22, 1, 0.36, 1)";function Dl({images:t,index:e,imageDisplay:r,originRect:n,reverseClose:o,onClose:a,onPrev:i,onNext:s}){const c=B.useRef(null),d=B.useRef(null),[l,C]=B.useState(null),[m,y]=B.useState(n?"opening":"open"),[u,g]=B.useState(!0),S=B.useRef(e),b=B.useCallback(()=>{const f=c.current,L=d.current;if(!f||!L)return;const A=f.getBoundingClientRect(),N=A.width,_=A.height,W=L.naturalWidth,P=L.naturalHeight;if(!N||!_||!W||!P)return;if(r==="Cover"){C({width:N,height:_,left:A.left,top:A.top});return}const D=W/P,H=N/_;if(D>H){const h=N/D;C({width:N,height:h,left:A.left,top:A.top+(_-h)/2})}else{const h=_*D;C({width:h,height:_,left:A.left+(N-h)/2,top:A.top})}},[r]);B.useEffect(()=>{b();const f=c.current;if(!f)return;const L=new ResizeObserver(()=>b());return L.observe(f),()=>L.disconnect()},[b,e]),B.useEffect(()=>{if(m!=="opening"||!l)return;const f={id:0};return f.id=requestAnimationFrame(()=>{f.id=requestAnimationFrame(()=>y("open"))}),()=>cancelAnimationFrame(f.id)},[m,l]),B.useEffect(()=>{if(m!=="closing")return;const f=setTimeout(()=>a(),Jt);return()=>clearTimeout(f)},[m,a]),B.useEffect(()=>{S.current!==e&&g(!1),S.current=e},[e]);const v=()=>{m!=="closing"&&y("closing")},$=m==="open",z=m==="closing",V=z&&o&&!!n,w=m==="opening"?n??l:V?n:l;return p.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:v,children:[p.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:$?1:0,transition:`opacity ${Jt}ms ${ae}`,pointerEvents:"none"}}),p.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[p.jsx("div",{style:{height:"10%"}}),p.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})}),p.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:$?1:0,transition:`opacity ${Jt}ms ${ae}`,fontFamily:jl()},children:t.length>1&&p.jsxs(p.Fragment,{children:[p.jsx("p",{children:e+1}),p.jsx("p",{children:"/"}),p.jsx("p",{children:t.length})]})})]}),w&&p.jsx("img",{ref:d,src:t[e],onLoad:b,style:{position:"fixed",top:w.top,left:w.left,width:w.width,height:w.height,objectFit:r==="Cover"?"cover":"contain",opacity:z&&!V?0:1,transition:z&&!V?`opacity ${Jt}ms ${ae}`:V||u?`top ${Jt}ms ${ae}, left ${Jt}ms ${ae}, width ${Jt}ms ${ae}, height ${Jt}ms ${ae}`:"none",pointerEvents:"none",zIndex:9998}}),$&&l&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,width:l.width/2,height:l.height,cursor:"w-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),i()}}),p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left+l.width/2,width:l.width/2,height:l.height,cursor:"e-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),s()}})]})]})}function Gl({settings:t,content:e,isEditor:r,metadata:n,activeEvent:o}){const{prefix:a}=E.useScopedStyles(),{type:i="A",gridLayout:s,textBoxWidth:c,verticalGap:d,entriesCount:l,lightbox:C,imageDisplay:m,slider:y,sliderTiming:u,direction:g,transition:S,titleColor:b,subtitleColor:v,titleFontFamily:$,titleFontSettings:z,titleFontSize:V,titleLineHeight:w,titleLetterSpacing:f,titleWordSpacing:L,titleTextAppearance:A,subtitleFontFamily:N,subtitleFontSettings:_,subtitleFontSize:W,subtitleLineHeight:P,subtitleLetterSpacing:D,subtitleWordSpacing:H,subtitleTextAppearance:h}=t,R={fontSettings:{fontFamily:$,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:V??.01,lineHeight:w,letterSpacing:f??0,wordSpacing:L??0,textAppearance:A,color:b},I={...Qt(Xt(R,r))},T={fontSettings:{fontFamily:N,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:W??.01,lineHeight:P,letterSpacing:D??0,wordSpacing:H??0,textAppearance:h,color:v},X={...Qt(Xt(T,r))},ot=E.buildColorVars(a,{titleColor:b,subtitleColor:v},Ul,Xl),at=`${o&&o!=="default"?`${a}-state-${o}`:""}`.trim(),k=l===0?1/0:l,K=(e??[]).slice(0,k),st=s.entryWidth??.2,lt=(m==null?void 0:m.display)==="Cover",mt=(m==null?void 0:m.ratioValue)??"1:1",Ct=(m==null?void 0:m.reversed)??!1,[It,M]=mt.split(":").map(Number),x=Ct?M:It,G=Ct?It:M,q=`${x} / ${G}`,J=x>=G,et={objectFit:lt?"cover":"contain",...lt&&{aspectRatio:q,width:J?"100%":"auto",height:J?"auto":"100%"}},[Q,Y]=B.useState("ltr"),[rt,ft]=B.useState(!1),[it,gt]=B.useState([]),[Ft,Z]=B.useState(0),[ct,$t]=B.useState(null),kt=(St,jt,pt)=>{if(C==="Off")return;const bt=St.currentTarget.getBoundingClientRect();$t({top:bt.top,left:bt.left,width:bt.width,height:bt.height}),gt(jt),Z(pt),ft(!0)};return B.useEffect(()=>{if(!rt||C!=="On"||typeof document>"u")return;const St=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=St}},[rt,C]),p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Hl(a)}}),p.jsx("div",{style:ot,children:p.jsx("div",{className:`${a}-wrapper ${a}-type-${i} ${at}`.trim(),style:{gridTemplateColumns:`repeat(${s.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(d??0,r),columnGap:E.scalingValue(s.horizontalGap??0,r),width:E.scalingValue(s.wrapperWidth??0,r)},children:K.map((St,jt)=>{var pt;return p.jsxs("div",{className:`${a}-item`.trim(),children:[p.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:E.scalingValue(st??0,r),height:E.scalingValue(st??0,r)},children:(((pt=St.image)==null?void 0:pt.length)??0)===0?null:y==="Off"?p.jsx("img",{src:St.image[0].url,alt:St.image[0].name,className:`${a}-item-image`.trim(),style:et,onClick:bt=>kt(bt,St.image.map(_t=>_t.url),0)}):p.jsx(Qr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:u*1e3,width:"100%",height:"100%",speed:500,type:S==="Fade"?"fade":"loop",rewind:S==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:S==="Fade"?"ltr":g!=="Random"?g==="Horizontal"?"ltr":"ttb":Q},onMoved:bt=>{if(g!=="Random"||S==="Fade")return;const _t=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Y(_t),setTimeout(()=>{bt.refresh()},0)},children:St.image.map((bt,_t)=>p.jsx(tn,{children:p.jsx("img",{src:bt.url,alt:bt.name,className:`${a}-item-image`.trim(),style:et,onClick:vt=>kt(vt,St.image.map(Rt=>Rt.url),_t)})},_t))},`${S}-${st}-${g}-${u}`)}),p.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${E.scalingValue(st??0,r)} * (${c} / 100))`,...I},children:St.title}),i==="B"&&p.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(st??0,r)} * (${c} / 100))`,...X},children:St.subtitle})]},jt)})})}),rt&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&C==="On"&&Ln.createPortal(p.jsx("div",{"data-selection":"none",children:p.jsx(Dl,{images:it,index:Ft,imageDisplay:m.display,originRect:ct,reverseClose:y==="Off",onClose:()=>ft(!1),onPrev:()=>Z(St=>(St-1+it.length)%it.length),onNext:()=>Z(St=>(St+1)%it.length)})}),document.body)]})}const Ul={titleColor:"title-color",subtitleColor:"subtitle-color"},Xl=["hover","focus","filled","success","error"],ql=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
1560
+ import '@splidejs/react-splide/css/core';\r
1561
+ import { CommonComponentProps } from '../props';\r
1562
+ import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
1563
+ import { useCallback, useEffect, useRef, useState } from 'react';\r
1564
+ import { createPortal } from 'react-dom';\r
1565
+ import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
1566
+ import { getFontBasedOnSystem } from '../utils/getMainFontBaseOnSystem';\r
1567
+ \r
1568
+ function sv(px: number): string {\r
1569
+ return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;\r
1570
+ }\r
1571
+ \r
1572
+ function getCSS(P: string): string {\r
1573
+ return \`\r
1574
+ .\${P}-wrapper {\r
1575
+ display: grid;\r
1576
+ align-items: start;\r
1577
+ min-height: \${sv(48)};\r
1578
+ }\r
1579
+ .\${P}-item {\r
1580
+ display: flex;\r
1581
+ flex-direction: column;\r
1582
+ justify-content: center;\r
1583
+ align-items: center;\r
1584
+ gap: 12px;\r
1585
+ }\r
1586
+ .\${P}-item-image-wrapper {\r
1587
+ display: flex;\r
1588
+ justify-content: center;\r
1589
+ align-items: center;\r
1590
+ }\r
1591
+ .\${P}-item-image {\r
1592
+ width: 100%;\r
1593
+ height: 100%;\r
1594
+ display: block;\r
1595
+ }\r
1596
+ .\${P}-item-slider,\r
1597
+ .\${P}-item-slider .splide__track,\r
1598
+ .\${P}-item-slider .splide__list,\r
1599
+ .\${P}-item-slider .splide__slide {\r
1600
+ width: 100%;\r
1601
+ height: 100%;\r
1602
+ }\r
1603
+ .\${P}-item-slider .splide__slide {\r
1604
+ display: flex;\r
1605
+ justify-content: center;\r
1606
+ align-items: center;\r
1607
+ }\r
1608
+ .\${P}-item-title {\r
1609
+ white-space: normal;\r
1610
+ overflow-wrap: anywhere;\r
1611
+ word-break: break-word;\r
1612
+ text-align: center;\r
1613
+ margin-bottom: 0px;\r
1614
+ margin-top: 0px;\r
1615
+ color: var(--\${P}-title-color);\r
1616
+ }\r
1617
+ .\${P}-item-subtitle {\r
1618
+ white-space: normal;\r
1619
+ overflow-wrap: anywhere;\r
1620
+ word-break: break-word;\r
1621
+ text-align: center;\r
1622
+ margin-bottom: 0px;\r
1623
+ margin-top: 0px;\r
1624
+ color: var(--\${P}-subtitle-color);\r
1625
+ }\r
1626
+ \`;\r
1627
+ }\r
1628
+ \r
1629
+ type GridProps = {\r
1630
+ settings: GridSettings;\r
1631
+ content?: any;\r
1632
+ isEditor?: boolean;\r
1633
+ activeEvent: string | undefined;\r
1634
+ onUpdateSettings?: (settings: GridSettings) => void;\r
1635
+ } & CommonComponentProps;\r
1636
+ \r
1637
+ type AnimRect = { top: number; left: number; width: number; height: number };\r
1638
+ \r
1639
+ type LightboxProps = {\r
1640
+ images: string[];\r
1641
+ index: number;\r
1642
+ imageDisplay: 'Fit' | 'Cover';\r
1643
+ originRect: AnimRect | null;\r
1644
+ reverseClose: boolean;\r
1645
+ onClose: () => void;\r
1646
+ onPrev: () => void;\r
1647
+ onNext: () => void;\r
1648
+ };\r
1649
+ \r
1650
+ const LIGHTBOX_ANIM_MS = 500;\r
1651
+ const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';\r
1652
+ \r
1653
+ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext }: LightboxProps) {\r
1654
+ const ghostRef = useRef<HTMLDivElement>(null);\r
1655
+ const imgRef = useRef<HTMLImageElement>(null);\r
1656
+ const [finalRect, setFinalRect] = useState<AnimRect | null>(null);\r
1657
+ const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');\r
1658
+ const [transitionsEnabled, setTransitionsEnabled] = useState(true);\r
1659
+ const prevIndexRef = useRef(index);\r
1660
+ \r
1661
+ const computeFinalRect = useCallback(() => {\r
1662
+ const ghost = ghostRef.current;\r
1663
+ const img = imgRef.current;\r
1664
+ if (!ghost || !img) return;\r
1665
+ const cb = ghost.getBoundingClientRect();\r
1666
+ const cw = cb.width;\r
1667
+ const ch = cb.height;\r
1668
+ const nw = img.naturalWidth;\r
1669
+ const nh = img.naturalHeight;\r
1670
+ if (!cw || !ch || !nw || !nh) return;\r
1671
+ if (imageDisplay === 'Cover') {\r
1672
+ setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });\r
1673
+ return;\r
1674
+ }\r
1675
+ const ir = nw / nh;\r
1676
+ const cr = cw / ch;\r
1677
+ if (ir > cr) {\r
1678
+ const dh = cw / ir;\r
1679
+ setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });\r
1680
+ } else {\r
1681
+ const dw = ch * ir;\r
1682
+ setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });\r
1683
+ }\r
1684
+ }, [imageDisplay]);\r
1685
+ \r
1686
+ useEffect(() => {\r
1687
+ computeFinalRect();\r
1688
+ const c = ghostRef.current;\r
1689
+ if (!c) return;\r
1690
+ const ro = new ResizeObserver(() => computeFinalRect());\r
1691
+ ro.observe(c);\r
1692
+ return () => ro.disconnect();\r
1693
+ }, [computeFinalRect, index]);\r
1694
+ \r
1695
+ useEffect(() => {\r
1696
+ if (phase !== 'opening' || !finalRect) return;\r
1697
+ const handle = { id: 0 };\r
1698
+ handle.id = requestAnimationFrame(() => {\r
1699
+ handle.id = requestAnimationFrame(() => setPhase('open'));\r
1700
+ });\r
1701
+ return () => cancelAnimationFrame(handle.id);\r
1702
+ }, [phase, finalRect]);\r
1703
+ \r
1704
+ useEffect(() => {\r
1705
+ if (phase !== 'closing') return;\r
1706
+ const t = setTimeout(() => onClose(), LIGHTBOX_ANIM_MS);\r
1707
+ return () => clearTimeout(t);\r
1708
+ }, [phase, onClose]);\r
1709
+ \r
1710
+ useEffect(() => {\r
1711
+ if (prevIndexRef.current !== index) {\r
1712
+ setTransitionsEnabled(false);\r
1713
+ }\r
1714
+ prevIndexRef.current = index;\r
1715
+ }, [index]);\r
1716
+ \r
1717
+ const handleClose = () => {\r
1718
+ if (phase === 'closing') return;\r
1719
+ setPhase('closing');\r
1720
+ };\r
1721
+ \r
1722
+ const isOpen = phase === 'open';\r
1723
+ const isClosing = phase === 'closing';\r
1724
+ const reverseAnimateClose = isClosing && reverseClose && !!originRect;\r
1725
+ const animatedRect = phase === 'opening'\r
1726
+ ? (originRect ?? finalRect)\r
1727
+ : reverseAnimateClose\r
1728
+ ? originRect\r
1729
+ : finalRect;\r
1730
+ \r
1731
+ return (\r
1732
+ <div\r
1733
+ style={{\r
1734
+ position: 'fixed',\r
1735
+ top: 0,\r
1736
+ left: 0,\r
1737
+ width: '100vw',\r
1738
+ height: '100vh',\r
1739
+ zIndex: 9997,\r
1740
+ }}\r
1741
+ onClick={handleClose}\r
1742
+ >\r
1743
+ <div\r
1744
+ style={{\r
1745
+ position: 'absolute',\r
1746
+ inset: 0,\r
1747
+ background: 'rgba(28,31,34,0.9)',\r
1748
+ opacity: isOpen ? 1 : 0,\r
1749
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,\r
1750
+ pointerEvents: 'none',\r
1751
+ }}\r
1752
+ />\r
1753
+ <div\r
1754
+ style={{\r
1755
+ position: 'relative',\r
1756
+ width: '100%',\r
1757
+ height: '100%',\r
1758
+ display: 'flex',\r
1759
+ flexDirection: 'column',\r
1760
+ alignItems: 'center',\r
1761
+ justifyContent: 'center',\r
1762
+ }}\r
1763
+ >\r
1764
+ <div style={{ height: '10%' }}></div>\r
1765
+ <div\r
1766
+ style={{\r
1767
+ width: '70%',\r
1768
+ height: '80%',\r
1769
+ display: 'flex',\r
1770
+ justifyContent: 'center',\r
1771
+ alignItems: 'center'\r
1772
+ }}>\r
1773
+ <div ref={ghostRef} style={{ width: '100%', height: '100%' }} />\r
1774
+ </div>\r
1775
+ <div\r
1776
+ style={{\r
1777
+ display: 'flex',\r
1778
+ flexDirection: 'row',\r
1779
+ justifyContent: 'center',\r
1780
+ alignItems: 'center',\r
1781
+ height: '10%',\r
1782
+ color: '#E6E6E6',\r
1783
+ letterSpacing: '-0.6px',\r
1784
+ lineHeight: '16px',\r
1785
+ opacity: isOpen ? 1 : 0,\r
1786
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,\r
1787
+ fontFamily: getFontBasedOnSystem(),\r
1788
+ }}\r
1789
+ >\r
1790
+ {images.length > 1 &&\r
1791
+ <>\r
1792
+ <p>{index + 1}</p>\r
1793
+ <p>/</p>\r
1794
+ <p>{images.length}</p>\r
1795
+ </>\r
1796
+ }\r
1797
+ </div>\r
1798
+ </div>\r
1799
+ \r
1800
+ {animatedRect && (\r
1801
+ <img\r
1802
+ ref={imgRef}\r
1803
+ src={images[index]}\r
1804
+ onLoad={computeFinalRect}\r
1805
+ style={{\r
1806
+ position: 'fixed',\r
1807
+ top: animatedRect.top,\r
1808
+ left: animatedRect.left,\r
1809
+ width: animatedRect.width,\r
1810
+ height: animatedRect.height,\r
1811
+ objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain',\r
1812
+ opacity: isClosing && !reverseAnimateClose ? 0 : 1,\r
1813
+ transition: isClosing && !reverseAnimateClose\r
1814
+ ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`\r
1815
+ : (reverseAnimateClose || transitionsEnabled)\r
1816
+ ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`\r
1817
+ : 'none',\r
1818
+ pointerEvents: 'none',\r
1819
+ zIndex: 9998,\r
1820
+ }}\r
1821
+ />\r
1822
+ )}\r
1823
+ \r
1824
+ {isOpen && finalRect && (\r
1825
+ <>\r
1826
+ <div\r
1827
+ style={{\r
1828
+ position: 'fixed',\r
1829
+ top: finalRect.top,\r
1830
+ left: finalRect.left,\r
1831
+ width: finalRect.width / 2,\r
1832
+ height: finalRect.height,\r
1833
+ cursor: 'w-resize',\r
1834
+ zIndex: 9999,\r
1835
+ }}\r
1836
+ onClick={(e) => {\r
1837
+ e.stopPropagation();\r
1838
+ onPrev();\r
1839
+ }}\r
1840
+ />\r
1841
+ <div\r
1842
+ style={{\r
1843
+ position: 'fixed',\r
1844
+ top: finalRect.top,\r
1845
+ left: finalRect.left + finalRect.width / 2,\r
1846
+ width: finalRect.width / 2,\r
1847
+ height: finalRect.height,\r
1848
+ cursor: 'e-resize',\r
1849
+ zIndex: 9999,\r
1850
+ }}\r
1851
+ onClick={(e) => {\r
1852
+ e.stopPropagation();\r
1853
+ onNext();\r
1854
+ }}\r
1855
+ />\r
1856
+ </>\r
1857
+ )}\r
1858
+ </div>\r
1859
+ );\r
1860
+ }\r
1861
+ \r
1862
+ export function Grid({ settings, content, isEditor, metadata, activeEvent }: GridProps) {\r
1863
+ const { prefix: P } = useScopedStyles();\r
1864
+ const {\r
1865
+ type = 'A',\r
1866
+ gridLayout,\r
1867
+ textBoxWidth,\r
1868
+ verticalGap,\r
1869
+ entriesCount,\r
1870
+ lightbox,\r
1871
+ imageDisplay,\r
1872
+ slider,\r
1873
+ sliderTiming,\r
1874
+ direction,\r
1875
+ transition,\r
1876
+ titleColor,\r
1877
+ subtitleColor,\r
1878
+ titleFontFamily,\r
1879
+ titleFontSettings,\r
1880
+ titleFontSize,\r
1881
+ titleLineHeight,\r
1882
+ titleLetterSpacing,\r
1883
+ titleWordSpacing,\r
1884
+ titleTextAppearance,\r
1885
+ subtitleFontFamily,\r
1886
+ subtitleFontSettings,\r
1887
+ subtitleFontSize,\r
1888
+ subtitleLineHeight,\r
1889
+ subtitleLetterSpacing,\r
1890
+ subtitleWordSpacing,\r
1891
+ subtitleTextAppearance,\r
1892
+ } = settings;\r
1893
+ \r
1894
+ const resolvedTitleTextStyle: TextStyles = {\r
1895
+ fontSettings: {\r
1896
+ fontFamily: titleFontFamily,\r
1897
+ fontWeight: titleFontSettings?.fontWeight ?? 400,\r
1898
+ fontStyle: titleFontSettings?.fontStyle ?? 'normal',\r
1899
+ },\r
1900
+ fontSize: titleFontSize ?? 0.01,\r
1901
+ lineHeight: titleLineHeight,\r
1902
+ letterSpacing: titleLetterSpacing ?? 0,\r
1903
+ wordSpacing: titleWordSpacing ?? 0,\r
1904
+ textAppearance: titleTextAppearance,\r
1905
+ color: titleColor,\r
1906
+ };\r
1907
+ const titleTypographyCss = omitTextColors(textStylesToCss(resolvedTitleTextStyle, isEditor));\r
1908
+ const titleFieldCss = {\r
1909
+ ...titleTypographyCss,\r
1910
+ } as React.CSSProperties;\r
1911
+ \r
1912
+ const resolvedSubtitleTextStyle: TextStyles = {\r
1913
+ fontSettings: {\r
1914
+ fontFamily: subtitleFontFamily,\r
1915
+ fontWeight: subtitleFontSettings?.fontWeight ?? 400,\r
1916
+ fontStyle: subtitleFontSettings?.fontStyle ?? 'normal',\r
1917
+ },\r
1918
+ fontSize: subtitleFontSize ?? 0.01,\r
1919
+ lineHeight: subtitleLineHeight,\r
1920
+ letterSpacing: subtitleLetterSpacing ?? 0,\r
1921
+ wordSpacing: subtitleWordSpacing ?? 0,\r
1922
+ textAppearance: subtitleTextAppearance,\r
1923
+ color: subtitleColor,\r
1924
+ };\r
1925
+ const subtitleTypographyCss = omitTextColors(textStylesToCss(resolvedSubtitleTextStyle, isEditor));\r
1926
+ const subtitleFieldCss = {\r
1927
+ ...subtitleTypographyCss,\r
1928
+ } as React.CSSProperties;\r
1929
+ \r
1930
+ const colorVars = buildColorVars(P, {\r
1931
+ titleColor,\r
1932
+ subtitleColor,\r
1933
+ }, COLOR_VAR_MAP, STATE_KEYS);\r
1934
+ \r
1935
+ const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';\r
1936
+ const wrapperStateClasses = \`\${stateClass}\`.trim();\r
1937
+ \r
1938
+ const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;\r
1939
+ \r
1940
+ const cropContent = (content ?? []).slice(0, resEntriesCount);\r
1941
+ \r
1942
+ const size = gridLayout.entryWidth ?? 0.2;\r
1943
+ \r
1944
+ const isCover = imageDisplay?.display === 'Cover';\r
1945
+ const ratioValue = imageDisplay?.ratioValue ?? '1:1';\r
1946
+ const ratioReversed = imageDisplay?.reversed ?? false;\r
1947
+ const [rW, rH] = ratioValue.split(':').map(Number);\r
1948
+ const effW = ratioReversed ? rH : rW;\r
1949
+ const effH = ratioReversed ? rW : rH;\r
1950
+ const aspectRatio = \`\${effW} / \${effH}\`;\r
1951
+ const isLandscape = effW >= effH;\r
1952
+ \r
1953
+ const imageStyle: React.CSSProperties = {\r
1954
+ objectFit: isCover ? 'cover' : 'contain',\r
1955
+ ...(isCover && {\r
1956
+ aspectRatio,\r
1957
+ width: isLandscape ? '100%' : 'auto',\r
1958
+ height: isLandscape ? 'auto' : '100%',\r
1959
+ }),\r
1960
+ };\r
1961
+ \r
1962
+ const [dir, setDir] = useState('ltr');\r
1963
+ \r
1964
+ const [lightboxOpen, setLightboxOpen] = useState(false);\r
1965
+ const [lightboxImages, setLightboxImages] = useState<string[]>([]);\r
1966
+ const [lightboxIndex, setLightboxIndex] = useState(0);\r
1967
+ const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);\r
1968
+ \r
1969
+ const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {\r
1970
+ if (lightbox === 'Off') return;\r
1971
+ const r = e.currentTarget.getBoundingClientRect();\r
1972
+ setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });\r
1973
+ setLightboxImages(urls);\r
1974
+ setLightboxIndex(idx);\r
1975
+ setLightboxOpen(true);\r
1976
+ };\r
1977
+ \r
1978
+ useEffect(() => {\r
1979
+ if (!lightboxOpen || lightbox !== 'On') return;\r
1980
+ if (typeof document === 'undefined') return;\r
1981
+ const prevOverflow = document.body.style.overflow;\r
1982
+ document.body.style.overflow = 'hidden';\r
1983
+ return () => {\r
1984
+ document.body.style.overflow = prevOverflow;\r
1985
+ };\r
1986
+ }, [lightboxOpen, lightbox]);\r
1987
+ \r
1988
+ return (\r
1989
+ <>\r
1990
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />\r
1991
+ <div style={colorVars}>\r
1992
+ <div\r
1993
+ className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()}\r
1994
+ style={{\r
1995
+ gridTemplateColumns: \`repeat(\${gridLayout.columnsCount}, minmax(0, 1fr))\`,\r
1996
+ rowGap: scalingValue(verticalGap ?? 0, isEditor),\r
1997
+ columnGap: scalingValue(gridLayout.horizontalGap ?? 0, isEditor),\r
1998
+ width: scalingValue(gridLayout.wrapperWidth ?? 0, isEditor)\r
1999
+ }}>\r
2000
+ {cropContent.map((item, index) => (\r
2001
+ <div\r
2002
+ key={index}\r
2003
+ className={\`\${P}-item\`.trim()}\r
2004
+ >\r
2005
+ <div className={\`\${P}-item-image-wrapper\`} style={{ width: scalingValue(size ?? 0, isEditor), height: scalingValue(size ?? 0, isEditor) }}>\r
2006
+ {(item.image?.length ?? 0) === 0\r
2007
+ ? null\r
2008
+ : slider === 'Off'\r
2009
+ ?\r
2010
+ <img\r
2011
+ src={item.image[0].url}\r
2012
+ alt={item.image[0].name}\r
2013
+ className={\`\${P}-item-image\`.trim()}\r
2014
+ style={imageStyle}\r
2015
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), 0)}\r
2016
+ />\r
2017
+ :\r
2018
+ <Splide\r
2019
+ key={\`\${transition}-\${size}-\${direction}-\${sliderTiming}\`}\r
2020
+ className={\`\${P}-item-slider\`}\r
2021
+ options={{\r
2022
+ arrows: false,\r
2023
+ pagination: false,\r
2024
+ drag: false,\r
2025
+ perPage: 1,\r
2026
+ autoplay: true,\r
2027
+ interval: sliderTiming * 1000,\r
2028
+ width: '100%',\r
2029
+ height: '100%',\r
2030
+ speed: 500,\r
2031
+ type: transition === 'Fade' ? 'fade' : 'loop',\r
2032
+ rewind: transition === 'Fade',\r
2033
+ pauseOnHover: false,\r
2034
+ pauseOnFocus: false,\r
2035
+ direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'\r
2036
+ ? direction === 'Horizontal'\r
2037
+ ? 'ltr'\r
2038
+ : 'ttb'\r
2039
+ : dir,\r
2040
+ }}\r
2041
+ onMoved={(splide) => {\r
2042
+ if (direction !== 'Random' || transition === 'Fade') return;\r
2043
+ const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';\r
2044
+ setDir(next);\r
2045
+ \r
2046
+ setTimeout(() => {\r
2047
+ splide.refresh();\r
2048
+ }, 0);\r
2049
+ }}\r
2050
+ >\r
2051
+ {item.image.map((img: { url: string; name?: string }, imgIndex: number) => (\r
2052
+ <SplideSlide key={imgIndex}>\r
2053
+ <img\r
2054
+ src={img.url}\r
2055
+ alt={img.name}\r
2056
+ className={\`\${P}-item-image\`.trim()}\r
2057
+ style={imageStyle}\r
2058
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), imgIndex)}\r
2059
+ />\r
2060
+ </SplideSlide>\r
2061
+ ))}\r
2062
+ </Splide>\r
2063
+ }\r
2064
+ </div>\r
2065
+ <p className={\`\${P}-item-title\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...titleFieldCss }}>\r
2066
+ {item.title}\r
2067
+ </p>\r
2068
+ {type === 'B' && <p className={\`\${P}-item-subtitle\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...subtitleFieldCss }}>\r
2069
+ {item.subtitle}\r
2070
+ </p>}\r
2071
+ </div>\r
2072
+ ))}\r
2073
+ </div>\r
2074
+ </div>\r
2075
+ {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&\r
2076
+ createPortal(\r
2077
+ <div data-selection="none">\r
2078
+ <Lightbox\r
2079
+ images={lightboxImages}\r
2080
+ index={lightboxIndex}\r
2081
+ imageDisplay={imageDisplay.display}\r
2082
+ originRect={lightboxOriginRect}\r
2083
+ reverseClose={slider === 'Off'}\r
2084
+ onClose={() => setLightboxOpen(false)}\r
2085
+ onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}\r
2086
+ onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}\r
2087
+ />\r
2088
+ </div>,\r
2089
+ document.body\r
2090
+ )}\r
2091
+ </>\r
2092
+ );\r
2093
+ }\r
2094
+ \r
2095
+ type GridLayoutConfig = {\r
2096
+ entryWidth: number;\r
2097
+ horizontalGap: number;\r
2098
+ wrapperWidth: number;\r
2099
+ columnsCount: number;\r
2100
+ lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;\r
2101
+ };\r
2102
+ \r
2103
+ type GridSettings = {\r
2104
+ type: 'A' | 'B';\r
2105
+ gridLayout: GridLayoutConfig;\r
2106
+ textBoxWidth: number;\r
2107
+ verticalGap: number;\r
2108
+ entriesCount: number;\r
2109
+ lightbox: 'On' | 'Off';\r
2110
+ imageDisplay: {\r
2111
+ display: 'Fit' | 'Cover';\r
2112
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';\r
2113
+ reversed: boolean;\r
2114
+ };\r
2115
+ slider: 'On' | 'Off';\r
2116
+ sliderTiming: number;\r
2117
+ direction: 'Horizontal' | 'Vertical' | 'Random',\r
2118
+ transition: 'Fade' | 'Slide',\r
2119
+ titleColor: string;\r
2120
+ subtitleColor: string;\r
2121
+ titleFontFamily: string;\r
2122
+ titleFontSettings?: { fontWeight: number; fontStyle: string };\r
2123
+ titleFontSize?: number;\r
2124
+ titleLineHeight?: number;\r
2125
+ titleLetterSpacing?: number;\r
2126
+ titleWordSpacing?: number;\r
2127
+ titleTextAppearance?: TextStyles['textAppearance'];\r
2128
+ subtitleFontFamily: string;\r
2129
+ subtitleFontSettings?: { fontWeight: number; fontStyle: string };\r
2130
+ subtitleFontSize?: number;\r
2131
+ subtitleLineHeight?: number;\r
2132
+ subtitleLetterSpacing?: number;\r
2133
+ subtitleWordSpacing?: number;\r
2134
+ subtitleTextAppearance?: TextStyles['textAppearance'];\r
2135
+ };\r
2136
+ \r
2137
+ type ColorKeys =\r
2138
+ | 'titleColor'\r
2139
+ | 'subtitleColor'\r
2140
+ \r
2141
+ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
2142
+ titleColor: 'title-color',\r
2143
+ subtitleColor: 'subtitle-color',\r
2144
+ };\r
2145
+ \r
2146
+ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
2147
+ `,Tn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yl=["titleColor","subtitleColor"],Kl={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}]},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}]},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}]}]}},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{entryWidth:{type:"number",title:"E"},horizontalGap:{type:"number",title:"G"},wrapperWidth:{type:"number",title:"W"},columnsCount:{type:"number",title:"C",min:1,max:4}}}},textBoxWidth:{type:"number",scope:"layout",title:"Textbox Width",display:{type:"percentage-input"},min:0,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (S)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type","gridLayout",{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["textBoxWidth"]},{type:"row",title:"",items:["verticalGap"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["entriesCount"]},{type:"row",title:"",items:["lightbox"]}]}]},{type:"group",title:"Image",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["imageDisplay"]}]}]},{type:"group",title:"Slider",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["slider"]},{type:"row",title:"",items:["sliderTiming"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["direction"]},{type:"row",title:"",items:["transition"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...Yl],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Jl={element:Gl,id:"grid",name:"Neptune",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Kl,sourceCode:ql},Zl=[Ta,Ra,xl,Il,zl,Jl];exports.components=Zl;exports.isSchemaV1=bo;