@cntrl-site/components 1.0.12-alpha.3 → 1.0.12-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -114
- package/dist/index.mjs +250 -340
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Ce=require("classnames"),T=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Uo=require("react-dom");function ji(e){return e.type==="object"&&e.version===1}const Ki="ControlSlider-module__wrapper___sHEkd",Ui="ControlSlider-module__hoverArrow___A-dOH",qi="ControlSlider-module__sliderItem___QQSkR",Gi="ControlSlider-module__sliderImage___9hRl-",Yi="ControlSlider-module__arrow___05ghY",Xi="ControlSlider-module__arrowVertical___tBfVN",Zi="ControlSlider-module__nextArrow___-30Yc",Ji="ControlSlider-module__arrowInner___aEra3",Qi="ControlSlider-module__arrowIcon___S4ztF",ea="ControlSlider-module__arrowImg___2dwJW",ta="ControlSlider-module__mirror___brd6U",na="ControlSlider-module__pagination___bicLF",ra="ControlSlider-module__paginationInner___bT-P-",oa="ControlSlider-module__paginationVertical___zYqKw",ia="ControlSlider-module__paginationItem___nTRbk",aa="ControlSlider-module__dot___p1Qun",sa="ControlSlider-module__activeDot___LHFaj",la="ControlSlider-module__paginationInsideBottom___R3FWn",ca="ControlSlider-module__paginationInsideTop___V-qb-",da="ControlSlider-module__paginationOutsideBottom___14w8D",ua="ControlSlider-module__paginationOutsideTop___SCLqB",pa="ControlSlider-module__paginationInsideLeft___yOBRZ",ma="ControlSlider-module__paginationInsideRight___Rtt3o",ga="ControlSlider-module__paginationOutsideLeft___lahaw",ha="ControlSlider-module__paginationOutsideRight___EtuQa",fa="ControlSlider-module__imgWrapper___UjEgB",ya="ControlSlider-module__captionBlock___dJ6-j",va="ControlSlider-module__captionTextWrapper___HFlpf",ba="ControlSlider-module__captionText___uGBVc",xa="ControlSlider-module__active___WZK4G",Ca="ControlSlider-module__withPointerEvents___t-18M",Sa="ControlSlider-module__topLeftAlignment___zjnGM",wa="ControlSlider-module__topCenterAlignment___gD1xW",$a="ControlSlider-module__topRightAlignment___NMapS",Ta="ControlSlider-module__middleLeftAlignment___OnUrY",La="ControlSlider-module__middleCenterAlignment___Tdkl0",Ea="ControlSlider-module__middleRightAlignment___wEbfX",_a="ControlSlider-module__bottomLeftAlignment___cTP2-",Pa="ControlSlider-module__bottomCenterAlignment___c54fB",Aa="ControlSlider-module__bottomRightAlignment___kEwrz",Ra="ControlSlider-module__clickOverlay___DZA28",Ia="ControlSlider-module__contain___pLyq7",Wa="ControlSlider-module__cover___KdDat",ae={wrapper:Ki,hoverArrow:Ui,sliderItem:qi,sliderImage:Gi,arrow:Yi,arrowVertical:Xi,nextArrow:Zi,arrowInner:Ji,arrowIcon:Qi,arrowImg:ea,mirror:ta,pagination:na,paginationInner:ra,paginationVertical:oa,paginationItem:ia,dot:aa,activeDot:sa,paginationInsideBottom:la,paginationInsideTop:ca,paginationOutsideBottom:da,paginationOutsideTop:ua,paginationInsideLeft:pa,paginationInsideRight:ma,paginationOutsideLeft:ga,paginationOutsideRight:ha,imgWrapper:fa,captionBlock:ya,captionTextWrapper:va,captionText:ba,active:xa,withPointerEvents:Ca,topLeftAlignment:Sa,topCenterAlignment:wa,topRightAlignment:$a,middleLeftAlignment:Ta,middleCenterAlignment:La,middleRightAlignment:Ea,bottomLeftAlignment:_a,bottomCenterAlignment:Pa,bottomRightAlignment:Aa,clickOverlay:Ra,contain:Ia,cover:Wa};function Fa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ka(e,t,n){return t&&Fa(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var uo="(prefers-reduced-motion: reduce)",Kt=1,Ma=2,Gt=3,en=4,Cn=5,On=6,Un=7,Na={CREATED:Kt,MOUNTED:Ma,IDLE:Gt,MOVING:en,SCROLLING:Cn,DRAGGING:On,DESTROYED:Un};function bt(e){e.length=0}function At(e,t,n){return Array.prototype.slice.call(e,t,n)}function _e(e){return e.bind.apply(e,[null].concat(At(arguments,1)))}var qo=setTimeout,Sr=function(){};function po(e){return requestAnimationFrame(e)}function Jn(e,t){return typeof t===e}function un(e){return!Wr(e)&&Jn("object",e)}var Ir=Array.isArray,Go=_e(Jn,"function"),Et=_e(Jn,"string"),Sn=_e(Jn,"undefined");function Wr(e){return e===null}function Yo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function wn(e){return Ir(e)?e:[e]}function rt(e,t){wn(e).forEach(t)}function Fr(e,t){return e.indexOf(t)>-1}function Bn(e,t){return e.push.apply(e,wn(t)),e}function gt(e,t,n){e&&rt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function dt(e,t){gt(e,Et(t)?t.split(" "):t,!0)}function $n(e,t){rt(t,e.appendChild.bind(e))}function kr(e,t){rt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function pn(e,t){return Yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Xo(e,t){var n=e?At(e.children):[];return t?n.filter(function(r){return pn(r,t)}):n}function Tn(e,t){return t?Xo(e,t)[0]:e.firstElementChild}var mn=Object.keys;function Nt(e,t,n){return e&&(n?mn(e).reverse():mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function gn(e){return At(arguments,1).forEach(function(t){Nt(t,function(n,r){e[r]=t[r]})}),e}function Tt(e){return At(arguments,1).forEach(function(t){Nt(t,function(n,r){Ir(n)?e[r]=n.slice():un(n)?e[r]=Tt({},un(e[r])?e[r]:{},n):e[r]=n})}),e}function mo(e,t){rt(t||mn(e),function(n){delete e[n]})}function ut(e,t){rt(e,function(n){rt(t,function(r){n&&n.removeAttribute(r)})})}function fe(e,t,n){un(t)?Nt(t,function(r,o){fe(e,o,r)}):rt(e,function(r){Wr(n)||n===""?ut(r,t):r.setAttribute(t,String(n))})}function Ut(e,t,n){var r=document.createElement(e);return t&&(Et(t)?dt(r,t):fe(r,t)),n&&$n(n,r),r}function it(e,t,n){if(Sn(n))return getComputedStyle(e)[t];Wr(n)||(e.style[t]=""+n)}function hn(e,t){it(e,"display",t)}function Zo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function at(e,t){return e.getAttribute(t)}function go(e,t){return e&&e.classList.contains(t)}function et(e){return e.getBoundingClientRect()}function Ht(e){rt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Jo(e){return Tn(new DOMParser().parseFromString(e,"text/html").body)}function mt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Qo(e,t){return e&&e.querySelector(t)}function Mr(e,t){return t?At(e.querySelectorAll(t)):[]}function ht(e,t){gt(e,t,!1)}function wr(e){return e.timeStamp}function Ft(e){return Et(e)?e:e?e+"px":""}var Ln="splide",Nr="data-"+Ln;function cn(e,t){if(!e)throw new Error("["+Ln+"] "+(t||""))}var _t=Math.min,qn=Math.max,Gn=Math.floor,fn=Math.ceil,qe=Math.abs;function ei(e,t,n){return qe(e-t)<n}function Vn(e,t,n,r){var o=_t(t,n),s=qn(t,n);return r?o<e&&e<s:o<=e&&e<=s}function zt(e,t,n){var r=_t(t,n),o=qn(t,n);return _t(qn(r,e),o)}function $r(e){return+(e>0)-+(e<0)}function Tr(e,t){return rt(t,function(n){e=e.replace("%s",""+n)}),e}function Hr(e){return e<10?"0"+e:""+e}var ho={};function Ha(e){return""+e+Hr(ho[e]=(ho[e]||0)+1)}function ti(){var e=[];function t(i,a,c,u){o(i,a,function(d,$,h){var f="addEventListener"in d,m=f?d.removeEventListener.bind(d,$,c,u):d.removeListener.bind(d,c);f?d.addEventListener($,c,u):d.addListener(c),e.push([d,$,h,c,m])})}function n(i,a,c){o(i,a,function(u,d,$){e=e.filter(function(h){return h[0]===u&&h[1]===d&&h[2]===$&&(!c||h[3]===c)?(h[4](),!1):!0})})}function r(i,a,c){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(a,{bubbles:d,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(a,d,!1,c)),i.dispatchEvent(u),u}function o(i,a,c){rt(i,function(u){u&&rt(a,function(d){d.split(" ").forEach(function($){var h=$.split(".");c(u,h[0],h[1])})})})}function s(){e.forEach(function(i){i[4]()}),bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var Rt="mounted",Lr="ready",xt="move",tn="moved",Or="click",ni="active",ri="inactive",oi="visible",ii="hidden",Fe="refresh",je="updated",Yt="resize",Qn="resized",ai="drag",si="dragging",li="dragged",er="scroll",Vt="scrolled",Oa="overflow",Br="destroy",ci="arrows:mounted",di="arrows:updated",ui="pagination:mounted",pi="pagination:updated",Vr="navigation:mounted",Dr="autoplay:play",mi="autoplay:playing",zr="autoplay:pause",jr="lazyload:loaded",gi="sk",hi="sh",Yn="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ti();function r(s,i){n.bind(t,wn(s).join(" "),function(a){i.apply(i,Ir(a.detail)?a.detail:[])})}function o(s){n.dispatch(t,s,At(arguments,1))}return e&&e.event.on(Br,n.destroy),gn(n,{bus:t,on:r,off:_e(n.unbind,t),emit:o})}function tr(e,t,n,r){var o=Date.now,s,i=0,a,c=!0,u=0;function d(){if(!c){if(i=e?_t((o()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=o(),r&&++u>=r))return h();a=po(d)}}function $(y){y||m(),s=o()-(y?i*e:0),c=!1,a=po(d)}function h(){c=!0}function f(){s=o(),i=0,n&&n(i)}function m(){a&&cancelAnimationFrame(a),i=0,a=0,c=!0}function g(y){e=y}function C(){return c}return{start:$,rewind:f,pause:h,cancel:m,set:g,isPaused:C}}function Ba(e){var t=e;function n(o){t=o}function r(o){return Fr(wn(o),t)}return{set:n,is:r}}function Va(e,t){var n=tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Da(e,t,n){var r=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},i=ti(),a=[];function c(){var m=n.mediaQuery==="min";mn(o).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){d(o[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),d(s,uo),$()}function u(m){m&&i.destroy()}function d(m,g){var C=matchMedia(g);i.bind(C,"change",$),a.push([m,C])}function $(){var m=r.is(Un),g=n.direction,C=a.reduce(function(y,x){return Tt(y,x[1].matches?x[0]:{})},{});mo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(uo).matches&&(m?Tt(n,s):mo(n,mn(s)))}function f(m,g,C){Tt(n,m),g&&Tt(Object.getPrototypeOf(n),m),(C||!r.is(Kt))&&e.emit(je,n)}return{setup:c,destroy:u,reduce:h,set:f}}var nr="Arrow",rr=nr+"Left",or=nr+"Right",fi=nr+"Up",yi=nr+"Down",fo="rtl",ir="ttb",pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[fi,or],ArrowRight:[yi,rr]};function za(e,t,n){function r(s,i,a){a=a||n.direction;var c=a===fo&&!i?1:a===ir?0:-1;return pr[s]&&pr[s][c]||s.replace(/width|left|right/i,function(u,d){var $=pr[u.toLowerCase()][c]||u;return d>0?$.charAt(0).toUpperCase()+$.slice(1):$})}function o(s){return s*(n.direction===fo?1:-1)}return{resolve:r,orient:o}}var ft="role",qt="tabindex",ja="disabled",st="aria-",En=st+"controls",vi=st+"current",yo=st+"selected",tt=st+"label",Kr=st+"labelledby",bi=st+"hidden",Ur=st+"orientation",yn=st+"roledescription",vo=st+"live",bo=st+"busy",xo=st+"atomic",qr=[ft,qt,ja,En,vi,tt,Kr,bi,Ur,yn],pt=Ln+"__",It="is-",mr=Ln,Co=pt+"track",Ka=pt+"list",ar=pt+"slide",xi=ar+"--clone",Ua=ar+"__container",Gr=pt+"arrows",sr=pt+"arrow",Ci=sr+"--prev",Si=sr+"--next",lr=pt+"pagination",wi=lr+"__page",qa=pt+"progress",Ga=qa+"__bar",Ya=pt+"toggle",Xa=pt+"spinner",Za=pt+"sr",Ja=It+"initialized",Ot=It+"active",$i=It+"prev",Ti=It+"next",Er=It+"visible",_r=It+"loading",Li=It+"focus-in",Ei=It+"overflow",Qa=[Ot,Er,$i,Ti,_r,Li,Ei],es={slide:ar,clone:xi,arrows:Gr,arrow:sr,prev:Ci,next:Si,pagination:lr,page:wi,spinner:Xa};function ts(e,t){if(Go(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!pn(n,t);)n=n.parentElement;return n}var ns=5,So=200,_i="touchstart mousedown",gr="touchmove mousemove",hr="touchend touchcancel mouseup click";function rs(e,t,n){var r=We(e),o=r.on,s=r.bind,i=e.root,a=n.i18n,c={},u=[],d=[],$=[],h,f,m;function g(){P(),L(),x()}function C(){o(Fe,y),o(Fe,g),o(je,x),s(document,_i+" keydown",function(v){m=v.type==="keydown"},{capture:!0}),s(i,"focusin",function(){gt(i,Li,!!m)})}function y(v){var S=qr.concat("style");bt(u),ht(i,d),ht(h,$),ut([h,f],S),ut(i,v?S:["style",yn])}function x(){ht(i,d),ht(h,$),d=E(mr),$=E(Co),dt(i,d),dt(h,$),fe(i,tt,n.label),fe(i,Kr,n.labelledby)}function P(){h=_("."+Co),f=Tn(h,"."+Ka),cn(h&&f,"A track/list element is missing."),Bn(u,Xo(f,"."+ar+":not(."+xi+")")),Nt({arrows:Gr,pagination:lr,prev:Ci,next:Si,bar:Ga,toggle:Ya},function(v,S){c[S]=_("."+v)}),gn(c,{root:i,track:h,list:f,slides:u})}function L(){var v=i.id||Ha(Ln),S=n.role;i.id=v,h.id=h.id||v+"-track",f.id=f.id||v+"-list",!at(i,ft)&&i.tagName!=="SECTION"&&S&&fe(i,ft,S),fe(i,yn,a.carousel),fe(f,ft,"presentation")}function _(v){var S=Qo(i,v);return S&&ts(S,"."+mr)===i?S:void 0}function E(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===mr&&Ot]}return gn(c,{setup:g,mount:C,destroy:y})}var Xt="slide",nn="loop",_n="fade";function os(e,t,n,r){var o=We(e),s=o.on,i=o.emit,a=o.bind,c=e.Components,u=e.root,d=e.options,$=d.isNavigation,h=d.updateOnMove,f=d.i18n,m=d.pagination,g=d.slideFocus,C=c.Direction.resolve,y=at(r,"style"),x=at(r,tt),P=n>-1,L=Tn(r,"."+Ua),_;function E(){P||(r.id=u.id+"-slide"+Hr(t+1),fe(r,ft,m?"tabpanel":"group"),fe(r,yn,f.slide),fe(r,tt,x||Tr(f.slideLabel,[t+1,e.length]))),v()}function v(){a(r,"click",_e(i,Or,k)),a(r,"keydown",_e(i,gi,k)),s([tn,hi,Vt],A),s(Vr,F),h&&s(xt,V)}function S(){_=!0,o.destroy(),ht(r,Qa),ut(r,qr),fe(r,"style",y),fe(r,tt,x||"")}function F(){var M=e.splides.map(function(R){var B=R.splide.Components.Slides.getAt(t);return B?B.slide.id:""}).join(" ");fe(r,tt,Tr(f.slideX,(P?n:t)+1)),fe(r,En,M),fe(r,ft,g?"button":""),g&&ut(r,yn)}function V(){_||A()}function A(){if(!_){var M=e.index;O(),D(),gt(r,$i,t===M-1),gt(r,Ti,t===M+1)}}function O(){var M=U();M!==go(r,Ot)&&(gt(r,Ot,M),fe(r,vi,$&&M||""),i(M?ni:ri,k))}function D(){var M=w(),R=!M&&(!U()||P);if(e.state.is([en,Cn])||fe(r,bi,R||""),fe(Mr(r,d.focusableNodes||""),qt,R?-1:""),g&&fe(r,qt,R?-1:0),M!==go(r,Er)&&(gt(r,Er,M),i(M?oi:ii,k)),!M&&document.activeElement===r){var B=c.Slides.getAt(e.index);B&&Zo(B.slide)}}function j(M,R,B){it(B&&L||r,M,R)}function U(){var M=e.index;return M===t||d.cloneStatus&&M===n}function w(){if(e.is(_n))return U();var M=et(c.Elements.track),R=et(r),B=C("left",!0),te=C("right",!0);return Gn(M[B])<=fn(R[B])&&Gn(R[te])<=fn(M[te])}function N(M,R){var B=qe(M-t);return!P&&(d.rewind||e.is(nn))&&(B=_t(B,e.length-B)),B<=R}var k={index:t,slideIndex:n,slide:r,container:L,isClone:P,mount:E,destroy:S,update:A,style:j,isWithin:N};return k}function is(e,t,n){var r=We(e),o=r.on,s=r.emit,i=r.bind,a=t.Elements,c=a.slides,u=a.list,d=[];function $(){h(),o(Fe,f),o(Fe,h)}function h(){c.forEach(function(A,O){g(A,O,-1)})}function f(){_(function(A){A.destroy()}),bt(d)}function m(){_(function(A){A.update()})}function g(A,O,D){var j=os(e,O,D,A);j.mount(),d.push(j),d.sort(function(U,w){return U.index-w.index})}function C(A){return A?E(function(O){return!O.isClone}):d}function y(A){var O=t.Controller,D=O.toIndex(A),j=O.hasFocus()?1:n.perPage;return E(function(U){return Vn(U.index,D,D+j-1)})}function x(A){return E(A)[0]}function P(A,O){rt(A,function(D){if(Et(D)&&(D=Jo(D)),Yo(D)){var j=c[O];j?kr(D,j):$n(u,D),dt(D,n.classes.slide),S(D,_e(s,Yt))}}),s(Fe)}function L(A){Ht(E(A).map(function(O){return O.slide})),s(Fe)}function _(A,O){C(O).forEach(A)}function E(A){return d.filter(Go(A)?A:function(O){return Et(A)?pn(O.slide,A):Fr(wn(A),O.index)})}function v(A,O,D){_(function(j){j.style(A,O,D)})}function S(A,O){var D=Mr(A,"img"),j=D.length;j?D.forEach(function(U){i(U,"load error",function(){--j||O()})}):O()}function F(A){return A?c.length:d.length}function V(){return d.length>n.perPage}return{mount:$,destroy:f,update:m,register:g,get:C,getIn:y,getAt:x,add:P,remove:L,forEach:_,filter:E,style:v,getLength:F,isEnough:V}}function as(e,t,n){var r=We(e),o=r.on,s=r.bind,i=r.emit,a=t.Slides,c=t.Direction.resolve,u=t.Elements,d=u.root,$=u.track,h=u.list,f=a.getAt,m=a.style,g,C,y;function x(){P(),s(window,"resize load",Va(_e(i,Yt))),o([je,Fe],P),o(Yt,L)}function P(){g=n.direction===ir,it(d,"maxWidth",Ft(n.width)),it($,c("paddingLeft"),_(!1)),it($,c("paddingRight"),_(!0)),L(!0)}function L(k){var M=et(d);(k||C.width!==M.width||C.height!==M.height)&&(it($,"height",E()),m(c("marginRight"),Ft(n.gap)),m("width",S()),m("height",F(),!0),C=M,i(Qn),y!==(y=N())&&(gt(d,Ei,y),i(Oa,y)))}function _(k){var M=n.padding,R=c(k?"right":"left");return M&&Ft(M[R]||(un(M)?0:M))||"0px"}function E(){var k="";return g&&(k=v(),cn(k,"height or heightRatio is missing."),k="calc("+k+" - "+_(!1)+" - "+_(!0)+")"),k}function v(){return Ft(n.height||et(h).width*n.heightRatio)}function S(){return n.autoWidth?null:Ft(n.fixedWidth)||(g?"":V())}function F(){return Ft(n.fixedHeight)||(g?n.autoHeight?null:V():v())}function V(){var k=Ft(n.gap);return"calc((100%"+(k&&" + "+k)+")/"+(n.perPage||1)+(k&&" - "+k)+")"}function A(){return et(h)[c("width")]}function O(k,M){var R=f(k||0);return R?et(R.slide)[c("width")]+(M?0:U()):0}function D(k,M){var R=f(k);if(R){var B=et(R.slide)[c("right")],te=et(h)[c("left")];return qe(B-te)+(M?0:U())}return 0}function j(k){return D(e.length-1)-D(0)+O(0,k)}function U(){var k=f(0);return k&&parseFloat(it(k.slide,c("marginRight")))||0}function w(k){return parseFloat(it($,c("padding"+(k?"Right":"Left"))))||0}function N(){return e.is(_n)||j(!0)>A()}return{mount:x,resize:L,listSize:A,slideSize:O,sliderSize:j,totalSize:D,getPadding:w,isOverflow:N}}var ss=2;function ls(e,t,n){var r=We(e),o=r.on,s=t.Elements,i=t.Slides,a=t.Direction.resolve,c=[],u;function d(){o(Fe,$),o([je,Yt],f),(u=C())&&(m(u),t.Layout.resize(!0))}function $(){h(),d()}function h(){Ht(c),bt(c),r.destroy()}function f(){var y=C();u!==y&&(u<y||!y)&&r.emit(Fe)}function m(y){var x=i.get().slice(),P=x.length;if(P){for(;x.length<y;)Bn(x,x);Bn(x.slice(-y),x.slice(0,y)).forEach(function(L,_){var E=_<y,v=g(L.slide,_);E?kr(v,x[0].slide):$n(s.list,v),Bn(c,v),i.register(v,_-y+(E?0:P),L.index)})}}function g(y,x){var P=y.cloneNode(!0);return dt(P,n.classes.clone),P.id=e.root.id+"-clone"+Hr(x+1),P}function C(){var y=n.clones;if(!e.is(nn))y=0;else if(Sn(y)){var x=n[a("fixedWidth")]&&t.Layout.slideSize(0),P=x&&fn(et(s.track)[a("width")]/x);y=P||n[a("autoWidth")]&&e.length||n.perPage*ss}return y}return{mount:d,destroy:h}}function cs(e,t,n){var r=We(e),o=r.on,s=r.emit,i=e.state.set,a=t.Layout,c=a.slideSize,u=a.getPadding,d=a.totalSize,$=a.listSize,h=a.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,y=C.list,x=C.track,P;function L(){P=t.Transition,o([Rt,Qn,je,Fe],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function E(R,B,te,ue){R!==B&&k(R>te)&&(A(),S(V(j(),R>te),!0)),i(en),s(xt,B,te,R),P.start(B,function(){i(Gt),s(tn,B,te,R),ue&&ue()})}function v(R){S(D(R,!0))}function S(R,B){if(!e.is(_n)){var te=B?R:F(R);it(y,"transform","translate"+m("X")+"("+te+"px)"),R!==te&&s(hi)}}function F(R){if(e.is(nn)){var B=O(R),te=B>t.Controller.getEnd(),ue=B<0;(ue||te)&&(R=V(R,te))}return R}function V(R,B){var te=R-N(B),ue=h();return R-=g(ue*(fn(qe(te)/ue)||1))*(B?1:-1),R}function A(){S(j(),!0),P.cancel()}function O(R){for(var B=t.Slides.get(),te=0,ue=1/0,ie=0;ie<B.length;ie++){var me=B[ie].index,H=qe(D(me,!0)-R);if(H<=ue)ue=H,te=me;else break}return te}function D(R,B){var te=g(d(R-1)-w(R));return B?U(te):te}function j(){var R=m("left");return et(y)[R]-et(x)[R]+g(u(!1))}function U(R){return n.trimSpace&&e.is(Xt)&&(R=zt(R,0,g(h(!0)-$()))),R}function w(R){var B=n.focus;return B==="center"?($()-c(R,!0))/2:+B*c(R)||0}function N(R){return D(R?t.Controller.getEnd():0,!!n.trimSpace)}function k(R){var B=g(V(j(),R));return R?B>=0:B<=y[m("scrollWidth")]-et(x)[m("width")]}function M(R,B){B=Sn(B)?j():B;var te=R!==!0&&g(B)<g(N(!1)),ue=R!==!1&&g(B)>g(N(!0));return te||ue}return{mount:L,move:E,jump:v,translate:S,shift:V,cancel:A,toIndex:O,toPosition:D,getPosition:j,getLimit:N,exceededLimit:M,reposition:_}}function ds(e,t,n){var r=We(e),o=r.on,s=r.emit,i=t.Move,a=i.getPosition,c=i.getLimit,u=i.toPosition,d=t.Slides,$=d.isEnough,h=d.getLength,f=n.omitEnd,m=e.is(nn),g=e.is(Xt),C=_e(j,!1),y=_e(j,!0),x=n.start||0,P,L=x,_,E,v;function S(){F(),o([je,Fe,Yn],F),o(Qn,V)}function F(){_=h(!0),E=n.perMove,v=n.perPage,P=k();var H=zt(x,0,f?P:_-1);H!==x&&(x=H,i.reposition())}function V(){P!==k()&&s(Yn)}function A(H,Q,G){if(!me()){var Y=D(H),oe=N(Y);oe>-1&&(Q||oe!==x)&&(te(oe),i.move(Y,oe,L,G))}}function O(H,Q,G,Y){t.Scroll.scroll(H,Q,G,function(){var oe=N(i.toIndex(a()));te(f?_t(oe,P):oe),Y&&Y()})}function D(H){var Q=x;if(Et(H)){var G=H.match(/([+\-<>])(\d+)?/)||[],Y=G[1],oe=G[2];Y==="+"||Y==="-"?Q=U(x+ +(""+Y+(+oe||1)),x):Y===">"?Q=oe?M(+oe):C(!0):Y==="<"&&(Q=y(!0))}else Q=m?H:zt(H,0,P);return Q}function j(H,Q){var G=E||(ie()?1:v),Y=U(x+G*(H?-1:1),x,!(E||ie()));return Y===-1&&g&&!ei(a(),c(!H),1)?H?0:P:Q?Y:N(Y)}function U(H,Q,G){if($()||ie()){var Y=w(H);Y!==H&&(Q=H,H=Y,G=!1),H<0||H>P?!E&&(Vn(0,H,Q,!0)||Vn(P,Q,H,!0))?H=M(R(H)):m?H=G?H<0?-(_%v||v):_:H:n.rewind?H=H<0?P:0:H=-1:G&&H!==Q&&(H=M(R(Q)+(H<Q?-1:1)))}else H=-1;return H}function w(H){if(g&&n.trimSpace==="move"&&H!==x)for(var Q=a();Q===u(H,!0)&&Vn(H,0,e.length-1,!n.rewind);)H<x?--H:++H;return H}function N(H){return m?(H+_)%_||0:H}function k(){for(var H=_-(ie()||m&&E?1:v);f&&H-- >0;)if(u(_-1,!0)!==u(H,!0)){H++;break}return zt(H,0,_-1)}function M(H){return zt(ie()?H:v*H,0,P)}function R(H){return ie()?_t(H,P):Gn((H>=P?_-1:H)/v)}function B(H){var Q=i.toIndex(H);return g?zt(Q,0,P):Q}function te(H){H!==x&&(L=x,x=H)}function ue(H){return H?L:x}function ie(){return!Sn(n.focus)||n.isNavigation}function me(){return e.state.is([en,Cn])&&!!n.waitForTransition}return{mount:S,go:A,scroll:O,getNext:C,getPrev:y,getAdjacent:j,getEnd:k,setIndex:te,getIndex:ue,toIndex:M,toPage:R,toDest:B,hasFocus:ie,isBusy:me}}var us="http://www.w3.org/2000/svg",ps="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",In=40;function ms(e,t,n){var r=We(e),o=r.on,s=r.bind,i=r.emit,a=n.classes,c=n.i18n,u=t.Elements,d=t.Controller,$=u.arrows,h=u.track,f=$,m=u.prev,g=u.next,C,y,x={};function P(){_(),o(je,L)}function L(){E(),P()}function _(){var O=n.arrows;O&&!(m&&g)&&F(),m&&g&&(gn(x,{prev:m,next:g}),hn(f,O?"":"none"),dt(f,y=Gr+"--"+n.direction),O&&(v(),A(),fe([m,g],En,h.id),i(ci,m,g)))}function E(){r.destroy(),ht(f,y),C?(Ht($?[m,g]:f),m=g=null):ut([m,g],qr)}function v(){o([Rt,tn,Fe,Vt,Yn],A),s(g,"click",_e(S,">")),s(m,"click",_e(S,"<"))}function S(O){d.go(O,!0)}function F(){f=$||Ut("div",a.arrows),m=V(!0),g=V(!1),C=!0,$n(f,[m,g]),!$&&kr(f,h)}function V(O){var D='<button class="'+a.arrow+" "+(O?a.prev:a.next)+'" type="button"><svg xmlns="'+us+'" viewBox="0 0 '+In+" "+In+'" width="'+In+'" height="'+In+'" focusable="false"><path d="'+(n.arrowPath||ps)+'" />';return Jo(D)}function A(){if(m&&g){var O=e.index,D=d.getPrev(),j=d.getNext(),U=D>-1&&O<D?c.last:c.prev,w=j>-1&&O>j?c.first:c.next;m.disabled=D<0,g.disabled=j<0,fe(m,tt,U),fe(g,tt,w),i(di,m,g,D,j)}}return{arrows:x,mount:P,destroy:E,update:A}}var gs=Nr+"-interval";function hs(e,t,n){var r=We(e),o=r.on,s=r.bind,i=r.emit,a=tr(n.interval,e.go.bind(e,">"),v),c=a.isPaused,u=t.Elements,d=t.Elements,$=d.root,h=d.toggle,f=n.autoplay,m,g,C=f==="pause";function y(){f&&(x(),h&&fe(h,En,u.track.id),C||P(),E())}function x(){n.pauseOnHover&&s($,"mouseenter mouseleave",function(F){m=F.type==="mouseenter",_()}),n.pauseOnFocus&&s($,"focusin focusout",function(F){g=F.type==="focusin",_()}),h&&s(h,"click",function(){C?P():L(!0)}),o([xt,er,Fe],a.rewind),o(xt,S)}function P(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=C=!1,E(),i(Dr))}function L(F){F===void 0&&(F=!0),C=!!F,E(),c()||(a.pause(),i(zr))}function _(){C||(m||g?L(!1):P())}function E(){h&&(gt(h,Ot,!C),fe(h,tt,n.i18n[C?"play":"pause"]))}function v(F){var V=u.bar;V&&it(V,"width",F*100+"%"),i(mi,F)}function S(F){var V=t.Slides.getAt(F);a.set(V&&+at(V.slide,gs)||n.interval)}return{mount:y,destroy:a.cancel,play:P,pause:L,isPaused:c}}function fs(e,t,n){var r=We(e),o=r.on;function s(){n.cover&&(o(jr,_e(a,!0)),o([Rt,je,Fe],_e(i,!0)))}function i(c){t.Slides.forEach(function(u){var d=Tn(u.container||u.slide,"img");d&&d.src&&a(c,d,u)})}function a(c,u,d){d.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),hn(u,c?"none":"")}return{mount:s,destroy:_e(i,!1)}}var ys=10,vs=600,bs=.6,xs=1.5,Cs=800;function Ss(e,t,n){var r=We(e),o=r.on,s=r.emit,i=e.state.set,a=t.Move,c=a.getPosition,u=a.getLimit,d=a.exceededLimit,$=a.translate,h=e.is(Xt),f,m,g=1;function C(){o(xt,L),o([je,Fe],_)}function y(v,S,F,V,A){var O=c();if(L(),F&&(!h||!d())){var D=t.Layout.sliderSize(),j=$r(v)*D*Gn(qe(v)/D)||0;v=a.toPosition(t.Controller.toDest(v%D))+j}var U=ei(O,v,1);g=1,S=U?0:S||qn(qe(v-O)/xs,Cs),m=V,f=tr(S,x,_e(P,O,v,A),1),i(Cn),s(er),f.start()}function x(){i(Gt),m&&m(),s(Vt)}function P(v,S,F,V){var A=c(),O=v+(S-v)*E(V),D=(O-A)*g;$(A+D),h&&!F&&d()&&(g*=bs,qe(D)<ys&&y(u(d(!0)),vs,!1,m,!0))}function L(){f&&f.cancel()}function _(){f&&!f.isPaused()&&(L(),x())}function E(v){var S=n.easingFunc;return S?S(v):1-Math.pow(1-v,4)}return{mount:C,destroy:L,scroll:y,cancel:_}}var jt={passive:!1,capture:!0};function ws(e,t,n){var r=We(e),o=r.on,s=r.emit,i=r.bind,a=r.unbind,c=e.state,u=t.Move,d=t.Scroll,$=t.Controller,h=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,y=u.getPosition,x=u.exceededLimit,P,L,_,E,v,S=!1,F,V,A;function O(){i(h,gr,Sr,jt),i(h,hr,Sr,jt),i(h,_i,j,jt),i(h,"click",N,{capture:!0}),i(h,"dragstart",mt),o([Rt,je],D)}function D(){var I=n.drag;ne(!I),E=I==="free"}function j(I){if(F=!1,!V){var b=oe(I);Y(I.target)&&(b||!I.button)&&($.isBusy()?mt(I,!0):(A=b?h:window,v=c.is([en,Cn]),_=null,i(A,gr,U,jt),i(A,hr,w,jt),u.cancel(),d.cancel(),k(I)))}}function U(I){if(c.is(On)||(c.set(On),s(ai)),I.cancelable)if(v){u.translate(P+G(ie(I)));var b=me(I)>So,z=S!==(S=x());(b||z)&&k(I),F=!0,s(si),mt(I)}else B(I)&&(v=R(I),mt(I))}function w(I){c.is(On)&&(c.set(Gt),s(li)),v&&(M(I),mt(I)),a(A,gr,U),a(A,hr,w),v=!1}function N(I){!V&&F&&mt(I,!0)}function k(I){_=L,L=I,P=y()}function M(I){var b=te(I),z=ue(b),q=n.rewind&&n.rewindByDrag;f(!1),E?$.scroll(z,0,n.snap):e.is(_n)?$.go(C($r(b))<0?q?"<":"-":q?">":"+"):e.is(Xt)&&S&&q?$.go(x(!0)?">":"<"):$.go($.toDest(z),!0),f(!0)}function R(I){var b=n.dragMinThreshold,z=un(b),q=z&&b.mouse||0,J=(z?b.touch:+b)||10;return qe(ie(I))>(oe(I)?J:q)}function B(I){return qe(ie(I))>qe(ie(I,!0))}function te(I){if(e.is(nn)||!S){var b=me(I);if(b&&b<So)return ie(I)/b}return 0}function ue(I){return y()+$r(I)*_t(qe(I)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(I,b){return Q(I,b)-Q(H(I),b)}function me(I){return wr(I)-wr(H(I))}function H(I){return L===I&&_||L}function Q(I,b){return(oe(I)?I.changedTouches[0]:I)["page"+g(b?"Y":"X")]}function G(I){return I/(S&&e.is(Xt)?ns:1)}function Y(I){var b=n.noDrag;return!pn(I,"."+wi+", ."+sr)&&(!b||!pn(I,b))}function oe(I){return typeof TouchEvent<"u"&&I instanceof TouchEvent}function W(){return v}function ne(I){V=I}return{mount:O,disable:ne,isDragging:W}}var $s={Spacebar:" ",Right:or,Left:rr,Up:fi,Down:yi};function Yr(e){return e=Et(e)?e:e.key,$s[e]||e}var wo="keydown";function Ts(e,t,n){var r=We(e),o=r.on,s=r.bind,i=r.unbind,a=e.root,c=t.Direction.resolve,u,d;function $(){h(),o(je,f),o(je,h),o(xt,g)}function h(){var y=n.keyboard;y&&(u=y==="global"?window:a,s(u,wo,C))}function f(){i(u,wo)}function m(y){d=y}function g(){var y=d;d=!0,qo(function(){d=y})}function C(y){if(!d){var x=Yr(y);x===c(rr)?e.go("<"):x===c(or)&&e.go(">")}}return{mount:$,destroy:f,disable:m}}var dn=Nr+"-lazy",Dn=dn+"-srcset",Ls="["+dn+"], ["+Dn+"]";function Es(e,t,n){var r=We(e),o=r.on,s=r.off,i=r.bind,a=r.emit,c=n.lazyLoad==="sequential",u=[tn,Vt],d=[];function $(){n.lazyLoad&&(h(),o(Fe,h))}function h(){bt(d),f(),c?y():(s(u),o(u,m),m())}function f(){t.Slides.forEach(function(x){Mr(x.slide,Ls).forEach(function(P){var L=at(P,dn),_=at(P,Dn);if(L!==P.src||_!==P.srcset){var E=n.classes.spinner,v=P.parentElement,S=Tn(v,"."+E)||Ut("span",E,v);d.push([P,x,S]),P.src||hn(P,"none")}})})}function m(){d=d.filter(function(x){var P=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,P)?g(x):!0}),d.length||s(u)}function g(x){var P=x[0];dt(x[1].slide,_r),i(P,"load error",_e(C,x)),fe(P,"src",at(P,dn)),fe(P,"srcset",at(P,Dn)),ut(P,dn),ut(P,Dn)}function C(x,P){var L=x[0],_=x[1];ht(_.slide,_r),P.type!=="error"&&(Ht(x[2]),hn(L,""),a(jr,L,_),a(Yt)),c&&y()}function y(){d.length&&g(d.shift())}return{mount:$,destroy:_e(bt,d),check:m}}function _s(e,t,n){var r=We(e),o=r.on,s=r.emit,i=r.bind,a=t.Slides,c=t.Elements,u=t.Controller,d=u.hasFocus,$=u.getIndex,h=u.go,f=t.Direction.resolve,m=c.pagination,g=[],C,y;function x(){P(),o([je,Fe,Yn],x);var V=n.pagination;m&&hn(m,V?"":"none"),V&&(o([xt,er,Vt],F),L(),F(),s(ui,{list:C,items:g},S(e.index)))}function P(){C&&(Ht(m?At(C.children):C),ht(C,y),bt(g),C=null),r.destroy()}function L(){var V=e.length,A=n.classes,O=n.i18n,D=n.perPage,j=d()?u.getEnd()+1:fn(V/D);C=m||Ut("ul",A.pagination,c.track.parentElement),dt(C,y=lr+"--"+v()),fe(C,ft,"tablist"),fe(C,tt,O.select),fe(C,Ur,v()===ir?"vertical":"");for(var U=0;U<j;U++){var w=Ut("li",null,C),N=Ut("button",{class:A.page,type:"button"},w),k=a.getIn(U).map(function(R){return R.slide.id}),M=!d()&&D>1?O.pageX:O.slideX;i(N,"click",_e(_,U)),n.paginationKeyboard&&i(N,"keydown",_e(E,U)),fe(w,ft,"presentation"),fe(N,ft,"tab"),fe(N,En,k.join(" ")),fe(N,tt,Tr(M,U+1)),fe(N,qt,-1),g.push({li:w,button:N,page:U})}}function _(V){h(">"+V,!0)}function E(V,A){var O=g.length,D=Yr(A),j=v(),U=-1;D===f(or,!1,j)?U=++V%O:D===f(rr,!1,j)?U=(--V+O)%O:D==="Home"?U=0:D==="End"&&(U=O-1);var w=g[U];w&&(Zo(w.button),h(">"+U),mt(A,!0))}function v(){return n.paginationDirection||n.direction}function S(V){return g[u.toPage(V)]}function F(){var V=S($(!0)),A=S($());if(V){var O=V.button;ht(O,Ot),ut(O,yo),fe(O,qt,-1)}if(A){var D=A.button;dt(D,Ot),fe(D,yo,!0),fe(D,qt,"")}s(pi,{list:C,items:g},V,A)}return{items:g,mount:x,destroy:P,getAt:S,update:F}}var Ps=[" ","Enter"];function As(e,t,n){var r=n.isNavigation,o=n.slideFocus,s=[];function i(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),r&&d()}function a(){s.forEach(function(m){m.destroy()}),bt(s)}function c(){a(),i()}function u(m,g){var C=We(m);C.on(xt,function(y,x,P){g.go(g.is(nn)?P:y)}),s.push(C)}function d(){var m=We(e),g=m.on;g(Or,h),g(gi,f),g([Rt,je],$),s.push(m),m.emit(Vr,e.splides)}function $(){fe(t.Elements.list,Ur,n.direction===ir?"vertical":"")}function h(m){e.go(m.index)}function f(m,g){Fr(Ps,Yr(g))&&(h(m),mt(g))}return{setup:_e(t.Media.set,{slideFocus:Sn(o)?r:o},!0),mount:i,destroy:a,remount:c}}function Rs(e,t,n){var r=We(e),o=r.bind,s=0;function i(){n.wheel&&o(t.Elements.track,"wheel",a,jt)}function a(u){if(u.cancelable){var d=u.deltaY,$=d<0,h=wr(u),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;qe(d)>f&&h-s>m&&(e.go($?"<":">"),s=h),c($)&&mt(u)}}function c(u){return!n.releaseWheel||e.state.is(en)||t.Controller.getAdjacent(u)!==-1}return{mount:i}}var Is=90;function Ws(e,t,n){var r=We(e),o=r.on,s=t.Elements.track,i=n.live&&!n.isNavigation,a=Ut("span",Za),c=tr(Is,_e(d,!1));function u(){i&&(h(!t.Autoplay.isPaused()),fe(s,xo,!0),a.textContent="…",o(Dr,_e(h,!0)),o(zr,_e(h,!1)),o([tn,Vt],_e(d,!0)))}function d(f){fe(s,bo,f),f?($n(s,a),c.start()):(Ht(a),c.cancel())}function $(){ut(s,[vo,xo,bo]),Ht(a)}function h(f){i&&fe(s,vo,f?"off":"polite")}return{mount:u,disable:h,destroy:$}}var Fs=Object.freeze({__proto__:null,Media:Da,Direction:za,Elements:rs,Slides:is,Layout:as,Clones:ls,Move:cs,Controller:ds,Arrows:ms,Autoplay:hs,Cover:fs,Scroll:Ss,Drag:ws,Keyboard:Ts,LazyLoad:Es,Pagination:_s,Sync:As,Wheel:Rs,Live:Ws}),ks={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"},Ms={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:es,i18n:ks,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ns(e,t,n){var r=t.Slides;function o(){We(e).on([Rt,Fe],s)}function s(){r.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function i(a,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),qo(c)}return{mount:o,start:i,cancel:Sr}}function Hs(e,t,n){var r=t.Move,o=t.Controller,s=t.Scroll,i=t.Elements.list,a=_e(it,i,"transition"),c;function u(){We(e).bind(i,"transitionend",function(f){f.target===i&&c&&($(),c())})}function d(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),y=h(f);qe(g-C)>=1&&y>=1?n.useScroll?s.scroll(g,y,!1,m):(a("transform "+y+"ms "+n.easing),r.translate(g,!0),c=m):(r.jump(f),m())}function $(){a(""),s.cancel()}function h(f){var m=n.rewindSpeed;if(e.is(Xt)&&m){var g=o.getIndex(!0),C=o.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:u,start:d,cancel:$}}var Os=(function(){function e(n,r){this.event=We(),this.Components={},this.state=Ba(Kt),this.splides=[],this._o={},this._E={};var o=Et(n)?Qo(document,n):n;cn(o,o+" is invalid."),this.root=o,r=Tt({label:at(o,tt)||"",labelledby:at(o,Kr)||""},Ms,e.defaults,r||{});try{Tt(r,JSON.parse(at(o,Nr)))}catch{cn(!1,"Invalid JSON")}this._o=Object.create(Tt({},r))}var t=e.prototype;return t.mount=function(r,o){var s=this,i=this.state,a=this.Components;cn(i.is([Kt,Un]),"Already mounted!"),i.set(Kt),this._C=a,this._T=o||this._T||(this.is(_n)?Ns:Hs),this._E=r||this._E;var c=gn({},Fs,this._E,{Transition:this._T});return Nt(c,function(u,d){var $=u(s,a,s._o);a[d]=$,$.setup&&$.setup()}),Nt(a,function(u){u.mount&&u.mount()}),this.emit(Rt),dt(this.root,Ja),i.set(Gt),this.emit(Lr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(Gt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(At(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Fe),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,s=this.state;return s.is(Kt)?We(this).on(Lr,this.destroy.bind(this,r)):(Nt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Br),o.destroy(),r&&bt(this.splides),s.set(Un)),this},ka(e,[{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()}}]),e})(),Xr=Os;Xr.defaults={};Xr.STATES=Na;var $o=[[Rt,"onMounted"],[Lr,"onReady"],[xt,"onMove"],[tn,"onMoved"],[Or,"onClick"],[ni,"onActive"],[ri,"onInactive"],[oi,"onVisible"],[ii,"onHidden"],[Fe,"onRefresh"],[je,"onUpdated"],[Yt,"onResize"],[Qn,"onResized"],[ai,"onDrag"],[si,"onDragging"],[li,"onDragged"],[er,"onScroll"],[Vt,"onScrolled"],[Br,"onDestroy"],[ci,"onArrowsMounted"],[di,"onArrowsUpdated"],[ui,"onPaginationMounted"],[pi,"onPaginationUpdated"],[Vr,"onNavigationMounted"],[Dr,"onAutoplayPlay"],[mi,"onAutoplayPlaying"],[zr,"onAutoplayPause"],[jr,"onLazyLoadLoaded"]];function Zr(...e){return e.filter(Boolean).join(" ")}function Xn(e){return e!==null&&typeof e=="object"}function Pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Pr(n,t[r]));if(Xn(e)&&Xn(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Pr(e[o],t[o]))}return e===t}function Bs(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Vs(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Ar(e,t){const n=e;return Vs(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():Xn(r)?n[o]=Ar(Xn(n[o])?n[o]:{},r):n[o]=r}),n}var Ds=({children:e,className:t,...n})=>p.createElement("div",{className:Zr("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),Jr=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Xr(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ar({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Pr(this.options,e)&&(this.splide.options=e,this.options=Ar({},e));const t=this.getSlides();Bs(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){$o.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return p.createElement(t,{className:Zr("splide",e),ref:this.splideRef,...this.omit(o,["options",...$o.map(s=>s[1])])},n?p.createElement(Ds,null,r):r)}},Qr=({children:e,className:t,...n})=>p.createElement("li",{className:Zr("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Ce=require("classnames"),T=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ki=require("react-dom");function jo(e){return e.type==="object"&&e.version===1}const Ko="ControlSlider-module__wrapper___sHEkd",Uo="ControlSlider-module__hoverArrow___A-dOH",qo="ControlSlider-module__sliderItem___QQSkR",Go="ControlSlider-module__sliderImage___9hRl-",Yo="ControlSlider-module__arrow___05ghY",Xo="ControlSlider-module__arrowVertical___tBfVN",Zo="ControlSlider-module__nextArrow___-30Yc",Jo="ControlSlider-module__arrowInner___aEra3",Qo="ControlSlider-module__arrowIcon___S4ztF",ea="ControlSlider-module__arrowImg___2dwJW",ta="ControlSlider-module__mirror___brd6U",na="ControlSlider-module__pagination___bicLF",ra="ControlSlider-module__paginationInner___bT-P-",ia="ControlSlider-module__paginationVertical___zYqKw",oa="ControlSlider-module__paginationItem___nTRbk",aa="ControlSlider-module__dot___p1Qun",sa="ControlSlider-module__activeDot___LHFaj",la="ControlSlider-module__paginationInsideBottom___R3FWn",ca="ControlSlider-module__paginationInsideTop___V-qb-",da="ControlSlider-module__paginationOutsideBottom___14w8D",ua="ControlSlider-module__paginationOutsideTop___SCLqB",pa="ControlSlider-module__paginationInsideLeft___yOBRZ",ma="ControlSlider-module__paginationInsideRight___Rtt3o",ga="ControlSlider-module__paginationOutsideLeft___lahaw",ha="ControlSlider-module__paginationOutsideRight___EtuQa",fa="ControlSlider-module__imgWrapper___UjEgB",ya="ControlSlider-module__captionBlock___dJ6-j",va="ControlSlider-module__captionTextWrapper___HFlpf",ba="ControlSlider-module__captionText___uGBVc",xa="ControlSlider-module__active___WZK4G",Ca="ControlSlider-module__withPointerEvents___t-18M",Sa="ControlSlider-module__topLeftAlignment___zjnGM",wa="ControlSlider-module__topCenterAlignment___gD1xW",$a="ControlSlider-module__topRightAlignment___NMapS",Ta="ControlSlider-module__middleLeftAlignment___OnUrY",La="ControlSlider-module__middleCenterAlignment___Tdkl0",Ea="ControlSlider-module__middleRightAlignment___wEbfX",_a="ControlSlider-module__bottomLeftAlignment___cTP2-",Pa="ControlSlider-module__bottomCenterAlignment___c54fB",Aa="ControlSlider-module__bottomRightAlignment___kEwrz",Ra="ControlSlider-module__clickOverlay___DZA28",Ia="ControlSlider-module__contain___pLyq7",Wa="ControlSlider-module__cover___KdDat",ae={wrapper:Ko,hoverArrow:Uo,sliderItem:qo,sliderImage:Go,arrow:Yo,arrowVertical:Xo,nextArrow:Zo,arrowInner:Jo,arrowIcon:Qo,arrowImg:ea,mirror:ta,pagination:na,paginationInner:ra,paginationVertical:ia,paginationItem:oa,dot:aa,activeDot:sa,paginationInsideBottom:la,paginationInsideTop:ca,paginationOutsideBottom:da,paginationOutsideTop:ua,paginationInsideLeft:pa,paginationInsideRight:ma,paginationOutsideLeft:ga,paginationOutsideRight:ha,imgWrapper:fa,captionBlock:ya,captionTextWrapper:va,captionText:ba,active:xa,withPointerEvents:Ca,topLeftAlignment:Sa,topCenterAlignment:wa,topRightAlignment:$a,middleLeftAlignment:Ta,middleCenterAlignment:La,middleRightAlignment:Ea,bottomLeftAlignment:_a,bottomCenterAlignment:Pa,bottomRightAlignment:Aa,clickOverlay:Ra,contain:Ia,cover:Wa};function ka(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fa(e,t,n){return t&&ka(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var di="(prefers-reduced-motion: reduce)",Kt=1,Ma=2,Gt=3,en=4,Cn=5,On=6,Un=7,Na={CREATED:Kt,MOUNTED:Ma,IDLE:Gt,MOVING:en,SCROLLING:Cn,DRAGGING:On,DESTROYED:Un};function bt(e){e.length=0}function At(e,t,n){return Array.prototype.slice.call(e,t,n)}function _e(e){return e.bind.apply(e,[null].concat(At(arguments,1)))}var Ui=setTimeout,Sr=function(){};function ui(e){return requestAnimationFrame(e)}function Jn(e,t){return typeof t===e}function un(e){return!Wr(e)&&Jn("object",e)}var Ir=Array.isArray,qi=_e(Jn,"function"),Et=_e(Jn,"string"),Sn=_e(Jn,"undefined");function Wr(e){return e===null}function Gi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function wn(e){return Ir(e)?e:[e]}function rt(e,t){wn(e).forEach(t)}function kr(e,t){return e.indexOf(t)>-1}function Bn(e,t){return e.push.apply(e,wn(t)),e}function gt(e,t,n){e&&rt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function dt(e,t){gt(e,Et(t)?t.split(" "):t,!0)}function $n(e,t){rt(t,e.appendChild.bind(e))}function Fr(e,t){rt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function pn(e,t){return Gi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Yi(e,t){var n=e?At(e.children):[];return t?n.filter(function(r){return pn(r,t)}):n}function Tn(e,t){return t?Yi(e,t)[0]:e.firstElementChild}var mn=Object.keys;function Nt(e,t,n){return e&&(n?mn(e).reverse():mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function gn(e){return At(arguments,1).forEach(function(t){Nt(t,function(n,r){e[r]=t[r]})}),e}function Tt(e){return At(arguments,1).forEach(function(t){Nt(t,function(n,r){Ir(n)?e[r]=n.slice():un(n)?e[r]=Tt({},un(e[r])?e[r]:{},n):e[r]=n})}),e}function pi(e,t){rt(t||mn(e),function(n){delete e[n]})}function ut(e,t){rt(e,function(n){rt(t,function(r){n&&n.removeAttribute(r)})})}function fe(e,t,n){un(t)?Nt(t,function(r,i){fe(e,i,r)}):rt(e,function(r){Wr(n)||n===""?ut(r,t):r.setAttribute(t,String(n))})}function Ut(e,t,n){var r=document.createElement(e);return t&&(Et(t)?dt(r,t):fe(r,t)),n&&$n(n,r),r}function ot(e,t,n){if(Sn(n))return getComputedStyle(e)[t];Wr(n)||(e.style[t]=""+n)}function hn(e,t){ot(e,"display",t)}function Xi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function at(e,t){return e.getAttribute(t)}function mi(e,t){return e&&e.classList.contains(t)}function et(e){return e.getBoundingClientRect()}function Ht(e){rt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Zi(e){return Tn(new DOMParser().parseFromString(e,"text/html").body)}function mt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ji(e,t){return e&&e.querySelector(t)}function Mr(e,t){return t?At(e.querySelectorAll(t)):[]}function ht(e,t){gt(e,t,!1)}function wr(e){return e.timeStamp}function kt(e){return Et(e)?e:e?e+"px":""}var Ln="splide",Nr="data-"+Ln;function cn(e,t){if(!e)throw new Error("["+Ln+"] "+(t||""))}var _t=Math.min,qn=Math.max,Gn=Math.floor,fn=Math.ceil,qe=Math.abs;function Qi(e,t,n){return qe(e-t)<n}function Vn(e,t,n,r){var i=_t(t,n),s=qn(t,n);return r?i<e&&e<s:i<=e&&e<=s}function zt(e,t,n){var r=_t(t,n),i=qn(t,n);return _t(qn(r,e),i)}function $r(e){return+(e>0)-+(e<0)}function Tr(e,t){return rt(t,function(n){e=e.replace("%s",""+n)}),e}function Hr(e){return e<10?"0"+e:""+e}var gi={};function Ha(e){return""+e+Hr(gi[e]=(gi[e]||0)+1)}function eo(){var e=[];function t(o,a,c,u){i(o,a,function(d,$,h){var f="addEventListener"in d,m=f?d.removeEventListener.bind(d,$,c,u):d.removeListener.bind(d,c);f?d.addEventListener($,c,u):d.addListener(c),e.push([d,$,h,c,m])})}function n(o,a,c){i(o,a,function(u,d,$){e=e.filter(function(h){return h[0]===u&&h[1]===d&&h[2]===$&&(!c||h[3]===c)?(h[4](),!1):!0})})}function r(o,a,c){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(a,{bubbles:d,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(a,d,!1,c)),o.dispatchEvent(u),u}function i(o,a,c){rt(o,function(u){u&&rt(a,function(d){d.split(" ").forEach(function($){var h=$.split(".");c(u,h[0],h[1])})})})}function s(){e.forEach(function(o){o[4]()}),bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:s}}var Rt="mounted",Lr="ready",xt="move",tn="moved",Or="click",to="active",no="inactive",ro="visible",io="hidden",ke="refresh",je="updated",Yt="resize",Qn="resized",oo="drag",ao="dragging",so="dragged",er="scroll",Vt="scrolled",Oa="overflow",Br="destroy",lo="arrows:mounted",co="arrows:updated",uo="pagination:mounted",po="pagination:updated",Vr="navigation:mounted",Dr="autoplay:play",mo="autoplay:playing",zr="autoplay:pause",jr="lazyload:loaded",go="sk",ho="sh",Yn="ei";function We(e){var t=e?e.event.bus:document.createDocumentFragment(),n=eo();function r(s,o){n.bind(t,wn(s).join(" "),function(a){o.apply(o,Ir(a.detail)?a.detail:[])})}function i(s){n.dispatch(t,s,At(arguments,1))}return e&&e.event.on(Br,n.destroy),gn(n,{bus:t,on:r,off:_e(n.unbind,t),emit:i})}function tr(e,t,n,r){var i=Date.now,s,o=0,a,c=!0,u=0;function d(){if(!c){if(o=e?_t((i()-s)/e,1):1,n&&n(o),o>=1&&(t(),s=i(),r&&++u>=r))return h();a=ui(d)}}function $(y){y||m(),s=i()-(y?o*e:0),c=!1,a=ui(d)}function h(){c=!0}function f(){s=i(),o=0,n&&n(o)}function m(){a&&cancelAnimationFrame(a),o=0,a=0,c=!0}function g(y){e=y}function C(){return c}return{start:$,rewind:f,pause:h,cancel:m,set:g,isPaused:C}}function Ba(e){var t=e;function n(i){t=i}function r(i){return kr(wn(i),t)}return{set:n,is:r}}function Va(e,t){var n=tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Da(e,t,n){var r=e.state,i=n.breakpoints||{},s=n.reducedMotion||{},o=eo(),a=[];function c(){var m=n.mediaQuery==="min";mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){d(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),d(s,di),$()}function u(m){m&&o.destroy()}function d(m,g){var C=matchMedia(g);o.bind(C,"change",$),a.push([m,C])}function $(){var m=r.is(Un),g=n.direction,C=a.reduce(function(y,x){return Tt(y,x[1].matches?x[0]:{})},{});pi(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(u(!0),e.mount()):g!==n.direction&&e.refresh()}function h(m){matchMedia(di).matches&&(m?Tt(n,s):pi(n,mn(s)))}function f(m,g,C){Tt(n,m),g&&Tt(Object.getPrototypeOf(n),m),(C||!r.is(Kt))&&e.emit(je,n)}return{setup:c,destroy:u,reduce:h,set:f}}var nr="Arrow",rr=nr+"Left",ir=nr+"Right",fo=nr+"Up",yo=nr+"Down",hi="rtl",or="ttb",pr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[fo,ir],ArrowRight:[yo,rr]};function za(e,t,n){function r(s,o,a){a=a||n.direction;var c=a===hi&&!o?1:a===or?0:-1;return pr[s]&&pr[s][c]||s.replace(/width|left|right/i,function(u,d){var $=pr[u.toLowerCase()][c]||u;return d>0?$.charAt(0).toUpperCase()+$.slice(1):$})}function i(s){return s*(n.direction===hi?1:-1)}return{resolve:r,orient:i}}var ft="role",qt="tabindex",ja="disabled",st="aria-",En=st+"controls",vo=st+"current",fi=st+"selected",tt=st+"label",Kr=st+"labelledby",bo=st+"hidden",Ur=st+"orientation",yn=st+"roledescription",yi=st+"live",vi=st+"busy",bi=st+"atomic",qr=[ft,qt,ja,En,vo,tt,Kr,bo,Ur,yn],pt=Ln+"__",It="is-",mr=Ln,xi=pt+"track",Ka=pt+"list",ar=pt+"slide",xo=ar+"--clone",Ua=ar+"__container",Gr=pt+"arrows",sr=pt+"arrow",Co=sr+"--prev",So=sr+"--next",lr=pt+"pagination",wo=lr+"__page",qa=pt+"progress",Ga=qa+"__bar",Ya=pt+"toggle",Xa=pt+"spinner",Za=pt+"sr",Ja=It+"initialized",Ot=It+"active",$o=It+"prev",To=It+"next",Er=It+"visible",_r=It+"loading",Lo=It+"focus-in",Eo=It+"overflow",Qa=[Ot,Er,$o,To,_r,Lo,Eo],es={slide:ar,clone:xo,arrows:Gr,arrow:sr,prev:Co,next:So,pagination:lr,page:wo,spinner:Xa};function ts(e,t){if(qi(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!pn(n,t);)n=n.parentElement;return n}var ns=5,Ci=200,_o="touchstart mousedown",gr="touchmove mousemove",hr="touchend touchcancel mouseup click";function rs(e,t,n){var r=We(e),i=r.on,s=r.bind,o=e.root,a=n.i18n,c={},u=[],d=[],$=[],h,f,m;function g(){P(),L(),x()}function C(){i(ke,y),i(ke,g),i(je,x),s(document,_o+" keydown",function(v){m=v.type==="keydown"},{capture:!0}),s(o,"focusin",function(){gt(o,Lo,!!m)})}function y(v){var S=qr.concat("style");bt(u),ht(o,d),ht(h,$),ut([h,f],S),ut(o,v?S:["style",yn])}function x(){ht(o,d),ht(h,$),d=E(mr),$=E(xi),dt(o,d),dt(h,$),fe(o,tt,n.label),fe(o,Kr,n.labelledby)}function P(){h=_("."+xi),f=Tn(h,"."+Ka),cn(h&&f,"A track/list element is missing."),Bn(u,Yi(f,"."+ar+":not(."+xo+")")),Nt({arrows:Gr,pagination:lr,prev:Co,next:So,bar:Ga,toggle:Ya},function(v,S){c[S]=_("."+v)}),gn(c,{root:o,track:h,list:f,slides:u})}function L(){var v=o.id||Ha(Ln),S=n.role;o.id=v,h.id=h.id||v+"-track",f.id=f.id||v+"-list",!at(o,ft)&&o.tagName!=="SECTION"&&S&&fe(o,ft,S),fe(o,yn,a.carousel),fe(f,ft,"presentation")}function _(v){var S=Ji(o,v);return S&&ts(S,"."+mr)===o?S:void 0}function E(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===mr&&Ot]}return gn(c,{setup:g,mount:C,destroy:y})}var Xt="slide",nn="loop",_n="fade";function is(e,t,n,r){var i=We(e),s=i.on,o=i.emit,a=i.bind,c=e.Components,u=e.root,d=e.options,$=d.isNavigation,h=d.updateOnMove,f=d.i18n,m=d.pagination,g=d.slideFocus,C=c.Direction.resolve,y=at(r,"style"),x=at(r,tt),P=n>-1,L=Tn(r,"."+Ua),_;function E(){P||(r.id=u.id+"-slide"+Hr(t+1),fe(r,ft,m?"tabpanel":"group"),fe(r,yn,f.slide),fe(r,tt,x||Tr(f.slideLabel,[t+1,e.length]))),v()}function v(){a(r,"click",_e(o,Or,F)),a(r,"keydown",_e(o,go,F)),s([tn,ho,Vt],A),s(Vr,k),h&&s(xt,V)}function S(){_=!0,i.destroy(),ht(r,Qa),ut(r,qr),fe(r,"style",y),fe(r,tt,x||"")}function k(){var M=e.splides.map(function(R){var B=R.splide.Components.Slides.getAt(t);return B?B.slide.id:""}).join(" ");fe(r,tt,Tr(f.slideX,(P?n:t)+1)),fe(r,En,M),fe(r,ft,g?"button":""),g&&ut(r,yn)}function V(){_||A()}function A(){if(!_){var M=e.index;O(),D(),gt(r,$o,t===M-1),gt(r,To,t===M+1)}}function O(){var M=U();M!==mi(r,Ot)&&(gt(r,Ot,M),fe(r,vo,$&&M||""),o(M?to:no,F))}function D(){var M=w(),R=!M&&(!U()||P);if(e.state.is([en,Cn])||fe(r,bo,R||""),fe(Mr(r,d.focusableNodes||""),qt,R?-1:""),g&&fe(r,qt,R?-1:0),M!==mi(r,Er)&&(gt(r,Er,M),o(M?ro:io,F)),!M&&document.activeElement===r){var B=c.Slides.getAt(e.index);B&&Xi(B.slide)}}function j(M,R,B){ot(B&&L||r,M,R)}function U(){var M=e.index;return M===t||d.cloneStatus&&M===n}function w(){if(e.is(_n))return U();var M=et(c.Elements.track),R=et(r),B=C("left",!0),te=C("right",!0);return Gn(M[B])<=fn(R[B])&&Gn(R[te])<=fn(M[te])}function N(M,R){var B=qe(M-t);return!P&&(d.rewind||e.is(nn))&&(B=_t(B,e.length-B)),B<=R}var F={index:t,slideIndex:n,slide:r,container:L,isClone:P,mount:E,destroy:S,update:A,style:j,isWithin:N};return F}function os(e,t,n){var r=We(e),i=r.on,s=r.emit,o=r.bind,a=t.Elements,c=a.slides,u=a.list,d=[];function $(){h(),i(ke,f),i(ke,h)}function h(){c.forEach(function(A,O){g(A,O,-1)})}function f(){_(function(A){A.destroy()}),bt(d)}function m(){_(function(A){A.update()})}function g(A,O,D){var j=is(e,O,D,A);j.mount(),d.push(j),d.sort(function(U,w){return U.index-w.index})}function C(A){return A?E(function(O){return!O.isClone}):d}function y(A){var O=t.Controller,D=O.toIndex(A),j=O.hasFocus()?1:n.perPage;return E(function(U){return Vn(U.index,D,D+j-1)})}function x(A){return E(A)[0]}function P(A,O){rt(A,function(D){if(Et(D)&&(D=Zi(D)),Gi(D)){var j=c[O];j?Fr(D,j):$n(u,D),dt(D,n.classes.slide),S(D,_e(s,Yt))}}),s(ke)}function L(A){Ht(E(A).map(function(O){return O.slide})),s(ke)}function _(A,O){C(O).forEach(A)}function E(A){return d.filter(qi(A)?A:function(O){return Et(A)?pn(O.slide,A):kr(wn(A),O.index)})}function v(A,O,D){_(function(j){j.style(A,O,D)})}function S(A,O){var D=Mr(A,"img"),j=D.length;j?D.forEach(function(U){o(U,"load error",function(){--j||O()})}):O()}function k(A){return A?c.length:d.length}function V(){return d.length>n.perPage}return{mount:$,destroy:f,update:m,register:g,get:C,getIn:y,getAt:x,add:P,remove:L,forEach:_,filter:E,style:v,getLength:k,isEnough:V}}function as(e,t,n){var r=We(e),i=r.on,s=r.bind,o=r.emit,a=t.Slides,c=t.Direction.resolve,u=t.Elements,d=u.root,$=u.track,h=u.list,f=a.getAt,m=a.style,g,C,y;function x(){P(),s(window,"resize load",Va(_e(o,Yt))),i([je,ke],P),i(Yt,L)}function P(){g=n.direction===or,ot(d,"maxWidth",kt(n.width)),ot($,c("paddingLeft"),_(!1)),ot($,c("paddingRight"),_(!0)),L(!0)}function L(F){var M=et(d);(F||C.width!==M.width||C.height!==M.height)&&(ot($,"height",E()),m(c("marginRight"),kt(n.gap)),m("width",S()),m("height",k(),!0),C=M,o(Qn),y!==(y=N())&&(gt(d,Eo,y),o(Oa,y)))}function _(F){var M=n.padding,R=c(F?"right":"left");return M&&kt(M[R]||(un(M)?0:M))||"0px"}function E(){var F="";return g&&(F=v(),cn(F,"height or heightRatio is missing."),F="calc("+F+" - "+_(!1)+" - "+_(!0)+")"),F}function v(){return kt(n.height||et(h).width*n.heightRatio)}function S(){return n.autoWidth?null:kt(n.fixedWidth)||(g?"":V())}function k(){return kt(n.fixedHeight)||(g?n.autoHeight?null:V():v())}function V(){var F=kt(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function A(){return et(h)[c("width")]}function O(F,M){var R=f(F||0);return R?et(R.slide)[c("width")]+(M?0:U()):0}function D(F,M){var R=f(F);if(R){var B=et(R.slide)[c("right")],te=et(h)[c("left")];return qe(B-te)+(M?0:U())}return 0}function j(F){return D(e.length-1)-D(0)+O(0,F)}function U(){var F=f(0);return F&&parseFloat(ot(F.slide,c("marginRight")))||0}function w(F){return parseFloat(ot($,c("padding"+(F?"Right":"Left"))))||0}function N(){return e.is(_n)||j(!0)>A()}return{mount:x,resize:L,listSize:A,slideSize:O,sliderSize:j,totalSize:D,getPadding:w,isOverflow:N}}var ss=2;function ls(e,t,n){var r=We(e),i=r.on,s=t.Elements,o=t.Slides,a=t.Direction.resolve,c=[],u;function d(){i(ke,$),i([je,Yt],f),(u=C())&&(m(u),t.Layout.resize(!0))}function $(){h(),d()}function h(){Ht(c),bt(c),r.destroy()}function f(){var y=C();u!==y&&(u<y||!y)&&r.emit(ke)}function m(y){var x=o.get().slice(),P=x.length;if(P){for(;x.length<y;)Bn(x,x);Bn(x.slice(-y),x.slice(0,y)).forEach(function(L,_){var E=_<y,v=g(L.slide,_);E?Fr(v,x[0].slide):$n(s.list,v),Bn(c,v),o.register(v,_-y+(E?0:P),L.index)})}}function g(y,x){var P=y.cloneNode(!0);return dt(P,n.classes.clone),P.id=e.root.id+"-clone"+Hr(x+1),P}function C(){var y=n.clones;if(!e.is(nn))y=0;else if(Sn(y)){var x=n[a("fixedWidth")]&&t.Layout.slideSize(0),P=x&&fn(et(s.track)[a("width")]/x);y=P||n[a("autoWidth")]&&e.length||n.perPage*ss}return y}return{mount:d,destroy:h}}function cs(e,t,n){var r=We(e),i=r.on,s=r.emit,o=e.state.set,a=t.Layout,c=a.slideSize,u=a.getPadding,d=a.totalSize,$=a.listSize,h=a.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,y=C.list,x=C.track,P;function L(){P=t.Transition,i([Rt,Qn,je,ke],_)}function _(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function E(R,B,te,ue){R!==B&&F(R>te)&&(A(),S(V(j(),R>te),!0)),o(en),s(xt,B,te,R),P.start(B,function(){o(Gt),s(tn,B,te,R),ue&&ue()})}function v(R){S(D(R,!0))}function S(R,B){if(!e.is(_n)){var te=B?R:k(R);ot(y,"transform","translate"+m("X")+"("+te+"px)"),R!==te&&s(ho)}}function k(R){if(e.is(nn)){var B=O(R),te=B>t.Controller.getEnd(),ue=B<0;(ue||te)&&(R=V(R,te))}return R}function V(R,B){var te=R-N(B),ue=h();return R-=g(ue*(fn(qe(te)/ue)||1))*(B?1:-1),R}function A(){S(j(),!0),P.cancel()}function O(R){for(var B=t.Slides.get(),te=0,ue=1/0,oe=0;oe<B.length;oe++){var me=B[oe].index,H=qe(D(me,!0)-R);if(H<=ue)ue=H,te=me;else break}return te}function D(R,B){var te=g(d(R-1)-w(R));return B?U(te):te}function j(){var R=m("left");return et(y)[R]-et(x)[R]+g(u(!1))}function U(R){return n.trimSpace&&e.is(Xt)&&(R=zt(R,0,g(h(!0)-$()))),R}function w(R){var B=n.focus;return B==="center"?($()-c(R,!0))/2:+B*c(R)||0}function N(R){return D(R?t.Controller.getEnd():0,!!n.trimSpace)}function F(R){var B=g(V(j(),R));return R?B>=0:B<=y[m("scrollWidth")]-et(x)[m("width")]}function M(R,B){B=Sn(B)?j():B;var te=R!==!0&&g(B)<g(N(!1)),ue=R!==!1&&g(B)>g(N(!0));return te||ue}return{mount:L,move:E,jump:v,translate:S,shift:V,cancel:A,toIndex:O,toPosition:D,getPosition:j,getLimit:N,exceededLimit:M,reposition:_}}function ds(e,t,n){var r=We(e),i=r.on,s=r.emit,o=t.Move,a=o.getPosition,c=o.getLimit,u=o.toPosition,d=t.Slides,$=d.isEnough,h=d.getLength,f=n.omitEnd,m=e.is(nn),g=e.is(Xt),C=_e(j,!1),y=_e(j,!0),x=n.start||0,P,L=x,_,E,v;function S(){k(),i([je,ke,Yn],k),i(Qn,V)}function k(){_=h(!0),E=n.perMove,v=n.perPage,P=F();var H=zt(x,0,f?P:_-1);H!==x&&(x=H,o.reposition())}function V(){P!==F()&&s(Yn)}function A(H,Q,G){if(!me()){var Y=D(H),ie=N(Y);ie>-1&&(Q||ie!==x)&&(te(ie),o.move(Y,ie,L,G))}}function O(H,Q,G,Y){t.Scroll.scroll(H,Q,G,function(){var ie=N(o.toIndex(a()));te(f?_t(ie,P):ie),Y&&Y()})}function D(H){var Q=x;if(Et(H)){var G=H.match(/([+\-<>])(\d+)?/)||[],Y=G[1],ie=G[2];Y==="+"||Y==="-"?Q=U(x+ +(""+Y+(+ie||1)),x):Y===">"?Q=ie?M(+ie):C(!0):Y==="<"&&(Q=y(!0))}else Q=m?H:zt(H,0,P);return Q}function j(H,Q){var G=E||(oe()?1:v),Y=U(x+G*(H?-1:1),x,!(E||oe()));return Y===-1&&g&&!Qi(a(),c(!H),1)?H?0:P:Q?Y:N(Y)}function U(H,Q,G){if($()||oe()){var Y=w(H);Y!==H&&(Q=H,H=Y,G=!1),H<0||H>P?!E&&(Vn(0,H,Q,!0)||Vn(P,Q,H,!0))?H=M(R(H)):m?H=G?H<0?-(_%v||v):_:H:n.rewind?H=H<0?P:0:H=-1:G&&H!==Q&&(H=M(R(Q)+(H<Q?-1:1)))}else H=-1;return H}function w(H){if(g&&n.trimSpace==="move"&&H!==x)for(var Q=a();Q===u(H,!0)&&Vn(H,0,e.length-1,!n.rewind);)H<x?--H:++H;return H}function N(H){return m?(H+_)%_||0:H}function F(){for(var H=_-(oe()||m&&E?1:v);f&&H-- >0;)if(u(_-1,!0)!==u(H,!0)){H++;break}return zt(H,0,_-1)}function M(H){return zt(oe()?H:v*H,0,P)}function R(H){return oe()?_t(H,P):Gn((H>=P?_-1:H)/v)}function B(H){var Q=o.toIndex(H);return g?zt(Q,0,P):Q}function te(H){H!==x&&(L=x,x=H)}function ue(H){return H?L:x}function oe(){return!Sn(n.focus)||n.isNavigation}function me(){return e.state.is([en,Cn])&&!!n.waitForTransition}return{mount:S,go:A,scroll:O,getNext:C,getPrev:y,getAdjacent:j,getEnd:F,setIndex:te,getIndex:ue,toIndex:M,toPage:R,toDest:B,hasFocus:oe,isBusy:me}}var us="http://www.w3.org/2000/svg",ps="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",In=40;function ms(e,t,n){var r=We(e),i=r.on,s=r.bind,o=r.emit,a=n.classes,c=n.i18n,u=t.Elements,d=t.Controller,$=u.arrows,h=u.track,f=$,m=u.prev,g=u.next,C,y,x={};function P(){_(),i(je,L)}function L(){E(),P()}function _(){var O=n.arrows;O&&!(m&&g)&&k(),m&&g&&(gn(x,{prev:m,next:g}),hn(f,O?"":"none"),dt(f,y=Gr+"--"+n.direction),O&&(v(),A(),fe([m,g],En,h.id),o(lo,m,g)))}function E(){r.destroy(),ht(f,y),C?(Ht($?[m,g]:f),m=g=null):ut([m,g],qr)}function v(){i([Rt,tn,ke,Vt,Yn],A),s(g,"click",_e(S,">")),s(m,"click",_e(S,"<"))}function S(O){d.go(O,!0)}function k(){f=$||Ut("div",a.arrows),m=V(!0),g=V(!1),C=!0,$n(f,[m,g]),!$&&Fr(f,h)}function V(O){var D='<button class="'+a.arrow+" "+(O?a.prev:a.next)+'" type="button"><svg xmlns="'+us+'" viewBox="0 0 '+In+" "+In+'" width="'+In+'" height="'+In+'" focusable="false"><path d="'+(n.arrowPath||ps)+'" />';return Zi(D)}function A(){if(m&&g){var O=e.index,D=d.getPrev(),j=d.getNext(),U=D>-1&&O<D?c.last:c.prev,w=j>-1&&O>j?c.first:c.next;m.disabled=D<0,g.disabled=j<0,fe(m,tt,U),fe(g,tt,w),o(co,m,g,D,j)}}return{arrows:x,mount:P,destroy:E,update:A}}var gs=Nr+"-interval";function hs(e,t,n){var r=We(e),i=r.on,s=r.bind,o=r.emit,a=tr(n.interval,e.go.bind(e,">"),v),c=a.isPaused,u=t.Elements,d=t.Elements,$=d.root,h=d.toggle,f=n.autoplay,m,g,C=f==="pause";function y(){f&&(x(),h&&fe(h,En,u.track.id),C||P(),E())}function x(){n.pauseOnHover&&s($,"mouseenter mouseleave",function(k){m=k.type==="mouseenter",_()}),n.pauseOnFocus&&s($,"focusin focusout",function(k){g=k.type==="focusin",_()}),h&&s(h,"click",function(){C?P():L(!0)}),i([xt,er,ke],a.rewind),i(xt,S)}function P(){c()&&t.Slides.isEnough()&&(a.start(!n.resetProgress),g=m=C=!1,E(),o(Dr))}function L(k){k===void 0&&(k=!0),C=!!k,E(),c()||(a.pause(),o(zr))}function _(){C||(m||g?L(!1):P())}function E(){h&&(gt(h,Ot,!C),fe(h,tt,n.i18n[C?"play":"pause"]))}function v(k){var V=u.bar;V&&ot(V,"width",k*100+"%"),o(mo,k)}function S(k){var V=t.Slides.getAt(k);a.set(V&&+at(V.slide,gs)||n.interval)}return{mount:y,destroy:a.cancel,play:P,pause:L,isPaused:c}}function fs(e,t,n){var r=We(e),i=r.on;function s(){n.cover&&(i(jr,_e(a,!0)),i([Rt,je,ke],_e(o,!0)))}function o(c){t.Slides.forEach(function(u){var d=Tn(u.container||u.slide,"img");d&&d.src&&a(c,d,u)})}function a(c,u,d){d.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),hn(u,c?"none":"")}return{mount:s,destroy:_e(o,!1)}}var ys=10,vs=600,bs=.6,xs=1.5,Cs=800;function Ss(e,t,n){var r=We(e),i=r.on,s=r.emit,o=e.state.set,a=t.Move,c=a.getPosition,u=a.getLimit,d=a.exceededLimit,$=a.translate,h=e.is(Xt),f,m,g=1;function C(){i(xt,L),i([je,ke],_)}function y(v,S,k,V,A){var O=c();if(L(),k&&(!h||!d())){var D=t.Layout.sliderSize(),j=$r(v)*D*Gn(qe(v)/D)||0;v=a.toPosition(t.Controller.toDest(v%D))+j}var U=Qi(O,v,1);g=1,S=U?0:S||qn(qe(v-O)/xs,Cs),m=V,f=tr(S,x,_e(P,O,v,A),1),o(Cn),s(er),f.start()}function x(){o(Gt),m&&m(),s(Vt)}function P(v,S,k,V){var A=c(),O=v+(S-v)*E(V),D=(O-A)*g;$(A+D),h&&!k&&d()&&(g*=bs,qe(D)<ys&&y(u(d(!0)),vs,!1,m,!0))}function L(){f&&f.cancel()}function _(){f&&!f.isPaused()&&(L(),x())}function E(v){var S=n.easingFunc;return S?S(v):1-Math.pow(1-v,4)}return{mount:C,destroy:L,scroll:y,cancel:_}}var jt={passive:!1,capture:!0};function ws(e,t,n){var r=We(e),i=r.on,s=r.emit,o=r.bind,a=r.unbind,c=e.state,u=t.Move,d=t.Scroll,$=t.Controller,h=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,y=u.getPosition,x=u.exceededLimit,P,L,_,E,v,S=!1,k,V,A;function O(){o(h,gr,Sr,jt),o(h,hr,Sr,jt),o(h,_o,j,jt),o(h,"click",N,{capture:!0}),o(h,"dragstart",mt),i([Rt,je],D)}function D(){var I=n.drag;ne(!I),E=I==="free"}function j(I){if(k=!1,!V){var b=ie(I);Y(I.target)&&(b||!I.button)&&($.isBusy()?mt(I,!0):(A=b?h:window,v=c.is([en,Cn]),_=null,o(A,gr,U,jt),o(A,hr,w,jt),u.cancel(),d.cancel(),F(I)))}}function U(I){if(c.is(On)||(c.set(On),s(oo)),I.cancelable)if(v){u.translate(P+G(oe(I)));var b=me(I)>Ci,z=S!==(S=x());(b||z)&&F(I),k=!0,s(ao),mt(I)}else B(I)&&(v=R(I),mt(I))}function w(I){c.is(On)&&(c.set(Gt),s(so)),v&&(M(I),mt(I)),a(A,gr,U),a(A,hr,w),v=!1}function N(I){!V&&k&&mt(I,!0)}function F(I){_=L,L=I,P=y()}function M(I){var b=te(I),z=ue(b),q=n.rewind&&n.rewindByDrag;f(!1),E?$.scroll(z,0,n.snap):e.is(_n)?$.go(C($r(b))<0?q?"<":"-":q?">":"+"):e.is(Xt)&&S&&q?$.go(x(!0)?">":"<"):$.go($.toDest(z),!0),f(!0)}function R(I){var b=n.dragMinThreshold,z=un(b),q=z&&b.mouse||0,J=(z?b.touch:+b)||10;return qe(oe(I))>(ie(I)?J:q)}function B(I){return qe(oe(I))>qe(oe(I,!0))}function te(I){if(e.is(nn)||!S){var b=me(I);if(b&&b<Ci)return oe(I)/b}return 0}function ue(I){return y()+$r(I)*_t(qe(I)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function oe(I,b){return Q(I,b)-Q(H(I),b)}function me(I){return wr(I)-wr(H(I))}function H(I){return L===I&&_||L}function Q(I,b){return(ie(I)?I.changedTouches[0]:I)["page"+g(b?"Y":"X")]}function G(I){return I/(S&&e.is(Xt)?ns:1)}function Y(I){var b=n.noDrag;return!pn(I,"."+wo+", ."+sr)&&(!b||!pn(I,b))}function ie(I){return typeof TouchEvent<"u"&&I instanceof TouchEvent}function W(){return v}function ne(I){V=I}return{mount:O,disable:ne,isDragging:W}}var $s={Spacebar:" ",Right:ir,Left:rr,Up:fo,Down:yo};function Yr(e){return e=Et(e)?e:e.key,$s[e]||e}var Si="keydown";function Ts(e,t,n){var r=We(e),i=r.on,s=r.bind,o=r.unbind,a=e.root,c=t.Direction.resolve,u,d;function $(){h(),i(je,f),i(je,h),i(xt,g)}function h(){var y=n.keyboard;y&&(u=y==="global"?window:a,s(u,Si,C))}function f(){o(u,Si)}function m(y){d=y}function g(){var y=d;d=!0,Ui(function(){d=y})}function C(y){if(!d){var x=Yr(y);x===c(rr)?e.go("<"):x===c(ir)&&e.go(">")}}return{mount:$,destroy:f,disable:m}}var dn=Nr+"-lazy",Dn=dn+"-srcset",Ls="["+dn+"], ["+Dn+"]";function Es(e,t,n){var r=We(e),i=r.on,s=r.off,o=r.bind,a=r.emit,c=n.lazyLoad==="sequential",u=[tn,Vt],d=[];function $(){n.lazyLoad&&(h(),i(ke,h))}function h(){bt(d),f(),c?y():(s(u),i(u,m),m())}function f(){t.Slides.forEach(function(x){Mr(x.slide,Ls).forEach(function(P){var L=at(P,dn),_=at(P,Dn);if(L!==P.src||_!==P.srcset){var E=n.classes.spinner,v=P.parentElement,S=Tn(v,"."+E)||Ut("span",E,v);d.push([P,x,S]),P.src||hn(P,"none")}})})}function m(){d=d.filter(function(x){var P=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,P)?g(x):!0}),d.length||s(u)}function g(x){var P=x[0];dt(x[1].slide,_r),o(P,"load error",_e(C,x)),fe(P,"src",at(P,dn)),fe(P,"srcset",at(P,Dn)),ut(P,dn),ut(P,Dn)}function C(x,P){var L=x[0],_=x[1];ht(_.slide,_r),P.type!=="error"&&(Ht(x[2]),hn(L,""),a(jr,L,_),a(Yt)),c&&y()}function y(){d.length&&g(d.shift())}return{mount:$,destroy:_e(bt,d),check:m}}function _s(e,t,n){var r=We(e),i=r.on,s=r.emit,o=r.bind,a=t.Slides,c=t.Elements,u=t.Controller,d=u.hasFocus,$=u.getIndex,h=u.go,f=t.Direction.resolve,m=c.pagination,g=[],C,y;function x(){P(),i([je,ke,Yn],x);var V=n.pagination;m&&hn(m,V?"":"none"),V&&(i([xt,er,Vt],k),L(),k(),s(uo,{list:C,items:g},S(e.index)))}function P(){C&&(Ht(m?At(C.children):C),ht(C,y),bt(g),C=null),r.destroy()}function L(){var V=e.length,A=n.classes,O=n.i18n,D=n.perPage,j=d()?u.getEnd()+1:fn(V/D);C=m||Ut("ul",A.pagination,c.track.parentElement),dt(C,y=lr+"--"+v()),fe(C,ft,"tablist"),fe(C,tt,O.select),fe(C,Ur,v()===or?"vertical":"");for(var U=0;U<j;U++){var w=Ut("li",null,C),N=Ut("button",{class:A.page,type:"button"},w),F=a.getIn(U).map(function(R){return R.slide.id}),M=!d()&&D>1?O.pageX:O.slideX;o(N,"click",_e(_,U)),n.paginationKeyboard&&o(N,"keydown",_e(E,U)),fe(w,ft,"presentation"),fe(N,ft,"tab"),fe(N,En,F.join(" ")),fe(N,tt,Tr(M,U+1)),fe(N,qt,-1),g.push({li:w,button:N,page:U})}}function _(V){h(">"+V,!0)}function E(V,A){var O=g.length,D=Yr(A),j=v(),U=-1;D===f(ir,!1,j)?U=++V%O:D===f(rr,!1,j)?U=(--V+O)%O:D==="Home"?U=0:D==="End"&&(U=O-1);var w=g[U];w&&(Xi(w.button),h(">"+U),mt(A,!0))}function v(){return n.paginationDirection||n.direction}function S(V){return g[u.toPage(V)]}function k(){var V=S($(!0)),A=S($());if(V){var O=V.button;ht(O,Ot),ut(O,fi),fe(O,qt,-1)}if(A){var D=A.button;dt(D,Ot),fe(D,fi,!0),fe(D,qt,"")}s(po,{list:C,items:g},V,A)}return{items:g,mount:x,destroy:P,getAt:S,update:k}}var Ps=[" ","Enter"];function As(e,t,n){var r=n.isNavigation,i=n.slideFocus,s=[];function o(){e.splides.forEach(function(m){m.isParent||(u(e,m.splide),u(m.splide,e))}),r&&d()}function a(){s.forEach(function(m){m.destroy()}),bt(s)}function c(){a(),o()}function u(m,g){var C=We(m);C.on(xt,function(y,x,P){g.go(g.is(nn)?P:y)}),s.push(C)}function d(){var m=We(e),g=m.on;g(Or,h),g(go,f),g([Rt,je],$),s.push(m),m.emit(Vr,e.splides)}function $(){fe(t.Elements.list,Ur,n.direction===or?"vertical":"")}function h(m){e.go(m.index)}function f(m,g){kr(Ps,Yr(g))&&(h(m),mt(g))}return{setup:_e(t.Media.set,{slideFocus:Sn(i)?r:i},!0),mount:o,destroy:a,remount:c}}function Rs(e,t,n){var r=We(e),i=r.bind,s=0;function o(){n.wheel&&i(t.Elements.track,"wheel",a,jt)}function a(u){if(u.cancelable){var d=u.deltaY,$=d<0,h=wr(u),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;qe(d)>f&&h-s>m&&(e.go($?"<":">"),s=h),c($)&&mt(u)}}function c(u){return!n.releaseWheel||e.state.is(en)||t.Controller.getAdjacent(u)!==-1}return{mount:o}}var Is=90;function Ws(e,t,n){var r=We(e),i=r.on,s=t.Elements.track,o=n.live&&!n.isNavigation,a=Ut("span",Za),c=tr(Is,_e(d,!1));function u(){o&&(h(!t.Autoplay.isPaused()),fe(s,bi,!0),a.textContent="…",i(Dr,_e(h,!0)),i(zr,_e(h,!1)),i([tn,Vt],_e(d,!0)))}function d(f){fe(s,vi,f),f?($n(s,a),c.start()):(Ht(a),c.cancel())}function $(){ut(s,[yi,bi,vi]),Ht(a)}function h(f){o&&fe(s,yi,f?"off":"polite")}return{mount:u,disable:h,destroy:$}}var ks=Object.freeze({__proto__:null,Media:Da,Direction:za,Elements:rs,Slides:os,Layout:as,Clones:ls,Move:cs,Controller:ds,Arrows:ms,Autoplay:hs,Cover:fs,Scroll:Ss,Drag:ws,Keyboard:Ts,LazyLoad:Es,Pagination:_s,Sync:As,Wheel:Rs,Live:Ws}),Fs={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"},Ms={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:es,i18n:Fs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ns(e,t,n){var r=t.Slides;function i(){We(e).on([Rt,ke],s)}function s(){r.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function o(a,c){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ui(c)}return{mount:i,start:o,cancel:Sr}}function Hs(e,t,n){var r=t.Move,i=t.Controller,s=t.Scroll,o=t.Elements.list,a=_e(ot,o,"transition"),c;function u(){We(e).bind(o,"transitionend",function(f){f.target===o&&c&&($(),c())})}function d(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),y=h(f);qe(g-C)>=1&&y>=1?n.useScroll?s.scroll(g,y,!1,m):(a("transform "+y+"ms "+n.easing),r.translate(g,!0),c=m):(r.jump(f),m())}function $(){a(""),s.cancel()}function h(f){var m=n.rewindSpeed;if(e.is(Xt)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:u,start:d,cancel:$}}var Os=(function(){function e(n,r){this.event=We(),this.Components={},this.state=Ba(Kt),this.splides=[],this._o={},this._E={};var i=Et(n)?Ji(document,n):n;cn(i,i+" is invalid."),this.root=i,r=Tt({label:at(i,tt)||"",labelledby:at(i,Kr)||""},Ms,e.defaults,r||{});try{Tt(r,JSON.parse(at(i,Nr)))}catch{cn(!1,"Invalid JSON")}this._o=Object.create(Tt({},r))}var t=e.prototype;return t.mount=function(r,i){var s=this,o=this.state,a=this.Components;cn(o.is([Kt,Un]),"Already mounted!"),o.set(Kt),this._C=a,this._T=i||this._T||(this.is(_n)?Ns:Hs),this._E=r||this._E;var c=gn({},ks,this._E,{Transition:this._T});return Nt(c,function(u,d){var $=u(s,a,s._o);a[d]=$,$.setup&&$.setup()}),Nt(a,function(u){u.mount&&u.mount()}),this.emit(Rt),dt(this.root,Ja),o.set(Gt),this.emit(Lr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(Gt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(At(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(ke),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,s=this.state;return s.is(Kt)?We(this).on(Lr,this.destroy.bind(this,r)):(Nt(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(Br),i.destroy(),r&&bt(this.splides),s.set(Un)),this},Fa(e,[{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()}}]),e})(),Xr=Os;Xr.defaults={};Xr.STATES=Na;var wi=[[Rt,"onMounted"],[Lr,"onReady"],[xt,"onMove"],[tn,"onMoved"],[Or,"onClick"],[to,"onActive"],[no,"onInactive"],[ro,"onVisible"],[io,"onHidden"],[ke,"onRefresh"],[je,"onUpdated"],[Yt,"onResize"],[Qn,"onResized"],[oo,"onDrag"],[ao,"onDragging"],[so,"onDragged"],[er,"onScroll"],[Vt,"onScrolled"],[Br,"onDestroy"],[lo,"onArrowsMounted"],[co,"onArrowsUpdated"],[uo,"onPaginationMounted"],[po,"onPaginationUpdated"],[Vr,"onNavigationMounted"],[Dr,"onAutoplayPlay"],[mo,"onAutoplayPlaying"],[zr,"onAutoplayPause"],[jr,"onLazyLoadLoaded"]];function Zr(...e){return e.filter(Boolean).join(" ")}function Xn(e){return e!==null&&typeof e=="object"}function Pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Pr(n,t[r]));if(Xn(e)&&Xn(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Pr(e[i],t[i]))}return e===t}function Bs(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Vs(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function Ar(e,t){const n=e;return Vs(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():Xn(r)?n[i]=Ar(Xn(n[i])?n[i]:{},r):n[i]=r}),n}var Ds=({children:e,className:t,...n})=>p.createElement("div",{className:Zr("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),Jr=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Xr(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ar({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Pr(this.options,e)&&(this.splide.options=e,this.options=Ar({},e));const t=this.getSlides();Bs(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){wi.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return p.createElement(t,{className:Zr("splide",e),ref:this.splideRef,...this.omit(i,["options",...wi.map(s=>s[1])])},n?p.createElement(Ds,null,r):r)}},Qr=({children:e,className:t,...n})=>p.createElement("li",{className:Zr("splide__slide",t),...n},e);/*!
|
|
2
2
|
* Splide.js
|
|
3
3
|
* Version : 4.1.3
|
|
4
4
|
* License : MIT
|
|
5
5
|
* Copyright: 2022 Naotoshi Fujita
|
|
6
|
-
*/const zs="RichTextRenderer-module__link___BWeZ2",js={link:zs},Ks=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},cr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ks(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Je(e,t){var o,s,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:cr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:T.scalingValue(e.letterSpacing,t),wordSpacing:T.scalingValue(e.wordSpacing,t),fontSize:T.scalingValue(n,t),lineHeight:r!==void 0?T.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,color:e.color}}const vn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?l.jsx("a",{className:js.link,href:r.value,target:r.target,children:t(r.children)},o):l.jsx("span",{style:Us(r),children:r.text},o));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const o=n.children;return l.jsx("div",{children:t(o)},r)})})};function Us(e){return{...e.fontFamily&&{fontFamily:cr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const qs="SvgImage-module__svg___q3xE-",Gs="SvgImage-module__img___VsTm-",To={svg:qs,img:Gs},Ys=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Xs=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Lt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[s,i]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(a)}},[]),!Ys(e)||!s?l.jsx("img",{src:e,alt:"",className:Ce(To.img,r),style:o}):l.jsx("span",{"data-supports-mask":s,className:Ce(To.svg,r),style:{"--svg":Xs(e),"--fill":t,"--hover-fill":n,...o??{}}})},Zs={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function Js({settings:e,content:t,styles:n,isEditor:r}){const[o,s]=p.useState(null),{widthSettings:i,fontSettings:a,letterSpacing:c,textAlign:u,wordSpacing:d,fontSizeLineHeight:$,textAppearance:h,color:f}=n.imageCaption,[m,g]=p.useState(void 0),[C,y]=p.useState(null),[x,P]=p.useState(0),[L,_]=p.useState(0),{direction:E,transition:v,controls:S,pagination:F,imageCaption:V,triggers:A}=e,O=p.useRef(v.type),{x:D,y:j}=e.controls.offset,U=w=>{o&&o.go(w)};return p.useEffect(()=>{if(!C)return;const w=new ResizeObserver(N=>{if(!o)return;const[k]=N;g({width:Math.round(k.contentRect.width),height:Math.round(k.contentRect.height)})});return w.observe(C),()=>w.unobserve(C)},[C]),p.useEffect(()=>{!o||O.current===v.type||(_(w=>w+1),O.current=v.type)},[v.type]),l.jsx("div",{className:Ce(ae.wrapper,{[ae.editor]:r}),ref:y,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ce(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((w,N)=>l.jsx("div",{className:Ce(ae.captionText,Zs[V.alignment],{[ae.withPointerEvents]:N===x&&r,[ae.active]:N===x}),style:{fontFamily:cr(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:i.sizing==="auto"?"max-content":T.scalingValue(i.width,r),letterSpacing:T.scalingValue(c,r),wordSpacing:T.scalingValue(d,r),textAlign:u,fontSize:T.scalingValue($.fontSize,r),lineHeight:T.scalingValue($.lineHeight,r),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:T.scalingValue(V.offset.y,r),left:T.scalingValue(V.offset.x,r)},children:l.jsx(vn,{content:w.imageCaption})})},N))})}),l.jsx(Jr,{onMove:w=>{P(w.index)},ref:s,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:A.autoPlay!==null,...A.autoPlay!==null&&{interval:parseInt(A.autoPlay)*1e3},direction:E==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:A.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((w,N)=>l.jsx(Qr,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Ce(ae.sliderImage,{[ae.contain]:w.image.objectFit==="contain",[ae.cover]:w.image.objectFit==="cover"}),src:w.image.url,alt:w.image.name??""})})})},N))},L),S.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(ae.arrow,{[ae.arrowVertical]:E==="vert",[ae.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:l.jsxs("button",{onClick:()=>{U("-1")},className:ae.arrowInner,style:{transform:`translate(${T.scalingValue(D,r)}, ${T.scalingValue(j*(E==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&l.jsx(Lt,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:Ce(ae.arrowImg,ae.mirror)}),!S.arrowsImgUrl&&l.jsx(Lo,{color:S.color,className:Ce(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Ce(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:E==="vert",[ae.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${T.scalingValue(D*(E==="horiz"?-1:1),r)}, ${T.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&l.jsx(Lt,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:ae.arrowImg}),!S.arrowsImgUrl&&l.jsx(Lo,{color:S.color,className:Ce(ae.arrowIcon,ae.arrowImg)})]})})]}),A.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{o&&o.go("+1")}}),F.isActive&&l.jsx("div",{className:Ce(ae.pagination,{[ae.paginationInsideBottom]:F.position==="inside-1"&&E==="horiz",[ae.paginationInsideTop]:F.position==="inside-2"&&E==="horiz",[ae.paginationOutsideBottom]:F.position==="outside-1"&&E==="horiz",[ae.paginationOutsideTop]:F.position==="outside-2"&&E==="horiz",[ae.paginationInsideLeft]:F.position==="inside-1"&&E==="vert",[ae.paginationInsideRight]:F.position==="inside-2"&&E==="vert",[ae.paginationOutsideLeft]:F.position==="outside-1"&&E==="vert",[ae.paginationOutsideRight]:F.position==="outside-2"&&E==="vert",[ae.paginationVertical]:E==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:F.colors[2],transform:`scale(${F.scale/100}) translate(${T.scalingValue(F.offset.x,r)}, ${T.scalingValue(F.offset.y,r)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((w,N)=>l.jsx("button",{onClick:()=>{o&&o.go(N)},className:Ce(ae.paginationItem),children:l.jsx("div",{className:Ce(ae.dot,{[ae.activeDot]:N===x}),style:{backgroundColor:N===x?F.colors[0]:F.colors[1],"--pagination-hover-color":F.hover}})},N))})})]})})}function Lo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Qs={element:Js,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},el="ImageRevealSlider-module__imageRevealSlider___UE5Ob",tl="ImageRevealSlider-module__image___Qjt-e",nl="ImageRevealSlider-module__link___N-iLG",rl="ImageRevealSlider-module__cursor___2U03d",Dt={imageRevealSlider:el,image:tl,link:nl,cursor:rl};function Eo(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const s=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*s,a=s/2,c=i/2;if(e>=r.x-a&&e<=r.x+a&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function fr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ol(e,t,n,r){let o,s;if(t==="custom"){o=n;const i=await fr(e);s=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await fr(e);s=i.height/i.width*o}else{const i=await fr(e);o=i.width,s=i.height}return{width:o,height:s,finalWidth:`${o}px`}}function il({settings:e,content:t,isEditor:n}){const[r,o]=p.useState(null),[s,i]=p.useState([]),[a,c]=p.useState(0),u=p.useRef(0),[d,$]=p.useState({x:0,y:0}),[h,f]=p.useState(1),[m,g]=p.useState("none"),C=p.useRef({x:0,y:0}),[y,x]=p.useState(!1),{sizeType:P,imageWidth:L,randomRangeImageWidth:_}=e.imageSize,{revealPosition:E,visible:v}=e.position,{cursorType:S,target:F,defaultCursorScale:V,defaultCursor:A,hoverCursorScale:O,hoverCursor:D}=e.cursor;p.useEffect(()=>{if(!r)return;const w=(M,R)=>{const B=r.getBoundingClientRect(),te=M-B.left,ue=R-B.top;if($({x:te,y:ue}),S==="system"){g("none"),f(1);return}const ie=te,me=ue,H=document.elementFromPoint(B.left+ie,B.top+me);if(H&&H.closest("a")){g("none"),f(1);return}const Q=Eo(ie,me,s)||F==="area"?{img:D??"none",scale:O}:{img:A??"none",scale:V};g(Q.img),f(Q.scale)},N=M=>{M.stopPropagation(),C.current={x:M.clientX,y:M.clientY},w(M.clientX,M.clientY)},k=()=>{y&&w(C.current.x,C.current.y)};return r.addEventListener("mousemove",N),window.addEventListener("scroll",k,!0),()=>{r.removeEventListener("mousemove",N),window.removeEventListener("scroll",k,!0)}},[r,y,d,S,F,D,A,O,V,s]),p.useEffect(()=>{y||(g("none"),f(0))},[y]);const j=async(w,N,k,M={})=>{const{width:R,height:B,finalWidth:te}=await ol(w.image.url,P,L,_);let ue=0,ie=0;E==="same"?(ue=N/2,ie=k/2):(ue=M.x??Math.random()*N,ie=M.y??Math.random()*k);const me=Math.min(Math.max(ue,R/2),N-R/2),H=Math.min(Math.max(ie,B/2),k-B/2);return{id:u.current++,url:w.image.url,link:w.link,name:w.image.name,x:me,y:H,width:te}};p.useEffect(()=>{if(!r||t.length===0)return;const w=r.getBoundingClientRect(),N=w.width,k=w.height,M=[];(async()=>{const B=t[0],te=await j(B,N,k);M.push(te),i(M),c(1)})()},[P,L,_,E,r]),p.useEffect(()=>{v==="last One"&&i(w=>w.length>0?[w[w.length-1]]:[])},[v]);const U=async w=>{if(!r)return;const N=r.getBoundingClientRect(),k=w.clientX-N.left,M=w.clientY-N.top;if(F==="image"&&!Eo(k,M,s))return;let R=0,B=0;E==="on Click"?(R=k,B=M):E==="same"?(R=N.width/2,B=N.height/2):(R=Math.random()*N.width,B=Math.random()*N.height);const te=t[a],ue=await j(te,N.width,N.height,{x:R,y:B});i(ie=>v==="all"?[...ie,ue]:[ue]),c(ie=>ie>=t.length-1?0:ie+1)};return l.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:Dt.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(w=>l.jsx("div",{className:Dt.wrapper,style:{top:`${w.y}px`,left:`${w.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:w.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:F==="area"&&w.link?l.jsx("a",{href:w.link,target:"_blank",className:Dt.link,children:l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)}):l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)},w.id)),y&&l.jsx("div",{className:Dt.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const al={element:il,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},sl="LightBox-module__hidden___9s-9x",ll="LightBox-module__heroImage___sTxNF",cl="LightBox-module__background___rm9ml",dl="LightBox-module__editor___4ACaY",ul="LightBox-module__contentStyle___Bgnsq",pl="LightBox-module__imageStyle___tLIlB",ml="LightBox-module__imgWrapper___LuFUp",gl="LightBox-module__contain___8-yaS",hl="LightBox-module__cover___hNvOG",fl="LightBox-module__caption___b6L2I",yl="LightBox-module__captionTextInner___rCGNH",vl="LightBox-module__lightboxSplide___XFuWC",bl="LightBox-module__arrow___iz38X",xl="LightBox-module__arrowVertical___Zfz81",Cl="LightBox-module__nextArrow___zkAQN",Sl="LightBox-module__arrowInner___p48sW",wl="LightBox-module__arrowIcon___3VaFf",$l="LightBox-module__arrowImg___pNV88",Tl="LightBox-module__mirror___pjeXc",Ll="LightBox-module__thumbsWrapper___GB-nU",El="LightBox-module__thumbsContainerVertical___wttk5",_l="LightBox-module__thumbsContainer___osSma",Pl="LightBox-module__thumbsAlignStart___MO6tY",Al="LightBox-module__thumbsAlignCenter___Q4sUx",Rl="LightBox-module__thumbsAlignEnd___p4y9R",Il="LightBox-module__thumbItem___HvnF3",Wl="LightBox-module__closeButton___g2khP",Fl="LightBox-module__fadeIn___0m5GW",kl="LightBox-module__slideInLeft___gPYwC",Ml="LightBox-module__slideInRight___S-pPp",Nl="LightBox-module__slideInTop___DFdAj",Hl="LightBox-module__slideInBottom___m27kZ",Ol="LightBox-module__fadeOut___55qBR",Bl="LightBox-module__slideOutLeft___NvU7P",Vl="LightBox-module__slideOutRight___SK7eC",Dl="LightBox-module__slideOutTop___Vgg0z",zl="LightBox-module__slideOutBottom___nJ0Ef",jl="LightBox-module__scaleSlide___vZriG",X={hidden:sl,heroImage:ll,background:cl,editor:dl,contentStyle:ul,imageStyle:pl,imgWrapper:ml,contain:gl,cover:hl,caption:fl,captionTextInner:yl,lightboxSplide:vl,arrow:bl,arrowVertical:xl,nextArrow:Cl,arrowInner:Sl,arrowIcon:wl,arrowImg:$l,mirror:Tl,thumbsWrapper:Ll,thumbsContainerVertical:El,thumbsContainer:_l,thumbsAlignStart:Pl,thumbsAlignCenter:Al,thumbsAlignEnd:Rl,thumbItem:Il,closeButton:Wl,fadeIn:Fl,slideInLeft:kl,slideInRight:Ml,slideInTop:Nl,slideInBottom:Hl,fadeOut:Ol,slideOutLeft:Bl,slideOutRight:Vl,slideOutTop:Dl,slideOutBottom:zl,scaleSlide:jl},Wn=(e,t,n)=>{const r={},[o,s]=e.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"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),o==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), calc(-50% + ${T.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${T.scalingValue(t.x,n)}, calc(-50% + ${T.scalingValue(t.y,n)}))`:s==="center"?r.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), ${T.scalingValue(t.y,n)})`:r.transform=`translate(${T.scalingValue(t.x,n)}, ${T.scalingValue(t.y,n)})`,r};function Pi(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function _o(e){const t=e.getBoundingClientRect(),n=Pi(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,a=r/o,c=s/i;let u,d;c>a?(u=r,d=r/c):(d=o,u=o*c);const $=t.left+n.left,h=t.top+n.top,f=(r-u)/2+$,m=(o-d)/2+h;return{x:f,y:m,width:u,height:d}}function Po(e){const t=e.getBoundingClientRect(),n=Pi(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ao(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Kl(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),s=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:s}}const Ul=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:s})=>{const[i,a]=p.useState(!1),{url:c}=e.thumbnailBlock.cover;return p.useEffect(()=>{o==="close"&&a(!1),o==="open"&&a(!0)},[o]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:c,alt:"Cover",className:X.heroImage,onClick:()=>a(!0)}),l.jsx(ql,{isOpen:i,onClose:()=>a(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},ql=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:s,isEditor:i,metadata:a})=>{var I;const[c,u]=p.useState(0),[d,$]=p.useState(0),[h,f]=p.useState(!1),[m,g]=p.useState(!1),[C,y]=p.useState({}),x=p.useRef(null),P=p.useRef(null),L=p.useRef(null),_=p.useRef(!1),E=p.useRef(null),v=p.useRef(null),S=p.useRef(null),F=p.useRef(null),V=p.useRef(!1),A=p.useRef(null),[O,D]=p.useState(!1),{appear:j,triggers:U,slider:w,thumbnail:N,controls:k,area:M,caption:R,layout:B}=o.lightboxBlock,{appearClass:te,backdropAppearClass:ue,backdropDisappearClass:ie,disappearClass:me}=Kl(j.type,j.direction),H=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const b=()=>{setTimeout(()=>{var q,J;(J=(q=x.current)==null?void 0:q.splide)==null||J.refresh()},16)},z=()=>{$(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",z),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",z)}},[]),p.useEffect(()=>{if(!e||!N.isActive){D(!1);return}const b=A.current;if(!b)return;const z=()=>{w.direction==="horiz"?D(b.scrollWidth>b.clientWidth):D(b.scrollHeight>b.clientHeight)};z();const q=new ResizeObserver(z);return q.observe(b),()=>q.disconnect()},[e,N.isActive,n.length,C,w.direction]);const Q=p.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,z=Ao(M.color);b&&!i&&z>.9&&(document.body.style.backgroundColor=""),f(!0),_.current=!0;const q=J=>{J.target===E.current&&J.animationName&&(E.current&&v.current&&E.current.removeEventListener("animationend",v.current),v.current=null,_.current&&(_.current=!1,t()),f(!1))};E.current&&(v.current=q,E.current.addEventListener("animationend",q))},[t,M.color,i]),G=(b,z,q)=>{var J,se;if(b){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?Q():(J=x.current)==null||J.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const le=b.getBoundingClientRect(),ce=z-le.left,he=q-le.top,K=le.width,ee=le.height;let Z;w.direction==="horiz"?Z=ce<K/2?"-1":"+1":Z=he<ee/2?"-1":"+1",(se=x.current)==null||se.go(Z)}}},Y=b=>{if(V.current){V.current=!1;return}const z=n[c],q=(z==null?void 0:z.image.objectFit)==="cover";let J,se;if("changedTouches"in b&&b.changedTouches.length>0)J=b.changedTouches[0].clientX,se=b.changedTouches[0].clientY;else if("clientX"in b)J=b.clientX,se=b.clientY;else return;let le;if(q&&L.current){const ce=Po(L.current);le=J>=ce.left&&J<=ce.right&&se>=ce.top&&se<=ce.bottom}else{const ce=L.current?_o(L.current):null;if(!ce){b.target===b.currentTarget&&Q();return}le=J>=ce.x&&J<=ce.x+ce.width&&se>=ce.y&&se<=ce.y+ce.height}le?G(L.current,J,se):Q()},oe=b=>{const z=b.target;(z.classList.contains(X.thumbsWrapper)||z.classList.contains(X.thumbsContainer))&&Y(b)};p.useEffect(()=>{if(!e)return;const b=z=>{var q,J;if(z.key==="Escape"){Q();return}if(z.key==="ArrowRight"){u(se=>(se+1)%Math.max(n.length,1)),(q=x.current)==null||q.go("+1");return}z.key==="ArrowLeft"&&(u(se=>(se-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=x.current)==null||J.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,Q,n.length]),p.useEffect(()=>{if(e){if(u(0),$(z=>z+1),_.current=!1,f(!1),g(!1),y({}),!H)return;const b=new CustomEvent("page-overlay",{detail:{itemId:H}});window.dispatchEvent(b)}return()=>{E.current&&v.current&&(E.current.removeEventListener("animationend",v.current),v.current=null),g(!1)}},[e,H]),p.useEffect(()=>{P.current!==null&&P.current!==w.type&&$(b=>b+1),P.current=w.type},[w.type]),p.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,z=window.matchMedia("(max-width: 768px)").matches,q=Ao(M.color);document.body.style.overflow="hidden",g(!1);const J=le=>{le.target===E.current&&!_.current&&le.animationName&&(z&&!i&&q>.9&&(document.body.style.backgroundColor=M.color),g(!0),E.current&&S.current&&E.current.removeEventListener("animationend",S.current),S.current=null)};E.current&&(S.current=J,E.current.addEventListener("animationend",J));const se=le=>{const ce=le.target;ce&&(ce.closest(`.${X.thumbsWrapper}`)||ce.closest(`.${X.thumbsContainer}`))||w.type!=="slide"&&le.preventDefault()};return document.addEventListener("touchmove",se,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",se),E.current&&S.current&&(E.current.removeEventListener("animationend",S.current),S.current=null),g(!1)}},[e,i,M.color,w.type]),p.useEffect(()=>{if(!e)return;const b=z=>{var J,se;if(_.current){z.stopPropagation();return}if(V.current){V.current=!1;return}const q=z.target;if(!(q&&(q.closest(`.${X.thumbsContainer}`)||q.closest(`.${X.thumbItem}`)||q.closest(`.${X.arrow}`)||q.closest(`.${X.closeButton}`)||q.closest(`.${X.caption}`)))){if(w.type==="slide"&&U.type==="drag"&&((se=(J=x.current)==null?void 0:J.splide)!=null&&se.root)){const le=x.current.splide.root;if(q&&(le.contains(q)||le===q))return}if(z.touches.length===0&&z.changedTouches.length>0){const le=n[c],ce=(le==null?void 0:le.image.objectFit)==="cover",he=z.changedTouches[0];let K;if(ce&&L.current){const ee=Po(L.current);K=he.clientX>=ee.left&&he.clientX<=ee.right&&he.clientY>=ee.top&&he.clientY<=ee.bottom}else{const ee=L.current?_o(L.current):null;if(!ee)return;K=he.clientX>=ee.x&&he.clientX<=ee.x+ee.width&&he.clientY>=ee.y&&he.clientY<=ee.y+ee.height}if(!K){z.stopPropagation(),_.current=!0;const ee=Z=>{Z.stopPropagation(),Z.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),Q()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,Q,c,n]);const W=(w.type==="scale"||w.type==="fade")&&w.direction==="vert"&&U.type==="drag";p.useEffect(()=>{var Z,de;if(!e||!W||!((de=(Z=x.current)==null?void 0:Z.splide)!=null&&de.root))return;const b=x.current.splide.root,z=30,q=(re,pe)=>{if(F.current){const ve=Math.abs(re-F.current.x),Pe=Math.abs(pe-F.current.y);(ve>0||Pe>0)&&(V.current=!0)}},J=re=>{F.current&&(re.preventDefault(),q(re.clientX,re.clientY))},se=re=>{F.current&&re.touches.length>0&&(re.preventDefault(),q(re.touches[0].clientX,re.touches[0].clientY))},le=(re,pe)=>{if(!F.current||!x.current){F.current=null;return}const ve=Math.abs(re-F.current.x),Pe=Math.abs(pe-F.current.y);Pe>z&&Pe>ve&&x.current.go(pe<F.current.y?"+1":"-1"),F.current=null},ce=re=>{F.current&&le(re.clientX,re.clientY),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("pointermove",J)},he=re=>{if(F.current){if(re.changedTouches.length>0){const pe=re.changedTouches[0];le(pe.clientX,pe.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",se)}},K=re=>{F.current={x:re.clientX,y:re.clientY},V.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ce),document.addEventListener("pointercancel",ce)},ee=re=>{re.touches.length>0&&(F.current={x:re.touches[0].clientX,y:re.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",se,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return b.addEventListener("pointerdown",K),b.addEventListener("touchstart",ee),()=>{b.removeEventListener("pointerdown",K),b.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),F.current=null,V.current=!1}},[e,W,d]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Uo.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:E,className:Ce(X.background,h?ie:ue,{[X.editor]:i},{[X.hidden]:!e}),style:{...ne,...m&&!i&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?E:null,className:Ce(X.contentStyle,h?me:te,{[X.editor]:i},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(Jr,{onMove:b=>u(b.index),ref:x,className:X.lightboxSplide,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,direction:w.direction==="horiz"||w.type==="fade"||w.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!W,perPage:1,width:"100%",height:"100%",type:w.type==="fade"||w.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":w.duration},children:n.map((b,z)=>{const q=Wn(B.position,B.offset,i),J=`${T.scalingValue(B.padding.top,i)} ${T.scalingValue(B.padding.right,i)} ${T.scalingValue(B.padding.bottom,i)} ${T.scalingValue(B.padding.left,i)}`,se=w.type==="scale"?(()=>{const{transform:le,...ce}=q;return{...ce,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":le||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return l.jsx(Qr,{children:l.jsx("div",{className:X.imgWrapper,onClick:Y,children:l.jsx("img",{ref:z===c?L:null,className:Ce(X.imageStyle,{[X.contain]:b.image.objectFit==="contain",[X.cover]:b.image.objectFit==="cover",[X.scaleSlide]:w.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...se,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},z)})},d),k.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(X.arrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(k.offset.x,i)}, ${T.scalingValue(k.offset.y*(w.direction==="horiz"?1:-1),i)}) scale(${k.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[k.arrowsImgUrl&&l.jsx(Lt,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:Ce(X.arrowImg,X.mirror)}),!k.arrowsImgUrl&&l.jsx(Ro,{color:k.color,className:Ce(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ce(X.arrow,X.nextArrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(k.offset.x*(w.direction==="horiz"?-1:1),i)}, ${T.scalingValue(k.offset.y,i)}) scale(${k.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[k.arrowsImgUrl&&l.jsx(Lt,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:X.arrowImg}),!k.arrowsImgUrl&&l.jsx(Ro,{color:k.color,className:Ce(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const b=Wn(M.closeIconAlign,M.closeIconOffset,i),z=`scale(${M.closeIconScale})`,q=b.transform?`${b.transform} ${z}`:z;return l.jsx("button",{className:X.closeButton,style:{...b,transform:q},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Lt,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),R&&R.isActive&&r.imageCaption&&((I=n[c])==null?void 0:I.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:z,letterSpacing:q,textAlign:J,wordSpacing:se,fontSizeLineHeight:le,textAppearance:ce,color:he}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...Wn(R.alignment,R.offset,i),fontFamily:cr(z.fontFamily),fontWeight:z.fontWeight,fontStyle:z.fontStyle,width:b.sizing==="auto"?"max-content":T.scalingValue(b.width,i),letterSpacing:T.scalingValue(q,i),wordSpacing:T.scalingValue(se,i),textAlign:J,fontSize:T.scalingValue(le.fontSize,i),lineHeight:T.scalingValue(le.lineHeight,i),textTransform:ce.textTransform??"none",textDecoration:ce.textDecoration??"none",fontVariant:ce.fontVariant??"normal",color:he},onClick:K=>K.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":R.linkColor,"--link-hover-color":R.linkHoverColor},children:l.jsx(vn,{content:n[c].imageCaption})})})})(),N.isActive&&(()=>{const[b,z]=N.position.split("-"),q=w.direction==="horiz"?`${b}-left`:N.position,J=Wn(q,N.offset,i),se=()=>{if(w.direction==="horiz"){if(z==="left")return"flex-start";if(z==="center")return"center";if(z==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:A,className:X.thumbsWrapper,onClick:le=>oe(le),style:{position:i?"absolute":"fixed",...J,...w.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ce(X.thumbsContainer,{[X.thumbsContainerVertical]:w.direction==="vert",[X.thumbsAlignStart]:N.align==="start",[X.thumbsAlignCenter]:N.align==="center",[X.thumbsAlignEnd]:N.align==="end"}),style:{gap:T.scalingValue(N.grid.gap,i),justifyContent:O?"flex-start":se()},children:n.map((le,ce)=>{const he=ce===c,K=C[ce],Z=N.grid.size*(he?N.activeState.scale:1),de=()=>{if(N.fit!=="fit")return{};if(!K)return w.direction==="horiz"?{height:T.scalingValue(Z,i)}:{width:T.scalingValue(Z,i)};const re=K.width/K.height;if(w.direction==="horiz"){const pe=Z,ve=pe*re;return{width:T.scalingValue(ve,i),height:T.scalingValue(pe,i)}}else{const pe=Z,ve=pe/re;return{width:T.scalingValue(pe,i),height:T.scalingValue(ve,i)}}};return l.jsx("button",{className:X.thumbItem,style:{...w.direction==="horiz"&&N.fit!=="fit"?{height:T.scalingValue(Z,i)}:{},...w.direction==="vert"&&N.fit!=="fit"?{width:T.scalingValue(Z,i)}:{},...N.fit==="cover"?{width:T.scalingValue(Z,i),height:T.scalingValue(Z,i)}:{},...de(),transition:he?"all 0.25s ease-out":"none",opacity:he?N.activeState.opacity/100:N.opacity/100,"--thumb-hover":N.activeState.opacity/100},onClick:re=>{var pe;re.stopPropagation(),u(ce),(pe=x.current)==null||pe.go(ce)},onMouseEnter:()=>{var re;N.triggers==="hov"&&((re=x.current)==null||re.go(ce))},children:l.jsx("img",{src:le.image.url,alt:le.image.name??"",onLoad:re=>{const pe=re.currentTarget;pe.naturalWidth&&pe.naturalHeight&&y(ve=>({...ve,[ce]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:N.fit==="cover"?"cover":"contain",...N.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...N.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${le.image.name}-${ce}`)})})})})()]})]}),document.getElementById(s))};function Ro({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Gl={element:Ul,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Fn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yl(e){return`
|
|
6
|
+
*/const zs="RichTextRenderer-module__link___BWeZ2",js={link:zs},Ks=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},cr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ks(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Je(e,t){var i,s,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:cr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:T.scalingValue(e.letterSpacing,t),wordSpacing:T.scalingValue(e.wordSpacing,t),fontSize:T.scalingValue(n,t),lineHeight:r!==void 0?T.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,color:e.color}}const vn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:js.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:Us(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function Us(e){return{...e.fontFamily&&{fontFamily:cr(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const qs="SvgImage-module__svg___q3xE-",Gs="SvgImage-module__img___VsTm-",$i={svg:qs,img:Gs},Ys=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Xs=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Lt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[s,o]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const a=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(a)}},[]),!Ys(e)||!s?l.jsx("img",{src:e,alt:"",className:Ce($i.img,r),style:i}):l.jsx("span",{"data-supports-mask":s,className:Ce($i.svg,r),style:{"--svg":Xs(e),"--fill":t,"--hover-fill":n,...i??{}}})},Zs={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function Js({settings:e,content:t,styles:n,isEditor:r}){const[i,s]=p.useState(null),{widthSettings:o,fontSettings:a,letterSpacing:c,textAlign:u,wordSpacing:d,fontSizeLineHeight:$,textAppearance:h,color:f}=n.imageCaption,[m,g]=p.useState(void 0),[C,y]=p.useState(null),[x,P]=p.useState(0),[L,_]=p.useState(0),{direction:E,transition:v,controls:S,pagination:k,imageCaption:V,triggers:A}=e,O=p.useRef(v.type),{x:D,y:j}=e.controls.offset,U=w=>{i&&i.go(w)};return p.useEffect(()=>{if(!C)return;const w=new ResizeObserver(N=>{if(!i)return;const[F]=N;g({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return w.observe(C),()=>w.unobserve(C)},[C]),p.useEffect(()=>{!i||O.current===v.type||(_(w=>w+1),O.current=v.type)},[v.type]),l.jsx("div",{className:Ce(ae.wrapper,{[ae.editor]:r}),ref:y,children:l.jsxs("div",{className:ae.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ce(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((w,N)=>l.jsx("div",{className:Ce(ae.captionText,Zs[V.alignment],{[ae.withPointerEvents]:N===x&&r,[ae.active]:N===x}),style:{fontFamily:cr(a.fontFamily),fontWeight:a.fontWeight,fontStyle:a.fontStyle,width:o.sizing==="auto"?"max-content":T.scalingValue(o.width,r),letterSpacing:T.scalingValue(c,r),wordSpacing:T.scalingValue(d,r),textAlign:u,fontSize:T.scalingValue($.fontSize,r),lineHeight:T.scalingValue($.lineHeight,r),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:f,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:T.scalingValue(V.offset.y,r),left:T.scalingValue(V.offset.x,r)},children:l.jsx(vn,{content:w.imageCaption})})},N))})}),l.jsx(Jr,{onMove:w=>{P(w.index)},ref:s,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:A.autoPlay!==null,...A.autoPlay!==null&&{interval:parseInt(A.autoPlay)*1e3},direction:E==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:A.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((w,N)=>l.jsx(Qr,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Ce(ae.sliderImage,{[ae.contain]:w.image.objectFit==="contain",[ae.cover]:w.image.objectFit==="cover"}),src:w.image.url,alt:w.image.name??""})})})},N))},L),S.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(ae.arrow,{[ae.arrowVertical]:E==="vert",[ae.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:l.jsxs("button",{onClick:()=>{U("-1")},className:ae.arrowInner,style:{transform:`translate(${T.scalingValue(D,r)}, ${T.scalingValue(j*(E==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&l.jsx(Lt,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:Ce(ae.arrowImg,ae.mirror)}),!S.arrowsImgUrl&&l.jsx(Ti,{color:S.color,className:Ce(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Ce(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:E==="vert",[ae.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${T.scalingValue(D*(E==="horiz"?-1:1),r)}, ${T.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&l.jsx(Lt,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:ae.arrowImg}),!S.arrowsImgUrl&&l.jsx(Ti,{color:S.color,className:Ce(ae.arrowIcon,ae.arrowImg)})]})})]}),A.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{i&&i.go("+1")}}),k.isActive&&l.jsx("div",{className:Ce(ae.pagination,{[ae.paginationInsideBottom]:k.position==="inside-1"&&E==="horiz",[ae.paginationInsideTop]:k.position==="inside-2"&&E==="horiz",[ae.paginationOutsideBottom]:k.position==="outside-1"&&E==="horiz",[ae.paginationOutsideTop]:k.position==="outside-2"&&E==="horiz",[ae.paginationInsideLeft]:k.position==="inside-1"&&E==="vert",[ae.paginationInsideRight]:k.position==="inside-2"&&E==="vert",[ae.paginationOutsideLeft]:k.position==="outside-1"&&E==="vert",[ae.paginationOutsideRight]:k.position==="outside-2"&&E==="vert",[ae.paginationVertical]:E==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:k.colors[2],transform:`scale(${k.scale/100}) translate(${T.scalingValue(k.offset.x,r)}, ${T.scalingValue(k.offset.y,r)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((w,N)=>l.jsx("button",{onClick:()=>{i&&i.go(N)},className:Ce(ae.paginationItem),children:l.jsx("div",{className:Ce(ae.dot,{[ae.activeDot]:N===x}),style:{backgroundColor:N===x?k.colors[0]:k.colors[1],"--pagination-hover-color":k.hover}})},N))})})]})})}function Ti({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Qs={element:Js,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},el="ImageRevealSlider-module__imageRevealSlider___UE5Ob",tl="ImageRevealSlider-module__image___Qjt-e",nl="ImageRevealSlider-module__link___N-iLG",rl="ImageRevealSlider-module__cursor___2U03d",Dt={imageRevealSlider:el,image:tl,link:nl,cursor:rl};function Li(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const s=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*s,a=s/2,c=o/2;if(e>=r.x-a&&e<=r.x+a&&t>=r.y-c&&t<=r.y+c)return!0}return!1}function fr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function il(e,t,n,r){let i,s;if(t==="custom"){i=n;const o=await fr(e);s=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await fr(e);s=o.height/o.width*i}else{const o=await fr(e);i=o.width,s=o.height}return{width:i,height:s,finalWidth:`${i}px`}}function ol({settings:e,content:t,isEditor:n}){const[r,i]=p.useState(null),[s,o]=p.useState([]),[a,c]=p.useState(0),u=p.useRef(0),[d,$]=p.useState({x:0,y:0}),[h,f]=p.useState(1),[m,g]=p.useState("none"),C=p.useRef({x:0,y:0}),[y,x]=p.useState(!1),{sizeType:P,imageWidth:L,randomRangeImageWidth:_}=e.imageSize,{revealPosition:E,visible:v}=e.position,{cursorType:S,target:k,defaultCursorScale:V,defaultCursor:A,hoverCursorScale:O,hoverCursor:D}=e.cursor;p.useEffect(()=>{if(!r)return;const w=(M,R)=>{const B=r.getBoundingClientRect(),te=M-B.left,ue=R-B.top;if($({x:te,y:ue}),S==="system"){g("none"),f(1);return}const oe=te,me=ue,H=document.elementFromPoint(B.left+oe,B.top+me);if(H&&H.closest("a")){g("none"),f(1);return}const Q=Li(oe,me,s)||k==="area"?{img:D??"none",scale:O}:{img:A??"none",scale:V};g(Q.img),f(Q.scale)},N=M=>{M.stopPropagation(),C.current={x:M.clientX,y:M.clientY},w(M.clientX,M.clientY)},F=()=>{y&&w(C.current.x,C.current.y)};return r.addEventListener("mousemove",N),window.addEventListener("scroll",F,!0),()=>{r.removeEventListener("mousemove",N),window.removeEventListener("scroll",F,!0)}},[r,y,d,S,k,D,A,O,V,s]),p.useEffect(()=>{y||(g("none"),f(0))},[y]);const j=async(w,N,F,M={})=>{const{width:R,height:B,finalWidth:te}=await il(w.image.url,P,L,_);let ue=0,oe=0;E==="same"?(ue=N/2,oe=F/2):(ue=M.x??Math.random()*N,oe=M.y??Math.random()*F);const me=Math.min(Math.max(ue,R/2),N-R/2),H=Math.min(Math.max(oe,B/2),F-B/2);return{id:u.current++,url:w.image.url,link:w.link,name:w.image.name,x:me,y:H,width:te}};p.useEffect(()=>{if(!r||t.length===0)return;const w=r.getBoundingClientRect(),N=w.width,F=w.height,M=[];(async()=>{const B=t[0],te=await j(B,N,F);M.push(te),o(M),c(1)})()},[P,L,_,E,r]),p.useEffect(()=>{v==="last One"&&o(w=>w.length>0?[w[w.length-1]]:[])},[v]);const U=async w=>{if(!r)return;const N=r.getBoundingClientRect(),F=w.clientX-N.left,M=w.clientY-N.top;if(k==="image"&&!Li(F,M,s))return;let R=0,B=0;E==="on Click"?(R=F,B=M):E==="same"?(R=N.width/2,B=N.height/2):(R=Math.random()*N.width,B=Math.random()*N.height);const te=t[a],ue=await j(te,N.width,N.height,{x:R,y:B});o(oe=>v==="all"?[...oe,ue]:[ue]),c(oe=>oe>=t.length-1?0:oe+1)};return l.jsxs("div",{ref:i,onClick:U,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:Dt.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(w=>l.jsx("div",{className:Dt.wrapper,style:{top:`${w.y}px`,left:`${w.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:w.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:k==="area"&&w.link?l.jsx("a",{href:w.link,target:"_blank",className:Dt.link,children:l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)}):l.jsx("img",{src:w.url,alt:w.name,className:Dt.image},w.id)},w.id)),y&&l.jsx("div",{className:Dt.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const al={element:ol,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},sl="LightBox-module__hidden___9s-9x",ll="LightBox-module__heroImage___sTxNF",cl="LightBox-module__background___rm9ml",dl="LightBox-module__editor___4ACaY",ul="LightBox-module__contentStyle___Bgnsq",pl="LightBox-module__imageStyle___tLIlB",ml="LightBox-module__imgWrapper___LuFUp",gl="LightBox-module__contain___8-yaS",hl="LightBox-module__cover___hNvOG",fl="LightBox-module__caption___b6L2I",yl="LightBox-module__captionTextInner___rCGNH",vl="LightBox-module__lightboxSplide___XFuWC",bl="LightBox-module__arrow___iz38X",xl="LightBox-module__arrowVertical___Zfz81",Cl="LightBox-module__nextArrow___zkAQN",Sl="LightBox-module__arrowInner___p48sW",wl="LightBox-module__arrowIcon___3VaFf",$l="LightBox-module__arrowImg___pNV88",Tl="LightBox-module__mirror___pjeXc",Ll="LightBox-module__thumbsWrapper___GB-nU",El="LightBox-module__thumbsContainerVertical___wttk5",_l="LightBox-module__thumbsContainer___osSma",Pl="LightBox-module__thumbsAlignStart___MO6tY",Al="LightBox-module__thumbsAlignCenter___Q4sUx",Rl="LightBox-module__thumbsAlignEnd___p4y9R",Il="LightBox-module__thumbItem___HvnF3",Wl="LightBox-module__closeButton___g2khP",kl="LightBox-module__fadeIn___0m5GW",Fl="LightBox-module__slideInLeft___gPYwC",Ml="LightBox-module__slideInRight___S-pPp",Nl="LightBox-module__slideInTop___DFdAj",Hl="LightBox-module__slideInBottom___m27kZ",Ol="LightBox-module__fadeOut___55qBR",Bl="LightBox-module__slideOutLeft___NvU7P",Vl="LightBox-module__slideOutRight___SK7eC",Dl="LightBox-module__slideOutTop___Vgg0z",zl="LightBox-module__slideOutBottom___nJ0Ef",jl="LightBox-module__scaleSlide___vZriG",X={hidden:sl,heroImage:ll,background:cl,editor:dl,contentStyle:ul,imageStyle:pl,imgWrapper:ml,contain:gl,cover:hl,caption:fl,captionTextInner:yl,lightboxSplide:vl,arrow:bl,arrowVertical:xl,nextArrow:Cl,arrowInner:Sl,arrowIcon:wl,arrowImg:$l,mirror:Tl,thumbsWrapper:Ll,thumbsContainerVertical:El,thumbsContainer:_l,thumbsAlignStart:Pl,thumbsAlignCenter:Al,thumbsAlignEnd:Rl,thumbItem:Il,closeButton:Wl,fadeIn:kl,slideInLeft:Fl,slideInRight:Ml,slideInTop:Nl,slideInBottom:Hl,fadeOut:Ol,slideOutLeft:Bl,slideOutRight:Vl,slideOutTop:Dl,slideOutBottom:zl,scaleSlide:jl},Wn=(e,t,n)=>{const r={},[i,s]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),s==="left"?(r.left="0",r.right="auto"):s==="center"?(r.left="50%",r.right="auto"):s==="right"&&(r.left="auto",r.right="0"),i==="middle"&&s==="center"?r.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), calc(-50% + ${T.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${T.scalingValue(t.x,n)}, calc(-50% + ${T.scalingValue(t.y,n)}))`:s==="center"?r.transform=`translate(calc(-50% + ${T.scalingValue(t.x,n)}), ${T.scalingValue(t.y,n)})`:r.transform=`translate(${T.scalingValue(t.x,n)}, ${T.scalingValue(t.y,n)})`,r};function Po(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function Ei(e){const t=e.getBoundingClientRect(),n=Po(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,o=e.naturalHeight,a=r/i,c=s/o;let u,d;c>a?(u=r,d=r/c):(d=i,u=i*c);const $=t.left+n.left,h=t.top+n.top,f=(r-u)/2+$,m=(i-d)/2+h;return{x:f,y:m,width:u,height:d}}function _i(e){const t=e.getBoundingClientRect(),n=Po(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Pi(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Kl(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),s=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:s}}const Ul=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:s})=>{const[o,a]=p.useState(!1),{url:c}=e.thumbnailBlock.cover;return p.useEffect(()=>{i==="close"&&a(!1),i==="open"&&a(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:c,alt:"Cover",className:X.heroImage,onClick:()=>a(!0)}),l.jsx(ql,{isOpen:o,onClose:()=>a(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:s})]})},ql=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:s,isEditor:o,metadata:a})=>{var I;const[c,u]=p.useState(0),[d,$]=p.useState(0),[h,f]=p.useState(!1),[m,g]=p.useState(!1),[C,y]=p.useState({}),x=p.useRef(null),P=p.useRef(null),L=p.useRef(null),_=p.useRef(!1),E=p.useRef(null),v=p.useRef(null),S=p.useRef(null),k=p.useRef(null),V=p.useRef(!1),A=p.useRef(null),[O,D]=p.useState(!1),{appear:j,triggers:U,slider:w,thumbnail:N,controls:F,area:M,caption:R,layout:B}=i.lightboxBlock,{appearClass:te,backdropAppearClass:ue,backdropDisappearClass:oe,disappearClass:me}=Kl(j.type,j.direction),H=(a==null?void 0:a.itemId)??null;p.useEffect(()=>{const b=()=>{setTimeout(()=>{var q,J;(J=(q=x.current)==null?void 0:q.splide)==null||J.refresh()},16)},z=()=>{$(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",z),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",z)}},[]),p.useEffect(()=>{if(!e||!N.isActive){D(!1);return}const b=A.current;if(!b)return;const z=()=>{w.direction==="horiz"?D(b.scrollWidth>b.clientWidth):D(b.scrollHeight>b.clientHeight)};z();const q=new ResizeObserver(z);return q.observe(b),()=>q.disconnect()},[e,N.isActive,n.length,C,w.direction]);const Q=p.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,z=Pi(M.color);b&&!o&&z>.9&&(document.body.style.backgroundColor=""),f(!0),_.current=!0;const q=J=>{J.target===E.current&&J.animationName&&(E.current&&v.current&&E.current.removeEventListener("animationend",v.current),v.current=null,_.current&&(_.current=!1,t()),f(!1))};E.current&&(v.current=q,E.current.addEventListener("animationend",q))},[t,M.color,o]),G=(b,z,q)=>{var J,se;if(b){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?Q():(J=x.current)==null||J.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const le=b.getBoundingClientRect(),ce=z-le.left,he=q-le.top,K=le.width,ee=le.height;let Z;w.direction==="horiz"?Z=ce<K/2?"-1":"+1":Z=he<ee/2?"-1":"+1",(se=x.current)==null||se.go(Z)}}},Y=b=>{if(V.current){V.current=!1;return}const z=n[c],q=(z==null?void 0:z.image.objectFit)==="cover";let J,se;if("changedTouches"in b&&b.changedTouches.length>0)J=b.changedTouches[0].clientX,se=b.changedTouches[0].clientY;else if("clientX"in b)J=b.clientX,se=b.clientY;else return;let le;if(q&&L.current){const ce=_i(L.current);le=J>=ce.left&&J<=ce.right&&se>=ce.top&&se<=ce.bottom}else{const ce=L.current?Ei(L.current):null;if(!ce){b.target===b.currentTarget&&Q();return}le=J>=ce.x&&J<=ce.x+ce.width&&se>=ce.y&&se<=ce.y+ce.height}le?G(L.current,J,se):Q()},ie=b=>{const z=b.target;(z.classList.contains(X.thumbsWrapper)||z.classList.contains(X.thumbsContainer))&&Y(b)};p.useEffect(()=>{if(!e)return;const b=z=>{var q,J;if(z.key==="Escape"){Q();return}if(z.key==="ArrowRight"){u(se=>(se+1)%Math.max(n.length,1)),(q=x.current)==null||q.go("+1");return}z.key==="ArrowLeft"&&(u(se=>(se-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=x.current)==null||J.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,Q,n.length]),p.useEffect(()=>{if(e){if(u(0),$(z=>z+1),_.current=!1,f(!1),g(!1),y({}),!H)return;const b=new CustomEvent("page-overlay",{detail:{itemId:H}});window.dispatchEvent(b)}return()=>{E.current&&v.current&&(E.current.removeEventListener("animationend",v.current),v.current=null),g(!1)}},[e,H]),p.useEffect(()=>{P.current!==null&&P.current!==w.type&&$(b=>b+1),P.current=w.type},[w.type]),p.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,z=window.matchMedia("(max-width: 768px)").matches,q=Pi(M.color);document.body.style.overflow="hidden",g(!1);const J=le=>{le.target===E.current&&!_.current&&le.animationName&&(z&&!o&&q>.9&&(document.body.style.backgroundColor=M.color),g(!0),E.current&&S.current&&E.current.removeEventListener("animationend",S.current),S.current=null)};E.current&&(S.current=J,E.current.addEventListener("animationend",J));const se=le=>{const ce=le.target;ce&&(ce.closest(`.${X.thumbsWrapper}`)||ce.closest(`.${X.thumbsContainer}`))||w.type!=="slide"&&le.preventDefault()};return document.addEventListener("touchmove",se,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",se),E.current&&S.current&&(E.current.removeEventListener("animationend",S.current),S.current=null),g(!1)}},[e,o,M.color,w.type]),p.useEffect(()=>{if(!e)return;const b=z=>{var J,se;if(_.current){z.stopPropagation();return}if(V.current){V.current=!1;return}const q=z.target;if(!(q&&(q.closest(`.${X.thumbsContainer}`)||q.closest(`.${X.thumbItem}`)||q.closest(`.${X.arrow}`)||q.closest(`.${X.closeButton}`)||q.closest(`.${X.caption}`)))){if(w.type==="slide"&&U.type==="drag"&&((se=(J=x.current)==null?void 0:J.splide)!=null&&se.root)){const le=x.current.splide.root;if(q&&(le.contains(q)||le===q))return}if(z.touches.length===0&&z.changedTouches.length>0){const le=n[c],ce=(le==null?void 0:le.image.objectFit)==="cover",he=z.changedTouches[0];let K;if(ce&&L.current){const ee=_i(L.current);K=he.clientX>=ee.left&&he.clientX<=ee.right&&he.clientY>=ee.top&&he.clientY<=ee.bottom}else{const ee=L.current?Ei(L.current):null;if(!ee)return;K=he.clientX>=ee.x&&he.clientX<=ee.x+ee.width&&he.clientY>=ee.y&&he.clientY<=ee.y+ee.height}if(!K){z.stopPropagation(),_.current=!0;const ee=Z=>{Z.stopPropagation(),Z.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),Q()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,Q,c,n]);const W=(w.type==="scale"||w.type==="fade")&&w.direction==="vert"&&U.type==="drag";p.useEffect(()=>{var Z,de;if(!e||!W||!((de=(Z=x.current)==null?void 0:Z.splide)!=null&&de.root))return;const b=x.current.splide.root,z=30,q=(re,pe)=>{if(k.current){const ve=Math.abs(re-k.current.x),Pe=Math.abs(pe-k.current.y);(ve>0||Pe>0)&&(V.current=!0)}},J=re=>{k.current&&(re.preventDefault(),q(re.clientX,re.clientY))},se=re=>{k.current&&re.touches.length>0&&(re.preventDefault(),q(re.touches[0].clientX,re.touches[0].clientY))},le=(re,pe)=>{if(!k.current||!x.current){k.current=null;return}const ve=Math.abs(re-k.current.x),Pe=Math.abs(pe-k.current.y);Pe>z&&Pe>ve&&x.current.go(pe<k.current.y?"+1":"-1"),k.current=null},ce=re=>{k.current&&le(re.clientX,re.clientY),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("pointermove",J)},he=re=>{if(k.current){if(re.changedTouches.length>0){const pe=re.changedTouches[0];le(pe.clientX,pe.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",se)}},K=re=>{k.current={x:re.clientX,y:re.clientY},V.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ce),document.addEventListener("pointercancel",ce)},ee=re=>{re.touches.length>0&&(k.current={x:re.touches[0].clientX,y:re.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",se,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return b.addEventListener("pointerdown",K),b.addEventListener("touchstart",ee),()=>{b.removeEventListener("pointerdown",K),b.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ce),document.removeEventListener("pointercancel",ce),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),k.current=null,V.current=!1}},[e,W,d]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ki.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:o?null:E,className:Ce(X.background,h?oe:ue,{[X.editor]:o},{[X.hidden]:!e}),style:{...ne,...m&&!o&&!h?{position:"absolute"}:{}}}),l.jsxs("div",{ref:o?E:null,className:Ce(X.contentStyle,h?me:te,{[X.editor]:o},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(Jr,{onMove:b=>u(b.index),ref:x,className:X.lightboxSplide,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,direction:w.direction==="horiz"||w.type==="fade"||w.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!W,perPage:1,width:"100%",height:"100%",type:w.type==="fade"||w.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":w.duration},children:n.map((b,z)=>{const q=Wn(B.position,B.offset,o),J=`${T.scalingValue(B.padding.top,o)} ${T.scalingValue(B.padding.right,o)} ${T.scalingValue(B.padding.bottom,o)} ${T.scalingValue(B.padding.left,o)}`,se=w.type==="scale"?(()=>{const{transform:le,...ce}=q;return{...ce,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":le||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return l.jsx(Qr,{children:l.jsx("div",{className:X.imgWrapper,onClick:Y,children:l.jsx("img",{ref:z===c?L:null,className:Ce(X.imageStyle,{[X.contain]:b.image.objectFit==="contain",[X.cover]:b.image.objectFit==="cover",[X.scaleSlide]:w.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...se,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},z)})},d),F.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ce(X.arrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(F.offset.x,o)}, ${T.scalingValue(F.offset.y*(w.direction==="horiz"?1:-1),o)}) scale(${F.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&l.jsx(Lt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:Ce(X.arrowImg,X.mirror)}),!F.arrowsImgUrl&&l.jsx(Ai,{color:F.color,className:Ce(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ce(X.arrow,X.nextArrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${T.scalingValue(F.offset.x*(w.direction==="horiz"?-1:1),o)}, ${T.scalingValue(F.offset.y,o)}) scale(${F.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&l.jsx(Lt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:X.arrowImg}),!F.arrowsImgUrl&&l.jsx(Ai,{color:F.color,className:Ce(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const b=Wn(M.closeIconAlign,M.closeIconOffset,o),z=`scale(${M.closeIconScale})`,q=b.transform?`${b.transform} ${z}`:z;return l.jsx("button",{className:X.closeButton,style:{...b,transform:q},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Lt,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),R&&R.isActive&&r.imageCaption&&((I=n[c])==null?void 0:I.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:z,letterSpacing:q,textAlign:J,wordSpacing:se,fontSizeLineHeight:le,textAppearance:ce,color:he}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...Wn(R.alignment,R.offset,o),fontFamily:cr(z.fontFamily),fontWeight:z.fontWeight,fontStyle:z.fontStyle,width:b.sizing==="auto"?"max-content":T.scalingValue(b.width,o),letterSpacing:T.scalingValue(q,o),wordSpacing:T.scalingValue(se,o),textAlign:J,fontSize:T.scalingValue(le.fontSize,o),lineHeight:T.scalingValue(le.lineHeight,o),textTransform:ce.textTransform??"none",textDecoration:ce.textDecoration??"none",fontVariant:ce.fontVariant??"normal",color:he},onClick:K=>K.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":R.linkColor,"--link-hover-color":R.linkHoverColor},children:l.jsx(vn,{content:n[c].imageCaption})})})})(),N.isActive&&(()=>{const[b,z]=N.position.split("-"),q=w.direction==="horiz"?`${b}-left`:N.position,J=Wn(q,N.offset,o),se=()=>{if(w.direction==="horiz"){if(z==="left")return"flex-start";if(z==="center")return"center";if(z==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:A,className:X.thumbsWrapper,onClick:le=>ie(le),style:{position:o?"absolute":"fixed",...J,...w.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ce(X.thumbsContainer,{[X.thumbsContainerVertical]:w.direction==="vert",[X.thumbsAlignStart]:N.align==="start",[X.thumbsAlignCenter]:N.align==="center",[X.thumbsAlignEnd]:N.align==="end"}),style:{gap:T.scalingValue(N.grid.gap,o),justifyContent:O?"flex-start":se()},children:n.map((le,ce)=>{const he=ce===c,K=C[ce],Z=N.grid.size*(he?N.activeState.scale:1),de=()=>{if(N.fit!=="fit")return{};if(!K)return w.direction==="horiz"?{height:T.scalingValue(Z,o)}:{width:T.scalingValue(Z,o)};const re=K.width/K.height;if(w.direction==="horiz"){const pe=Z,ve=pe*re;return{width:T.scalingValue(ve,o),height:T.scalingValue(pe,o)}}else{const pe=Z,ve=pe/re;return{width:T.scalingValue(pe,o),height:T.scalingValue(ve,o)}}};return l.jsx("button",{className:X.thumbItem,style:{...w.direction==="horiz"&&N.fit!=="fit"?{height:T.scalingValue(Z,o)}:{},...w.direction==="vert"&&N.fit!=="fit"?{width:T.scalingValue(Z,o)}:{},...N.fit==="cover"?{width:T.scalingValue(Z,o),height:T.scalingValue(Z,o)}:{},...de(),transition:he?"all 0.25s ease-out":"none",opacity:he?N.activeState.opacity/100:N.opacity/100,"--thumb-hover":N.activeState.opacity/100},onClick:re=>{var pe;re.stopPropagation(),u(ce),(pe=x.current)==null||pe.go(ce)},onMouseEnter:()=>{var re;N.triggers==="hov"&&((re=x.current)==null||re.go(ce))},children:l.jsx("img",{src:le.image.url,alt:le.image.name??"",onLoad:re=>{const pe=re.currentTarget;pe.naturalWidth&&pe.naturalHeight&&y(ve=>({...ve,[ce]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:N.fit==="cover"?"cover":"contain",...N.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...N.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${le.image.name}-${ce}`)})})})})()]})]}),document.getElementById(s))};function Ai({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Gl={element:Ul,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function kn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Yl(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${kn(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
|
|
14
14
|
.${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
min-width: 0;
|
|
33
33
|
}
|
|
34
34
|
.${e}-field-group.${e}-labeled {
|
|
35
|
-
gap: ${
|
|
35
|
+
gap: ${kn(4)};
|
|
36
36
|
}
|
|
37
37
|
.${e}-field-label {
|
|
38
38
|
white-space: nowrap;
|
|
@@ -128,18 +128,18 @@
|
|
|
128
128
|
outline: none;
|
|
129
129
|
}
|
|
130
130
|
.${e}-success {
|
|
131
|
-
margin-top: ${
|
|
131
|
+
margin-top: ${kn(8)};
|
|
132
132
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
133
133
|
}
|
|
134
134
|
.${e}-error {
|
|
135
|
-
margin-top: ${
|
|
135
|
+
margin-top: ${kn(8)};
|
|
136
136
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
137
137
|
}
|
|
138
138
|
.${e}-overlay-anchor {
|
|
139
139
|
position: relative;
|
|
140
140
|
height: auto;
|
|
141
141
|
}
|
|
142
|
-
`}function Xl({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:
|
|
142
|
+
`}function Xl({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:i}=T.useScopedStyles(),{type:s="A",fieldsToShow:o=2,fields:a=[],buttonLabel:c,gap:u,fieldsGap:d,buttonCorners:$,buttonStroke:h,buttonPadding:f,isButtonFullWidth:m,inputCorners:g,inputStroke:C,inputPadding:y,inputColor:x,inputTextColor:P,inputBorderColor:L,placeholderColor:_,buttonColor:E,buttonTextColor:v,buttonBorderColor:S,labelTextColor:k,successColor:V,errorColor:A,fontFamily:O,inputFontSettings:D,inputFontSize:j,inputLineHeight:U,inputLetterSpacing:w,inputWordSpacing:N,inputTextAppearance:F,buttonFontSettings:M,buttonFontSize:R,buttonLineHeight:B,buttonLetterSpacing:te,buttonWordSpacing:ue,buttonTextAppearance:oe,labelFontSettings:me,labelFontSize:H,labelLineHeight:Q,labelLetterSpacing:G,labelWordSpacing:Y,labelTextAppearance:ie,statusFontSettings:W,statusFontSize:ne,statusLineHeight:I,statusLetterSpacing:b,statusWordSpacing:z,statusTextAppearance:q,successMessage:J,errorMessage:se,stateOverrides:le}=e,ce=s==="B",he=a.slice(0,Math.min(o,a.length)),K={fontSettings:{fontFamily:O,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:j??.01,lineHeight:U,letterSpacing:w??0,wordSpacing:N??0,textAppearance:F,color:P},ee=yt(Je(K,t)),Z=T.scalingValue(C??0,t),de=T.scalingValue((U??j??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(s==="C"?C??0:(C??0)*2),t),re={...ee,borderStyle:"solid",borderRadius:s==="C"?0:T.scalingValue(g??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Z,borderLeftWidth:0}:{borderWidth:Z},paddingTop:T.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:T.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:T.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:T.scalingValue((y==null?void 0:y.left)??0,t),height:de,minHeight:de},pe={fontSettings:{fontFamily:O,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:R??.01,lineHeight:B,letterSpacing:te??0,wordSpacing:ue??0,textAppearance:oe,color:v},ve=yt(Je(pe,t)),Pe=T.scalingValue(h??0,t),Ke={fontSettings:{fontFamily:O,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:H??.01,lineHeight:Q,letterSpacing:G??0,wordSpacing:Y??0,textAppearance:ie,color:k},Ge=Je(Ke,t),$e={fontSettings:{fontFamily:O,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:I,letterSpacing:b??0,wordSpacing:z??0,textAppearance:q,color:V},Ae=yt(Je($e,t)),Me=T.buildColorVars(i,{inputColor:x,inputTextColor:P,inputBorderColor:L,placeholderColor:_!=null&&_.trim()?_:"#cccccc",buttonColor:E,buttonTextColor:v,buttonBorderColor:S,labelTextColor:k,successColor:V,errorColor:A},Zl,Jl,le),[Ie,Ve]=p.useState(()=>Object.fromEntries(he.map(be=>[be.name,""]))),[ye,Fe]=p.useState("idle"),[He,Oe]=p.useState(null),De=r==="success"?"success":r==="error"?"error":ye,Qe=r==="error"?se:He,Ct=r==="filled",lt=p.useMemo(()=>{if(!Ct)return Ie;let be=null;for(const Ye of he)(Ie[Ye.name]??"").trim().length>0||(be=be??{...Ie},be[Ye.name]="Filled");return be??Ie},[Ie,Ct,he]),dr=De==="error"?T.getFormFieldValidationError(he,lt):null,An=`${r&&r!=="default"?`${i}-state-${r}`:""}`.trim(),rn=n==null?void 0:n.submitUrl,on=(be,Ye)=>{Ve(ze=>({...ze,[be]:Ye}))},ur=async be=>{be.preventDefault();const Ye=Object.fromEntries(he.map(Ne=>{var St;return[Ne.name,((St=Ie[Ne.name])==null?void 0:St.trim())??""]}).filter(([,Ne])=>Ne));if(!rn){Fe("error"),Oe("No integrations were found for this form.");return}if(Object.keys(Ye).length===0)return;const ze=T.getFormFieldValidationError(he,Ie);if(ze){Fe("error"),Oe(ze);return}Fe("submitting"),Oe(null);try{const Ne=await fetch(rn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ye)});if(!Ne.ok){const St=await Ne.text();throw new Error(St||`Request failed: ${Ne.status}`)}Fe("success"),Ve(Object.fromEntries(he.map(St=>[St.name,""])))}catch(Ne){Fe("error"),Oe(Ne instanceof Error?Ne.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${i}-type-${s} ${An}`.trim(),style:Me,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yl(i)}}),l.jsxs("form",{onSubmit:ur,className:`${i}-form`,style:{gap:T.scalingValue(u??0,t)},children:[l.jsx("div",{className:`${i}-fields`,style:{gap:T.scalingValue(d??0,t)},children:he.map((be,Ye)=>l.jsxs("div",{className:`${i}-field-group${ce?` ${i}-labeled`:""}`,children:[ce&&l.jsx("span",{className:`${i}-field-label`,style:Ge?{...Ge,lineHeight:Ge.fontSize}:void 0,children:be.label||be.name}),be.type==="textarea"?l.jsx("textarea",{name:be.name,autoComplete:"off",value:lt[be.name]??"",onChange:ze=>on(be.name,ze.target.value),placeholder:be.placeholder,className:`${i}-input`,style:re,rows:1,"data-filled":Ct||(lt[be.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:be.type==="phone"?"tel":be.type==="email"?"email":"text",name:be.name,autoComplete:"off",value:lt[be.name]??"",onChange:ze=>on(be.name,ze.target.value),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${i}-input`,style:re,"data-filled":Ct||(lt[be.name]??"").trim().length>0})]},Ye))}),l.jsx("div",{className:`${i}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${i}-button`,style:{borderStyle:"solid",borderRadius:T.scalingValue($??0,t),borderWidth:Pe,paddingTop:T.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:T.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:T.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:T.scalingValue((f==null?void 0:f.left)??0,t),...ve,...m?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${i}-overlay-anchor`,style:m?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ye==="submitting"?"...":c})})})]}),De==="success"&&l.jsx("p",{className:`${i}-success`,style:{...Ae},children:J}),De==="error"&&l.jsx("p",{className:`${i}-error`,style:{...Ae},role:"alert",children:dr??Qe??se})]})}const Zl={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"},Jl=["hover","focus","filled","success","error"],Ql=`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
|
-
`,ec=[{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"}],kn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},tc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],nc={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...kn.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:{...kn.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:{...kn.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:{...kn.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:ec,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:"settings",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","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{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:[...tc],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"]},rc={element:Xl,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:nc,sourceCode:Ql};function Mn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function oc(e){return`
|
|
743
|
+
`,ec=[{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"}],Fn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},tc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],nc={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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",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:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Fn.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:{...Fn.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:{...Fn.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:{...Fn.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:ec,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:"settings",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","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{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:[...tc],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"]},rc={element:Xl,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:nc,sourceCode:Ql};function Mn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ic(e){return`
|
|
744
744
|
.${e}-wrapper {
|
|
745
745
|
display: flex;
|
|
746
746
|
flex-direction: column;
|
|
@@ -931,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
931
931
|
font-size: ${Mn(14)};
|
|
932
932
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
933
933
|
}
|
|
934
|
-
`}const
|
|
934
|
+
`}const oc=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:i}=T.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:a,fieldsToShow:c=1,fontFamily:u,inputFontSettings:d,inputFontSize:$,inputLineHeight:h,inputLetterSpacing:f,inputWordSpacing:m,inputTextAppearance:g,buttonFontSettings:C,buttonFontSize:y,buttonLineHeight:x,buttonLetterSpacing:P,buttonWordSpacing:L,buttonTextAppearance:_,statusFontSettings:E,statusFontSize:v,statusLineHeight:S,statusLetterSpacing:k,statusWordSpacing:V,statusTextAppearance:A,iconMaxWidth:O,minHeight:D,corners:j,stroke:U,stateOverrides:w,inputPadding:N,buttonPadding:F,successMessage:M="Thanks for subscribing!",errorMessage:R="Please, fill all required fields."}=e,B=s.slice(0,Math.min(c,s.length)),[te,ue]=p.useState(()=>Object.fromEntries(B.map($e=>[$e.name,""]))),[oe,me]=p.useState("idle"),[H,Q]=p.useState(null),G=r==="success"?"success":r==="error"?"error":oe,Y=r==="error"?R:H,ie=r==="filled",W=p.useMemo(()=>{if(!ie)return te;let $e=null;for(const Ae of B)(te[Ae.name]??"").trim().length>0||($e=$e??{...te},$e[Ae.name]="Filled");return $e??te},[ie,te,B]),ne=G==="error"?T.getFormFieldValidationError(B,W):null,I=r&&r!=="default"?`${i}-state-${r}`:"",b=B.some($e=>(W[$e.name]??"").trim().length>0),z=I!==`${i}-state-filled`&&b?`${i}-state-filled`:"",q=`${I} ${z}`.trim(),J=n==null?void 0:n.submitUrl,se=a??"",le=(o==null?void 0:o.icon)??"",ce=(o==null?void 0:o.mode)==="On",he=se||"Submit",K={fontSettings:{fontFamily:u,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:$??.01,lineHeight:h,letterSpacing:f??0,wordSpacing:m??0,textAppearance:g,color:e.inputTextColor??"#111111"},ee={fontSettings:{fontFamily:u,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:y??.01,lineHeight:x,letterSpacing:P??0,wordSpacing:L??0,textAppearance:_,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:u,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:v??.01,lineHeight:S,letterSpacing:k??0,wordSpacing:V??0,textAppearance:A,color:e.successColor??"#22c55e"},de=yt(Je(K,t)),re=yt(Je(ee,t)),pe=yt(Je(Z,t)),ve=T.buildColorVars(i,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(K==null?void 0:K.color)??"#111111",buttonTextColor:e.buttonTextColor??(ee==null?void 0:ee.color)??"#ffffff"},ac,sc,w),Pe={borderRadius:T.scalingValue(j,t),borderWidth:T.scalingValue(U,t),borderStyle:"solid"},Ke={borderLeftWidth:T.scalingValue(U,t)},Ge=async $e=>{$e.preventDefault();const Ae=Object.fromEntries(B.map(Ie=>{var Ve;return[Ie.name,((Ve=te[Ie.name])==null?void 0:Ve.trim())??""]}).filter(([,Ie])=>Ie));if(!J){me("error"),Q("No integrations were found for this form.");return}if(Object.keys(Ae).length===0)return;const Me=T.getFormFieldValidationError(B,te);if(Me){me("error"),Q(Me);return}me("submitting"),Q(null);try{const Ie=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ae)});if(!Ie.ok){const Ve=await Ie.text();throw new Error(Ve||`Request failed: ${Ie.status}`)}me("success"),ue(Object.fromEntries(B.map(Ve=>[Ve.name,""])))}catch(Ie){me("error"),Q(Ie instanceof Error?Ie.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${q}`.trim(),style:ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ic(i)}}),l.jsxs("form",{onSubmit:Ge,className:`${i}-form`,style:{...Pe,height:T.scalingValue(D,t),minHeight:T.scalingValue(D,t)},children:[l.jsx("div",{className:`${i}-inputWrap ${i}-overlayAnchor`,style:{flex:1,minWidth:0},children:B.map($e=>l.jsx("input",{type:$e.type==="email"?"email":$e.type==="phone"?"tel":"text",name:$e.name,autoComplete:"off",value:W[$e.name]??"",onChange:Ae=>ue(Me=>({...Me,[$e.name]:Ae.target.value})),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${i}-input`,style:{...de,paddingRight:T.scalingValue(N.right,t),paddingLeft:T.scalingValue(N.left,t),paddingTop:T.scalingValue(N.top,t),paddingBottom:T.scalingValue(N.bottom,t)}},$e.name))}),l.jsx("div",{className:`${i}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${i}-submitBtn`,"aria-label":he,style:{...re,...Ke,paddingRight:T.scalingValue(F.right,t),paddingLeft:T.scalingValue(F.left,t),paddingTop:T.scalingValue(F.top,t),paddingBottom:T.scalingValue(F.bottom,t)},children:oe==="submitting"?"...":ce?le&&l.jsx(Lt,{url:le,className:`${i}-submitBtnIcon`,style:{maxWidth:T.scalingValue(O??0,t)},fill:`var(--${i}-button-text-color)`,hoverFill:`var(--${i}-button-text-color)`}):se})})]}),G==="success"&&l.jsx("p",{className:`${i}-success`,style:{...pe},children:M}),G==="error"&&l.jsx("p",{className:`${i}-error`,style:{...pe},role:"alert",children:ne??Y??R})]})},ac={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"},sc=["hover","focus","filled","success","error"],lc=`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,7 +1503,7 @@ 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
|
-
`,cc="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>'),dc=[{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."}],yr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],pc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",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 Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:{...yr.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:{...yr.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:{...yr.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:dc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:cc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"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:[...uc],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"]},mc={element:ic,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:pc,sourceCode:lc};function Io(e){return`
|
|
1506
|
+
`,cc="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>'),dc=[{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."}],yr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],pc={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:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",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 Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:{...yr.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:{...yr.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:{...yr.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:dc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:cc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",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:.001,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:.001,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:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"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:[...uc],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"]},mc={element:oc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:pc,sourceCode:lc};function Ri(e){return`
|
|
1507
1507
|
.${e}-marquee-wrapper {
|
|
1508
1508
|
overflow: hidden;
|
|
1509
1509
|
width: 100%;
|
|
@@ -1634,7 +1634,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
1634
1634
|
.${e}-image-hover-saturate:hover img {
|
|
1635
1635
|
filter: saturate(2);
|
|
1636
1636
|
}
|
|
1637
|
-
`}const gc=30,vr=2,hc=2,fc=(e,t)=>Array.from({length:t},()=>e).flat(),yc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},vc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>yc(r,e))},bc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:
|
|
1637
|
+
`}const gc=30,vr=2,hc=2,fc=(e,t)=>Array.from({length:t},()=>e).flat(),yc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},vc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>yc(r,e))},bc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:s,isFirstSet:o,scaled:a,onFirstSetImageDone:c})=>{var h,f,m;const u=p.useRef(null);p.useLayoutEffect(()=>{if(!o)return;const g=u.current;g!=null&&g.complete&&(c==null||c())},[o,(h=e.image)==null?void 0:h.url,c]);const d=n==="cover",$=((f=e.image)==null?void 0:f.url)&&l.jsx("img",{ref:u,src:e.image.url,alt:((m=e.image)==null?void 0:m.name)??"",style:d?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:a(r),objectFit:"contain"},onLoad:o?c:void 0,onError:o?c:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...d?{width:a(r)}:{width:"fit-content",maxWidth:a(r),minWidth:0}},children:l.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...d?{width:"100%",height:a(i),overflow:"hidden"}:{width:"fit-content",maxWidth:a(r),height:a(i)}},children:$&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ce(`${t}-marquee-link`,!d&&`${t}-marquee-link-contain`),children:$}):$})})},xc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:i}=T.useScopedStyles(),{speed:s,direction:o,pauseOnHover:a,gap:c,imageMaxWidth:u,imageMaxHeight:d,imageFit:$,hoverEffect:h}=e,f=h==="off"||h==="randomize"?void 0:`${i}-image-hover-${h}`,m=!r,g=Math.max(0,s)*gc,C=G=>T.scalingValue(G,n??!1),y=p.useRef(null),x=p.useRef(null),P=p.useRef(null),[L,_]=p.useState(0),[E,v]=p.useState(0),S=m&&a==="on",[k,V]=p.useState(!1),[A,O]=p.useState({}),D=p.useRef(A);D.current=A;const j=p.useRef(null),U=p.useRef(0),w=p.useRef(null),N=p.useMemo(()=>(t??[]).map(G=>{var Y;return((Y=G.image)==null?void 0:Y.url)??""}).join("\0"),[t]),[F,M]=p.useState(vr),R=p.useMemo(()=>{const G=t??[];return!m||G.length===0?G:fc(G,F)},[t,m,F]),B=p.useMemo(()=>R.filter(G=>{var Y;return!!((Y=G.image)!=null&&Y.url)}).length,[R]),te=p.useMemo(()=>!m||((t==null?void 0:t.length)??0)===0?1:hc,[m,t==null?void 0:t.length]);p.useLayoutEffect(()=>{U.current=0,O({}),j.current=null,M(vr),_(0)},[N]),p.useEffect(()=>{if(h!=="randomize")return;const G=y.current;if(!G)return;const Y=I=>{O(b=>{let z=null;for(const q of I)q in b&&(vc(G,q)||(z||(z={...b}),delete z[q]));return z??b})},ie=new IntersectionObserver(I=>{const b=new Set;for(const z of I){const q=z.target.dataset.marqueeItemIndex,J=q!==void 0?Number(q):NaN;Number.isNaN(J)||b.add(J)}b.size>0&&Y(b)},{root:G,threshold:0});Object.keys(A).forEach(I=>{const b=Number(I);G.querySelectorAll(`[data-marquee-item-index="${b}"]`).forEach(z=>ie.observe(z))});let W=0;const ne=()=>{const I=Object.keys(D.current);I.length!==0&&(Y(I.map(Number)),W=requestAnimationFrame(ne))};return Object.keys(D.current).length>0&&(W=requestAnimationFrame(ne)),()=>{cancelAnimationFrame(W),ie.disconnect()}},[h,A]),p.useLayoutEffect(()=>{if(!m)return;const G=y.current,Y=P.current;if(!G||!Y)return;let ie=0;const W=()=>{const b=G.getBoundingClientRect().width,z=Y.getBoundingClientRect().width,q=j.current,J=typeof q=="number"&&Math.abs(q-z)<=.25;if(j.current=z,z>0&&F>0){const se=z/F;if(se>0&&b>0){const le=Math.max(vr,Math.ceil(b/se)+1);if(le!==F){M(le);return}}}if(z>0&&L<=0){_(z);return}J&&z!==L?_(z):!J&&L<=0&&(cancelAnimationFrame(ie),ie=requestAnimationFrame(W))},ne=()=>{cancelAnimationFrame(ie),ie=requestAnimationFrame(W)};w.current=ne,ne();const I=new ResizeObserver(ne);return I.observe(G),I.observe(Y),()=>{w.current=null,cancelAnimationFrame(ie),I.disconnect()}},[m,L,N,F]),p.useLayoutEffect(()=>{const G=x.current;if(!m||!G)return;const Y=L>0?L:0,ie=Y>0&&g>0?Y/g*1e3:0,W=`${Math.max(0,ie)/1e3}s`;G.style.setProperty("--marquee-distance",`${Y}px`),G.style.setProperty("--marquee-duration",W)},[m,g,L]),p.useLayoutEffect(()=>{if(!m){v(0);return}if(L<=0){v(0);return}const G=x.current;if(!G)return;const Y=()=>{const W=G.getBoundingClientRect().height;v(W>0?W:0)};Y();const ie=new ResizeObserver(Y);return ie.observe(G),()=>ie.disconnect()},[m,te,R,n,c,u,d,L,$,A]);const ue=()=>{S&&V(!0)},oe=()=>{S&&V(!1)},me=p.useCallback(()=>{var G;U.current=Math.min(B,U.current+1),(G=w.current)==null||G.call(w)},[B]),H=p.useCallback((G,Y)=>{O(ie=>{const W=ie[G]??Y,ne=(t??[]).filter(b=>b!==W);if(ne.length===0)return ie;const I=ne[Math.floor(Math.random()*ne.length)];return{...ie,[G]:I}})},[t]),Q=(G,Y,ie,W)=>{const ne=h==="randomize"&&$==="cover"?A[ie]??G:G;return l.jsxs("div",{className:`${i}-marquee-card`,"data-marquee-item-index":ie,onMouseEnter:h==="randomize"&&$==="cover"?()=>H(ie,G):void 0,children:[l.jsx(bc,{item:ne,prefix:i,imageFit:$,imageMaxWidth:u,imageMaxHeight:d,imageHoverClass:f,isEditor:n,isFirstSet:W,scaled:C,onFirstSetImageDone:me}),n&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(c)})`,width:C(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${Y}-${ie}`)};return m&&((t==null?void 0:t.length)??0)>0?l.jsxs("div",{ref:y,className:Ce(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Marquee",style:L>0&&E>0?{height:E}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ri(i)}}),l.jsx("div",{ref:x,className:`${i}-marquee-track`,"data-direction":o,onMouseEnter:ue,onMouseLeave:oe,style:{...S?{"--marquee-play-state":k?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:te},(G,Y)=>l.jsx("div",{ref:Y===0?P:void 0,className:Ce(`${i}-marquee-row`,`${i}-marquee-set`),style:{gap:C(c),paddingRight:C(c)},"aria-hidden":Y>0,children:R.map((ie,W)=>Q(ie,Y,W,Y===0))},`set-${Y}`))},"marquee-track")]}):l.jsxs("div",{ref:y,className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ri(i)}}),l.jsx("div",{className:Ce(`${i}-marquee-row`,`${i}-marquee-static`),style:{gap:C(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((G,Y)=>Q(G,0,Y))},"marquee-static")]})},Cc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
1638
1638
|
import cn from 'classnames';\r
|
|
1639
1639
|
import { CommonComponentProps } from '../props';\r
|
|
1640
1640
|
import { scalingValue } from '../utils/scalingValue';\r
|
|
@@ -2234,7 +2234,7 @@ type MarqueeProps = {\r
|
|
|
2234
2234
|
isEditor?: boolean;\r
|
|
2235
2235
|
isPreviewMode?: boolean;\r
|
|
2236
2236
|
} & CommonComponentProps;\r
|
|
2237
|
-
`,Sc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale","saturate","randomize"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["cover","contain"]}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:"contain"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit",value:"contain"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","saturate"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},wc={element:xc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Sc,sourceCode:Cc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function
|
|
2237
|
+
`,Sc={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale","saturate","randomize"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["cover","contain"]}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:"contain"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit",value:"contain"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","saturate"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},wc={element:xc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Sc,sourceCode:Cc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Ii(e){return`
|
|
2238
2238
|
.${e}-marquee-wrapper {
|
|
2239
2239
|
overflow: hidden;
|
|
2240
2240
|
width: 100%;
|
|
@@ -2321,7 +2321,7 @@ type MarqueeProps = {\r
|
|
|
2321
2321
|
pointer-events: auto;
|
|
2322
2322
|
z-index: 10;
|
|
2323
2323
|
}
|
|
2324
|
-
`}const $c=30,Tc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:
|
|
2324
|
+
`}const $c=30,Tc=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:i}=T.useScopedStyles(),{autoplay:s,align:o,speed:a,direction:c,pauseOnHover:u,gap:d,cardWidth:$,corners:h,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:y,logoWidth:x,logoHeight:P,captionMarginTop:L}=e,_=s==="on"&&!r,E=_,v=Math.max(0,a)*$c,S=K=>T.scalingValue(K,n??!1),k=p.useRef(null),V=p.useRef(null),A=p.useRef(null),[O,D]=p.useState(0),[j,U]=p.useState(0),[w,N]=p.useState(0),F=E&&u==="on",[M,R]=p.useState(!1),B=p.useRef(null),[te,ue]=p.useState(0),[oe,me]=p.useState(0),H=p.useRef(null),Q=K=>{var Z,de,re,pe,ve;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${K}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((ve=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ve.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},G=Q("text"),Y=Q("caption"),ie=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var ee,Z;return(((ee=K.text)==null?void 0:ee.length)??0)>0||(((Z=K.caption)==null?void 0:Z.length)??0)>0}),[t]),W=p.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:j<=0||O<=0?2:Math.max(2,Math.ceil(O/j)+1),[_,t==null?void 0:t.length,j,O]);p.useLayoutEffect(()=>{if(!_)return;const K=k.current,ee=A.current;if(!K||!ee)return;let Z=0;const de=()=>{const ve=K.getBoundingClientRect().width,Pe=ee.getBoundingClientRect().width,Ke=H.current,Ge=typeof Ke=="number"&&Math.abs(Ke-Pe)<=.25;if(H.current=Pe,D(ve),typeof Pe=="number"&&Pe>0&&j<=0){U(Pe);return}Ge&&Pe!==j?U(Pe):!Ge&&j<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(de))},re=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(de)};re();const pe=new ResizeObserver(re);return pe.observe(K),pe.observe(ee),()=>{cancelAnimationFrame(Z),pe.disconnect()}},[_,j]),p.useLayoutEffect(()=>{const K=V.current;if(!_||!K||!E)return;const ee=j>0?j:0,Z=ee>0&&v>0?ee/v*1e3:0,de=`${Math.max(0,Z)/1e3}s`;K.style.setProperty("--marquee-distance",`${ee}px`),K.style.setProperty("--marquee-duration",de)},[_,E,v,j]),p.useLayoutEffect(()=>{if(!_){N(0);return}const K=A.current,ee=V.current;if(!K||!ee)return;const Z=()=>{let re=0;for(let pe=0;pe<K.children.length;pe++){const Pe=K.children[pe].firstElementChild;Pe&&(re=Math.max(re,Pe.offsetHeight))}re<=0&&(re=ee.offsetHeight),N(re>0?re:0)};Z();const de=new ResizeObserver(Z);return de.observe(K),de.observe(ee),()=>{de.disconnect()}},[_,W,t,n,d,$,C,f,h,x,P,te,oe]);const ne=()=>{F&&R(!0)},I=()=>{F&&R(!1)},b=p.useMemo(()=>{switch(o){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[o]),z=p.useMemo(()=>{switch(o){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[o]),q=p.useCallback((K,ee,Z,de)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:b,width:"100%"},children:[l.jsx("div",{"data-controls":de==null?void 0:de.controlsName,"data-controls-axis":"y",className:`${i}-control`,style:{height:S((de==null?void 0:de.marginTop)??0)}}),l.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...Je(K,n),textAlign:z,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:l.jsx(vn,{content:ee})})]},Z),[b,z,n]),J=p.useCallback((K,ee,Z)=>{var de,re,pe;return l.jsxs("div",{style:{padding:`${S(C.top)} ${S(C.right)} ${S(C.bottom)} ${S(C.left)}`,width:S($+f*2),height:"100%",borderRadius:S(h),border:`${S(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${i}-cover`,style:{background:g}}),l.jsxs("div",{className:`${i}-elements-overlay`,style:{alignItems:b,textAlign:z},children:[K.text&&q(G,K.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:b,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:`${i}-control`,style:{height:S(y)}}),l.jsx("div",{style:{width:S(x),height:S(P)},children:((de=K.logo)==null?void 0:de.url)&&l.jsx("img",{src:K.logo.url,alt:((re=K.logo)==null?void 0:re.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=K.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),K.caption&&q(Y,K.caption,"caption",{controlsName:"captionMarginTop",marginTop:L,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},ee)},[g,L,Y,$,h,P,y,x,b,z,C.bottom,C.left,C.right,C.top,q,f,m,G,n]),se=p.useCallback(K=>{ue(K.maxTextPx),me(K.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!ie){se({maxTextPx:0,maxCaptionPx:0});return}const K=B.current;if(!K)return;const ee=()=>{T.readTestimonialTextMeasure(K,se)};ee();const Z=new ResizeObserver(ee);return Z.observe(K),()=>{Z.disconnect()}},[ie,se,t,J]);const le=ie?{textMinHeightPx:te,captionMinHeightPx:oe}:void 0,ce=ie?l.jsx("div",{ref:B,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,ee)=>J(K,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,he=(K,ee)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${ee}`,le),n&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${S(d)})`,width:S(d),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);return _&&((t==null?void 0:t.length)??0)>0?l.jsxs("div",{ref:k,className:Ce(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...w>0?{height:w}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ii(i)}}),ce,l.jsx("div",{ref:V,className:`${i}-marquee-track`,"data-direction":c,onMouseEnter:ne,onMouseLeave:I,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...F?{"--marquee-play-state":M?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:W},(K,ee)=>l.jsx("div",{ref:ee===0?A:void 0,className:`${i}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:S(d),paddingRight:S(d)},"aria-hidden":ee>0,children:t==null?void 0:t.map((Z,de)=>he(Z,`${ee}-${de}`))},`set-${ee}`))})]}):l.jsxs("div",{className:`${i}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ii(i)}}),ce,l.jsx("div",{style:{gap:S(d),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,ee)=>he(K,ee))})]})},Lc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
2325
2325
|
import cn from 'classnames';\r
|
|
2326
2326
|
import { CommonComponentProps } from '../props';\r
|
|
2327
2327
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -2927,7 +2927,7 @@ type TestimonialsSettings = {\r
|
|
|
2927
2927
|
logoHeight: number;\r
|
|
2928
2928
|
captionMarginTop: number;\r
|
|
2929
2929
|
};\r
|
|
2930
|
-
`,
|
|
2930
|
+
`,Wi={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ec={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},_c={element:Tc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ec,sourceCode:Lc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Pc(e){return`
|
|
2931
2931
|
.${e}-container {
|
|
2932
2932
|
position: relative;
|
|
2933
2933
|
overflow-x: clip;
|
|
@@ -3051,7 +3051,7 @@ type TestimonialsSettings = {\r
|
|
|
3051
3051
|
width: 100%;
|
|
3052
3052
|
height: 100%;
|
|
3053
3053
|
}
|
|
3054
|
-
`}const Ac=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:
|
|
3054
|
+
`}const Ac=({settings:e,content:t,isEditor:n,isPreviewMode:r})=>{const{prefix:i}=T.useScopedStyles(),s=t||[],{autoplay:o,delay:a,align:c,width:u,imageMarginTop:d,textMarginTop:$,captionMarginTop:h,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:y}=e,x=o==="on"&&!r,[P,L]=p.useState(0),[_,E]=p.useState(null),[v,S]=p.useState(!1),k=p.useRef(null),V=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),A=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);p.useEffect(()=>{L(0),E(null),S(!1)},[s.length]);const O=s[P],D=_===null?null:s[_],j=W=>{var I,b,z,q,J;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((I=e==null?void 0:e[`${W}FontSettings`])==null?void 0:I.fontWeight)??400,fontStyle:((b=e==null?void 0:e[`${W}FontSettings`])==null?void 0:b.fontStyle)??"normal"},textAppearance:{textTransform:((z=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:z.textTransform)??"none",textDecoration:((q=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((J=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:J.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},U=j("text"),w=j("caption"),N=s.length>1&&s.some(W=>{var ne,I;return(((ne=W.text)==null?void 0:ne.length)??0)>0||(((I=W.caption)==null?void 0:I.length)??0)>0}),F=p.useRef(null),[M,R]=p.useState(0),[B,te]=p.useState(0),ue=e.controls??{mode:"Off",icon:null},oe=s.length>1,me=p.useCallback((W,ne)=>!oe||ne===W?W:(k.current&&window.clearTimeout(k.current),E(W),S(!0),k.current=window.setTimeout(()=>{E(null),S(!1),k.current=null},300),ne),[oe]),H=p.useCallback(()=>{oe&&L(W=>me(W,(W-1+s.length)%s.length))},[oe,me,s.length]),Q=p.useCallback(()=>{oe&&L(W=>me(W,(W+1)%s.length))},[oe,me,s.length]);p.useEffect(()=>{if(!x||!oe)return;const W=Math.max(300,Number.isFinite(a*1e3)?a*1e3:0),ne=window.setInterval(()=>{L(I=>me(I,(I+1)%s.length))},W);return()=>{window.clearInterval(ne)}},[x,oe,me,s.length,a]),p.useEffect(()=>()=>{k.current&&window.clearTimeout(k.current)},[]);const G=(W,ne)=>{var q,J,se,le;const I=ne==null?void 0:ne.textMinHeightPx,b=ne==null?void 0:ne.captionMinHeightPx,z=ne==null?void 0:ne.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[W.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${i}-control`,style:{height:T.scalingValue($??0,n??!1)}}),l.jsx("div",{...z&&{"data-testimonial-measure":"text"},style:{...Je(U,n),...I&&I>0?{minHeight:I}:{},textAlign:A,pointerEvents:"auto"},children:l.jsx(vn,{content:W.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${i}-control`,style:{height:T.scalingValue(d??0,n??!1)}}),l.jsx("div",{style:{width:T.scalingValue(f??0,n??!1),height:T.scalingValue(m??0,n??!1)},children:((q=W.image)==null?void 0:q.url)&&l.jsx("img",{src:(J=W.image)==null?void 0:J.url,alt:((se=W.image)==null?void 0:se.name)??"",className:`${i}-icon`,style:{objectFit:((le=W.image)==null?void 0:le.objectFit)||"contain"}})})]}),W.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${i}-control`,style:{height:T.scalingValue(h??0,n??!1)}}),l.jsx("div",{...z?{"data-testimonial-measure":"caption"}:{},style:{...Je(w,n),...b&&b>0?{minHeight:b}:{},textAlign:A,pointerEvents:"auto"},children:l.jsx(vn,{content:W.caption})})]})]})},Y=p.useCallback(W=>{R(W.maxTextPx),te(W.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!N){Y({maxTextPx:0,maxCaptionPx:0});return}const W=F.current;if(!W)return;const ne=()=>{T.readTestimonialTextMeasure(W,Y)};ne();const I=new ResizeObserver(ne);return I.observe(W),()=>{I.disconnect()}},[N,Y,t]),!O)return l.jsx(l.Fragment,{});const ie=N?{textMinHeightPx:M,captionMinHeightPx:B}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${i}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Pc(i)}}),l.jsxs("div",{className:`${i}-wrapper`,style:{width:T.scalingValue(u??0,n??!1),alignItems:V},children:[N&&l.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((W,ne)=>l.jsx("div",{style:{width:"100%"},children:G(W,{dataMeasureAttrs:!0})},ne))}),l.jsxs("div",{className:`${i}-fade-stack`,children:[D&&v&&l.jsx("div",{className:Ce(`${i}-fade-item-prev`,`${i}-fade-out`),children:G(D,ie)}),l.jsx("div",{className:Ce(`${i}-fade-item-current`,v?`${i}-fade-in`:void 0),children:G(O,ie)})]})]}),ue.mode==="On"&&l.jsxs("div",{className:`${i}-controls`,children:[l.jsx("div",{className:`${i}-arrow`,style:{width:T.scalingValue(g??.02,n??!1),height:T.scalingValue(g??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:H,disabled:!oe,"aria-label":"Previous testimonial",children:ue.icon&&l.jsx(Lt,{url:ue.icon,fill:C,hoverFill:y,className:Ce(`${i}-arrow-img`,`${i}-mirror`)})})}),l.jsx("div",{className:Ce(`${i}-arrow`,`${i}-next-arrow`),style:{width:T.scalingValue(g??.02,n??!1),height:T.scalingValue(g??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:Q,disabled:!oe,"aria-label":"Next testimonial",children:ue.icon&&l.jsx(Lt,{url:ue.icon,fill:C,hoverFill:y,className:`${i}-arrow-img`})})})]})]})})},Rc=`import cn from 'classnames';\r
|
|
3055
3055
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
|
|
3056
3056
|
import { CommonComponentProps } from '../props';\r
|
|
3057
3057
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
|
|
@@ -3543,7 +3543,7 @@ type TestimonialsSettings = {\r
|
|
|
3543
3543
|
icon?: string | null;\r
|
|
3544
3544
|
};\r
|
|
3545
3545
|
};\r
|
|
3546
|
-
`,Ic="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),
|
|
3546
|
+
`,Ic="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),ki={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Wc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ki.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ki.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Ic},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},kc={element:Ac,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Wc,sourceCode:Rc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Fc(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function Mc(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nc(e){return`
|
|
3547
3547
|
.${e}-wrapper {
|
|
3548
3548
|
display: grid;
|
|
3549
3549
|
align-items: start;
|
|
@@ -3631,7 +3631,7 @@ type TestimonialsSettings = {\r
|
|
|
3631
3631
|
pointer-events: auto;
|
|
3632
3632
|
z-index: 10;
|
|
3633
3633
|
}
|
|
3634
|
-
`}const $t=500,
|
|
3634
|
+
`}const $t=500,Ft="cubic-bezier(0.22, 1, 0.36, 1)";function Hc({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:s,onPrev:o,onNext:a}){const c=p.useRef(null),u=p.useRef(null),[d,$]=p.useState(null),[h,f]=p.useState(r?"opening":"open"),[m,g]=p.useState(!0),C=p.useRef(t),y=p.useCallback(()=>{const v=c.current,S=u.current;if(!v||!S)return;const k=v.getBoundingClientRect(),V=k.width,A=k.height,O=S.naturalWidth,D=S.naturalHeight;if(!V||!A||!O||!D)return;if(n==="Cover"){$({width:V,height:A,left:k.left,top:k.top});return}const j=O/D,U=V/A;if(j>U){const w=V/j;$({width:V,height:w,left:k.left,top:k.top+(A-w)/2})}else{const w=A*j;$({width:w,height:A,left:k.left+(V-w)/2,top:k.top})}},[n]);p.useEffect(()=>{y();const v=c.current;if(!v)return;const S=new ResizeObserver(()=>y());return S.observe(v),()=>S.disconnect()},[y,t]),p.useEffect(()=>{if(h!=="opening"||!d)return;const v={id:0};return v.id=requestAnimationFrame(()=>{v.id=requestAnimationFrame(()=>f("open"))}),()=>cancelAnimationFrame(v.id)},[h,d]),p.useEffect(()=>{if(h!=="closing")return;const v=setTimeout(()=>s(),$t);return()=>clearTimeout(v)},[h,s]),p.useEffect(()=>{C.current!==t&&g(!1),C.current=t},[t]);const x=()=>{h!=="closing"&&f("closing")},P=h==="open",L=h==="closing",_=L&&i&&!!r,E=h==="opening"?r??d:_?r:d;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:x,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:P?1:0,transition:`opacity ${$t}ms ${Ft}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:P?1:0,transition:`opacity ${$t}ms ${Ft}`,fontFamily:Fc()},children:e.length>1&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:t+1}),l.jsx("p",{children:"/"}),l.jsx("p",{children:e.length})]})})]}),E&&l.jsx("img",{ref:u,src:e[t],onLoad:y,style:{position:"fixed",top:E.top,left:E.left,width:E.width,height:E.height,objectFit:n==="Cover"?"cover":"contain",opacity:L&&!_?0:1,transition:L&&!_?`opacity ${$t}ms ${Ft}`:_||m?`top ${$t}ms ${Ft}, left ${$t}ms ${Ft}, width ${$t}ms ${Ft}, height ${$t}ms ${Ft}`:"none",pointerEvents:"none",zIndex:9998}}),P&&d&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:d.top,left:d.left,width:d.width/2,height:d.height,cursor:"w-resize",zIndex:9999},onClick:v=>{v.stopPropagation(),o()}}),l.jsx("div",{style:{position:"fixed",top:d.top,left:d.left+d.width/2,width:d.width/2,height:d.height,cursor:"e-resize",zIndex:9999},onClick:v=>{v.stopPropagation(),a()}})]})]})}function Oc({settings:e,content:t,isEditor:n,isPreviewMode:r,metadata:i,activeEvent:s,layoutId:o}){const{prefix:a}=T.useScopedStyles(),{type:c="A",gridLayout:u,textBoxWidth:d,verticalGap:$,entriesCount:h,lightbox:f,imageDisplay:m,slider:g,sliderTiming:C,direction:y,transition:x,titleMarginTop:P,subtitleMarginTop:L,titleColor:_,subtitleColor:E,titleFontFamily:v,titleFontSettings:S,titleFontSize:k,titleLineHeight:V,titleLetterSpacing:A,titleWordSpacing:O,titleTextAppearance:D,subtitleFontFamily:j,subtitleFontSettings:U,subtitleFontSize:w,subtitleLineHeight:N,subtitleLetterSpacing:F,subtitleWordSpacing:M,subtitleTextAppearance:R}=e,B={fontSettings:{fontFamily:v,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:k??.01,lineHeight:V,letterSpacing:A??0,wordSpacing:O??0,textAppearance:D,color:_},ue={...yt(Je(B,n))},oe={fontSettings:{fontFamily:j,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:F??0,wordSpacing:M??0,textAppearance:R,color:E},H={...yt(Je(oe,n))},Q=T.buildColorVars(a,{titleColor:_,subtitleColor:E},Bc,Vc),Y=`${s&&s!=="default"?`${a}-state-${s}`:""}`.trim(),ie=h===0?1/0:h,W=(t??[]).slice(0,ie),ne=u.entryWidth??.2,I=(m==null?void 0:m.display)==="Cover",b=(m==null?void 0:m.ratioValue)??"1:1",z=(m==null?void 0:m.reversed)??!1,[q,J]=b.split(":").map(Number),se=z?J:q,le=z?q:J,ce=`${se} / ${le}`,he=se>=le,K={objectFit:I?"cover":"contain",...I&&{aspectRatio:ce,width:he?"100%":"auto",height:he?"auto":"100%"}},[ee,Z]=p.useState("ltr"),[de,re]=p.useState(0),pe=p.useRef(null);p.useEffect(()=>{const ye=pe.current;if(!ye)return;const Fe=new ResizeObserver(He=>{re(Math.round(He[0].contentRect.width))});return Fe.observe(ye),()=>Fe.disconnect()},[]);const[ve,Pe]=p.useState(!1),[Ke,Ge]=p.useState([]),[$e,Ae]=p.useState(0),[Me,Ie]=p.useState(null),Ve=(ye,Fe,He)=>{if(f==="Off")return;const Oe=ye.currentTarget.getBoundingClientRect();Ie({top:Oe.top,left:Oe.left,width:Oe.width,height:Oe.height}),Ge(Fe),Ae(He),Pe(!0)};return p.useEffect(()=>{if(!ve||f!=="On"||typeof document>"u")return;const ye=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ye}},[ve,f]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Nc(a)}}),l.jsx("div",{style:Q,children:l.jsx("div",{ref:pe,className:`${a}-wrapper ${a}-type-${c} ${Y}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:T.scalingValue($??0,n),columnGap:T.scalingValue(u.horizontalGap??0,n),width:T.scalingValue(u.wrapperWidth??0,n)},children:W.map((ye,Fe)=>{var He,Oe;return l.jsx("div",{className:`${a}-item`.trim(),children:l.jsx("div",{className:r?`${a}-item-inner`:`${a}-item-inner-hidden`,style:{width:(d??0)>100?`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`:T.scalingValue(ne??0,n)},children:l.jsxs("a",{href:(((He=ye.link)==null?void 0:He.length)??0)>0&&f==="Off"?ye.link:void 0,target:"_blank",className:`${a}-item-image-link`,children:[l.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:T.scalingValue(ne??0,n),height:T.scalingValue(ne??0,n)},children:(((Oe=ye.image)==null?void 0:Oe.length)??0)===0?null:g==="Off"?l.jsx("img",{src:ye.image[0].url,alt:ye.image[0].name,className:`${a}-item-image`.trim(),style:K,onClick:De=>Ve(De,ye.image.map(Qe=>Qe.url),0)}):l.jsx(Jr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:500,type:x==="Fade"?"fade":"loop",rewind:x==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:x==="Fade"?"ltr":y!=="Random"?y==="Horizontal"?"ltr":"ttb":ee},onMoved:De=>{if(y!=="Random"||x==="Fade")return;const Qe=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Z(Qe),setTimeout(()=>{De.refresh()},0)},children:ye.image.map((De,Qe)=>l.jsx(Qr,{children:l.jsx("img",{src:De.url,alt:De.name,className:`${a}-item-image`.trim(),style:K,onClick:Ct=>Ve(Ct,ye.image.map(lt=>lt.url),Qe)})},Qe))},`${x}-${ne}-${y}-${C}-${de}-${o}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${a}-control`,style:{height:T.scalingValue(P??0,n),width:T.scalingValue(ne*d/100,n)}}),l.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`,...ue},children:ye.title}),c==="B"&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${a}-control`,style:{height:T.scalingValue(L??0,n),width:T.scalingValue(ne*d/100,n)}}),c==="B"&&l.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${T.scalingValue(ne??0,n)} * (${d} / 100))`,...H},children:ye.subtitle})]})})},Fe)})})}),ve&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&f==="On"&&Ki.createPortal(l.jsx("div",{"data-selection":"none",children:l.jsx(Hc,{images:Ke,index:$e,imageDisplay:m.display,originRect:Me,reverseClose:g==="Off",onClose:()=>Pe(!1),onPrev:()=>Ae(ye=>(ye-1+Ke.length)%Ke.length),onNext:()=>Ae(ye=>(ye+1)%Ke.length)})}),document.body)]})}const Bc={titleColor:"title-color",subtitleColor:"subtitle-color"},Vc=["hover","focus","filled","success","error"],Dc=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
|
|
3635
3635
|
import '@splidejs/react-splide/css/core';\r
|
|
3636
3636
|
import { CommonComponentProps } from '../props';\r
|
|
3637
3637
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
|
|
@@ -4290,7 +4290,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
|
|
|
4290
4290
|
};\r
|
|
4291
4291
|
\r
|
|
4292
4292
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
4293
|
-
`,
|
|
4293
|
+
`,Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zc=["titleColor","subtitleColor"],jc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},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"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},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"}],link:""},{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"}],link:""},{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"}],link:""}]},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:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},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 (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title 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:{...Fi.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:{...Fi.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,titleMarginTop:.02,subtitleMarginTop:.02,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,titleMarginTop:.008,subtitleMarginTop:.008,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}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","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:[...zc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Kc={element:Oc,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:jc,sourceCode:Dc};function zn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Uc(e){return String(e??"").trim().length>0}function qc(e,t,n,r,i,s,o){const a=T.scalingValue(s,o),c=T.scalingValue(0,o),u=e===0,d=e===t-1&&!i;return{borderTopWidth:u&&n?a:c,borderBottomWidth:!d||r?a:c}}function Gc(e,t,n){const r=T.scalingValue(t,n),i=T.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const Mi=10;function Yc(e){return`
|
|
4294
4294
|
.${e}-wrapper {
|
|
4295
4295
|
display: grid;
|
|
4296
4296
|
align-items: start;
|
|
@@ -4463,16 +4463,8 @@ a.${e}-list-item {
|
|
|
4463
4463
|
background: transparent;
|
|
4464
4464
|
}
|
|
4465
4465
|
|
|
4466
|
-
.${e}-row-padding-handle
|
|
4467
|
-
content: "";
|
|
4468
|
-
position: absolute;
|
|
4469
|
-
top: 0;
|
|
4470
|
-
left: 0;
|
|
4471
|
-
width: 100%;
|
|
4472
|
-
height: 100%;
|
|
4466
|
+
.${e}-row-padding-handle[data-controls] {
|
|
4473
4467
|
min-height: 20px;
|
|
4474
|
-
pointer-events: auto;
|
|
4475
|
-
z-index: 10;
|
|
4476
4468
|
}
|
|
4477
4469
|
|
|
4478
4470
|
.${e}-col-resize-handle::after {
|
|
@@ -4495,45 +4487,10 @@ a.${e}-list-item {
|
|
|
4495
4487
|
height: 2px;
|
|
4496
4488
|
}
|
|
4497
4489
|
|
|
4498
|
-
.${e}-padding-control-handle::after {
|
|
4499
|
-
content: '';
|
|
4500
|
-
position: absolute;
|
|
4501
|
-
top: 50%;
|
|
4502
|
-
left: 50%;
|
|
4503
|
-
transform: translate(-50%, -50%);
|
|
4504
|
-
width: 4px;
|
|
4505
|
-
height: 12px;
|
|
4506
|
-
background: #FF5C02;
|
|
4507
|
-
border: 1px solid #FFFFFF;
|
|
4508
|
-
border-radius: 5px;
|
|
4509
|
-
pointer-events: none;
|
|
4510
|
-
box-sizing: border-box;
|
|
4511
|
-
}
|
|
4512
|
-
|
|
4513
|
-
.${e}-wrapper.${e}-type-b .${e}-padding-control-handle::after {
|
|
4514
|
-
width: 12px;
|
|
4515
|
-
height: 4px;
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
4490
|
.${e}-text-padding-lr-handle {
|
|
4519
4491
|
background: transparent;
|
|
4520
4492
|
}
|
|
4521
4493
|
|
|
4522
|
-
.${e}-text-padding-lr-handle::after {
|
|
4523
|
-
content: '';
|
|
4524
|
-
position: absolute;
|
|
4525
|
-
top: 50%;
|
|
4526
|
-
left: 50%;
|
|
4527
|
-
transform: translate(-50%, -50%);
|
|
4528
|
-
width: 4px;
|
|
4529
|
-
height: 12px;
|
|
4530
|
-
background: #FF5C02;
|
|
4531
|
-
border: 1px solid #FFFFFF;
|
|
4532
|
-
border-radius: 5px;
|
|
4533
|
-
pointer-events: none;
|
|
4534
|
-
box-sizing: border-box;
|
|
4535
|
-
}
|
|
4536
|
-
|
|
4537
4494
|
.${e}-wrapper.${e}-entry-hover-default .${e}-list-item-has-link,
|
|
4538
4495
|
.${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item-has-link,
|
|
4539
4496
|
.${e}-wrapper.${e}-entry-hover-default .${e}-cut-item,
|
|
@@ -4662,7 +4619,7 @@ a.${e}-list-item {
|
|
|
4662
4619
|
overflow-wrap: anywhere;
|
|
4663
4620
|
word-break: break-word;
|
|
4664
4621
|
}
|
|
4665
|
-
`}const Pt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],eo=["AColumn","BColumn","CColumn","DColumn","EColumn"],vt="cutLabel",Pn=[...eo,vt],to=["A","B","C","D","E"];function Ai(e){return`${e}ColumnVerticalAlign`}const Xc=["Top","Center","Bottom"];function Zc(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Jc(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return to.includes(n)?n:null}function Ri(e,t,n){const r=Jc(e);return r?r===t?!1:Zc(n[Ai(r)]):!0}function Rr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return to.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Qc(e,t,n){if(Ii(e,t,n))return Rr(e);const r=Rr(e);return r.kind==="baseline"?{kind:"top"}:r}function Ii(e,t,n){return Ri(e,n,t)?Rr(e).kind==="baseline":!1}function ed(e){if(e.type==="B")return null;const t={};let n=!1;for(const r of to){const o=Ai(r),s=e[o];Ri(s,r,e)||(t[o]="Top",n=!0)}return n?t:null}function td(e){return e==="center"?{marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{marginTop:"auto"}:{}}function nd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-r;return n.remove(),s}function br(e,t,n,r){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const i=nd(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const a=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(a.height-c)/2:e.kind==="bottom"&&(u=a.height-c),a.top-t+u+i}function rd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${r}px`,s.style.height=`${r}px`)}),e.offsetHeight,r)}function od(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const id={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"},ad=["textFontFamily","textFontSettings","textFontSize","textLineHeight","textLetterSpacing","textWordSpacing","textTextAppearance"];function we(e,t){return`${e}${t.replace(/^text/,"Text")}`}function Zn(e,t){const n=r=>{const o=we(t,r),s=e[o];return s!==void 0?s:e[r]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ho(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(Je(n,t))}function Oo(e,t,n,r){const o=Zn(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<s?`${n} ${r}`:n}function Bo(e,t,n,r){const o=Zn(e,t),s=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=s?{}:{[`--${n}-title-leading-gap`]:T.scalingValue((s-i)/2,r)}}function sd(e,t){const n={};let r=!1;for(const o of ad)if(e[o]!==t[o]&&e[o]!==void 0){r=!0;for(const s of Pn)Object.assign(n,{[we(s,o)]:e[o]})}return r?n:null}const nt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Zt=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Jt=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Qt=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ld={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},cd=["hover","focus","filled","success","error"],Vo=.004,ln=.004,no=50,bn=1440,xn=no/bn;function Wi(e){const t=typeof e=="number"&&e>0?e:bn;return no/t}function dd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return bn}const Fi={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function jn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function ud(e,t=1){const n=t/e;return Object.fromEntries(nt.map(r=>[r,n]))}function pd(){return Object.fromEntries([...Zt.map(e=>[e,0]),...Jt.map(e=>[e,0])])}function md(){return Object.fromEntries(Qt.map(e=>[e,0]))}function Nn(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Fi[t]]))}function ki(e,t,n){const r=e-xn,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const s=r/o;return{paddingLeft:t*s,paddingRight:n*s}}function Kn(e,t,n){const r=ro(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((s,i)=>s+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function gd(e,t,n){const r={};for(let o=0;o<e;o+=1){const s=Zt[o],i=Jt[o],a=typeof n[s]=="number"?n[s]:0,c=typeof n[i]=="number"?n[i]:0,u=ki(t[o]??0,a,c);u.paddingLeft!==a&&(r[s]=u.paddingLeft),u.paddingRight!==c&&(r[i]=u.paddingRight)}return r}function ro(e,t,n){if(e<=0)return[];const r=nt.slice(0,e).map(u=>n[u]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((u,d)=>u+d,0)+xn;if(t>=i)return r;const a=[...o];let c=i-t;for(let u=a.length-1;u>=0&&c>0;u-=1){const d=a[u]-xn;if(d<=0)continue;const $=Math.min(c,d);a[u]-=$,c-=$}return[...a,r[e-1]]}function hd(e,t,n){if(e<=1)return{};const r=ro(e,t,n),o={};for(let s=0;s<e-1;s+=1){const i=nt[s];r[s]!==n[i]&&(o[i]=r[s])}return o}function Do(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pt]}function fd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function yd(e,t,n,r){const o=Math.min(r,e.length,nt.length),s={};for(let i=0;i<o;i+=1){const a=e[i],c=t.indexOf(a);if(c===-1)continue;const u=nt[c],d=Zt[c],$=Jt[c],h=Qt[c],f=nt[i],m=Zt[i],g=Jt[i],C=Qt[i],y=n[u],x=n[d],P=n[$],L=n[h];typeof y=="number"&&(s[f]=y),typeof x=="number"&&(s[m]=x),typeof P=="number"&&(s[g]=P),typeof L=="number"&&(s[C]=L)}return s}function vd(e,t,n){const r=sd(e,t);r&&(e={...e,...r});const o=ed(e);o&&(e={...e,...o});const s=Wi(n==null?void 0:n.designWidth),i=e.columns,a=t.columns,c=jn(e),u=jn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",$=typeof i=="number"?i:typeof a=="number"?a:Pt.length,h=L=>{if(d)return L;const _=Nn({...t,...L}),E=jn(L),v=Kn($,E,_),S=gd($,v,{...t,...L});return Object.keys(S).length===0?L:{...L,...S}};if(typeof i=="number"&&i!==a){const L={...e,...ud(i,c),...pd()};if(d)for(const _ of Qt)typeof t[_]=="number"&&(L[_]=t[_]);else Object.assign(L,md());return L}const f=Do(e),m=Do(t);if(!fd(f,m))return h({...e,...yd(f,m,t,$)});if(c<u&&typeof $=="number"&&!d){const L=Nn({...t,...e});return h({...e,...hd($,c,L)})}if(d){const L=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,_=Math.max(0,(c-s)/2);return L>_?{...e,textPaddingLR:_}:e}const g=Nn({...t,...e}),C=Kn($,u,Nn(t)),x=Kn($,c,g).some((L,_)=>L<(C[_]??L)),P=nt.some(L=>{const _=e[L],E=t[L];return typeof _=="number"&&typeof E=="number"&&_!==E});return x||P?h(e):e}function bd(e,t,n,r){const o=t.slice(0,e).reduce((i,a)=>i+a,0),s=n.slice(e+1,t.length-1).reduce((i,a)=>i+a,0);return Math.max(xn,r-o-s-xn)}function xd(e,t){return Math.random()*(t-e)+e}function Cd(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:Fi[t]]))}function xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Sd(e,t,n,r,o,s){return e.slice(0,t).map((i,a)=>{const c=Zt[a],u=Jt[a],d=Qt[a];return{key:i,textPrefix:id[i],widthKey:nt[a],width:n[nt[a]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:d,paddingLeft:r[c],paddingRight:o[u],paddingBottom:s[d]}})}function wd({settings:e,content:t,isEditor:n,isPreviewMode:r,activeEvent:o,layoutId:s,onUpdateSettings:i}){const{prefix:a}=T.useScopedStyles(),c=!!(n&&r),{columns:u,type:d,wrapperWidth:$,entriesCount:h,cellMinHeight:f,dividerWidth:m,showVisibility:g,cut:C,showCut:y,cutCellMinHeight:x,cutLabel:P,imageSize:L,imageOnHover:_,entryHoverEffect:E,rowPaddingTop:v,rowPaddingBottom:S,rowPaddingTopB:F,columnsOrder:V,textPaddingLR:A,textColor:O,textFontFamily:D,textFontSettings:j,textFontSize:U,textLineHeight:w,textLetterSpacing:N,textWordSpacing:k,textTextAppearance:M,backgroundColor:R,dividerColor:B,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:ie}=e,[me,H]=p.useState(void 0),[Q,G]=p.useState(null),Y=_==="On"&&(!n||r),oe=(C??0)>0,W=d==="B",ne=p.useRef(null),[I,b]=p.useState(bn),z=Wi(I),q=Math.max(0,(($??0)-z)/2),J=Math.min(A??0,q),se=Math.max(J,ln),le=(($??0)+z)/2;p.useLayoutEffect(()=>{if(!n){b(bn);return}const ge=()=>{b(dd(ne.current))};ge();const xe=ne.current;if(!xe)return;const Se=new ResizeObserver(ge);Se.observe(xe);let Re=xe;for(;Re&&!Re.style.getPropertyValue("--cntrl-article-width");)Re=Re.parentElement;return Re&&Se.observe(Re),()=>Se.disconnect()},[n,s]),p.useEffect(()=>{H(void 0)},[C,y,t,h]);const ce=T.buildColorVars(a,{textColor:O,backgroundColor:R,dividerColor:B,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:ie},ld,cd),he=o&&o!=="default"?`${a}-state-${o}`:"",ee=`${E==="Default"?`${a}-entry-hover-default`:E==="Blinds"?`${a}-entry-hover-blinds`:""} ${he}`.trim(),Z=(g==null?void 0:g[0])??!1,de=(g==null?void 0:g[1])??!1,re=p.useRef(e),pe=p.useRef(s);p.useEffect(()=>{if(!i||!n){re.current=e,pe.current=s;return}if(pe.current!==s){re.current=e,pe.current=s;return}const ge=re.current,xe=vd(e,ge,{designWidth:I});re.current=e,xe!==e&&i(xe)},[e,i,n,s,I]);const ve=p.useMemo(()=>Cd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Pe=p.useMemo(()=>xr(e,Zt),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Ke=p.useMemo(()=>xr(e,Jt),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ge=p.useMemo(()=>xr(e,Qt),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=p.useMemo(()=>Array.isArray(V)&&V.length>0?V:[...Pt],[V]),Ae=p.useMemo(()=>Sd($e,u,ve,Pe,Ke,Ge),[$e,u,ve,Pe,Ke,Ge]),Me=jn(e),Ie=p.useMemo(()=>nt.slice(0,u).map(ge=>ve[ge]),[u,ve]),Ve=p.useMemo(()=>ro(u,Me,ve),[u,Me,ve]),ye=p.useMemo(()=>Kn(u,Me,ve),[u,Me,ve]),ke=p.useMemo(()=>Ae.map((ge,xe)=>ki(ye[xe]??0,ge.paddingLeft,ge.paddingRight)),[Ae,ye]),He=p.useMemo(()=>{const ge=h===0?1/0:h;return(t??[]).slice(0,ge).map((Se,Re)=>({id:Re,cells:Object.fromEntries(Pt.map(Xe=>[Xe,Se[Xe]??""])),image:Se.image,link:Se.link}))},[t,h]),Oe=oe?me??C:He.length,De=p.useMemo(()=>oe?He.slice(0,Oe):He,[He,oe,Oe]),Qe=oe&&Oe<He.length,Ct=De.length>1||Qe,lt=[Z?`${a}-divider-top`:"",de||Ct?`${a}-divider-bottom`:""].filter(Boolean).join(" "),dr=()=>{const ge=me??C;if(!y){H(He.length);return}H(Math.min(ge+y,He.length))},Ee=ge=>T.scalingValue(ge,n??!1),An=W?F??0:v??0,rn=S??0,on=f??0,ur=W?"rowPaddingTopB":"rowPaddingTop",be=Ae[0],Ye=Ae[Ae.length-1],ze=ke[0],Ne=ke[ke.length-1],St=be&&ze?Math.max(ze.paddingLeft,ln):0,oo=Ye&&Ne?Math.max(Ne.paddingRight,ln):0,Ni=Me,io=ge=>{const xe=ne.current;if(!xe)return{x:0,y:0};const Se=xe.getBoundingClientRect();return{x:ge.clientX-Se.left+No,y:ge.clientY-Se.top+No}},Hi=(ge,xe)=>{if(!Y)return;const Se=ge.image;if(!(Se!=null&&Se.url)){G(null);return}const{x:Re,y:Xe}=io(xe),ct=(L==null?void 0:L.min)??80,Te=(L==null?void 0:L.max)??320,Be=(Q==null?void 0:Q.rowId)===ge.id?Q.widthPx:xd(ct,Te);G({rowId:ge.id,url:Se.url,objectFit:Se.objectFit??"cover",widthPx:Be,x:Re,y:Xe})},Oi=ge=>{if(!Y||!Q)return;const{x:xe,y:Se}=io(ge);G(Re=>!Re||Re.x===xe&&Re.y===Se?Re:{...Re,x:xe,y:Se})},Bi=()=>{G(null)},ao=p.useMemo(()=>!W&&eo.some(ge=>{const xe=ge.charAt(0),Se=e[`${ge}VerticalAlign`];return Ii(Se,e,xe)}),[W,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var ct;const ge=ne.current;if(!ge)return;const xe=()=>{ge.querySelectorAll("[data-list-col]").forEach(Te=>{Te.style.transform="";const Be=Te.querySelector(`.${a}-list-col`);Be&&(Be.style.minHeight="",Be.style.height="");const ot=Te.querySelector(`.${a}-list-col-title`);ot&&(ot.style.transform="")})};if(W||!ao){xe();return}const Se=()=>{ge.querySelectorAll("[data-list-row]").forEach(Te=>{const Be=Array.from(Te.querySelectorAll("[data-list-col]"));Be.forEach(Le=>{Le.style.transform="";const Ze=Le.querySelector(`.${a}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const Ue=Le.querySelector(`.${a}-list-col-title`);Ue&&(Ue.style.transform="")}),rd(Te,Be,`${a}-list-col`),Te.offsetHeight;const ot=Te.getBoundingClientRect().top,wt=`${a}-baseline-probe`,Wt=new Map,an=Be.map(Le=>{const Ze=Le.querySelector(`.${a}-list-col-title`),Ue={el:Le,titleEl:Ze,letter:Le.getAttribute("data-col-letter")??"",kind:Le.getAttribute("data-valign")??"top",anchor:Le.getAttribute("data-valign-anchor")};return Wt.set(Ue.letter,Ue),Ue}),sn=new Map,Rn=(Le,Ze)=>{const Ue=sn.get(Le.letter);if(Ue!==void 0)return Ue;const so=Le.anchor?Wt.get(Le.anchor):void 0;if(Le.kind!=="baseline"||!so||Ze.has(Le.letter)){const co=br(Le,ot,`${a}-list-col`,wt);return sn.set(Le.letter,co),co}Ze.add(Le.letter);const Vi=Rn(so,Ze);Ze.delete(Le.letter);const Di=br(Le,ot,`${a}-list-col`,wt),zi=Vi-Di;od(Le.titleEl,zi);const lo=br(Le,ot,`${a}-list-col`,wt);return sn.set(Le.letter,lo),lo};an.forEach(Le=>Rn(Le,new Set))})};Se();const Re=new ResizeObserver(()=>Se());Re.observe(ge);let Xe=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Xe||Se()}),()=>{Xe=!0,Re.disconnect(),xe()}},[ao,W,e,t,I,De,ye]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yc(a)}}),l.jsx("div",{style:ce,children:l.jsxs("div",{ref:ne,className:`${a}-wrapper ${ee}${lt?` ${lt}`:""}${W?` ${a}-type-b`:""}`.trim(),style:{width:T.scalingValue($??0,n)},onMouseMove:Y?Oi:void 0,onMouseLeave:Y?Bi:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[De.map((ge,xe)=>{var ct;const Se=(((ct=ge.link)==null?void 0:ct.length)??0)>0,Re=Se?"a":"div",Xe=qc(xe,De.length,Z,de,Qe,m??0,n??!1);return l.jsxs(Re,{className:`${a}-list-item${Se?` ${a}-list-item-has-link`:""}`,...Se?{href:ge.link,target:"_blank"}:{},style:Xe,onMouseEnter:Y?Te=>Hi(ge,Te):void 0,children:[(An>0||c)&&l.jsx("div",{...c?{"data-controls":ur,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(An)}}),l.jsx("div",{className:`${a}-list-cols-row${W?"":` ${a}-list-cols-row-h`}`,...W?{}:{"data-list-row":""},style:W?void 0:{minHeight:Ee(on)},children:Ae.map((Te,Be)=>{const ot=Be===Ae.length-1,wt=ke[Be],Wt=Te.paddingBottom,an=Uc(ge.cells[Te.key]),sn=W&&an&&(Wt>0||c),Rn=W?{minHeight:Ee(on)}:ot?{}:{width:Ee(ye[Be])},Le=W?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{paddingLeft:Ee(wt.paddingLeft),paddingRight:Ee(wt.paddingRight)},Ze=Te.textPrefix.charAt(0),Ue=W?{kind:"top"}:Qc(e[`${Te.textPrefix}VerticalAlign`],e,Ze);return l.jsxs("div",{...W?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":Ue.kind,...Ue.kind==="baseline"?{"data-valign-anchor":Ue.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${ot?` ${a}-list-col-last`:""}`,style:{...Le,...Rn},"data-test":Te.width,children:l.jsx("span",{className:Oo(e,Te.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...Ho(Zn(e,Te.textPrefix),n),...Bo(e,Te.textPrefix,a,n),...W?{}:td(Ue.kind)},children:ge.cells[Te.key]??null})}),sn&&l.jsx("div",{...c?{"data-controls":Te.paddingBottomKey,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(Wt)}})]},Te.key)})}),!W&&(rn>0||c)&&l.jsx("div",{...c?{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(rn)}})]},ge.id)}),Qe&&l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Ee(x??0),...Gc(de,m??0,n??!1)},onClick:dr,children:l.jsx("div",{className:`${a}-list-cols-row`,style:W?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{justifyContent:"center"},children:l.jsx("span",{className:Oo(e,vt,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...Ho(Zn(e,vt),n),...Bo(e,vt,a,n)},children:P})})})]}),c&&!W&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":be.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[0]-((ze==null?void 0:ze.paddingRight)??0)),"data-controls-static-handle":"",className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:Ee(St),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":Ye.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[Ae.length-1]-((Ne==null?void 0:Ne.paddingLeft)??0)),"data-controls-static-handle":"",className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Ni-oo),width:Ee(oo),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),c&&!W&&Ae.slice(0,-1).map((ge,xe)=>{const Se=Ae[xe+1],Re=bd(xe,Ve,Ie,Me),Xe=Ve.slice(0,xe+1).reduce((Wt,an)=>Wt+an,0),ct=ke[xe],Te=ke[xe+1],Be=Math.max(ct.paddingRight,ln),ot=Math.max(Te.paddingLeft,ln),wt=Xe-Vo/2;return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":ge.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[xe]-ct.paddingLeft),"data-controls-static-handle":"",className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe-Be),width:Ee(Be),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":ge.widthKey,"data-controls-axis":"x","data-controls-min":String(no),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(wt),width:Ee(Vo),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),l.jsx("div",{"data-controls":Se.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[xe+1]-Te.paddingRight),"data-controls-static-handle":"",className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe),width:Ee(ot),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${ge.widthKey}-junction`)}),c&&W&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(le),"data-controls-static-handle":"",className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:0,width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(le),"data-controls-static-handle":"",className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:Ee(Math.max(se,Me-se)),width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}})]},"text-padding-lr-handles"),Y&&Q&&l.jsx("img",{className:`${a}-hover-image`,src:Q.url,alt:"",style:{width:zn(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const $d=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4622
|
+
`}const Pt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ei=["AColumn","BColumn","CColumn","DColumn","EColumn"],vt="cutLabel",Pn=[...ei,vt],ti=["A","B","C","D","E"];function Ao(e){return`${e}ColumnVerticalAlign`}const Xc=["Top","Center","Bottom"];function Zc(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Jc(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ti.includes(n)?n:null}function Ro(e,t,n){const r=Jc(e);return r?r===t?!1:Zc(n[Ao(r)]):!0}function Rr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ti.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Qc(e,t,n){if(Io(e,t,n))return Rr(e);const r=Rr(e);return r.kind==="baseline"?{kind:"top"}:r}function Io(e,t,n){return Ro(e,n,t)?Rr(e).kind==="baseline":!1}function ed(e){if(e.type==="B")return null;const t={};let n=!1;for(const r of ti){const i=Ao(r),s=e[i];Ro(s,r,e)||(t[i]="Top",n=!0)}return n?t:null}function td(e){return e==="center"?{marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{marginTop:"auto"}:{}}function nd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),s=i-r;return n.remove(),s}function br(e,t,n,r){const i=e.titleEl;if(!i)return 0;const s=i.closest(`.${n}`);if(!s)return 0;const o=nd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const a=s.getBoundingClientRect(),c=i.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(a.height-c)/2:e.kind==="bottom"&&(u=a.height-c),a.top-t+u+o}function rd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const s=i.querySelector(`.${n}`);s&&(s.style.minHeight=`${r}px`,s.style.height=`${r}px`)}),e.offsetHeight,r)}function id(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const od={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"},ad=["textFontFamily","textFontSettings","textFontSize","textLineHeight","textLetterSpacing","textWordSpacing","textTextAppearance"];function we(e,t){return`${e}${t.replace(/^text/,"Text")}`}function Zn(e,t){const n=r=>{const i=we(t,r),s=e[i];return s!==void 0?s:e[r]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ni(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return yt(Je(n,t))}function Hi(e,t,n,r){const i=Zn(e,t),s=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<s?`${n} ${r}`:n}function Oi(e,t,n,r){const i=Zn(e,t),s=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=s?{}:{[`--${n}-title-leading-gap`]:T.scalingValue((s-o)/2,r)}}function sd(e,t){const n={};let r=!1;for(const i of ad)if(e[i]!==t[i]&&e[i]!==void 0){r=!0;for(const s of Pn)Object.assign(n,{[we(s,i)]:e[i]})}return r?n:null}const nt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Zt=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Jt=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Qt=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],ld={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},cd=["hover","focus","filled","success","error"],Bi=.004,ln=.004,ni=50,bn=1440,xn=ni/bn;function Wo(e){const t=typeof e=="number"&&e>0?e:bn;return ni/t}function dd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return bn}const ko={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function jn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function ud(e,t=1){const n=t/e;return Object.fromEntries(nt.map(r=>[r,n]))}function pd(){return Object.fromEntries([...Zt.map(e=>[e,0]),...Jt.map(e=>[e,0])])}function md(){return Object.fromEntries(Qt.map(e=>[e,0]))}function Nn(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:ko[t]]))}function Fo(e,t,n){const r=e-xn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const s=r/i;return{paddingLeft:t*s,paddingRight:n*s}}function Kn(e,t,n){const r=ri(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((s,o)=>s+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function gd(e,t,n){const r={};for(let i=0;i<e;i+=1){const s=Zt[i],o=Jt[i],a=typeof n[s]=="number"?n[s]:0,c=typeof n[o]=="number"?n[o]:0,u=Fo(t[i]??0,a,c);u.paddingLeft!==a&&(r[s]=u.paddingLeft),u.paddingRight!==c&&(r[o]=u.paddingRight)}return r}function ri(e,t,n){if(e<=0)return[];const r=nt.slice(0,e).map(u=>n[u]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((u,d)=>u+d,0)+xn;if(t>=o)return r;const a=[...i];let c=o-t;for(let u=a.length-1;u>=0&&c>0;u-=1){const d=a[u]-xn;if(d<=0)continue;const $=Math.min(c,d);a[u]-=$,c-=$}return[...a,r[e-1]]}function hd(e,t,n){if(e<=1)return{};const r=ri(e,t,n),i={};for(let s=0;s<e-1;s+=1){const o=nt[s];r[s]!==n[o]&&(i[o]=r[s])}return i}function Vi(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pt]}function fd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function yd(e,t,n,r){const i=Math.min(r,e.length,nt.length),s={};for(let o=0;o<i;o+=1){const a=e[o],c=t.indexOf(a);if(c===-1)continue;const u=nt[c],d=Zt[c],$=Jt[c],h=Qt[c],f=nt[o],m=Zt[o],g=Jt[o],C=Qt[o],y=n[u],x=n[d],P=n[$],L=n[h];typeof y=="number"&&(s[f]=y),typeof x=="number"&&(s[m]=x),typeof P=="number"&&(s[g]=P),typeof L=="number"&&(s[C]=L)}return s}function vd(e,t,n){const r=sd(e,t);r&&(e={...e,...r});const i=ed(e);i&&(e={...e,...i});const s=Wo(n==null?void 0:n.designWidth),o=e.columns,a=t.columns,c=jn(e),u=jn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",$=typeof o=="number"?o:typeof a=="number"?a:Pt.length,h=L=>{if(d)return L;const _=Nn({...t,...L}),E=jn(L),v=Kn($,E,_),S=gd($,v,{...t,...L});return Object.keys(S).length===0?L:{...L,...S}};if(typeof o=="number"&&o!==a){const L={...e,...ud(o,c),...pd()};if(d)for(const _ of Qt)typeof t[_]=="number"&&(L[_]=t[_]);else Object.assign(L,md());return L}const f=Vi(e),m=Vi(t);if(!fd(f,m))return h({...e,...yd(f,m,t,$)});if(c<u&&typeof $=="number"&&!d){const L=Nn({...t,...e});return h({...e,...hd($,c,L)})}if(d){const L=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,_=Math.max(0,(c-s)/2);return L>_?{...e,textPaddingLR:_}:e}const g=Nn({...t,...e}),C=Kn($,u,Nn(t)),x=Kn($,c,g).some((L,_)=>L<(C[_]??L)),P=nt.some(L=>{const _=e[L],E=t[L];return typeof _=="number"&&typeof E=="number"&&_!==E});return x||P?h(e):e}function bd(e,t,n,r){const i=t.slice(0,e).reduce((o,a)=>o+a,0),s=n.slice(e+1,t.length-1).reduce((o,a)=>o+a,0);return Math.max(xn,r-i-s-xn)}function xd(e,t){return Math.random()*(t-e)+e}function Cd(e){return Object.fromEntries(nt.map(t=>[t,typeof e[t]=="number"?e[t]:ko[t]]))}function xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Sd(e,t,n,r,i,s){return e.slice(0,t).map((o,a)=>{const c=Zt[a],u=Jt[a],d=Qt[a];return{key:o,textPrefix:od[o],widthKey:nt[a],width:n[nt[a]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:d,paddingLeft:r[c],paddingRight:i[u],paddingBottom:s[d]}})}function wd({settings:e,content:t,isEditor:n,isPreviewMode:r,activeEvent:i,layoutId:s,onUpdateSettings:o}){const{prefix:a}=T.useScopedStyles(),c=!!(n&&r),{columns:u,type:d,wrapperWidth:$,entriesCount:h,cellMinHeight:f,dividerWidth:m,showVisibility:g,cut:C,showCut:y,cutCellMinHeight:x,cutLabel:P,imageSize:L,imageOnHover:_,entryHoverEffect:E,rowPaddingTop:v,rowPaddingBottom:S,rowPaddingTopB:k,columnsOrder:V,textPaddingLR:A,textColor:O,textFontFamily:D,textFontSettings:j,textFontSize:U,textLineHeight:w,textLetterSpacing:N,textWordSpacing:F,textTextAppearance:M,backgroundColor:R,dividerColor:B,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:oe}=e,[me,H]=p.useState(void 0),[Q,G]=p.useState(null),Y=_==="On"&&(!n||r),ie=(C??0)>0,W=d==="B",ne=p.useRef(null),[I,b]=p.useState(bn),z=Wo(I),q=Math.max(0,(($??0)-z)/2),J=Math.min(A??0,q),se=Math.max(J,ln),le=(($??0)+z)/2;p.useLayoutEffect(()=>{if(!n){b(bn);return}const ge=()=>{b(dd(ne.current))};ge();const xe=ne.current;if(!xe)return;const Se=new ResizeObserver(ge);Se.observe(xe);let Re=xe;for(;Re&&!Re.style.getPropertyValue("--cntrl-article-width");)Re=Re.parentElement;return Re&&Se.observe(Re),()=>Se.disconnect()},[n,s]),p.useEffect(()=>{H(void 0)},[C,y,t,h]);const ce=T.buildColorVars(a,{textColor:O,backgroundColor:R,dividerColor:B,textHoverColor:te,backgroundHoverColor:ue,dividerHoverColor:oe},ld,cd),he=i&&i!=="default"?`${a}-state-${i}`:"",ee=`${E==="Default"?`${a}-entry-hover-default`:E==="Blinds"?`${a}-entry-hover-blinds`:""} ${he}`.trim(),Z=(g==null?void 0:g[0])??!1,de=(g==null?void 0:g[1])??!1,re=p.useRef(e),pe=p.useRef(s);p.useEffect(()=>{if(!o||!n){re.current=e,pe.current=s;return}if(pe.current!==s){re.current=e,pe.current=s;return}const ge=re.current,xe=vd(e,ge,{designWidth:I});re.current=e,xe!==e&&o(xe)},[e,o,n,s,I]);const ve=p.useMemo(()=>Cd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Pe=p.useMemo(()=>xr(e,Zt),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Ke=p.useMemo(()=>xr(e,Jt),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ge=p.useMemo(()=>xr(e,Qt),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=p.useMemo(()=>Array.isArray(V)&&V.length>0?V:[...Pt],[V]),Ae=p.useMemo(()=>Sd($e,u,ve,Pe,Ke,Ge),[$e,u,ve,Pe,Ke,Ge]),Me=jn(e),Ie=p.useMemo(()=>nt.slice(0,u).map(ge=>ve[ge]),[u,ve]),Ve=p.useMemo(()=>ri(u,Me,ve),[u,Me,ve]),ye=p.useMemo(()=>Kn(u,Me,ve),[u,Me,ve]),Fe=p.useMemo(()=>Ae.map((ge,xe)=>Fo(ye[xe]??0,ge.paddingLeft,ge.paddingRight)),[Ae,ye]),He=p.useMemo(()=>{const ge=h===0?1/0:h;return(t??[]).slice(0,ge).map((Se,Re)=>({id:Re,cells:Object.fromEntries(Pt.map(Xe=>[Xe,Se[Xe]??""])),image:Se.image,link:Se.link}))},[t,h]),Oe=ie?me??C:He.length,De=p.useMemo(()=>ie?He.slice(0,Oe):He,[He,ie,Oe]),Qe=ie&&Oe<He.length,Ct=De.length>1||Qe,lt=[Z?`${a}-divider-top`:"",de||Ct?`${a}-divider-bottom`:""].filter(Boolean).join(" "),dr=()=>{const ge=me??C;if(!y){H(He.length);return}H(Math.min(ge+y,He.length))},Ee=ge=>T.scalingValue(ge,n??!1),An=W?k??0:v??0,rn=S??0,on=f??0,ur=W?"rowPaddingTopB":"rowPaddingTop",be=Ae[0],Ye=Ae[Ae.length-1],ze=Fe[0],Ne=Fe[Fe.length-1],St=be&&ze?Math.max(ze.paddingLeft,ln):0,ii=Ye&&Ne?Math.max(Ne.paddingRight,ln):0,No=Me,oi=ge=>{const xe=ne.current;if(!xe)return{x:0,y:0};const Se=xe.getBoundingClientRect();return{x:ge.clientX-Se.left+Mi,y:ge.clientY-Se.top+Mi}},Ho=(ge,xe)=>{if(!Y)return;const Se=ge.image;if(!(Se!=null&&Se.url)){G(null);return}const{x:Re,y:Xe}=oi(xe),ct=(L==null?void 0:L.min)??80,Te=(L==null?void 0:L.max)??320,Be=(Q==null?void 0:Q.rowId)===ge.id?Q.widthPx:xd(ct,Te);G({rowId:ge.id,url:Se.url,objectFit:Se.objectFit??"cover",widthPx:Be,x:Re,y:Xe})},Oo=ge=>{if(!Y||!Q)return;const{x:xe,y:Se}=oi(ge);G(Re=>!Re||Re.x===xe&&Re.y===Se?Re:{...Re,x:xe,y:Se})},Bo=()=>{G(null)},ai=p.useMemo(()=>!W&&ei.some(ge=>{const xe=ge.charAt(0),Se=e[`${ge}VerticalAlign`];return Io(Se,e,xe)}),[W,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var ct;const ge=ne.current;if(!ge)return;const xe=()=>{ge.querySelectorAll("[data-list-col]").forEach(Te=>{Te.style.transform="";const Be=Te.querySelector(`.${a}-list-col`);Be&&(Be.style.minHeight="",Be.style.height="");const it=Te.querySelector(`.${a}-list-col-title`);it&&(it.style.transform="")})};if(W||!ai){xe();return}const Se=()=>{ge.querySelectorAll("[data-list-row]").forEach(Te=>{const Be=Array.from(Te.querySelectorAll("[data-list-col]"));Be.forEach(Le=>{Le.style.transform="";const Ze=Le.querySelector(`.${a}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const Ue=Le.querySelector(`.${a}-list-col-title`);Ue&&(Ue.style.transform="")}),rd(Te,Be,`${a}-list-col`),Te.offsetHeight;const it=Te.getBoundingClientRect().top,wt=`${a}-baseline-probe`,Wt=new Map,an=Be.map(Le=>{const Ze=Le.querySelector(`.${a}-list-col-title`),Ue={el:Le,titleEl:Ze,letter:Le.getAttribute("data-col-letter")??"",kind:Le.getAttribute("data-valign")??"top",anchor:Le.getAttribute("data-valign-anchor")};return Wt.set(Ue.letter,Ue),Ue}),sn=new Map,Rn=(Le,Ze)=>{const Ue=sn.get(Le.letter);if(Ue!==void 0)return Ue;const si=Le.anchor?Wt.get(Le.anchor):void 0;if(Le.kind!=="baseline"||!si||Ze.has(Le.letter)){const ci=br(Le,it,`${a}-list-col`,wt);return sn.set(Le.letter,ci),ci}Ze.add(Le.letter);const Vo=Rn(si,Ze);Ze.delete(Le.letter);const Do=br(Le,it,`${a}-list-col`,wt),zo=Vo-Do;id(Le.titleEl,zo);const li=br(Le,it,`${a}-list-col`,wt);return sn.set(Le.letter,li),li};an.forEach(Le=>Rn(Le,new Set))})};Se();const Re=new ResizeObserver(()=>Se());Re.observe(ge);let Xe=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Xe||Se()}),()=>{Xe=!0,Re.disconnect(),xe()}},[ai,W,e,t,I,De,ye]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yc(a)}}),l.jsx("div",{style:ce,children:l.jsxs("div",{ref:ne,className:`${a}-wrapper ${ee}${lt?` ${lt}`:""}${W?` ${a}-type-b`:""}`.trim(),style:{width:T.scalingValue($??0,n)},onMouseMove:Y?Oo:void 0,onMouseLeave:Y?Bo:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[De.map((ge,xe)=>{var ct;const Se=(((ct=ge.link)==null?void 0:ct.length)??0)>0,Re=Se?"a":"div",Xe=qc(xe,De.length,Z,de,Qe,m??0,n??!1);return l.jsxs(Re,{className:`${a}-list-item${Se?` ${a}-list-item-has-link`:""}`,...Se?{href:ge.link,target:"_blank"}:{},style:Xe,onMouseEnter:Y?Te=>Ho(ge,Te):void 0,children:[(An>0||c)&&l.jsx("div",{...c?{"data-controls":ur,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(An)}}),l.jsx("div",{className:`${a}-list-cols-row${W?"":` ${a}-list-cols-row-h`}`,...W?{}:{"data-list-row":""},style:W?void 0:{minHeight:Ee(on)},children:Ae.map((Te,Be)=>{const it=Be===Ae.length-1,wt=Fe[Be],Wt=Te.paddingBottom,an=Uc(ge.cells[Te.key]),sn=W&&an&&(Wt>0||c),Rn=W?{minHeight:Ee(on)}:it?{}:{width:Ee(ye[Be])},Le=W?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{paddingLeft:Ee(wt.paddingLeft),paddingRight:Ee(wt.paddingRight)},Ze=Te.textPrefix.charAt(0),Ue=W?{kind:"top"}:Qc(e[`${Te.textPrefix}VerticalAlign`],e,Ze);return l.jsxs("div",{...W?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":Ue.kind,...Ue.kind==="baseline"?{"data-valign-anchor":Ue.anchorLetter}:{}},children:[l.jsx("div",{className:`${a}-list-col${it?` ${a}-list-col-last`:""}`,style:{...Le,...Rn},"data-test":Te.width,children:l.jsx("span",{className:Hi(e,Te.textPrefix,`${a}-list-col-title`,`${a}-text-tight-leading`),style:{...Ni(Zn(e,Te.textPrefix),n),...Oi(e,Te.textPrefix,a,n),...W?{}:td(Ue.kind)},children:ge.cells[Te.key]??null})}),sn&&l.jsx("div",{...c?{"data-controls":Te.paddingBottomKey,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(Wt)}})]},Te.key)})}),!W&&(rn>0||c)&&l.jsx("div",{...c?{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0"}:{},className:`${a}-row-padding-handle`,style:{height:Ee(rn)}})]},ge.id)}),Qe&&l.jsx("button",{type:"button",className:`${a}-cut-item`,style:{minHeight:Ee(x??0),...Gc(de,m??0,n??!1)},onClick:dr,children:l.jsx("div",{className:`${a}-list-cols-row`,style:W?{paddingLeft:Ee(J),paddingRight:Ee(J)}:{justifyContent:"center"},children:l.jsx("span",{className:Hi(e,vt,`${a}-cut-label`,`${a}-text-tight-leading`),style:{...Ni(Zn(e,vt),n),...Oi(e,vt,a,n)},children:P})})})]}),c&&!W&&be&&Ye&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":be.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[0]-((ze==null?void 0:ze.paddingRight)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:Ee(St),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":Ye.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[Ae.length-1]-((Ne==null?void 0:Ne.paddingLeft)??0)),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(No-ii),width:Ee(ii),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),c&&!W&&Ae.slice(0,-1).map((ge,xe)=>{const Se=Ae[xe+1],Re=bd(xe,Ve,Ie,Me),Xe=Ve.slice(0,xe+1).reduce((Wt,an)=>Wt+an,0),ct=Fe[xe],Te=Fe[xe+1],Be=Math.max(ct.paddingRight,ln),it=Math.max(Te.paddingLeft,ln),wt=Xe-Bi/2;return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":ge.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ye[xe]-ct.paddingLeft),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe-Be),width:Ee(Be),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":ge.widthKey,"data-controls-axis":"x","data-controls-min":String(ni),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${a}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(wt),width:Ee(Bi),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),l.jsx("div",{"data-controls":Se.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye[xe+1]-Te.paddingRight),className:`${a}-padding-control-handle`,style:{position:"absolute",top:0,left:Ee(Xe),width:Ee(it),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${ge.widthKey}-junction`)}),c&&W&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(le),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:0,width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}}),l.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(le),className:`${a}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:Ee(Math.max(se,Me-se)),width:Ee(se),height:"100%",pointerEvents:"auto",zIndex:2}})]},"text-padding-lr-handles"),Y&&Q&&l.jsx("img",{className:`${a}-hover-image`,src:Q.url,alt:"",style:{width:zn(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const $d=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4666
4623
|
import { CommonComponentProps } from '../props';
|
|
4667
4624
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
4668
4625
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -5090,16 +5047,8 @@ a.\${P}-list-item {
|
|
|
5090
5047
|
background: transparent;
|
|
5091
5048
|
}
|
|
5092
5049
|
|
|
5093
|
-
.\${P}-row-padding-handle
|
|
5094
|
-
content: "";
|
|
5095
|
-
position: absolute;
|
|
5096
|
-
top: 0;
|
|
5097
|
-
left: 0;
|
|
5098
|
-
width: 100%;
|
|
5099
|
-
height: 100%;
|
|
5050
|
+
.\${P}-row-padding-handle[data-controls] {
|
|
5100
5051
|
min-height: 20px;
|
|
5101
|
-
pointer-events: auto;
|
|
5102
|
-
z-index: 10;
|
|
5103
5052
|
}
|
|
5104
5053
|
|
|
5105
5054
|
.\${P}-col-resize-handle::after {
|
|
@@ -5122,45 +5071,10 @@ a.\${P}-list-item {
|
|
|
5122
5071
|
height: 2px;
|
|
5123
5072
|
}
|
|
5124
5073
|
|
|
5125
|
-
.\${P}-padding-control-handle::after {
|
|
5126
|
-
content: '';
|
|
5127
|
-
position: absolute;
|
|
5128
|
-
top: 50%;
|
|
5129
|
-
left: 50%;
|
|
5130
|
-
transform: translate(-50%, -50%);
|
|
5131
|
-
width: 4px;
|
|
5132
|
-
height: 12px;
|
|
5133
|
-
background: #FF5C02;
|
|
5134
|
-
border: 1px solid #FFFFFF;
|
|
5135
|
-
border-radius: 5px;
|
|
5136
|
-
pointer-events: none;
|
|
5137
|
-
box-sizing: border-box;
|
|
5138
|
-
}
|
|
5139
|
-
|
|
5140
|
-
.\${P}-wrapper.\${P}-type-b .\${P}-padding-control-handle::after {
|
|
5141
|
-
width: 12px;
|
|
5142
|
-
height: 4px;
|
|
5143
|
-
}
|
|
5144
|
-
|
|
5145
5074
|
.\${P}-text-padding-lr-handle {
|
|
5146
5075
|
background: transparent;
|
|
5147
5076
|
}
|
|
5148
5077
|
|
|
5149
|
-
.\${P}-text-padding-lr-handle::after {
|
|
5150
|
-
content: '';
|
|
5151
|
-
position: absolute;
|
|
5152
|
-
top: 50%;
|
|
5153
|
-
left: 50%;
|
|
5154
|
-
transform: translate(-50%, -50%);
|
|
5155
|
-
width: 4px;
|
|
5156
|
-
height: 12px;
|
|
5157
|
-
background: #FF5C02;
|
|
5158
|
-
border: 1px solid #FFFFFF;
|
|
5159
|
-
border-radius: 5px;
|
|
5160
|
-
pointer-events: none;
|
|
5161
|
-
box-sizing: border-box;
|
|
5162
|
-
}
|
|
5163
|
-
|
|
5164
5078
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item-has-link,
|
|
5165
5079
|
.\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item-has-link,
|
|
5166
5080
|
.\${P}-wrapper.\${P}-entry-hover-default .\${P}-cut-item,
|
|
@@ -6864,6 +6778,7 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
6864
6778
|
{...(showControls ? {
|
|
6865
6779
|
'data-controls': rowPaddingTopControlKey,
|
|
6866
6780
|
'data-controls-axis': 'y',
|
|
6781
|
+
'data-controls-variant': 'row-padding',
|
|
6867
6782
|
'data-controls-min': '0',
|
|
6868
6783
|
} : {})}
|
|
6869
6784
|
className={\`\${P}-row-padding-handle\`}
|
|
@@ -6962,6 +6877,7 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
6962
6877
|
{...(showControls ? {
|
|
6963
6878
|
'data-controls': 'rowPaddingBottom',
|
|
6964
6879
|
'data-controls-axis': 'y',
|
|
6880
|
+
'data-controls-variant': 'row-padding',
|
|
6965
6881
|
'data-controls-min': '0',
|
|
6966
6882
|
} : {})}
|
|
6967
6883
|
className={\`\${P}-row-padding-handle\`}
|
|
@@ -7024,7 +6940,6 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7024
6940
|
data-controls-max-fraction={String(
|
|
7025
6941
|
effectiveColumnWidths[0] - (firstColumnEffectivePadding?.paddingRight ?? 0),
|
|
7026
6942
|
)}
|
|
7027
|
-
data-controls-static-handle=""
|
|
7028
6943
|
className={\`\${P}-padding-control-handle\`}
|
|
7029
6944
|
style={{
|
|
7030
6945
|
position: 'absolute',
|
|
@@ -7046,7 +6961,6 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7046
6961
|
effectiveColumnWidths[listColumns.length - 1]
|
|
7047
6962
|
- (lastColumnEffectivePadding?.paddingLeft ?? 0),
|
|
7048
6963
|
)}
|
|
7049
|
-
data-controls-static-handle=""
|
|
7050
6964
|
className={\`\${P}-padding-control-handle\`}
|
|
7051
6965
|
style={{
|
|
7052
6966
|
position: 'absolute',
|
|
@@ -7092,7 +7006,6 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7092
7006
|
data-controls-max-fraction={String(
|
|
7093
7007
|
effectiveColumnWidths[colIndex] - colEffectivePadding.paddingLeft,
|
|
7094
7008
|
)}
|
|
7095
|
-
data-controls-static-handle=""
|
|
7096
7009
|
className={\`\${P}-padding-control-handle\`}
|
|
7097
7010
|
style={{
|
|
7098
7011
|
position: 'absolute',
|
|
@@ -7129,7 +7042,6 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7129
7042
|
data-controls-max-fraction={String(
|
|
7130
7043
|
effectiveColumnWidths[colIndex + 1] - nextColEffectivePadding.paddingRight,
|
|
7131
7044
|
)}
|
|
7132
|
-
data-controls-static-handle=""
|
|
7133
7045
|
className={\`\${P}-padding-control-handle\`}
|
|
7134
7046
|
style={{
|
|
7135
7047
|
position: 'absolute',
|
|
@@ -7150,9 +7062,9 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7150
7062
|
data-controls="textPaddingLR"
|
|
7151
7063
|
data-controls-paired=""
|
|
7152
7064
|
data-controls-axis="x"
|
|
7065
|
+
data-controls-variant="column-padding"
|
|
7153
7066
|
data-controls-min="0"
|
|
7154
7067
|
data-controls-max-fraction={String(textPaddingLRMaxFraction)}
|
|
7155
|
-
data-controls-static-handle=""
|
|
7156
7068
|
className={\`\${P}-text-padding-lr-handle\`}
|
|
7157
7069
|
style={{
|
|
7158
7070
|
position: 'absolute',
|
|
@@ -7168,10 +7080,10 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7168
7080
|
data-controls="textPaddingLR"
|
|
7169
7081
|
data-controls-paired=""
|
|
7170
7082
|
data-controls-axis="x"
|
|
7083
|
+
data-controls-variant="column-padding"
|
|
7171
7084
|
data-controls-reverse=""
|
|
7172
7085
|
data-controls-min="0"
|
|
7173
7086
|
data-controls-max-fraction={String(textPaddingLRMaxFraction)}
|
|
7174
|
-
data-controls-static-handle=""
|
|
7175
7087
|
className={\`\${P}-text-padding-lr-handle\`}
|
|
7176
7088
|
style={{
|
|
7177
7089
|
position: 'absolute',
|
|
@@ -7203,4 +7115,4 @@ export function List({ settings, content, isEditor, isPreviewMode, activeEvent,
|
|
|
7203
7115
|
</>
|
|
7204
7116
|
);
|
|
7205
7117
|
}
|
|
7206
|
-
`,Bt=["A","B","C","D","E"],zo=[...Xc,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Mt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Td(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Ld(){return Object.fromEntries(Bt.map((e,t)=>{const n=Pt[t],r=`${e} column`;return[n,Td(r)]}))}function Ed(){const e={};for(const t of Bt)e[`${t}ColumnWidth`]=Hn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Hn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Hn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Hn(`${t} column padding bottom`);return e}function jo(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Pt]};for(const n of Bt)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function _d(e){const t={};if(e!==vt){const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"Vertical align",display:{type:"drop-down",enum:[...zo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zo]}}return t[we(e,"textFontFamily")]={type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},t[we(e,"textFontSettings")]={...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},t[we(e,"textFontSize")]={...Mt.fontSize,scope:"layout",title:"Font Size",display:{type:"font-size"}},t[we(e,"textLineHeight")]={...Mt.lineHeight,scope:"layout",title:"Line Height",display:{type:"line-height-input"}},t[we(e,"textLetterSpacing")]={...Mt.letterSpacing,scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},t[we(e,"textWordSpacing")]={...Mt.wordSpacing,scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},t[we(e,"textTextAppearance")]={...Mt.textAppearance,scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},t}const Pd=Pn.reduce((e,t)=>({...e,..._d(t)}),{}),Ad=Pn.reduce((e,t)=>({...e,...t!==vt?{[`${t}VerticalAlign`]:"Top"}:{},[we(t,"textFontFamily")]:"Arial",[we(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[we(t,"textLetterSpacing")]:0,[we(t,"textWordSpacing")]:0,[we(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ko(e){const{textFontSize:t,textLineHeight:n}=e;return Pn.reduce((r,o)=>(t!==void 0&&(r[`${o}TextFontSize`]=t),n!==void 0&&(r[`${o}TextLineHeight`]=n),r),{})}const Rd={AColumn:"A column",BColumn:"B column",CColumn:"C column",DColumn:"D column",EColumn:"E column",cutLabel:"See all"},Id=Pn.map(e=>({type:"group",title:Rd[e],items:[we(e,"textFontFamily"),we(e,"textFontSettings"),{type:"row",items:[we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing")]},we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}));function Mi(e){return[we(e,"textFontFamily"),we(e,"textFontSettings"),we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing"),we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}function Wd(){const e=[];return eo.forEach((t,n)=>{const r=Pt[n],o=Mi(t);for(let s=1;s<Pt.length;s+=1){const i=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:r,isNotEqual:!0}))];o.forEach(a=>{e.push({if:i,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const Fd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],kd=["cutLabel","cutCellMinHeight","showCut"],Md=Mi(vt),Nd=[...kd,...Md],Hd=[...Bt.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function Cr(e,t){const n=e?` ${e}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:t,link:""}}const Od=[Cr("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),Cr("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),Cr("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Bd=[...Bt.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Vd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Ld(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Od},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Ed(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},...Pd,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Ad,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:jo({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},textFontSize:.043,textLineHeight:.043,...Ko({textFontSize:.043,textLineHeight:.043})}),d:jo({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},textFontSize:.01,textLineHeight:.01,...Ko({textFontSize:.01,textLineHeight:.01})})},displayRules:[...Wd(),...Nd.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Hd.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Bt.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),...Bt.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}ColumnVerticalAlign.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Bd]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"All text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},...Id]}],paletteBookmark:{items:[...Fd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Dd={element:wd,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Vd,sourceCode:$d},zd=[Qs,al,Gl,rc,mc,wc,_c,Fc,Kc,Dd];exports.components=zd;exports.isSchemaV1=ji;
|
|
7118
|
+
`,Bt=["A","B","C","D","E"],Di=[...Xc,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Mt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Td(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Hn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Ld(){return Object.fromEntries(Bt.map((e,t)=>{const n=Pt[t],r=`${e} column`;return[n,Td(r)]}))}function Ed(){const e={};for(const t of Bt)e[`${t}ColumnWidth`]=Hn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Hn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Hn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Hn(`${t} column padding bottom`);return e}function zi(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...Pt]};for(const n of Bt)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function _d(e){const t={};if(e!==vt){const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"Vertical align",display:{type:"drop-down",enum:[...Di],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Di]}}return t[we(e,"textFontFamily")]={type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},t[we(e,"textFontSettings")]={...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},t[we(e,"textFontSize")]={...Mt.fontSize,scope:"layout",title:"Font Size",display:{type:"font-size"}},t[we(e,"textLineHeight")]={...Mt.lineHeight,scope:"layout",title:"Line Height",display:{type:"line-height-input"}},t[we(e,"textLetterSpacing")]={...Mt.letterSpacing,scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},t[we(e,"textWordSpacing")]={...Mt.wordSpacing,scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},t[we(e,"textTextAppearance")]={...Mt.textAppearance,scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},t}const Pd=Pn.reduce((e,t)=>({...e,..._d(t)}),{}),Ad=Pn.reduce((e,t)=>({...e,...t!==vt?{[`${t}VerticalAlign`]:"Top"}:{},[we(t,"textFontFamily")]:"Arial",[we(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[we(t,"textLetterSpacing")]:0,[we(t,"textWordSpacing")]:0,[we(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ji(e){const{textFontSize:t,textLineHeight:n}=e;return Pn.reduce((r,i)=>(t!==void 0&&(r[`${i}TextFontSize`]=t),n!==void 0&&(r[`${i}TextLineHeight`]=n),r),{})}const Rd={AColumn:"A column",BColumn:"B column",CColumn:"C column",DColumn:"D column",EColumn:"E column",cutLabel:"See all"},Id=Pn.map(e=>({type:"group",title:Rd[e],items:[we(e,"textFontFamily"),we(e,"textFontSettings"),{type:"row",items:[we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing")]},we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}));function Mo(e){return[we(e,"textFontFamily"),we(e,"textFontSettings"),we(e,"textFontSize"),we(e,"textLineHeight"),we(e,"textLetterSpacing"),we(e,"textWordSpacing"),we(e,"textTextAppearance"),...e!==vt?[`${e}VerticalAlign`]:[]]}function Wd(){const e=[];return ei.forEach((t,n)=>{const r=Pt[n],i=Mo(t);for(let s=1;s<Pt.length;s+=1){const o=[{name:"columns",value:s},...Array.from({length:s},(a,c)=>({name:`columnsOrder.${c}`,value:r,isNotEqual:!0}))];i.forEach(a=>{e.push({if:o,then:{name:`properties.${a}.display.visible`,value:!1}})})}}),e}const kd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],Fd=["cutLabel","cutCellMinHeight","showCut"],Md=Mo(vt),Nd=[...Fd,...Md],Hd=[...Bt.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function Cr(e,t){const n=e?` ${e}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:t,link:""}}const Od=[Cr("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),Cr("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),Cr("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Bd=[...Bt.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Vd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Ld(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Od},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Ed(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...Mt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},...Pd,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Ad,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:zi({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},textFontSize:.043,textLineHeight:.043,...ji({textFontSize:.043,textLineHeight:.043})}),d:zi({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},textFontSize:.01,textLineHeight:.01,...ji({textFontSize:.01,textLineHeight:.01})})},displayRules:[...Wd(),...Nd.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Hd.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Bt.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),...Bt.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}ColumnVerticalAlign.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Bd]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"All text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},...Id]}],paletteBookmark:{items:[...kd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Dd={element:wd,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Vd,sourceCode:$d},zd=[Qs,al,Gl,rc,mc,wc,_c,kc,Kc,Dd];exports.components=zd;exports.isSchemaV1=jo;
|