@cntrl-site/components 0.1.30-alpha.4 → 0.1.30-components.0
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/Components/ControlSlider/ControlSliderComponent.d.ts +0 -3
- package/dist/Components/Form/Form.d.ts +64 -0
- package/dist/Components/Form/FormComponent.d.ts +14 -0
- package/dist/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +0 -2
- package/dist/Components/OnelinerForm/OnelinerForm.d.ts +33 -0
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +13 -0
- package/dist/Components/utils/index.d.ts +4 -0
- package/dist/Components/utils/useScopedStyles.d.ts +5 -0
- package/dist/components.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +460 -2
- package/dist/index.mjs +3074 -3360
- package/dist/types/Component.d.ts +4 -0
- package/dist/types/SchemaV1.d.ts +58 -0
- package/dist/useScopedStyles-b8cb4EW8.js +1 -0
- package/dist/useScopedStyles-c-B_XeP_.mjs +15 -0
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +5 -0
- package/package.json +13 -1
- package/dist/Components/Testimonials/Arrows.d.ts +0 -12
- package/dist/Components/Testimonials/Testimonials.d.ts +0 -136
- package/dist/Components/Testimonials/TestimonialsComponent.d.ts +0 -2
- package/dist/Components/Testimonials/getAlignPosition.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,464 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),F=require("react"),oe=require("classnames"),Br=require("react-dom"),Wr="ControlSlider-module__wrapper___sHEkd",Fr="ControlSlider-module__hoverArrow___A-dOH",Mr="ControlSlider-module__sliderItem___QQSkR",Hr="ControlSlider-module__sliderImage___9hRl-",Vr="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Ur="ControlSlider-module__nextArrow___-30Yc",Gr="ControlSlider-module__arrowInner___aEra3",Yr="ControlSlider-module__arrowIcon___S4ztF",Xr="ControlSlider-module__arrowImg___2dwJW",Kr="ControlSlider-module__mirror___brd6U",qr="ControlSlider-module__pagination___bicLF",Jr="ControlSlider-module__paginationInner___bT-P-",Zr="ControlSlider-module__paginationVertical___zYqKw",Qr="ControlSlider-module__paginationItem___nTRbk",ei="ControlSlider-module__dot___p1Qun",ti="ControlSlider-module__activeDot___LHFaj",ni="ControlSlider-module__paginationInsideBottom___R3FWn",ri="ControlSlider-module__paginationInsideTop___V-qb-",ii="ControlSlider-module__paginationOutsideBottom___14w8D",oi="ControlSlider-module__paginationOutsideTop___SCLqB",ai="ControlSlider-module__paginationInsideLeft___yOBRZ",li="ControlSlider-module__paginationInsideRight___Rtt3o",si="ControlSlider-module__paginationOutsideLeft___lahaw",ci="ControlSlider-module__paginationOutsideRight___EtuQa",ui="ControlSlider-module__imgWrapper___UjEgB",pi="ControlSlider-module__captionBlock___dJ6-j",di="ControlSlider-module__captionTextWrapper___HFlpf",mi="ControlSlider-module__captionText___uGBVc",gi="ControlSlider-module__active___WZK4G",fi="ControlSlider-module__withPointerEvents___t-18M",hi="ControlSlider-module__topLeftAlignment___zjnGM",vi="ControlSlider-module__topCenterAlignment___gD1xW",yi="ControlSlider-module__topRightAlignment___NMapS",bi="ControlSlider-module__middleLeftAlignment___OnUrY",_i="ControlSlider-module__middleCenterAlignment___Tdkl0",wi="ControlSlider-module__middleRightAlignment___wEbfX",Si="ControlSlider-module__bottomLeftAlignment___cTP2-",xi="ControlSlider-module__bottomCenterAlignment___c54fB",Ci="ControlSlider-module__bottomRightAlignment___kEwrz",Ai="ControlSlider-module__clickOverlay___DZA28",Ii="ControlSlider-module__contain___pLyq7",Ei="ControlSlider-module__cover___KdDat",U={wrapper:Wr,hoverArrow:Fr,sliderItem:Mr,sliderImage:Hr,arrow:Vr,arrowVertical:$r,nextArrow:Ur,arrowInner:Gr,arrowIcon:Yr,arrowImg:Xr,mirror:Kr,pagination:qr,paginationInner:Jr,paginationVertical:Zr,paginationItem:Qr,dot:ei,activeDot:ti,paginationInsideBottom:ni,paginationInsideTop:ri,paginationOutsideBottom:ii,paginationOutsideTop:oi,paginationInsideLeft:ai,paginationInsideRight:li,paginationOutsideLeft:si,paginationOutsideRight:ci,imgWrapper:ui,captionBlock:pi,captionTextWrapper:di,captionText:mi,active:gi,withPointerEvents:fi,topLeftAlignment:hi,topCenterAlignment:vi,topRightAlignment:yi,middleLeftAlignment:bi,middleCenterAlignment:_i,middleRightAlignment:wi,bottomLeftAlignment:Si,bottomCenterAlignment:xi,bottomRightAlignment:Ci,clickOverlay:Ai,contain:Ii,cover:Ei};function Li(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ti(e,r,t){return r&&Li(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var kn="(prefers-reduced-motion: reduce)",Je=1,Ri=2,et=3,rt=4,ht=5,Tt=6,kt=7,Ni={CREATED:Je,MOUNTED:Ri,IDLE:et,MOVING:rt,SCROLLING:ht,DRAGGING:Tt,DESTROYED:kt};function Oe(e){e.length=0}function We(e,r,t){return Array.prototype.slice.call(e,r,t)}function ae(e){return e.bind.apply(e,[null].concat(We(arguments,1)))}var tr=setTimeout,tn=function(){};function On(e){return requestAnimationFrame(e)}function Wt(e,r){return typeof r===e}function ct(e){return!dn(e)&&Wt("object",e)}var pn=Array.isArray,nr=ae(Wt,"function"),Pe=ae(Wt,"string"),vt=ae(Wt,"undefined");function dn(e){return e===null}function rr(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function yt(e){return pn(e)?e:[e]}function Se(e,r){yt(e).forEach(r)}function mn(e,r){return e.indexOf(r)>-1}function Rt(e,r){return e.push.apply(e,yt(r)),e}function Ne(e,r,t){e&&Se(r,function(n){n&&e.classList[t?"add":"remove"](n)})}function Ie(e,r){Ne(e,Pe(r)?r.split(" "):r,!0)}function bt(e,r){Se(r,e.appendChild.bind(e))}function gn(e,r){Se(e,function(t){var n=(r||t).parentNode;n&&n.insertBefore(t,r)})}function ut(e,r){return rr(e)&&(e.msMatchesSelector||e.matches).call(e,r)}function ir(e,r){var t=e?We(e.children):[];return r?t.filter(function(n){return ut(n,r)}):t}function _t(e,r){return r?ir(e,r)[0]:e.firstElementChild}var pt=Object.keys;function Ve(e,r,t){return e&&(t?pt(e).reverse():pt(e)).forEach(function(n){n!=="__proto__"&&r(e[n],n)}),e}function dt(e){return We(arguments,1).forEach(function(r){Ve(r,function(t,n){e[n]=r[n]})}),e}function ze(e){return We(arguments,1).forEach(function(r){Ve(r,function(t,n){pn(t)?e[n]=t.slice():ct(t)?e[n]=ze({},ct(e[n])?e[n]:{},t):e[n]=t})}),e}function Dn(e,r){Se(r||pt(e),function(t){delete e[t]})}function Ee(e,r){Se(e,function(t){Se(r,function(n){t&&t.removeAttribute(n)})})}function q(e,r,t){ct(r)?Ve(r,function(n,o){q(e,o,n)}):Se(e,function(n){dn(t)||t===""?Ee(n,r):n.setAttribute(r,String(t))})}function Ze(e,r,t){var n=document.createElement(e);return r&&(Pe(r)?Ie(n,r):q(n,r)),t&&bt(t,n),n}function xe(e,r,t){if(vt(t))return getComputedStyle(e)[r];dn(t)||(e.style[r]=""+t)}function mt(e,r){xe(e,"display",r)}function or(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ce(e,r){return e.getAttribute(r)}function zn(e,r){return e&&e.classList.contains(r)}function _e(e){return e.getBoundingClientRect()}function Ue(e){Se(e,function(r){r&&r.parentNode&&r.parentNode.removeChild(r)})}function ar(e){return _t(new DOMParser().parseFromString(e,"text/html").body)}function Re(e,r){e.preventDefault(),r&&(e.stopPropagation(),e.stopImmediatePropagation())}function lr(e,r){return e&&e.querySelector(r)}function fn(e,r){return r?We(e.querySelectorAll(r)):[]}function je(e,r){Ne(e,r,!1)}function nn(e){return e.timeStamp}function He(e){return Pe(e)?e:e?e+"px":""}var wt="splide",hn="data-"+wt;function lt(e,r){if(!e)throw new Error("["+wt+"] "+(r||""))}var Be=Math.min,Ot=Math.max,Dt=Math.floor,gt=Math.ceil,be=Math.abs;function sr(e,r,t){return be(e-r)<t}function Nt(e,r,t,n){var o=Be(r,t),l=Ot(r,t);return n?o<e&&e<l:o<=e&&e<=l}function Ke(e,r,t){var n=Be(r,t),o=Ot(r,t);return Be(Ot(n,e),o)}function rn(e){return+(e>0)-+(e<0)}function on(e,r){return Se(r,function(t){e=e.replace("%s",""+t)}),e}function vn(e){return e<10?"0"+e:""+e}var Pn={};function ji(e){return""+e+vn(Pn[e]=(Pn[e]||0)+1)}function cr(){var e=[];function r(i,c,s,p){o(i,c,function(a,_,h){var d="addEventListener"in a,u=d?a.removeEventListener.bind(a,_,s,p):a.removeListener.bind(a,s);d?a.addEventListener(_,s,p):a.addListener(s),e.push([a,_,h,s,u])})}function t(i,c,s){o(i,c,function(p,a,_){e=e.filter(function(h){return h[0]===p&&h[1]===a&&h[2]===_&&(!s||h[3]===s)?(h[4](),!1):!0})})}function n(i,c,s){var p,a=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:a,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,a,!1,s)),i.dispatchEvent(p),p}function o(i,c,s){Se(i,function(p){p&&Se(c,function(a){a.split(" ").forEach(function(_){var h=_.split(".");s(p,h[0],h[1])})})})}function l(){e.forEach(function(i){i[4]()}),Oe(e)}return{bind:r,unbind:t,dispatch:n,destroy:l}}var Fe="mounted",an="ready",De="move",it="moved",yn="click",ur="active",pr="inactive",dr="visible",mr="hidden",me="refresh",ve="updated",tt="resize",Ft="resized",gr="drag",fr="dragging",hr="dragged",Mt="scroll",Ye="scrolled",ki="overflow",bn="destroy",vr="arrows:mounted",yr="arrows:updated",br="pagination:mounted",_r="pagination:updated",_n="navigation:mounted",wn="autoplay:play",wr="autoplay:playing",Sn="autoplay:pause",xn="lazyload:loaded",Sr="sk",xr="sh",zt="ei";function ue(e){var r=e?e.event.bus:document.createDocumentFragment(),t=cr();function n(l,i){t.bind(r,yt(l).join(" "),function(c){i.apply(i,pn(c.detail)?c.detail:[])})}function o(l){t.dispatch(r,l,We(arguments,1))}return e&&e.event.on(bn,t.destroy),dt(t,{bus:r,on:n,off:ae(t.unbind,r),emit:o})}function Ht(e,r,t,n){var o=Date.now,l,i=0,c,s=!0,p=0;function a(){if(!s){if(i=e?Be((o()-l)/e,1):1,t&&t(i),i>=1&&(r(),l=o(),n&&++p>=n))return h();c=On(a)}}function _(A){A||u(),l=o()-(A?i*e:0),s=!1,c=On(a)}function h(){s=!0}function d(){l=o(),i=0,t&&t(i)}function u(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function m(A){e=A}function C(){return s}return{start:_,rewind:d,pause:h,cancel:u,set:m,isPaused:C}}function Oi(e){var r=e;function t(o){r=o}function n(o){return mn(yt(o),r)}return{set:t,is:n}}function Di(e,r){var t=Ht(0,e,null,1);return function(){t.isPaused()&&t.start()}}function zi(e,r,t){var n=e.state,o=t.breakpoints||{},l=t.reducedMotion||{},i=cr(),c=[];function s(){var u=t.mediaQuery==="min";pt(o).sort(function(m,C){return u?+m-+C:+C-+m}).forEach(function(m){a(o[m],"("+(u?"min":"max")+"-width:"+m+"px)")}),a(l,kn),_()}function p(u){u&&i.destroy()}function a(u,m){var C=matchMedia(m);i.bind(C,"change",_),c.push([u,C])}function _(){var u=n.is(kt),m=t.direction,C=c.reduce(function(A,y){return ze(A,y[1].matches?y[0]:{})},{});Dn(t),d(C),t.destroy?e.destroy(t.destroy==="completely"):u?(p(!0),e.mount()):m!==t.direction&&e.refresh()}function h(u){matchMedia(kn).matches&&(u?ze(t,l):Dn(t,pt(l)))}function d(u,m,C){ze(t,u),m&&ze(Object.getPrototypeOf(t),u),(C||!n.is(Je))&&e.emit(ve,t)}return{setup:s,destroy:p,reduce:h,set:d}}var Vt="Arrow",$t=Vt+"Left",Ut=Vt+"Right",Cr=Vt+"Up",Ar=Vt+"Down",Bn="rtl",Gt="ttb",qt={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Cr,Ut],ArrowRight:[Ar,$t]};function Pi(e,r,t){function n(l,i,c){c=c||t.direction;var s=c===Bn&&!i?1:c===Gt?0:-1;return qt[l]&&qt[l][s]||l.replace(/width|left|right/i,function(p,a){var _=qt[p.toLowerCase()][s]||p;return a>0?_.charAt(0).toUpperCase()+_.slice(1):_})}function o(l){return l*(t.direction===Bn?1:-1)}return{resolve:n,orient:o}}var ke="role",Qe="tabindex",Bi="disabled",Ae="aria-",St=Ae+"controls",Ir=Ae+"current",Wn=Ae+"selected",we=Ae+"label",Cn=Ae+"labelledby",Er=Ae+"hidden",An=Ae+"orientation",ft=Ae+"roledescription",Fn=Ae+"live",Mn=Ae+"busy",Hn=Ae+"atomic",In=[ke,Qe,Bi,St,Ir,we,Cn,Er,An,ft],Le=wt+"__",Me="is-",Jt=wt,Vn=Le+"track",Wi=Le+"list",Yt=Le+"slide",Lr=Yt+"--clone",Fi=Yt+"__container",En=Le+"arrows",Xt=Le+"arrow",Tr=Xt+"--prev",Rr=Xt+"--next",Kt=Le+"pagination",Nr=Kt+"__page",Mi=Le+"progress",Hi=Mi+"__bar",Vi=Le+"toggle",$i=Le+"spinner",Ui=Le+"sr",Gi=Me+"initialized",Ge=Me+"active",jr=Me+"prev",kr=Me+"next",ln=Me+"visible",sn=Me+"loading",Or=Me+"focus-in",Dr=Me+"overflow",Yi=[Ge,ln,jr,kr,sn,Or,Dr],Xi={slide:Yt,clone:Lr,arrows:En,arrow:Xt,prev:Tr,next:Rr,pagination:Kt,page:Nr,spinner:$i};function Ki(e,r){if(nr(e.closest))return e.closest(r);for(var t=e;t&&t.nodeType===1&&!ut(t,r);)t=t.parentElement;return t}var qi=5,$n=200,zr="touchstart mousedown",Zt="touchmove mousemove",Qt="touchend touchcancel mouseup click";function Ji(e,r,t){var n=ue(e),o=n.on,l=n.bind,i=e.root,c=t.i18n,s={},p=[],a=[],_=[],h,d,u;function m(){x(),H(),y()}function C(){o(me,A),o(me,m),o(ve,y),l(document,zr+" keydown",function(v){u=v.type==="keydown"},{capture:!0}),l(i,"focusin",function(){Ne(i,Or,!!u)})}function A(v){var S=In.concat("style");Oe(p),je(i,a),je(h,_),Ee([h,d],S),Ee(i,v?S:["style",ft])}function y(){je(i,a),je(h,_),a=L(Jt),_=L(Vn),Ie(i,a),Ie(h,_),q(i,we,t.label),q(i,Cn,t.labelledby)}function x(){h=B("."+Vn),d=_t(h,"."+Wi),lt(h&&d,"A track/list element is missing."),Rt(p,ir(d,"."+Yt+":not(."+Lr+")")),Ve({arrows:En,pagination:Kt,prev:Tr,next:Rr,bar:Hi,toggle:Vi},function(v,S){s[S]=B("."+v)}),dt(s,{root:i,track:h,list:d,slides:p})}function H(){var v=i.id||ji(wt),S=t.role;i.id=v,h.id=h.id||v+"-track",d.id=d.id||v+"-list",!Ce(i,ke)&&i.tagName!=="SECTION"&&S&&q(i,ke,S),q(i,ft,c.carousel),q(d,ke,"presentation")}function B(v){var S=lr(i,v);return S&&Ki(S,"."+Jt)===i?S:void 0}function L(v){return[v+"--"+t.type,v+"--"+t.direction,t.drag&&v+"--draggable",t.isNavigation&&v+"--nav",v===Jt&&Ge]}return dt(s,{setup:m,mount:C,destroy:A})}var nt="slide",ot="loop",xt="fade";function Zi(e,r,t,n){var o=ue(e),l=o.on,i=o.emit,c=o.bind,s=e.Components,p=e.root,a=e.options,_=a.isNavigation,h=a.updateOnMove,d=a.i18n,u=a.pagination,m=a.slideFocus,C=s.Direction.resolve,A=Ce(n,"style"),y=Ce(n,we),x=t>-1,H=_t(n,"."+Fi),B;function L(){x||(n.id=p.id+"-slide"+vn(r+1),q(n,ke,u?"tabpanel":"group"),q(n,ft,d.slide),q(n,we,y||on(d.slideLabel,[r+1,e.length]))),v()}function v(){c(n,"click",ae(i,yn,T)),c(n,"keydown",ae(i,Sr,T)),l([it,xr,Ye],I),l(_n,N),h&&l(De,W)}function S(){B=!0,o.destroy(),je(n,Yi),Ee(n,In),q(n,"style",A),q(n,we,y||"")}function N(){var R=e.splides.map(function(b){var O=b.splide.Components.Slides.getAt(r);return O?O.slide.id:""}).join(" ");q(n,we,on(d.slideX,(x?t:r)+1)),q(n,St,R),q(n,ke,m?"button":""),m&&Ee(n,ft)}function W(){B||I()}function I(){if(!B){var R=e.index;D(),P(),Ne(n,jr,r===R-1),Ne(n,kr,r===R+1)}}function D(){var R=V();R!==zn(n,Ge)&&(Ne(n,Ge,R),q(n,Ir,_&&R||""),i(R?ur:pr,T))}function P(){var R=g(),b=!R&&(!V()||x);if(e.state.is([rt,ht])||q(n,Er,b||""),q(fn(n,a.focusableNodes||""),Qe,b?-1:""),m&&q(n,Qe,b?-1:0),R!==zn(n,ln)&&(Ne(n,ln,R),i(R?dr:mr,T)),!R&&document.activeElement===n){var O=s.Slides.getAt(e.index);O&&or(O.slide)}}function G(R,b,O){xe(O&&H||n,R,b)}function V(){var R=e.index;return R===r||a.cloneStatus&&R===t}function g(){if(e.is(xt))return V();var R=_e(s.Elements.track),b=_e(n),O=C("left",!0),Y=C("right",!0);return Dt(R[O])<=gt(b[O])&&Dt(b[Y])<=gt(R[Y])}function j(R,b){var O=be(R-r);return!x&&(a.rewind||e.is(ot))&&(O=Be(O,e.length-O)),O<=b}var T={index:r,slideIndex:t,slide:n,container:H,isClone:x,mount:L,destroy:S,update:I,style:G,isWithin:j};return T}function Qi(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=n.bind,c=r.Elements,s=c.slides,p=c.list,a=[];function _(){h(),o(me,d),o(me,h)}function h(){s.forEach(function(I,D){m(I,D,-1)})}function d(){B(function(I){I.destroy()}),Oe(a)}function u(){B(function(I){I.update()})}function m(I,D,P){var G=Zi(e,D,P,I);G.mount(),a.push(G),a.sort(function(V,g){return V.index-g.index})}function C(I){return I?L(function(D){return!D.isClone}):a}function A(I){var D=r.Controller,P=D.toIndex(I),G=D.hasFocus()?1:t.perPage;return L(function(V){return Nt(V.index,P,P+G-1)})}function y(I){return L(I)[0]}function x(I,D){Se(I,function(P){if(Pe(P)&&(P=ar(P)),rr(P)){var G=s[D];G?gn(P,G):bt(p,P),Ie(P,t.classes.slide),S(P,ae(l,tt))}}),l(me)}function H(I){Ue(L(I).map(function(D){return D.slide})),l(me)}function B(I,D){C(D).forEach(I)}function L(I){return a.filter(nr(I)?I:function(D){return Pe(I)?ut(D.slide,I):mn(yt(I),D.index)})}function v(I,D,P){B(function(G){G.style(I,D,P)})}function S(I,D){var P=fn(I,"img"),G=P.length;G?P.forEach(function(V){i(V,"load error",function(){--G||D()})}):D()}function N(I){return I?s.length:a.length}function W(){return a.length>t.perPage}return{mount:_,destroy:d,update:u,register:m,get:C,getIn:A,getAt:y,add:x,remove:H,forEach:B,filter:L,style:v,getLength:N,isEnough:W}}function eo(e,r,t){var n=ue(e),o=n.on,l=n.bind,i=n.emit,c=r.Slides,s=r.Direction.resolve,p=r.Elements,a=p.root,_=p.track,h=p.list,d=c.getAt,u=c.style,m,C,A;function y(){x(),l(window,"resize load",Di(ae(i,tt))),o([ve,me],x),o(tt,H)}function x(){m=t.direction===Gt,xe(a,"maxWidth",He(t.width)),xe(_,s("paddingLeft"),B(!1)),xe(_,s("paddingRight"),B(!0)),H(!0)}function H(T){var R=_e(a);(T||C.width!==R.width||C.height!==R.height)&&(xe(_,"height",L()),u(s("marginRight"),He(t.gap)),u("width",S()),u("height",N(),!0),C=R,i(Ft),A!==(A=j())&&(Ne(a,Dr,A),i(ki,A)))}function B(T){var R=t.padding,b=s(T?"right":"left");return R&&He(R[b]||(ct(R)?0:R))||"0px"}function L(){var T="";return m&&(T=v(),lt(T,"height or heightRatio is missing."),T="calc("+T+" - "+B(!1)+" - "+B(!0)+")"),T}function v(){return He(t.height||_e(h).width*t.heightRatio)}function S(){return t.autoWidth?null:He(t.fixedWidth)||(m?"":W())}function N(){return He(t.fixedHeight)||(m?t.autoHeight?null:W():v())}function W(){var T=He(t.gap);return"calc((100%"+(T&&" + "+T)+")/"+(t.perPage||1)+(T&&" - "+T)+")"}function I(){return _e(h)[s("width")]}function D(T,R){var b=d(T||0);return b?_e(b.slide)[s("width")]+(R?0:V()):0}function P(T,R){var b=d(T);if(b){var O=_e(b.slide)[s("right")],Y=_e(h)[s("left")];return be(O-Y)+(R?0:V())}return 0}function G(T){return P(e.length-1)-P(0)+D(0,T)}function V(){var T=d(0);return T&&parseFloat(xe(T.slide,s("marginRight")))||0}function g(T){return parseFloat(xe(_,s("padding"+(T?"Right":"Left"))))||0}function j(){return e.is(xt)||G(!0)>I()}return{mount:y,resize:H,listSize:I,slideSize:D,sliderSize:G,totalSize:P,getPadding:g,isOverflow:j}}var to=2;function no(e,r,t){var n=ue(e),o=n.on,l=r.Elements,i=r.Slides,c=r.Direction.resolve,s=[],p;function a(){o(me,_),o([ve,tt],d),(p=C())&&(u(p),r.Layout.resize(!0))}function _(){h(),a()}function h(){Ue(s),Oe(s),n.destroy()}function d(){var A=C();p!==A&&(p<A||!A)&&n.emit(me)}function u(A){var y=i.get().slice(),x=y.length;if(x){for(;y.length<A;)Rt(y,y);Rt(y.slice(-A),y.slice(0,A)).forEach(function(H,B){var L=B<A,v=m(H.slide,B);L?gn(v,y[0].slide):bt(l.list,v),Rt(s,v),i.register(v,B-A+(L?0:x),H.index)})}}function m(A,y){var x=A.cloneNode(!0);return Ie(x,t.classes.clone),x.id=e.root.id+"-clone"+vn(y+1),x}function C(){var A=t.clones;if(!e.is(ot))A=0;else if(vt(A)){var y=t[c("fixedWidth")]&&r.Layout.slideSize(0),x=y&>(_e(l.track)[c("width")]/y);A=x||t[c("autoWidth")]&&e.length||t.perPage*to}return A}return{mount:a,destroy:h}}function ro(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=e.state.set,c=r.Layout,s=c.slideSize,p=c.getPadding,a=c.totalSize,_=c.listSize,h=c.sliderSize,d=r.Direction,u=d.resolve,m=d.orient,C=r.Elements,A=C.list,y=C.track,x;function H(){x=r.Transition,o([Fe,Ft,ve,me],B)}function B(){r.Controller.isBusy()||(r.Scroll.cancel(),v(e.index),r.Slides.update())}function L(b,O,Y,ne){b!==O&&T(b>Y)&&(I(),S(W(G(),b>Y),!0)),i(rt),l(De,O,Y,b),x.start(O,function(){i(et),l(it,O,Y,b),ne&&ne()})}function v(b){S(P(b,!0))}function S(b,O){if(!e.is(xt)){var Y=O?b:N(b);xe(A,"transform","translate"+u("X")+"("+Y+"px)"),b!==Y&&l(xr)}}function N(b){if(e.is(ot)){var O=D(b),Y=O>r.Controller.getEnd(),ne=O<0;(ne||Y)&&(b=W(b,Y))}return b}function W(b,O){var Y=b-j(O),ne=h();return b-=m(ne*(gt(be(Y)/ne)||1))*(O?1:-1),b}function I(){S(G(),!0),x.cancel()}function D(b){for(var O=r.Slides.get(),Y=0,ne=1/0,Q=0;Q<O.length;Q++){var le=O[Q].index,E=be(P(le,!0)-b);if(E<=ne)ne=E,Y=le;else break}return Y}function P(b,O){var Y=m(a(b-1)-g(b));return O?V(Y):Y}function G(){var b=u("left");return _e(A)[b]-_e(y)[b]+m(p(!1))}function V(b){return t.trimSpace&&e.is(nt)&&(b=Ke(b,0,m(h(!0)-_()))),b}function g(b){var O=t.focus;return O==="center"?(_()-s(b,!0))/2:+O*s(b)||0}function j(b){return P(b?r.Controller.getEnd():0,!!t.trimSpace)}function T(b){var O=m(W(G(),b));return b?O>=0:O<=A[u("scrollWidth")]-_e(y)[u("width")]}function R(b,O){O=vt(O)?G():O;var Y=b!==!0&&m(O)<m(j(!1)),ne=b!==!1&&m(O)>m(j(!0));return Y||ne}return{mount:H,move:L,jump:v,translate:S,shift:W,cancel:I,toIndex:D,toPosition:P,getPosition:G,getLimit:j,exceededLimit:R,reposition:B}}function io(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=r.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,a=r.Slides,_=a.isEnough,h=a.getLength,d=t.omitEnd,u=e.is(ot),m=e.is(nt),C=ae(G,!1),A=ae(G,!0),y=t.start||0,x,H=y,B,L,v;function S(){N(),o([ve,me,zt],N),o(Ft,W)}function N(){B=h(!0),L=t.perMove,v=t.perPage,x=T();var E=Ke(y,0,d?x:B-1);E!==y&&(y=E,i.reposition())}function W(){x!==T()&&l(zt)}function I(E,J,he){if(!le()){var se=P(E),fe=j(se);fe>-1&&(J||fe!==y)&&(Y(fe),i.move(se,fe,H,he))}}function D(E,J,he,se){r.Scroll.scroll(E,J,he,function(){var fe=j(i.toIndex(c()));Y(d?Be(fe,x):fe),se&&se()})}function P(E){var J=y;if(Pe(E)){var he=E.match(/([+\-<>])(\d+)?/)||[],se=he[1],fe=he[2];se==="+"||se==="-"?J=V(y+ +(""+se+(+fe||1)),y):se===">"?J=fe?R(+fe):C(!0):se==="<"&&(J=A(!0))}else J=u?E:Ke(E,0,x);return J}function G(E,J){var he=L||(Q()?1:v),se=V(y+he*(E?-1:1),y,!(L||Q()));return se===-1&&m&&!sr(c(),s(!E),1)?E?0:x:J?se:j(se)}function V(E,J,he){if(_()||Q()){var se=g(E);se!==E&&(J=E,E=se,he=!1),E<0||E>x?!L&&(Nt(0,E,J,!0)||Nt(x,J,E,!0))?E=R(b(E)):u?E=he?E<0?-(B%v||v):B:E:t.rewind?E=E<0?x:0:E=-1:he&&E!==J&&(E=R(b(J)+(E<J?-1:1)))}else E=-1;return E}function g(E){if(m&&t.trimSpace==="move"&&E!==y)for(var J=c();J===p(E,!0)&&Nt(E,0,e.length-1,!t.rewind);)E<y?--E:++E;return E}function j(E){return u?(E+B)%B||0:E}function T(){for(var E=B-(Q()||u&&L?1:v);d&&E-- >0;)if(p(B-1,!0)!==p(E,!0)){E++;break}return Ke(E,0,B-1)}function R(E){return Ke(Q()?E:v*E,0,x)}function b(E){return Q()?Be(E,x):Dt((E>=x?B-1:E)/v)}function O(E){var J=i.toIndex(E);return m?Ke(J,0,x):J}function Y(E){E!==y&&(H=y,y=E)}function ne(E){return E?H:y}function Q(){return!vt(t.focus)||t.isNavigation}function le(){return e.state.is([rt,ht])&&!!t.waitForTransition}return{mount:S,go:I,scroll:D,getNext:C,getPrev:A,getAdjacent:G,getEnd:T,setIndex:Y,getIndex:ne,toIndex:R,toPage:b,toDest:O,hasFocus:Q,isBusy:le}}var oo="http://www.w3.org/2000/svg",ao="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",Et=40;function lo(e,r,t){var n=ue(e),o=n.on,l=n.bind,i=n.emit,c=t.classes,s=t.i18n,p=r.Elements,a=r.Controller,_=p.arrows,h=p.track,d=_,u=p.prev,m=p.next,C,A,y={};function x(){B(),o(ve,H)}function H(){L(),x()}function B(){var D=t.arrows;D&&!(u&&m)&&N(),u&&m&&(dt(y,{prev:u,next:m}),mt(d,D?"":"none"),Ie(d,A=En+"--"+t.direction),D&&(v(),I(),q([u,m],St,h.id),i(vr,u,m)))}function L(){n.destroy(),je(d,A),C?(Ue(_?[u,m]:d),u=m=null):Ee([u,m],In)}function v(){o([Fe,it,me,Ye,zt],I),l(m,"click",ae(S,">")),l(u,"click",ae(S,"<"))}function S(D){a.go(D,!0)}function N(){d=_||Ze("div",c.arrows),u=W(!0),m=W(!1),C=!0,bt(d,[u,m]),!_&&gn(d,h)}function W(D){var P='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+oo+'" viewBox="0 0 '+Et+" "+Et+'" width="'+Et+'" height="'+Et+'" focusable="false"><path d="'+(t.arrowPath||ao)+'" />';return ar(P)}function I(){if(u&&m){var D=e.index,P=a.getPrev(),G=a.getNext(),V=P>-1&&D<P?s.last:s.prev,g=G>-1&&D>G?s.first:s.next;u.disabled=P<0,m.disabled=G<0,q(u,we,V),q(m,we,g),i(yr,u,m,P,G)}}return{arrows:y,mount:x,destroy:L,update:I}}var so=hn+"-interval";function co(e,r,t){var n=ue(e),o=n.on,l=n.bind,i=n.emit,c=Ht(t.interval,e.go.bind(e,">"),v),s=c.isPaused,p=r.Elements,a=r.Elements,_=a.root,h=a.toggle,d=t.autoplay,u,m,C=d==="pause";function A(){d&&(y(),h&&q(h,St,p.track.id),C||x(),L())}function y(){t.pauseOnHover&&l(_,"mouseenter mouseleave",function(N){u=N.type==="mouseenter",B()}),t.pauseOnFocus&&l(_,"focusin focusout",function(N){m=N.type==="focusin",B()}),h&&l(h,"click",function(){C?x():H(!0)}),o([De,Mt,me],c.rewind),o(De,S)}function x(){s()&&r.Slides.isEnough()&&(c.start(!t.resetProgress),m=u=C=!1,L(),i(wn))}function H(N){N===void 0&&(N=!0),C=!!N,L(),s()||(c.pause(),i(Sn))}function B(){C||(u||m?H(!1):x())}function L(){h&&(Ne(h,Ge,!C),q(h,we,t.i18n[C?"play":"pause"]))}function v(N){var W=p.bar;W&&xe(W,"width",N*100+"%"),i(wr,N)}function S(N){var W=r.Slides.getAt(N);c.set(W&&+Ce(W.slide,so)||t.interval)}return{mount:A,destroy:c.cancel,play:x,pause:H,isPaused:s}}function uo(e,r,t){var n=ue(e),o=n.on;function l(){t.cover&&(o(xn,ae(c,!0)),o([Fe,ve,me],ae(i,!0)))}function i(s){r.Slides.forEach(function(p){var a=_t(p.container||p.slide,"img");a&&a.src&&c(s,a,p)})}function c(s,p,a){a.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),mt(p,s?"none":"")}return{mount:l,destroy:ae(i,!1)}}var po=10,mo=600,go=.6,fo=1.5,ho=800;function vo(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=e.state.set,c=r.Move,s=c.getPosition,p=c.getLimit,a=c.exceededLimit,_=c.translate,h=e.is(nt),d,u,m=1;function C(){o(De,H),o([ve,me],B)}function A(v,S,N,W,I){var D=s();if(H(),N&&(!h||!a())){var P=r.Layout.sliderSize(),G=rn(v)*P*Dt(be(v)/P)||0;v=c.toPosition(r.Controller.toDest(v%P))+G}var V=sr(D,v,1);m=1,S=V?0:S||Ot(be(v-D)/fo,ho),u=W,d=Ht(S,y,ae(x,D,v,I),1),i(ht),l(Mt),d.start()}function y(){i(et),u&&u(),l(Ye)}function x(v,S,N,W){var I=s(),D=v+(S-v)*L(W),P=(D-I)*m;_(I+P),h&&!N&&a()&&(m*=go,be(P)<po&&A(p(a(!0)),mo,!1,u,!0))}function H(){d&&d.cancel()}function B(){d&&!d.isPaused()&&(H(),y())}function L(v){var S=t.easingFunc;return S?S(v):1-Math.pow(1-v,4)}return{mount:C,destroy:H,scroll:A,cancel:B}}var qe={passive:!1,capture:!0};function yo(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=n.bind,c=n.unbind,s=e.state,p=r.Move,a=r.Scroll,_=r.Controller,h=r.Elements.track,d=r.Media.reduce,u=r.Direction,m=u.resolve,C=u.orient,A=p.getPosition,y=p.exceededLimit,x,H,B,L,v,S=!1,N,W,I;function D(){i(h,Zt,tn,qe),i(h,Qt,tn,qe),i(h,zr,G,qe),i(h,"click",j,{capture:!0}),i(h,"dragstart",Re),o([Fe,ve],P)}function P(){var M=t.drag;Ct(!M),L=M==="free"}function G(M){if(N=!1,!W){var w=fe(M);se(M.target)&&(w||!M.button)&&(_.isBusy()?Re(M,!0):(I=w?h:window,v=s.is([rt,ht]),B=null,i(I,Zt,V,qe),i(I,Qt,g,qe),p.cancel(),a.cancel(),T(M)))}}function V(M){if(s.is(Tt)||(s.set(Tt),l(gr)),M.cancelable)if(v){p.translate(x+he(Q(M)));var w=le(M)>$n,$=S!==(S=y());(w||$)&&T(M),N=!0,l(fr),Re(M)}else O(M)&&(v=b(M),Re(M))}function g(M){s.is(Tt)&&(s.set(et),l(hr)),v&&(R(M),Re(M)),c(I,Zt,V),c(I,Qt,g),v=!1}function j(M){!W&&N&&Re(M,!0)}function T(M){B=H,H=M,x=A()}function R(M){var w=Y(M),$=ne(w),X=t.rewind&&t.rewindByDrag;d(!1),L?_.scroll($,0,t.snap):e.is(xt)?_.go(C(rn(w))<0?X?"<":"-":X?">":"+"):e.is(nt)&&S&&X?_.go(y(!0)?">":"<"):_.go(_.toDest($),!0),d(!0)}function b(M){var w=t.dragMinThreshold,$=ct(w),X=$&&w.mouse||0,Z=($?w.touch:+w)||10;return be(Q(M))>(fe(M)?Z:X)}function O(M){return be(Q(M))>be(Q(M,!0))}function Y(M){if(e.is(ot)||!S){var w=le(M);if(w&&w<$n)return Q(M)/w}return 0}function ne(M){return A()+rn(M)*Be(be(M)*(t.flickPower||600),L?1/0:r.Layout.listSize()*(t.flickMaxPages||1))}function Q(M,w){return J(M,w)-J(E(M),w)}function le(M){return nn(M)-nn(E(M))}function E(M){return H===M&&B||H}function J(M,w){return(fe(M)?M.changedTouches[0]:M)["page"+m(w?"Y":"X")]}function he(M){return M/(S&&e.is(nt)?qi:1)}function se(M){var w=t.noDrag;return!ut(M,"."+Nr+", ."+Xt)&&(!w||!ut(M,w))}function fe(M){return typeof TouchEvent<"u"&&M instanceof TouchEvent}function at(){return v}function Ct(M){W=M}return{mount:D,disable:Ct,isDragging:at}}var bo={Spacebar:" ",Right:Ut,Left:$t,Up:Cr,Down:Ar};function Ln(e){return e=Pe(e)?e:e.key,bo[e]||e}var Un="keydown";function _o(e,r,t){var n=ue(e),o=n.on,l=n.bind,i=n.unbind,c=e.root,s=r.Direction.resolve,p,a;function _(){h(),o(ve,d),o(ve,h),o(De,m)}function h(){var A=t.keyboard;A&&(p=A==="global"?window:c,l(p,Un,C))}function d(){i(p,Un)}function u(A){a=A}function m(){var A=a;a=!0,tr(function(){a=A})}function C(A){if(!a){var y=Ln(A);y===s($t)?e.go("<"):y===s(Ut)&&e.go(">")}}return{mount:_,destroy:d,disable:u}}var st=hn+"-lazy",jt=st+"-srcset",wo="["+st+"], ["+jt+"]";function So(e,r,t){var n=ue(e),o=n.on,l=n.off,i=n.bind,c=n.emit,s=t.lazyLoad==="sequential",p=[it,Ye],a=[];function _(){t.lazyLoad&&(h(),o(me,h))}function h(){Oe(a),d(),s?A():(l(p),o(p,u),u())}function d(){r.Slides.forEach(function(y){fn(y.slide,wo).forEach(function(x){var H=Ce(x,st),B=Ce(x,jt);if(H!==x.src||B!==x.srcset){var L=t.classes.spinner,v=x.parentElement,S=_t(v,"."+L)||Ze("span",L,v);a.push([x,y,S]),x.src||mt(x,"none")}})})}function u(){a=a.filter(function(y){var x=t.perPage*((t.preloadPages||1)+1)-1;return y[1].isWithin(e.index,x)?m(y):!0}),a.length||l(p)}function m(y){var x=y[0];Ie(y[1].slide,sn),i(x,"load error",ae(C,y)),q(x,"src",Ce(x,st)),q(x,"srcset",Ce(x,jt)),Ee(x,st),Ee(x,jt)}function C(y,x){var H=y[0],B=y[1];je(B.slide,sn),x.type!=="error"&&(Ue(y[2]),mt(H,""),c(xn,H,B),c(tt)),s&&A()}function A(){a.length&&m(a.shift())}return{mount:_,destroy:ae(Oe,a),check:u}}function xo(e,r,t){var n=ue(e),o=n.on,l=n.emit,i=n.bind,c=r.Slides,s=r.Elements,p=r.Controller,a=p.hasFocus,_=p.getIndex,h=p.go,d=r.Direction.resolve,u=s.pagination,m=[],C,A;function y(){x(),o([ve,me,zt],y);var W=t.pagination;u&&mt(u,W?"":"none"),W&&(o([De,Mt,Ye],N),H(),N(),l(br,{list:C,items:m},S(e.index)))}function x(){C&&(Ue(u?We(C.children):C),je(C,A),Oe(m),C=null),n.destroy()}function H(){var W=e.length,I=t.classes,D=t.i18n,P=t.perPage,G=a()?p.getEnd()+1:gt(W/P);C=u||Ze("ul",I.pagination,s.track.parentElement),Ie(C,A=Kt+"--"+v()),q(C,ke,"tablist"),q(C,we,D.select),q(C,An,v()===Gt?"vertical":"");for(var V=0;V<G;V++){var g=Ze("li",null,C),j=Ze("button",{class:I.page,type:"button"},g),T=c.getIn(V).map(function(b){return b.slide.id}),R=!a()&&P>1?D.pageX:D.slideX;i(j,"click",ae(B,V)),t.paginationKeyboard&&i(j,"keydown",ae(L,V)),q(g,ke,"presentation"),q(j,ke,"tab"),q(j,St,T.join(" ")),q(j,we,on(R,V+1)),q(j,Qe,-1),m.push({li:g,button:j,page:V})}}function B(W){h(">"+W,!0)}function L(W,I){var D=m.length,P=Ln(I),G=v(),V=-1;P===d(Ut,!1,G)?V=++W%D:P===d($t,!1,G)?V=(--W+D)%D:P==="Home"?V=0:P==="End"&&(V=D-1);var g=m[V];g&&(or(g.button),h(">"+V),Re(I,!0))}function v(){return t.paginationDirection||t.direction}function S(W){return m[p.toPage(W)]}function N(){var W=S(_(!0)),I=S(_());if(W){var D=W.button;je(D,Ge),Ee(D,Wn),q(D,Qe,-1)}if(I){var P=I.button;Ie(P,Ge),q(P,Wn,!0),q(P,Qe,"")}l(_r,{list:C,items:m},W,I)}return{items:m,mount:y,destroy:x,getAt:S,update:N}}var Co=[" ","Enter"];function Ao(e,r,t){var n=t.isNavigation,o=t.slideFocus,l=[];function i(){e.splides.forEach(function(u){u.isParent||(p(e,u.splide),p(u.splide,e))}),n&&a()}function c(){l.forEach(function(u){u.destroy()}),Oe(l)}function s(){c(),i()}function p(u,m){var C=ue(u);C.on(De,function(A,y,x){m.go(m.is(ot)?x:A)}),l.push(C)}function a(){var u=ue(e),m=u.on;m(yn,h),m(Sr,d),m([Fe,ve],_),l.push(u),u.emit(_n,e.splides)}function _(){q(r.Elements.list,An,t.direction===Gt?"vertical":"")}function h(u){e.go(u.index)}function d(u,m){mn(Co,Ln(m))&&(h(u),Re(m))}return{setup:ae(r.Media.set,{slideFocus:vt(o)?n:o},!0),mount:i,destroy:c,remount:s}}function Io(e,r,t){var n=ue(e),o=n.bind,l=0;function i(){t.wheel&&o(r.Elements.track,"wheel",c,qe)}function c(p){if(p.cancelable){var a=p.deltaY,_=a<0,h=nn(p),d=t.wheelMinThreshold||0,u=t.wheelSleep||0;be(a)>d&&h-l>u&&(e.go(_?"<":">"),l=h),s(_)&&Re(p)}}function s(p){return!t.releaseWheel||e.state.is(rt)||r.Controller.getAdjacent(p)!==-1}return{mount:i}}var Eo=90;function Lo(e,r,t){var n=ue(e),o=n.on,l=r.Elements.track,i=t.live&&!t.isNavigation,c=Ze("span",Ui),s=Ht(Eo,ae(a,!1));function p(){i&&(h(!r.Autoplay.isPaused()),q(l,Hn,!0),c.textContent="…",o(wn,ae(h,!0)),o(Sn,ae(h,!1)),o([it,Ye],ae(a,!0)))}function a(d){q(l,Mn,d),d?(bt(l,c),s.start()):(Ue(c),s.cancel())}function _(){Ee(l,[Fn,Hn,Mn]),Ue(c)}function h(d){i&&q(l,Fn,d?"off":"polite")}return{mount:p,disable:h,destroy:_}}var To=Object.freeze({__proto__:null,Media:zi,Direction:Pi,Elements:Ji,Slides:Qi,Layout:eo,Clones:no,Move:ro,Controller:io,Arrows:lo,Autoplay:co,Cover:uo,Scroll:vo,Drag:yo,Keyboard:_o,LazyLoad:So,Pagination:xo,Sync:Ao,Wheel:Io,Live:Lo}),Ro={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"},No={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:Xi,i18n:Ro,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function jo(e,r,t){var n=r.Slides;function o(){ue(e).on([Fe,me],l)}function l(){n.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){n.style("transition","opacity "+t.speed+"ms "+t.easing),tr(s)}return{mount:o,start:i,cancel:tn}}function ko(e,r,t){var n=r.Move,o=r.Controller,l=r.Scroll,i=r.Elements.list,c=ae(xe,i,"transition"),s;function p(){ue(e).bind(i,"transitionend",function(d){d.target===i&&s&&(_(),s())})}function a(d,u){var m=n.toPosition(d,!0),C=n.getPosition(),A=h(d);be(m-C)>=1&&A>=1?t.useScroll?l.scroll(m,A,!1,u):(c("transform "+A+"ms "+t.easing),n.translate(m,!0),s=u):(n.jump(d),u())}function _(){c(""),l.cancel()}function h(d){var u=t.rewindSpeed;if(e.is(nt)&&u){var m=o.getIndex(!0),C=o.getEnd();if(m===0&&d>=C||m>=C&&d===0)return u}return t.speed}return{mount:p,start:a,cancel:_}}var Oo=(function(){function e(t,n){this.event=ue(),this.Components={},this.state=Oi(Je),this.splides=[],this._o={},this._E={};var o=Pe(t)?lr(document,t):t;lt(o,o+" is invalid."),this.root=o,n=ze({label:Ce(o,we)||"",labelledby:Ce(o,Cn)||""},No,e.defaults,n||{});try{ze(n,JSON.parse(Ce(o,hn)))}catch{lt(!1,"Invalid JSON")}this._o=Object.create(ze({},n))}var r=e.prototype;return r.mount=function(n,o){var l=this,i=this.state,c=this.Components;lt(i.is([Je,kt]),"Already mounted!"),i.set(Je),this._C=c,this._T=o||this._T||(this.is(xt)?jo:ko),this._E=n||this._E;var s=dt({},To,this._E,{Transition:this._T});return Ve(s,function(p,a){var _=p(l,c,l._o);c[a]=_,_.setup&&_.setup()}),Ve(c,function(p){p.mount&&p.mount()}),this.emit(Fe),Ie(this.root,Gi),i.set(et),this.emit(an),this},r.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(et)&&(this._C.Sync.remount(),n.Components.Sync.remount()),this},r.go=function(n){return this._C.Controller.go(n),this},r.on=function(n,o){return this.event.on(n,o),this},r.off=function(n){return this.event.off(n),this},r.emit=function(n){var o;return(o=this.event).emit.apply(o,[n].concat(We(arguments,1))),this},r.add=function(n,o){return this._C.Slides.add(n,o),this},r.remove=function(n){return this._C.Slides.remove(n),this},r.is=function(n){return this._o.type===n},r.refresh=function(){return this.emit(me),this},r.destroy=function(n){n===void 0&&(n=!0);var o=this.event,l=this.state;return l.is(Je)?ue(this).on(an,this.destroy.bind(this,n)):(Ve(this._C,function(i){i.destroy&&i.destroy(n)},!0),o.emit(bn),o.destroy(),n&&Oe(this.splides),l.set(kt)),this},Ti(e,[{key:"options",get:function(){return this._o},set:function(n){this._C.Media.set(n,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Tn=Oo;Tn.defaults={};Tn.STATES=Ni;var Gn=[[Fe,"onMounted"],[an,"onReady"],[De,"onMove"],[it,"onMoved"],[yn,"onClick"],[ur,"onActive"],[pr,"onInactive"],[dr,"onVisible"],[mr,"onHidden"],[me,"onRefresh"],[ve,"onUpdated"],[tt,"onResize"],[Ft,"onResized"],[gr,"onDrag"],[fr,"onDragging"],[hr,"onDragged"],[Mt,"onScroll"],[Ye,"onScrolled"],[bn,"onDestroy"],[vr,"onArrowsMounted"],[yr,"onArrowsUpdated"],[br,"onPaginationMounted"],[_r,"onPaginationUpdated"],[_n,"onNavigationMounted"],[wn,"onAutoplayPlay"],[wr,"onAutoplayPlaying"],[Sn,"onAutoplayPause"],[xn,"onLazyLoadLoaded"]];function Rn(...e){return e.filter(Boolean).join(" ")}function Pt(e){return e!==null&&typeof e=="object"}function cn(e,r){if(Array.isArray(e)&&Array.isArray(r))return e.length===r.length&&!e.some((t,n)=>!cn(t,r[n]));if(Pt(e)&&Pt(r)){const t=Object.keys(e),n=Object.keys(r);return t.length===n.length&&!t.some(o=>!Object.prototype.hasOwnProperty.call(r,o)||!cn(e[o],r[o]))}return e===r}function Do(e,r){return e.length===r.length&&!e.some((t,n)=>t!==r[n])}function zo(e,r){if(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const o=t[n];if(o!=="__proto__"&&r(e[o],o)===!1)break}}return e}function un(e,r){const t=e;return zo(r,(n,o)=>{Array.isArray(n)?t[o]=n.slice():Pt(n)?t[o]=un(Pt(t[o])?t[o]:{},n):t[o]=n}),t}var Po=({children:e,className:r,...t})=>F.createElement("div",{className:Rn("splide__track",r),...t},F.createElement("ul",{className:"splide__list"},e)),Nn=class extends F.Component{constructor(){super(...arguments),this.splideRef=F.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:r,transition:t}=this.props,{current:n}=this.splideRef;n&&(this.splide=new Tn(n,e),this.bind(this.splide),this.splide.mount(r,t),this.options=un({},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&&!cn(this.options,e)&&(this.splide.options=e,this.options=un({},e));const r=this.getSlides();Do(this.slides,r)||(this.splide.refresh(),this.slides=r)}sync(e){var r;(r=this.splide)==null||r.sync(e)}go(e){var r;(r=this.splide)==null||r.go(e)}getSlides(){var e;if(this.splide){const r=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return r&&Array.prototype.slice.call(r)||[]}return[]}bind(e){Gn.forEach(([r,t])=>{const n=this.props[t];typeof n=="function"&&e.on(r,(...o)=>{n(e,...o)})})}omit(e,r){return r.forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)&&delete e[t]}),e}render(){const{className:e,tag:r="div",hasTrack:t=!0,children:n,...o}=this.props;return F.createElement(r,{className:Rn("splide",e),ref:this.splideRef,...this.omit(o,["options",...Gn.map(l=>l[1])])},t?F.createElement(Po,null,n):n)}},jn=({children:e,className:r,...t})=>F.createElement("li",{className:Rn("splide__slide",r),...t},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),D=require("react"),se=require("classnames"),B=require("./useScopedStyles-b8cb4EW8.js"),Hr=require("react-dom");function Ur(e){return e.type==="object"&&e.version===1}const Gr="ControlSlider-module__wrapper___sHEkd",Yr="ControlSlider-module__hoverArrow___A-dOH",Xr="ControlSlider-module__sliderItem___QQSkR",qr="ControlSlider-module__sliderImage___9hRl-",Kr="ControlSlider-module__arrow___05ghY",Jr="ControlSlider-module__arrowVertical___tBfVN",Zr="ControlSlider-module__nextArrow___-30Yc",Qr="ControlSlider-module__arrowInner___aEra3",ei="ControlSlider-module__arrowIcon___S4ztF",ti="ControlSlider-module__arrowImg___2dwJW",ni="ControlSlider-module__mirror___brd6U",ri="ControlSlider-module__pagination___bicLF",ii="ControlSlider-module__paginationInner___bT-P-",oi="ControlSlider-module__paginationVertical___zYqKw",ai="ControlSlider-module__paginationItem___nTRbk",li="ControlSlider-module__dot___p1Qun",si="ControlSlider-module__activeDot___LHFaj",ci="ControlSlider-module__paginationInsideBottom___R3FWn",ui="ControlSlider-module__paginationInsideTop___V-qb-",pi="ControlSlider-module__paginationOutsideBottom___14w8D",di="ControlSlider-module__paginationOutsideTop___SCLqB",gi="ControlSlider-module__paginationInsideLeft___yOBRZ",fi="ControlSlider-module__paginationInsideRight___Rtt3o",mi="ControlSlider-module__paginationOutsideLeft___lahaw",hi="ControlSlider-module__paginationOutsideRight___EtuQa",yi="ControlSlider-module__imgWrapper___UjEgB",vi="ControlSlider-module__captionBlock___dJ6-j",bi="ControlSlider-module__captionTextWrapper___HFlpf",_i="ControlSlider-module__captionText___uGBVc",Si="ControlSlider-module__active___WZK4G",xi="ControlSlider-module__withPointerEvents___t-18M",Ci="ControlSlider-module__topLeftAlignment___zjnGM",wi="ControlSlider-module__topCenterAlignment___gD1xW",Ei="ControlSlider-module__topRightAlignment___NMapS",Ai="ControlSlider-module__middleLeftAlignment___OnUrY",Ii="ControlSlider-module__middleCenterAlignment___Tdkl0",Ti="ControlSlider-module__middleRightAlignment___wEbfX",Li="ControlSlider-module__bottomLeftAlignment___cTP2-",Ri="ControlSlider-module__bottomCenterAlignment___c54fB",ki="ControlSlider-module__bottomRightAlignment___kEwrz",Ni="ControlSlider-module__clickOverlay___DZA28",ji="ControlSlider-module__contain___pLyq7",Oi="ControlSlider-module__cover___KdDat",U={wrapper:Gr,hoverArrow:Yr,sliderItem:Xr,sliderImage:qr,arrow:Kr,arrowVertical:Jr,nextArrow:Zr,arrowInner:Qr,arrowIcon:ei,arrowImg:ti,mirror:ni,pagination:ri,paginationInner:ii,paginationVertical:oi,paginationItem:ai,dot:li,activeDot:si,paginationInsideBottom:ci,paginationInsideTop:ui,paginationOutsideBottom:pi,paginationOutsideTop:di,paginationInsideLeft:gi,paginationInsideRight:fi,paginationOutsideLeft:mi,paginationOutsideRight:hi,imgWrapper:yi,captionBlock:vi,captionTextWrapper:bi,captionText:_i,active:Si,withPointerEvents:xi,topLeftAlignment:Ci,topCenterAlignment:wi,topRightAlignment:Ei,middleLeftAlignment:Ai,middleCenterAlignment:Ii,middleRightAlignment:Ti,bottomLeftAlignment:Li,bottomCenterAlignment:Ri,bottomRightAlignment:ki,clickOverlay:Ni,contain:ji,cover:Oi};function Vi(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 $i(e,t,n){return t&&Vi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var On="(prefers-reduced-motion: reduce)",Qe=1,Pi=2,nt=3,ot=4,vt=5,Rt=6,Ot=7,Bi={CREATED:Qe,MOUNTED:Pi,IDLE:nt,MOVING:ot,SCROLLING:vt,DRAGGING:Rt,DESTROYED:Ot};function Ve(e){e.length=0}function De(e,t,n){return Array.prototype.slice.call(e,t,n)}function oe(e){return e.bind.apply(e,[null].concat(De(arguments,1)))}var ir=setTimeout,on=function(){};function Vn(e){return requestAnimationFrame(e)}function Ft(e,t){return typeof t===e}function pt(e){return!mn(e)&&Ft("object",e)}var fn=Array.isArray,or=oe(Ft,"function"),Fe=oe(Ft,"string"),bt=oe(Ft,"undefined");function mn(e){return e===null}function ar(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function _t(e){return fn(e)?e:[e]}function Ce(e,t){_t(e).forEach(t)}function hn(e,t){return e.indexOf(t)>-1}function kt(e,t){return e.push.apply(e,_t(t)),e}function Ne(e,t,n){e&&Ce(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Ie(e,t){Ne(e,Fe(t)?t.split(" "):t,!0)}function St(e,t){Ce(t,e.appendChild.bind(e))}function yn(e,t){Ce(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function dt(e,t){return ar(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function lr(e,t){var n=e?De(e.children):[];return t?n.filter(function(r){return dt(r,t)}):n}function xt(e,t){return t?lr(e,t)[0]:e.firstElementChild}var gt=Object.keys;function Ue(e,t,n){return e&&(n?gt(e).reverse():gt(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function ft(e){return De(arguments,1).forEach(function(t){Ue(t,function(n,r){e[r]=t[r]})}),e}function Be(e){return De(arguments,1).forEach(function(t){Ue(t,function(n,r){fn(n)?e[r]=n.slice():pt(n)?e[r]=Be({},pt(e[r])?e[r]:{},n):e[r]=n})}),e}function $n(e,t){Ce(t||gt(e),function(n){delete e[n]})}function Te(e,t){Ce(e,function(n){Ce(t,function(r){n&&n.removeAttribute(r)})})}function K(e,t,n){pt(t)?Ue(t,function(r,o){K(e,o,r)}):Ce(e,function(r){mn(n)||n===""?Te(r,t):r.setAttribute(t,String(n))})}function et(e,t,n){var r=document.createElement(e);return t&&(Fe(t)?Ie(r,t):K(r,t)),n&&St(n,r),r}function we(e,t,n){if(bt(n))return getComputedStyle(e)[t];mn(n)||(e.style[t]=""+n)}function mt(e,t){we(e,"display",t)}function sr(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Ee(e,t){return e.getAttribute(t)}function Pn(e,t){return e&&e.classList.contains(t)}function Se(e){return e.getBoundingClientRect()}function Ge(e){Ce(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function cr(e){return xt(new DOMParser().parseFromString(e,"text/html").body)}function ke(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ur(e,t){return e&&e.querySelector(t)}function vn(e,t){return t?De(e.querySelectorAll(t)):[]}function je(e,t){Ne(e,t,!1)}function an(e){return e.timeStamp}function He(e){return Fe(e)?e:e?e+"px":""}var Ct="splide",bn="data-"+Ct;function st(e,t){if(!e)throw new Error("["+Ct+"] "+(t||""))}var ze=Math.min,Vt=Math.max,$t=Math.floor,ht=Math.ceil,be=Math.abs;function pr(e,t,n){return be(e-t)<n}function Nt(e,t,n,r){var o=ze(t,n),a=Vt(t,n);return r?o<e&&e<a:o<=e&&e<=a}function Je(e,t,n){var r=ze(t,n),o=Vt(t,n);return ze(Vt(r,e),o)}function ln(e){return+(e>0)-+(e<0)}function sn(e,t){return Ce(t,function(n){e=e.replace("%s",""+n)}),e}function _n(e){return e<10?"0"+e:""+e}var Bn={};function Fi(e){return""+e+_n(Bn[e]=(Bn[e]||0)+1)}function dr(){var e=[];function t(i,s,l,p){o(i,s,function(u,x,m){var h="addEventListener"in u,c=h?u.removeEventListener.bind(u,x,l,p):u.removeListener.bind(u,l);h?u.addEventListener(x,l,p):u.addListener(l),e.push([u,x,m,l,c])})}function n(i,s,l){o(i,s,function(p,u,x){e=e.filter(function(m){return m[0]===p&&m[1]===u&&m[2]===x&&(!l||m[3]===l)?(m[4](),!1):!0})})}function r(i,s,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(s,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(s,u,!1,l)),i.dispatchEvent(p),p}function o(i,s,l){Ce(i,function(p){p&&Ce(s,function(u){u.split(" ").forEach(function(x){var m=x.split(".");l(p,m[0],m[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ve(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var We="mounted",cn="ready",$e="move",at="moved",Sn="click",gr="active",fr="inactive",mr="visible",hr="hidden",ge="refresh",ye="updated",rt="resize",zt="resized",yr="drag",vr="dragging",br="dragged",Dt="scroll",Xe="scrolled",zi="overflow",xn="destroy",_r="arrows:mounted",Sr="arrows:updated",xr="pagination:mounted",Cr="pagination:updated",Cn="navigation:mounted",wn="autoplay:play",wr="autoplay:playing",En="autoplay:pause",An="lazyload:loaded",Er="sk",Ar="sh",Pt="ei";function ce(e){var t=e?e.event.bus:document.createDocumentFragment(),n=dr();function r(a,i){n.bind(t,_t(a).join(" "),function(s){i.apply(i,fn(s.detail)?s.detail:[])})}function o(a){n.dispatch(t,a,De(arguments,1))}return e&&e.event.on(xn,n.destroy),ft(n,{bus:t,on:r,off:oe(n.unbind,t),emit:o})}function Wt(e,t,n,r){var o=Date.now,a,i=0,s,l=!0,p=0;function u(){if(!l){if(i=e?ze((o()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=o(),r&&++p>=r))return m();s=Vn(u)}}function x(v){v||c(),a=o()-(v?i*e:0),l=!1,s=Vn(u)}function m(){l=!0}function h(){a=o(),i=0,n&&n(i)}function c(){s&&cancelAnimationFrame(s),i=0,s=0,l=!0}function d(v){e=v}function w(){return l}return{start:x,rewind:h,pause:m,cancel:c,set:d,isPaused:w}}function Di(e){var t=e;function n(o){t=o}function r(o){return hn(_t(o),t)}return{set:n,is:r}}function Wi(e,t){var n=Wt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Mi(e,t,n){var r=e.state,o=n.breakpoints||{},a=n.reducedMotion||{},i=dr(),s=[];function l(){var c=n.mediaQuery==="min";gt(o).sort(function(d,w){return c?+d-+w:+w-+d}).forEach(function(d){u(o[d],"("+(c?"min":"max")+"-width:"+d+"px)")}),u(a,On),x()}function p(c){c&&i.destroy()}function u(c,d){var w=matchMedia(d);i.bind(w,"change",x),s.push([c,w])}function x(){var c=r.is(Ot),d=n.direction,w=s.reduce(function(v,g){return Be(v,g[1].matches?g[0]:{})},{});$n(n),h(w),n.destroy?e.destroy(n.destroy==="completely"):c?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function m(c){matchMedia(On).matches&&(c?Be(n,a):$n(n,gt(a)))}function h(c,d,w){Be(n,c),d&&Be(Object.getPrototypeOf(n),c),(w||!r.is(Qe))&&e.emit(ye,n)}return{setup:l,destroy:p,reduce:m,set:h}}var Mt="Arrow",Ht=Mt+"Left",Ut=Mt+"Right",Ir=Mt+"Up",Tr=Mt+"Down",Fn="rtl",Gt="ttb",Kt={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ir,Ut],ArrowRight:[Tr,Ht]};function Hi(e,t,n){function r(a,i,s){s=s||n.direction;var l=s===Fn&&!i?1:s===Gt?0:-1;return Kt[a]&&Kt[a][l]||a.replace(/width|left|right/i,function(p,u){var x=Kt[p.toLowerCase()][l]||p;return u>0?x.charAt(0).toUpperCase()+x.slice(1):x})}function o(a){return a*(n.direction===Fn?1:-1)}return{resolve:r,orient:o}}var Oe="role",tt="tabindex",Ui="disabled",Ae="aria-",wt=Ae+"controls",Lr=Ae+"current",zn=Ae+"selected",xe=Ae+"label",In=Ae+"labelledby",Rr=Ae+"hidden",Tn=Ae+"orientation",yt=Ae+"roledescription",Dn=Ae+"live",Wn=Ae+"busy",Mn=Ae+"atomic",Ln=[Oe,tt,Ui,wt,Lr,xe,In,Rr,Tn,yt],Le=Ct+"__",Me="is-",Jt=Ct,Hn=Le+"track",Gi=Le+"list",Yt=Le+"slide",kr=Yt+"--clone",Yi=Yt+"__container",Rn=Le+"arrows",Xt=Le+"arrow",Nr=Xt+"--prev",jr=Xt+"--next",qt=Le+"pagination",Or=qt+"__page",Xi=Le+"progress",qi=Xi+"__bar",Ki=Le+"toggle",Ji=Le+"spinner",Zi=Le+"sr",Qi=Me+"initialized",Ye=Me+"active",Vr=Me+"prev",$r=Me+"next",un=Me+"visible",pn=Me+"loading",Pr=Me+"focus-in",Br=Me+"overflow",eo=[Ye,un,Vr,$r,pn,Pr,Br],to={slide:Yt,clone:kr,arrows:Rn,arrow:Xt,prev:Nr,next:jr,pagination:qt,page:Or,spinner:Ji};function no(e,t){if(or(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!dt(n,t);)n=n.parentElement;return n}var ro=5,Un=200,Fr="touchstart mousedown",Zt="touchmove mousemove",Qt="touchend touchcancel mouseup click";function io(e,t,n){var r=ce(e),o=r.on,a=r.bind,i=e.root,s=n.i18n,l={},p=[],u=[],x=[],m,h,c;function d(){C(),W(),g()}function w(){o(ge,v),o(ge,d),o(ye,g),a(document,Fr+" keydown",function(y){c=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Ne(i,Pr,!!c)})}function v(y){var A=Ln.concat("style");Ve(p),je(i,u),je(m,x),Te([m,h],A),Te(i,y?A:["style",yt])}function g(){je(i,u),je(m,x),u=I(Jt),x=I(Hn),Ie(i,u),Ie(m,x),K(i,xe,n.label),K(i,In,n.labelledby)}function C(){m=F("."+Hn),h=xt(m,"."+Gi),st(m&&h,"A track/list element is missing."),kt(p,lr(h,"."+Yt+":not(."+kr+")")),Ue({arrows:Rn,pagination:qt,prev:Nr,next:jr,bar:qi,toggle:Ki},function(y,A){l[A]=F("."+y)}),ft(l,{root:i,track:m,list:h,slides:p})}function W(){var y=i.id||Fi(Ct),A=n.role;i.id=y,m.id=m.id||y+"-track",h.id=h.id||y+"-list",!Ee(i,Oe)&&i.tagName!=="SECTION"&&A&&K(i,Oe,A),K(i,yt,s.carousel),K(h,Oe,"presentation")}function F(y){var A=ur(i,y);return A&&no(A,"."+Jt)===i?A:void 0}function I(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===Jt&&Ye]}return ft(l,{setup:d,mount:w,destroy:v})}var it="slide",lt="loop",Et="fade";function oo(e,t,n,r){var o=ce(e),a=o.on,i=o.emit,s=o.bind,l=e.Components,p=e.root,u=e.options,x=u.isNavigation,m=u.updateOnMove,h=u.i18n,c=u.pagination,d=u.slideFocus,w=l.Direction.resolve,v=Ee(r,"style"),g=Ee(r,xe),C=n>-1,W=xt(r,"."+Yi),F;function I(){C||(r.id=p.id+"-slide"+_n(t+1),K(r,Oe,c?"tabpanel":"group"),K(r,yt,h.slide),K(r,xe,g||sn(h.slideLabel,[t+1,e.length]))),y()}function y(){s(r,"click",oe(i,Sn,T)),s(r,"keydown",oe(i,Er,T)),a([at,Ar,Xe],E),a(Cn,k),m&&a($e,$)}function A(){F=!0,o.destroy(),je(r,eo),Te(r,Ln),K(r,"style",v),K(r,xe,g||"")}function k(){var R=e.splides.map(function(S){var j=S.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");K(r,xe,sn(h.slideX,(C?n:t)+1)),K(r,wt,R),K(r,Oe,d?"button":""),d&&Te(r,yt)}function $(){F||E()}function E(){if(!F){var R=e.index;O(),V(),Ne(r,Vr,t===R-1),Ne(r,$r,t===R+1)}}function O(){var R=M();R!==Pn(r,Ye)&&(Ne(r,Ye,R),K(r,Lr,x&&R||""),i(R?gr:fr,T))}function V(){var R=f(),S=!R&&(!M()||C);if(e.state.is([ot,vt])||K(r,Rr,S||""),K(vn(r,u.focusableNodes||""),tt,S?-1:""),d&&K(r,tt,S?-1:0),R!==Pn(r,un)&&(Ne(r,un,R),i(R?mr:hr,T)),!R&&document.activeElement===r){var j=l.Slides.getAt(e.index);j&&sr(j.slide)}}function G(R,S,j){we(j&&W||r,R,S)}function M(){var R=e.index;return R===t||u.cloneStatus&&R===n}function f(){if(e.is(Et))return M();var R=Se(l.Elements.track),S=Se(r),j=w("left",!0),Y=w("right",!0);return $t(R[j])<=ht(S[j])&&$t(S[Y])<=ht(R[Y])}function N(R,S){var j=be(R-t);return!C&&(u.rewind||e.is(lt))&&(j=ze(j,e.length-j)),j<=S}var T={index:t,slideIndex:n,slide:r,container:W,isClone:C,mount:I,destroy:A,update:E,style:G,isWithin:N};return T}function ao(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=r.bind,s=t.Elements,l=s.slides,p=s.list,u=[];function x(){m(),o(ge,h),o(ge,m)}function m(){l.forEach(function(E,O){d(E,O,-1)})}function h(){F(function(E){E.destroy()}),Ve(u)}function c(){F(function(E){E.update()})}function d(E,O,V){var G=oo(e,O,V,E);G.mount(),u.push(G),u.sort(function(M,f){return M.index-f.index})}function w(E){return E?I(function(O){return!O.isClone}):u}function v(E){var O=t.Controller,V=O.toIndex(E),G=O.hasFocus()?1:n.perPage;return I(function(M){return Nt(M.index,V,V+G-1)})}function g(E){return I(E)[0]}function C(E,O){Ce(E,function(V){if(Fe(V)&&(V=cr(V)),ar(V)){var G=l[O];G?yn(V,G):St(p,V),Ie(V,n.classes.slide),A(V,oe(a,rt))}}),a(ge)}function W(E){Ge(I(E).map(function(O){return O.slide})),a(ge)}function F(E,O){w(O).forEach(E)}function I(E){return u.filter(or(E)?E:function(O){return Fe(E)?dt(O.slide,E):hn(_t(E),O.index)})}function y(E,O,V){F(function(G){G.style(E,O,V)})}function A(E,O){var V=vn(E,"img"),G=V.length;G?V.forEach(function(M){i(M,"load error",function(){--G||O()})}):O()}function k(E){return E?l.length:u.length}function $(){return u.length>n.perPage}return{mount:x,destroy:h,update:c,register:d,get:w,getIn:v,getAt:g,add:C,remove:W,forEach:F,filter:I,style:y,getLength:k,isEnough:$}}function lo(e,t,n){var r=ce(e),o=r.on,a=r.bind,i=r.emit,s=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,x=p.track,m=p.list,h=s.getAt,c=s.style,d,w,v;function g(){C(),a(window,"resize load",Wi(oe(i,rt))),o([ye,ge],C),o(rt,W)}function C(){d=n.direction===Gt,we(u,"maxWidth",He(n.width)),we(x,l("paddingLeft"),F(!1)),we(x,l("paddingRight"),F(!0)),W(!0)}function W(T){var R=Se(u);(T||w.width!==R.width||w.height!==R.height)&&(we(x,"height",I()),c(l("marginRight"),He(n.gap)),c("width",A()),c("height",k(),!0),w=R,i(zt),v!==(v=N())&&(Ne(u,Br,v),i(zi,v)))}function F(T){var R=n.padding,S=l(T?"right":"left");return R&&He(R[S]||(pt(R)?0:R))||"0px"}function I(){var T="";return d&&(T=y(),st(T,"height or heightRatio is missing."),T="calc("+T+" - "+F(!1)+" - "+F(!0)+")"),T}function y(){return He(n.height||Se(m).width*n.heightRatio)}function A(){return n.autoWidth?null:He(n.fixedWidth)||(d?"":$())}function k(){return He(n.fixedHeight)||(d?n.autoHeight?null:$():y())}function $(){var T=He(n.gap);return"calc((100%"+(T&&" + "+T)+")/"+(n.perPage||1)+(T&&" - "+T)+")"}function E(){return Se(m)[l("width")]}function O(T,R){var S=h(T||0);return S?Se(S.slide)[l("width")]+(R?0:M()):0}function V(T,R){var S=h(T);if(S){var j=Se(S.slide)[l("right")],Y=Se(m)[l("left")];return be(j-Y)+(R?0:M())}return 0}function G(T){return V(e.length-1)-V(0)+O(0,T)}function M(){var T=h(0);return T&&parseFloat(we(T.slide,l("marginRight")))||0}function f(T){return parseFloat(we(x,l("padding"+(T?"Right":"Left"))))||0}function N(){return e.is(Et)||G(!0)>E()}return{mount:g,resize:W,listSize:E,slideSize:O,sliderSize:G,totalSize:V,getPadding:f,isOverflow:N}}var so=2;function co(e,t,n){var r=ce(e),o=r.on,a=t.Elements,i=t.Slides,s=t.Direction.resolve,l=[],p;function u(){o(ge,x),o([ye,rt],h),(p=w())&&(c(p),t.Layout.resize(!0))}function x(){m(),u()}function m(){Ge(l),Ve(l),r.destroy()}function h(){var v=w();p!==v&&(p<v||!v)&&r.emit(ge)}function c(v){var g=i.get().slice(),C=g.length;if(C){for(;g.length<v;)kt(g,g);kt(g.slice(-v),g.slice(0,v)).forEach(function(W,F){var I=F<v,y=d(W.slide,F);I?yn(y,g[0].slide):St(a.list,y),kt(l,y),i.register(y,F-v+(I?0:C),W.index)})}}function d(v,g){var C=v.cloneNode(!0);return Ie(C,n.classes.clone),C.id=e.root.id+"-clone"+_n(g+1),C}function w(){var v=n.clones;if(!e.is(lt))v=0;else if(bt(v)){var g=n[s("fixedWidth")]&&t.Layout.slideSize(0),C=g&&ht(Se(a.track)[s("width")]/g);v=C||n[s("autoWidth")]&&e.length||n.perPage*so}return v}return{mount:u,destroy:m}}function uo(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=e.state.set,s=t.Layout,l=s.slideSize,p=s.getPadding,u=s.totalSize,x=s.listSize,m=s.sliderSize,h=t.Direction,c=h.resolve,d=h.orient,w=t.Elements,v=w.list,g=w.track,C;function W(){C=t.Transition,o([We,zt,ye,ge],F)}function F(){t.Controller.isBusy()||(t.Scroll.cancel(),y(e.index),t.Slides.update())}function I(S,j,Y,re){S!==j&&T(S>Y)&&(E(),A($(G(),S>Y),!0)),i(ot),a($e,j,Y,S),C.start(j,function(){i(nt),a(at,j,Y,S),re&&re()})}function y(S){A(V(S,!0))}function A(S,j){if(!e.is(Et)){var Y=j?S:k(S);we(v,"transform","translate"+c("X")+"("+Y+"px)"),S!==Y&&a(Ar)}}function k(S){if(e.is(lt)){var j=O(S),Y=j>t.Controller.getEnd(),re=j<0;(re||Y)&&(S=$(S,Y))}return S}function $(S,j){var Y=S-N(j),re=m();return S-=d(re*(ht(be(Y)/re)||1))*(j?1:-1),S}function E(){A(G(),!0),C.cancel()}function O(S){for(var j=t.Slides.get(),Y=0,re=1/0,ne=0;ne<j.length;ne++){var me=j[ne].index,L=be(V(me,!0)-S);if(L<=re)re=L,Y=me;else break}return Y}function V(S,j){var Y=d(u(S-1)-f(S));return j?M(Y):Y}function G(){var S=c("left");return Se(v)[S]-Se(g)[S]+d(p(!1))}function M(S){return n.trimSpace&&e.is(it)&&(S=Je(S,0,d(m(!0)-x()))),S}function f(S){var j=n.focus;return j==="center"?(x()-l(S,!0))/2:+j*l(S)||0}function N(S){return V(S?t.Controller.getEnd():0,!!n.trimSpace)}function T(S){var j=d($(G(),S));return S?j>=0:j<=v[c("scrollWidth")]-Se(g)[c("width")]}function R(S,j){j=bt(j)?G():j;var Y=S!==!0&&d(j)<d(N(!1)),re=S!==!1&&d(j)>d(N(!0));return Y||re}return{mount:W,move:I,jump:y,translate:A,shift:$,cancel:E,toIndex:O,toPosition:V,getPosition:G,getLimit:N,exceededLimit:R,reposition:F}}function po(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=t.Move,s=i.getPosition,l=i.getLimit,p=i.toPosition,u=t.Slides,x=u.isEnough,m=u.getLength,h=n.omitEnd,c=e.is(lt),d=e.is(it),w=oe(G,!1),v=oe(G,!0),g=n.start||0,C,W=g,F,I,y;function A(){k(),o([ye,ge,Pt],k),o(zt,$)}function k(){F=m(!0),I=n.perMove,y=n.perPage,C=T();var L=Je(g,0,h?C:F-1);L!==g&&(g=L,i.reposition())}function $(){C!==T()&&a(Pt)}function E(L,J,fe){if(!me()){var ae=V(L),Z=N(ae);Z>-1&&(J||Z!==g)&&(Y(Z),i.move(ae,Z,W,fe))}}function O(L,J,fe,ae){t.Scroll.scroll(L,J,fe,function(){var Z=N(i.toIndex(s()));Y(h?ze(Z,C):Z),ae&&ae()})}function V(L){var J=g;if(Fe(L)){var fe=L.match(/([+\-<>])(\d+)?/)||[],ae=fe[1],Z=fe[2];ae==="+"||ae==="-"?J=M(g+ +(""+ae+(+Z||1)),g):ae===">"?J=Z?R(+Z):w(!0):ae==="<"&&(J=v(!0))}else J=c?L:Je(L,0,C);return J}function G(L,J){var fe=I||(ne()?1:y),ae=M(g+fe*(L?-1:1),g,!(I||ne()));return ae===-1&&d&&!pr(s(),l(!L),1)?L?0:C:J?ae:N(ae)}function M(L,J,fe){if(x()||ne()){var ae=f(L);ae!==L&&(J=L,L=ae,fe=!1),L<0||L>C?!I&&(Nt(0,L,J,!0)||Nt(C,J,L,!0))?L=R(S(L)):c?L=fe?L<0?-(F%y||y):F:L:n.rewind?L=L<0?C:0:L=-1:fe&&L!==J&&(L=R(S(J)+(L<J?-1:1)))}else L=-1;return L}function f(L){if(d&&n.trimSpace==="move"&&L!==g)for(var J=s();J===p(L,!0)&&Nt(L,0,e.length-1,!n.rewind);)L<g?--L:++L;return L}function N(L){return c?(L+F)%F||0:L}function T(){for(var L=F-(ne()||c&&I?1:y);h&&L-- >0;)if(p(F-1,!0)!==p(L,!0)){L++;break}return Je(L,0,F-1)}function R(L){return Je(ne()?L:y*L,0,C)}function S(L){return ne()?ze(L,C):$t((L>=C?F-1:L)/y)}function j(L){var J=i.toIndex(L);return d?Je(J,0,C):J}function Y(L){L!==g&&(W=g,g=L)}function re(L){return L?W:g}function ne(){return!bt(n.focus)||n.isNavigation}function me(){return e.state.is([ot,vt])&&!!n.waitForTransition}return{mount:A,go:E,scroll:O,getNext:w,getPrev:v,getAdjacent:G,getEnd:T,setIndex:Y,getIndex:re,toIndex:R,toPage:S,toDest:j,hasFocus:ne,isBusy:me}}var go="http://www.w3.org/2000/svg",fo="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",Tt=40;function mo(e,t,n){var r=ce(e),o=r.on,a=r.bind,i=r.emit,s=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,x=p.arrows,m=p.track,h=x,c=p.prev,d=p.next,w,v,g={};function C(){F(),o(ye,W)}function W(){I(),C()}function F(){var O=n.arrows;O&&!(c&&d)&&k(),c&&d&&(ft(g,{prev:c,next:d}),mt(h,O?"":"none"),Ie(h,v=Rn+"--"+n.direction),O&&(y(),E(),K([c,d],wt,m.id),i(_r,c,d)))}function I(){r.destroy(),je(h,v),w?(Ge(x?[c,d]:h),c=d=null):Te([c,d],Ln)}function y(){o([We,at,ge,Xe,Pt],E),a(d,"click",oe(A,">")),a(c,"click",oe(A,"<"))}function A(O){u.go(O,!0)}function k(){h=x||et("div",s.arrows),c=$(!0),d=$(!1),w=!0,St(h,[c,d]),!x&&yn(h,m)}function $(O){var V='<button class="'+s.arrow+" "+(O?s.prev:s.next)+'" type="button"><svg xmlns="'+go+'" viewBox="0 0 '+Tt+" "+Tt+'" width="'+Tt+'" height="'+Tt+'" focusable="false"><path d="'+(n.arrowPath||fo)+'" />';return cr(V)}function E(){if(c&&d){var O=e.index,V=u.getPrev(),G=u.getNext(),M=V>-1&&O<V?l.last:l.prev,f=G>-1&&O>G?l.first:l.next;c.disabled=V<0,d.disabled=G<0,K(c,xe,M),K(d,xe,f),i(Sr,c,d,V,G)}}return{arrows:g,mount:C,destroy:I,update:E}}var ho=bn+"-interval";function yo(e,t,n){var r=ce(e),o=r.on,a=r.bind,i=r.emit,s=Wt(n.interval,e.go.bind(e,">"),y),l=s.isPaused,p=t.Elements,u=t.Elements,x=u.root,m=u.toggle,h=n.autoplay,c,d,w=h==="pause";function v(){h&&(g(),m&&K(m,wt,p.track.id),w||C(),I())}function g(){n.pauseOnHover&&a(x,"mouseenter mouseleave",function(k){c=k.type==="mouseenter",F()}),n.pauseOnFocus&&a(x,"focusin focusout",function(k){d=k.type==="focusin",F()}),m&&a(m,"click",function(){w?C():W(!0)}),o([$e,Dt,ge],s.rewind),o($e,A)}function C(){l()&&t.Slides.isEnough()&&(s.start(!n.resetProgress),d=c=w=!1,I(),i(wn))}function W(k){k===void 0&&(k=!0),w=!!k,I(),l()||(s.pause(),i(En))}function F(){w||(c||d?W(!1):C())}function I(){m&&(Ne(m,Ye,!w),K(m,xe,n.i18n[w?"play":"pause"]))}function y(k){var $=p.bar;$&&we($,"width",k*100+"%"),i(wr,k)}function A(k){var $=t.Slides.getAt(k);s.set($&&+Ee($.slide,ho)||n.interval)}return{mount:v,destroy:s.cancel,play:C,pause:W,isPaused:l}}function vo(e,t,n){var r=ce(e),o=r.on;function a(){n.cover&&(o(An,oe(s,!0)),o([We,ye,ge],oe(i,!0)))}function i(l){t.Slides.forEach(function(p){var u=xt(p.container||p.slide,"img");u&&u.src&&s(l,u,p)})}function s(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),mt(p,l?"none":"")}return{mount:a,destroy:oe(i,!1)}}var bo=10,_o=600,So=.6,xo=1.5,Co=800;function wo(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=e.state.set,s=t.Move,l=s.getPosition,p=s.getLimit,u=s.exceededLimit,x=s.translate,m=e.is(it),h,c,d=1;function w(){o($e,W),o([ye,ge],F)}function v(y,A,k,$,E){var O=l();if(W(),k&&(!m||!u())){var V=t.Layout.sliderSize(),G=ln(y)*V*$t(be(y)/V)||0;y=s.toPosition(t.Controller.toDest(y%V))+G}var M=pr(O,y,1);d=1,A=M?0:A||Vt(be(y-O)/xo,Co),c=$,h=Wt(A,g,oe(C,O,y,E),1),i(vt),a(Dt),h.start()}function g(){i(nt),c&&c(),a(Xe)}function C(y,A,k,$){var E=l(),O=y+(A-y)*I($),V=(O-E)*d;x(E+V),m&&!k&&u()&&(d*=So,be(V)<bo&&v(p(u(!0)),_o,!1,c,!0))}function W(){h&&h.cancel()}function F(){h&&!h.isPaused()&&(W(),g())}function I(y){var A=n.easingFunc;return A?A(y):1-Math.pow(1-y,4)}return{mount:w,destroy:W,scroll:v,cancel:F}}var Ze={passive:!1,capture:!0};function Eo(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=r.bind,s=r.unbind,l=e.state,p=t.Move,u=t.Scroll,x=t.Controller,m=t.Elements.track,h=t.Media.reduce,c=t.Direction,d=c.resolve,w=c.orient,v=p.getPosition,g=p.exceededLimit,C,W,F,I,y,A=!1,k,$,E;function O(){i(m,Zt,on,Ze),i(m,Qt,on,Ze),i(m,Fr,G,Ze),i(m,"click",N,{capture:!0}),i(m,"dragstart",ke),o([We,ye],V)}function V(){var z=n.drag;de(!z),I=z==="free"}function G(z){if(k=!1,!$){var _=Z(z);ae(z.target)&&(_||!z.button)&&(x.isBusy()?ke(z,!0):(E=_?m:window,y=l.is([ot,vt]),F=null,i(E,Zt,M,Ze),i(E,Qt,f,Ze),p.cancel(),u.cancel(),T(z)))}}function M(z){if(l.is(Rt)||(l.set(Rt),a(yr)),z.cancelable)if(y){p.translate(C+fe(ne(z)));var _=me(z)>Un,H=A!==(A=g());(_||H)&&T(z),k=!0,a(vr),ke(z)}else j(z)&&(y=S(z),ke(z))}function f(z){l.is(Rt)&&(l.set(nt),a(br)),y&&(R(z),ke(z)),s(E,Zt,M),s(E,Qt,f),y=!1}function N(z){!$&&k&&ke(z,!0)}function T(z){F=W,W=z,C=v()}function R(z){var _=Y(z),H=re(_),X=n.rewind&&n.rewindByDrag;h(!1),I?x.scroll(H,0,n.snap):e.is(Et)?x.go(w(ln(_))<0?X?"<":"-":X?">":"+"):e.is(it)&&A&&X?x.go(g(!0)?">":"<"):x.go(x.toDest(H),!0),h(!0)}function S(z){var _=n.dragMinThreshold,H=pt(_),X=H&&_.mouse||0,Q=(H?_.touch:+_)||10;return be(ne(z))>(Z(z)?Q:X)}function j(z){return be(ne(z))>be(ne(z,!0))}function Y(z){if(e.is(lt)||!A){var _=me(z);if(_&&_<Un)return ne(z)/_}return 0}function re(z){return v()+ln(z)*ze(be(z)*(n.flickPower||600),I?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(z,_){return J(z,_)-J(L(z),_)}function me(z){return an(z)-an(L(z))}function L(z){return W===z&&F||W}function J(z,_){return(Z(z)?z.changedTouches[0]:z)["page"+d(_?"Y":"X")]}function fe(z){return z/(A&&e.is(it)?ro:1)}function ae(z){var _=n.noDrag;return!dt(z,"."+Or+", ."+Xt)&&(!_||!dt(z,_))}function Z(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function _e(){return y}function de(z){$=z}return{mount:O,disable:de,isDragging:_e}}var Ao={Spacebar:" ",Right:Ut,Left:Ht,Up:Ir,Down:Tr};function kn(e){return e=Fe(e)?e:e.key,Ao[e]||e}var Gn="keydown";function Io(e,t,n){var r=ce(e),o=r.on,a=r.bind,i=r.unbind,s=e.root,l=t.Direction.resolve,p,u;function x(){m(),o(ye,h),o(ye,m),o($e,d)}function m(){var v=n.keyboard;v&&(p=v==="global"?window:s,a(p,Gn,w))}function h(){i(p,Gn)}function c(v){u=v}function d(){var v=u;u=!0,ir(function(){u=v})}function w(v){if(!u){var g=kn(v);g===l(Ht)?e.go("<"):g===l(Ut)&&e.go(">")}}return{mount:x,destroy:h,disable:c}}var ct=bn+"-lazy",jt=ct+"-srcset",To="["+ct+"], ["+jt+"]";function Lo(e,t,n){var r=ce(e),o=r.on,a=r.off,i=r.bind,s=r.emit,l=n.lazyLoad==="sequential",p=[at,Xe],u=[];function x(){n.lazyLoad&&(m(),o(ge,m))}function m(){Ve(u),h(),l?v():(a(p),o(p,c),c())}function h(){t.Slides.forEach(function(g){vn(g.slide,To).forEach(function(C){var W=Ee(C,ct),F=Ee(C,jt);if(W!==C.src||F!==C.srcset){var I=n.classes.spinner,y=C.parentElement,A=xt(y,"."+I)||et("span",I,y);u.push([C,g,A]),C.src||mt(C,"none")}})})}function c(){u=u.filter(function(g){var C=n.perPage*((n.preloadPages||1)+1)-1;return g[1].isWithin(e.index,C)?d(g):!0}),u.length||a(p)}function d(g){var C=g[0];Ie(g[1].slide,pn),i(C,"load error",oe(w,g)),K(C,"src",Ee(C,ct)),K(C,"srcset",Ee(C,jt)),Te(C,ct),Te(C,jt)}function w(g,C){var W=g[0],F=g[1];je(F.slide,pn),C.type!=="error"&&(Ge(g[2]),mt(W,""),s(An,W,F),s(rt)),l&&v()}function v(){u.length&&d(u.shift())}return{mount:x,destroy:oe(Ve,u),check:c}}function Ro(e,t,n){var r=ce(e),o=r.on,a=r.emit,i=r.bind,s=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,x=p.getIndex,m=p.go,h=t.Direction.resolve,c=l.pagination,d=[],w,v;function g(){C(),o([ye,ge,Pt],g);var $=n.pagination;c&&mt(c,$?"":"none"),$&&(o([$e,Dt,Xe],k),W(),k(),a(xr,{list:w,items:d},A(e.index)))}function C(){w&&(Ge(c?De(w.children):w),je(w,v),Ve(d),w=null),r.destroy()}function W(){var $=e.length,E=n.classes,O=n.i18n,V=n.perPage,G=u()?p.getEnd()+1:ht($/V);w=c||et("ul",E.pagination,l.track.parentElement),Ie(w,v=qt+"--"+y()),K(w,Oe,"tablist"),K(w,xe,O.select),K(w,Tn,y()===Gt?"vertical":"");for(var M=0;M<G;M++){var f=et("li",null,w),N=et("button",{class:E.page,type:"button"},f),T=s.getIn(M).map(function(S){return S.slide.id}),R=!u()&&V>1?O.pageX:O.slideX;i(N,"click",oe(F,M)),n.paginationKeyboard&&i(N,"keydown",oe(I,M)),K(f,Oe,"presentation"),K(N,Oe,"tab"),K(N,wt,T.join(" ")),K(N,xe,sn(R,M+1)),K(N,tt,-1),d.push({li:f,button:N,page:M})}}function F($){m(">"+$,!0)}function I($,E){var O=d.length,V=kn(E),G=y(),M=-1;V===h(Ut,!1,G)?M=++$%O:V===h(Ht,!1,G)?M=(--$+O)%O:V==="Home"?M=0:V==="End"&&(M=O-1);var f=d[M];f&&(sr(f.button),m(">"+M),ke(E,!0))}function y(){return n.paginationDirection||n.direction}function A($){return d[p.toPage($)]}function k(){var $=A(x(!0)),E=A(x());if($){var O=$.button;je(O,Ye),Te(O,zn),K(O,tt,-1)}if(E){var V=E.button;Ie(V,Ye),K(V,zn,!0),K(V,tt,"")}a(Cr,{list:w,items:d},$,E)}return{items:d,mount:g,destroy:C,getAt:A,update:k}}var ko=[" ","Enter"];function No(e,t,n){var r=n.isNavigation,o=n.slideFocus,a=[];function i(){e.splides.forEach(function(c){c.isParent||(p(e,c.splide),p(c.splide,e))}),r&&u()}function s(){a.forEach(function(c){c.destroy()}),Ve(a)}function l(){s(),i()}function p(c,d){var w=ce(c);w.on($e,function(v,g,C){d.go(d.is(lt)?C:v)}),a.push(w)}function u(){var c=ce(e),d=c.on;d(Sn,m),d(Er,h),d([We,ye],x),a.push(c),c.emit(Cn,e.splides)}function x(){K(t.Elements.list,Tn,n.direction===Gt?"vertical":"")}function m(c){e.go(c.index)}function h(c,d){hn(ko,kn(d))&&(m(c),ke(d))}return{setup:oe(t.Media.set,{slideFocus:bt(o)?r:o},!0),mount:i,destroy:s,remount:l}}function jo(e,t,n){var r=ce(e),o=r.bind,a=0;function i(){n.wheel&&o(t.Elements.track,"wheel",s,Ze)}function s(p){if(p.cancelable){var u=p.deltaY,x=u<0,m=an(p),h=n.wheelMinThreshold||0,c=n.wheelSleep||0;be(u)>h&&m-a>c&&(e.go(x?"<":">"),a=m),l(x)&&ke(p)}}function l(p){return!n.releaseWheel||e.state.is(ot)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var Oo=90;function Vo(e,t,n){var r=ce(e),o=r.on,a=t.Elements.track,i=n.live&&!n.isNavigation,s=et("span",Zi),l=Wt(Oo,oe(u,!1));function p(){i&&(m(!t.Autoplay.isPaused()),K(a,Mn,!0),s.textContent="…",o(wn,oe(m,!0)),o(En,oe(m,!1)),o([at,Xe],oe(u,!0)))}function u(h){K(a,Wn,h),h?(St(a,s),l.start()):(Ge(s),l.cancel())}function x(){Te(a,[Dn,Mn,Wn]),Ge(s)}function m(h){i&&K(a,Dn,h?"off":"polite")}return{mount:p,disable:m,destroy:x}}var $o=Object.freeze({__proto__:null,Media:Mi,Direction:Hi,Elements:io,Slides:ao,Layout:lo,Clones:co,Move:uo,Controller:po,Arrows:mo,Autoplay:yo,Cover:vo,Scroll:wo,Drag:Eo,Keyboard:Io,LazyLoad:Lo,Pagination:Ro,Sync:No,Wheel:jo,Live:Vo}),Po={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"},Bo={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:to,i18n:Po,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Fo(e,t,n){var r=t.Slides;function o(){ce(e).on([We,ge],a)}function a(){r.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function i(s,l){r.style("transition","opacity "+n.speed+"ms "+n.easing),ir(l)}return{mount:o,start:i,cancel:on}}function zo(e,t,n){var r=t.Move,o=t.Controller,a=t.Scroll,i=t.Elements.list,s=oe(we,i,"transition"),l;function p(){ce(e).bind(i,"transitionend",function(h){h.target===i&&l&&(x(),l())})}function u(h,c){var d=r.toPosition(h,!0),w=r.getPosition(),v=m(h);be(d-w)>=1&&v>=1?n.useScroll?a.scroll(d,v,!1,c):(s("transform "+v+"ms "+n.easing),r.translate(d,!0),l=c):(r.jump(h),c())}function x(){s(""),a.cancel()}function m(h){var c=n.rewindSpeed;if(e.is(it)&&c){var d=o.getIndex(!0),w=o.getEnd();if(d===0&&h>=w||d>=w&&h===0)return c}return n.speed}return{mount:p,start:u,cancel:x}}var Do=(function(){function e(n,r){this.event=ce(),this.Components={},this.state=Di(Qe),this.splides=[],this._o={},this._E={};var o=Fe(n)?ur(document,n):n;st(o,o+" is invalid."),this.root=o,r=Be({label:Ee(o,xe)||"",labelledby:Ee(o,In)||""},Bo,e.defaults,r||{});try{Be(r,JSON.parse(Ee(o,bn)))}catch{st(!1,"Invalid JSON")}this._o=Object.create(Be({},r))}var t=e.prototype;return t.mount=function(r,o){var a=this,i=this.state,s=this.Components;st(i.is([Qe,Ot]),"Already mounted!"),i.set(Qe),this._C=s,this._T=o||this._T||(this.is(Et)?Fo:zo),this._E=r||this._E;var l=ft({},$o,this._E,{Transition:this._T});return Ue(l,function(p,u){var x=p(a,s,a._o);s[u]=x,x.setup&&x.setup()}),Ue(s,function(p){p.mount&&p.mount()}),this.emit(We),Ie(this.root,Qi),i.set(nt),this.emit(cn),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(nt)&&(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(De(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(ge),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,a=this.state;return a.is(Qe)?ce(this).on(cn,this.destroy.bind(this,r)):(Ue(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(xn),o.destroy(),r&&Ve(this.splides),a.set(Ot)),this},$i(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})(),Nn=Do;Nn.defaults={};Nn.STATES=Bi;var Yn=[[We,"onMounted"],[cn,"onReady"],[$e,"onMove"],[at,"onMoved"],[Sn,"onClick"],[gr,"onActive"],[fr,"onInactive"],[mr,"onVisible"],[hr,"onHidden"],[ge,"onRefresh"],[ye,"onUpdated"],[rt,"onResize"],[zt,"onResized"],[yr,"onDrag"],[vr,"onDragging"],[br,"onDragged"],[Dt,"onScroll"],[Xe,"onScrolled"],[xn,"onDestroy"],[_r,"onArrowsMounted"],[Sr,"onArrowsUpdated"],[xr,"onPaginationMounted"],[Cr,"onPaginationUpdated"],[Cn,"onNavigationMounted"],[wn,"onAutoplayPlay"],[wr,"onAutoplayPlaying"],[En,"onAutoplayPause"],[An,"onLazyLoadLoaded"]];function jn(...e){return e.filter(Boolean).join(" ")}function Bt(e){return e!==null&&typeof e=="object"}function dn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!dn(n,t[r]));if(Bt(e)&&Bt(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!dn(e[o],t[o]))}return e===t}function Wo(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Mo(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 gn(e,t){const n=e;return Mo(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():Bt(r)?n[o]=gn(Bt(n[o])?n[o]:{},r):n[o]=r}),n}var Ho=({children:e,className:t,...n})=>D.createElement("div",{className:jn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),zr=class extends D.Component{constructor(){super(...arguments),this.splideRef=D.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Nn(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=gn({},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&&!dn(this.options,e)&&(this.splide.options=e,this.options=gn({},e));const t=this.getSlides();Wo(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){Yn.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 D.createElement(t,{className:jn("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yn.map(a=>a[1])])},n?D.createElement(Ho,null,r):r)}},Dr=({children:e,className:t,...n})=>D.createElement("li",{className:jn("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 Bo="RichTextRenderer-module__link___BWeZ2",Wo={link:Bo},Bt=({content:e})=>{const r=t=>t.map((n,o)=>n.type==="link"?f.jsx("a",{className:Wo.link,href:n.value,target:n.target,children:r(n.children)},o):f.jsx("span",{style:Fo(n),children:n.text},o));return f.jsx(f.Fragment,{children:e.map((t,n)=>{const o=t.children;return f.jsx("div",{children:r(o)},n)})})};function Fo(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function k(e,r=!1){return r?`calc(var(--cntrl-article-width) * ${e})`:`${e*100}vw`}const Mo="SvgImage-module__svg___q3xE-",Ho="SvgImage-module__img___VsTm-",Yn={svg:Mo,img:Ho},$e=({url:e,fill:r="#000000",hoverFill:t="#CCCCCC",className:n=""})=>{const[o,l]=F.useState(!0);return F.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(i)}},[]),!e.endsWith(".svg")||!o?f.jsx("img",{src:e,alt:"",className:oe(Yn.img,n)}):f.jsx("span",{"data-supports-mask":o,className:oe(Yn.svg,n),style:{"--svg":`url(${e})`,"--fill":r,"--hover-fill":t}})},Vo={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function $o({settings:e,content:r,styles:t,isEditor:n}){const[o,l]=F.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:a,fontSizeLineHeight:_,textAppearance:h,color:d}=t.imageCaption,[u,m]=F.useState(void 0),[C,A]=F.useState(null),[y,x]=F.useState(0),[H,B]=F.useState(0),{direction:L,transition:v,controls:S,pagination:N,imageCaption:W,triggers:I}=e,D=F.useRef(v.type),{x:P,y:G}=e.controls.offset,V=g=>{o&&o.go(g)};return F.useEffect(()=>{if(!C)return;const g=new ResizeObserver(j=>{if(!o)return;const[T]=j;m({width:Math.round(T.contentRect.width),height:Math.round(T.contentRect.height)})});return g.observe(C),()=>g.unobserve(C)},[C]),F.useEffect(()=>{!o||D.current===v.type||(B(g=>g+1),D.current=v.type)},[v.type]),f.jsx("div",{className:oe(U.wrapper,{[U.editor]:n}),ref:A,children:f.jsxs("div",{className:U.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&f.jsx("div",{className:oe(U.captionBlock),children:f.jsx("div",{className:U.captionTextWrapper,children:r.map((g,j)=>f.jsx("div",{className:oe(U.captionText,Vo[W.alignment],{[U.withPointerEvents]:j===y&&n,[U.active]:j===y}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":k(i.width,n),letterSpacing:k(s,n),wordSpacing:k(a,n),textAlign:p,fontSize:k(_.fontSize,n),lineHeight:k(_.lineHeight,n),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:d,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:f.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:k(W.offset.y,n),left:k(W.offset.x,n)},children:f.jsx(Bt,{content:g.imageCaption})})},j))})}),f.jsx(Nn,{onMove:g=>{x(g.index)},ref:l,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:L==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:r.map((g,j)=>f.jsx(jn,{children:f.jsx("div",{className:U.sliderItem,children:f.jsx("div",{className:U.imgWrapper,children:f.jsx("img",{className:oe(U.sliderImage,{[U.contain]:g.image.objectFit==="contain",[U.cover]:g.image.objectFit==="cover"}),src:g.image.url,alt:g.image.name??""})})})},j))},H),S.isActive&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:oe(U.arrow,{[U.arrowVertical]:L==="vert",[U.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:f.jsxs("button",{onClick:()=>{V("-1")},className:U.arrowInner,style:{transform:`translate(${k(P,n)}, ${k(G*(L==="horiz"?1:-1),n)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&f.jsx($e,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:oe(U.arrowImg,U.mirror)}),!S.arrowsImgUrl&&f.jsx(Xn,{color:S.color,className:oe(U.arrowIcon,U.arrowImg,U.mirror)})]})}),f.jsx("div",{className:oe(U.arrow,U.nextArrow,{[U.arrowVertical]:L==="vert",[U.hoverArrow]:S.show==="on hover"}),style:{color:S.color,"--arrow-hover-color":S.hover},children:f.jsxs("button",{className:U.arrowInner,onClick:()=>V("+1"),style:{transform:`translate(${k(P*(L==="horiz"?-1:1),n)}, ${k(G,n)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[S.arrowsImgUrl&&f.jsx($e,{url:S.arrowsImgUrl,fill:S.color,hoverFill:S.hover,className:U.arrowImg}),!S.arrowsImgUrl&&f.jsx(Xn,{color:S.color,className:oe(U.arrowIcon,U.arrowImg)})]})})]}),I.triggersList.click&&f.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),N.isActive&&f.jsx("div",{className:oe(U.pagination,{[U.paginationInsideBottom]:N.position==="inside-1"&&L==="horiz",[U.paginationInsideTop]:N.position==="inside-2"&&L==="horiz",[U.paginationOutsideBottom]:N.position==="outside-1"&&L==="horiz",[U.paginationOutsideTop]:N.position==="outside-2"&&L==="horiz",[U.paginationInsideLeft]:N.position==="inside-1"&&L==="vert",[U.paginationInsideRight]:N.position==="inside-2"&&L==="vert",[U.paginationOutsideLeft]:N.position==="outside-1"&&L==="vert",[U.paginationOutsideRight]:N.position==="outside-2"&&L==="vert",[U.paginationVertical]:L==="vert"}),children:f.jsx("div",{className:U.paginationInner,style:{backgroundColor:N.colors[2],transform:`scale(${N.scale/100}) translate(${k(N.offset.x,n)}, ${k(N.offset.y,n)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:r.map((g,j)=>f.jsx("button",{onClick:()=>{o&&o.go(j)},className:oe(U.paginationItem),children:f.jsx("div",{className:oe(U.dot,{[U.activeDot]:j===y}),style:{backgroundColor:j===y?N.colors[0]:N.colors[1],"--pagination-hover-color":N.hover}})},j))})})]})})}function Xn({color:e,className:r}){return f.jsx("svg",{viewBox:"0 0 10 18",className:r,children:f.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:f.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 Uo={element:$o,id:"control-slider",name:"Slider",preview:{type:"video",url:"https://cdn.cntrl.site/component-assets/Control-slider-preview.mp4"},defaultSize:{width:400,height:400},schema:{type:"object",properties:{settings:{layoutBased:!0,type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{layoutBased:!1,type:"array",settings:{addItemFromFileExplorer:!0,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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:{layoutBased:!0,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"]}},Go="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Yo="ImageRevealSlider-module__image___Qjt-e",Xo="ImageRevealSlider-module__link___N-iLG",Ko="ImageRevealSlider-module__cursor___2U03d",Xe={imageRevealSlider:Go,image:Yo,link:Xo,cursor:Ko};function Kn(e,r,t){for(const n of t){const o=new Image;o.src=n.url;const l=n.width?Number.parseFloat(n.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,c=l/2,s=i/2;if(e>=n.x-c&&e<=n.x+c&&r>=n.y-s&&r<=n.y+s)return!0}return!1}function en(e){return new Promise(r=>{const t=new Image;t.src=e,t.onload=()=>{r({width:t.naturalWidth,height:t.naturalHeight})}})}async function qo(e,r,t,n){let o,l;if(r==="custom"){o=t;const i=await en(e);l=i.height/i.width*o}else if(r==="random"){o=Math.random()*(n.max-n.min)+n.min;const i=await en(e);l=i.height/i.width*o}else{const i=await en(e);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Jo({settings:e,content:r,isEditor:t}){const[n,o]=F.useState(null),[l,i]=F.useState([]),[c,s]=F.useState(0),p=F.useRef(0),[a,_]=F.useState({x:0,y:0}),[h,d]=F.useState(1),[u,m]=F.useState("none"),C=F.useRef({x:0,y:0}),[A,y]=F.useState(!1),{sizeType:x,imageWidth:H,randomRangeImageWidth:B}=e.imageSize,{revealPosition:L,visible:v}=e.position,{cursorType:S,target:N,defaultCursorScale:W,defaultCursor:I,hoverCursorScale:D,hoverCursor:P}=e.cursor;F.useEffect(()=>{if(!n)return;const g=(R,b)=>{const O=n.getBoundingClientRect(),Y=R-O.left,ne=b-O.top;if(_({x:Y,y:ne}),S==="system"){m("none"),d(1);return}const Q=Y,le=ne,E=document.elementFromPoint(O.left+Q,O.top+le);if(E&&E.closest("a")){m("none"),d(1);return}const J=Kn(Q,le,l)||N==="area"?{img:P??"none",scale:D}:{img:I??"none",scale:W};m(J.img),d(J.scale)},j=R=>{R.stopPropagation(),C.current={x:R.clientX,y:R.clientY},g(R.clientX,R.clientY)},T=()=>{A&&g(C.current.x,C.current.y)};return n.addEventListener("mousemove",j),window.addEventListener("scroll",T,!0),()=>{n.removeEventListener("mousemove",j),window.removeEventListener("scroll",T,!0)}},[n,A,a,S,N,P,I,D,W,l]),F.useEffect(()=>{A||(m("none"),d(0))},[A]);const G=async(g,j,T,R={})=>{const{width:b,height:O,finalWidth:Y}=await qo(g.image.url,x,H,B);let ne=0,Q=0;L==="same"?(ne=j/2,Q=T/2):(ne=R.x??Math.random()*j,Q=R.y??Math.random()*T);const le=Math.min(Math.max(ne,b/2),j-b/2),E=Math.min(Math.max(Q,O/2),T-O/2);return{id:p.current++,url:g.image.url,link:g.link,name:g.image.name,x:le,y:E,width:Y}};F.useEffect(()=>{if(!n||r.length===0)return;const g=n.getBoundingClientRect(),j=g.width,T=g.height,R=[];(async()=>{const O=r[0],Y=await G(O,j,T);R.push(Y),i(R),s(1)})()},[x,H,B,L,n]),F.useEffect(()=>{v==="last One"&&i(g=>g.length>0?[g[g.length-1]]:[])},[v]);const V=async g=>{if(!n)return;const j=n.getBoundingClientRect(),T=g.clientX-j.left,R=g.clientY-j.top;if(N==="image"&&!Kn(T,R,l))return;let b=0,O=0;L==="on Click"?(b=T,O=R):L==="same"?(b=j.width/2,O=j.height/2):(b=Math.random()*j.width,O=Math.random()*j.height);const Y=r[c],ne=await G(Y,j.width,j.height,{x:b,y:O});i(Q=>v==="all"?[...Q,ne]:[ne]),s(Q=>Q>=r.length-1?0:Q+1)};return f.jsxs("div",{ref:o,onClick:V,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:Xe.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[l.map(g=>f.jsx("div",{className:Xe.wrapper,style:{top:`${g.y}px`,left:`${g.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:g.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:N==="area"&&g.link?f.jsx("a",{href:g.link,target:"_blank",className:Xe.link,children:f.jsx("img",{src:g.url,alt:g.name,className:Xe.image},g.id)}):f.jsx("img",{src:g.url,alt:g.name,className:Xe.image},g.id)},g.id)),A&&f.jsx("div",{className:Xe.cursor,style:{left:`${a.x}px`,top:`${a.y}px`,transform:`translate(-50%, -50%) scale(${h})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Zo={element:Jo,id:"control-image-reveal",name:"Click Gallery",preview:{type:"video",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7EQ3WSW43JG5YMC8B2HTPKT.mp4"},defaultSize:{width:"100%",height:"100%"},schema:{type:"object",properties:{settings:{layoutBased:!0,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:{layoutBased:!1,type:"array",settings:{addItemFromFileExplorer:!0,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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:""}]}}}},Qo="LightBox-module__hidden___9s-9x",ea="LightBox-module__heroImage___sTxNF",ta="LightBox-module__background___rm9ml",na="LightBox-module__editor___4ACaY",ra="LightBox-module__contentStyle___Bgnsq",ia="LightBox-module__imageStyle___tLIlB",oa="LightBox-module__imgWrapper___LuFUp",aa="LightBox-module__contain___8-yaS",la="LightBox-module__cover___hNvOG",sa="LightBox-module__caption___b6L2I",ca="LightBox-module__captionTextInner___rCGNH",ua="LightBox-module__lightboxSplide___XFuWC",pa="LightBox-module__arrow___iz38X",da="LightBox-module__arrowVertical___Zfz81",ma="LightBox-module__nextArrow___zkAQN",ga="LightBox-module__arrowInner___p48sW",fa="LightBox-module__arrowIcon___3VaFf",ha="LightBox-module__arrowImg___pNV88",va="LightBox-module__mirror___pjeXc",ya="LightBox-module__thumbsWrapper___GB-nU",ba="LightBox-module__thumbsContainerVertical___wttk5",_a="LightBox-module__thumbsContainer___osSma",wa="LightBox-module__thumbsAlignStart___MO6tY",Sa="LightBox-module__thumbsAlignCenter___Q4sUx",xa="LightBox-module__thumbsAlignEnd___p4y9R",Ca="LightBox-module__thumbItem___HvnF3",Aa="LightBox-module__closeButton___g2khP",Ia="LightBox-module__fadeIn___0m5GW",Ea="LightBox-module__slideInLeft___gPYwC",La="LightBox-module__slideInRight___S-pPp",Ta="LightBox-module__slideInTop___DFdAj",Ra="LightBox-module__slideInBottom___m27kZ",Na="LightBox-module__fadeOut___55qBR",ja="LightBox-module__slideOutLeft___NvU7P",ka="LightBox-module__slideOutRight___SK7eC",Oa="LightBox-module__slideOutTop___Vgg0z",Da="LightBox-module__slideOutBottom___nJ0Ef",za="LightBox-module__scaleSlide___vZriG",z={hidden:Qo,heroImage:ea,background:ta,editor:na,contentStyle:ra,imageStyle:ia,imgWrapper:oa,contain:aa,cover:la,caption:sa,captionTextInner:ca,lightboxSplide:ua,arrow:pa,arrowVertical:da,nextArrow:ma,arrowInner:ga,arrowIcon:fa,arrowImg:ha,mirror:va,thumbsWrapper:ya,thumbsContainerVertical:ba,thumbsContainer:_a,thumbsAlignStart:wa,thumbsAlignCenter:Sa,thumbsAlignEnd:xa,thumbItem:Ca,closeButton:Aa,fadeIn:Ia,slideInLeft:Ea,slideInRight:La,slideInTop:Ta,slideInBottom:Ra,fadeOut:Na,slideOutLeft:ja,slideOutRight:ka,slideOutTop:Oa,slideOutBottom:Da,scaleSlide:za},Lt=(e,r,t)=>{const n={},[o,l]=e.split("-");return o==="top"?(n.top="0",n.bottom="auto"):o==="middle"?(n.top="50%",n.bottom="auto"):o==="bottom"&&(n.top="auto",n.bottom="0"),l==="left"?(n.left="0",n.right="auto"):l==="center"?(n.left="50%",n.right="auto"):l==="right"&&(n.left="auto",n.right="0"),o==="middle"&&l==="center"?n.transform=`translate(calc(-50% + ${k(r.x,t)}), calc(-50% + ${k(r.y,t)}))`:o==="middle"?n.transform=`translate(${k(r.x,t)}, calc(-50% + ${k(r.y,t)}))`:l==="center"?n.transform=`translate(calc(-50% + ${k(r.x,t)}), ${k(r.y,t)})`:n.transform=`translate(${k(r.x,t)}, ${k(r.y,t)})`,n};function Pr(e){const r=window.getComputedStyle(e);return{top:parseFloat(r.paddingTop)||0,right:parseFloat(r.paddingRight)||0,bottom:parseFloat(r.paddingBottom)||0,left:parseFloat(r.paddingLeft)||0}}function qn(e){const r=e.getBoundingClientRect(),t=Pr(e),n=Math.max(0,r.width-t.left-t.right),o=Math.max(0,r.height-t.top-t.bottom),l=e.naturalWidth,i=e.naturalHeight,c=n/o,s=l/i;let p,a;s>c?(p=n,a=n/s):(a=o,p=o*s);const _=r.left+t.left,h=r.top+t.top,d=(n-p)/2+_,u=(o-a)/2+h;return{x:d,y:u,width:p,height:a}}function Jn(e){const r=e.getBoundingClientRect(),t=Pr(e);return{left:r.left+t.left,right:r.right-t.right,top:r.top+t.top,bottom:r.bottom-t.bottom}}function Zn(e){const r=e.match(/rgba?\(([^)]+)\)/);if(r){const n=r[1].split(",").map(o=>parseFloat(o.trim()));return n.length===4?n[3]:1}const t=e.match(/^#([0-9a-fA-F]{8})$/);if(t){const n=t[1].substring(6,8);return parseInt(n,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Pa(e,r){const t=(()=>{if(e==="fade in")return z.fadeIn;if(e==="slide in"||e==="mix")switch(r){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),n=(()=>{if(e==="fade in"||e==="mix")return z.fadeIn;if(e==="slide in")switch(r){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return z.fadeOut;if(e==="slide in")switch(r){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})(),l=(()=>{if(e==="fade in")return z.fadeOut;if(e==="slide in"||e==="mix")switch(r){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})();return{appearClass:t,backdropAppearClass:n,backdropDisappearClass:o,disappearClass:l}}const Ba=({settings:e,content:r,styles:t,portalId:n,activeEvent:o,isEditor:l})=>{const[i,c]=F.useState(!1),{url:s}=e.thumbnailBlock.cover;return F.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),f.jsxs(f.Fragment,{children:[f.jsx("img",{src:s,alt:"Cover",className:z.heroImage,onClick:()=>c(!0)}),f.jsx(Wa,{isOpen:i,onClose:()=>c(!1),content:r,settings:e,lightboxStyles:t,portalId:n,isEditor:l})]})},Wa=({isOpen:e,onClose:r,content:t,lightboxStyles:n,settings:o,portalId:l,isEditor:i,metadata:c})=>{var M;const[s,p]=F.useState(0),[a,_]=F.useState(0),[h,d]=F.useState(!1),[u,m]=F.useState(!1),[C,A]=F.useState({}),y=F.useRef(null),x=F.useRef(null),H=F.useRef(null),B=F.useRef(!1),L=F.useRef(null),v=F.useRef(null),S=F.useRef(null),N=F.useRef(null),W=F.useRef(!1),I=F.useRef(null),[D,P]=F.useState(!1),{appear:G,triggers:V,slider:g,thumbnail:j,controls:T,area:R,caption:b,layout:O}=o.lightboxBlock,{appearClass:Y,backdropAppearClass:ne,backdropDisappearClass:Q,disappearClass:le}=Pa(G.type,G.direction),E=(c==null?void 0:c.itemId)??null;F.useEffect(()=>{const w=()=>{setTimeout(()=>{var X,Z;(Z=(X=y.current)==null?void 0:X.splide)==null||Z.refresh()},16)},$=()=>{_(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",w),window.addEventListener("ArticleEditor.ComponentContent:change",$),()=>{window.removeEventListener("ArticleEditor.Layout:change",w),window.removeEventListener("ArticleEditor.ComponentContent:change",$)}},[]),F.useEffect(()=>{if(!e||!j.isActive){P(!1);return}const w=I.current;if(!w)return;const $=()=>{g.direction==="horiz"?P(w.scrollWidth>w.clientWidth):P(w.scrollHeight>w.clientHeight)};$();const X=new ResizeObserver($);return X.observe(w),()=>X.disconnect()},[e,j.isActive,t.length,C,g.direction]);const J=F.useCallback(()=>{const w=window.matchMedia("(max-width: 768px)").matches,$=Zn(R.color);w&&!i&&$>.9&&(document.body.style.backgroundColor=""),d(!0),B.current=!0;const X=Z=>{Z.target===L.current&&Z.animationName&&(L.current&&v.current&&L.current.removeEventListener("animationend",v.current),v.current=null,B.current&&(B.current=!1,r()),d(!1))};L.current&&(v.current=X,L.current.addEventListener("animationend",X))},[r,R.color,i]),he=(w,$,X)=>{var Z,re;if(w){if(V.type==="click"&&V.switch==="image")V.repeat==="close"&&s===t.length-1?J():(Z=y.current)==null||Z.go("+1");else if(V.type==="click"&&V.switch==="50/50"){const ee=w.getBoundingClientRect(),K=$-ee.left,ce=X-ee.top,ye=ee.width,pe=ee.height;let ge;g.direction==="horiz"?ge=K<ye/2?"-1":"+1":ge=ce<pe/2?"-1":"+1",(re=y.current)==null||re.go(ge)}}},se=w=>{if(W.current){W.current=!1;return}const $=t[s],X=($==null?void 0:$.image.objectFit)==="cover";let Z,re;if("changedTouches"in w&&w.changedTouches.length>0)Z=w.changedTouches[0].clientX,re=w.changedTouches[0].clientY;else if("clientX"in w)Z=w.clientX,re=w.clientY;else return;let ee;if(X&&H.current){const K=Jn(H.current);ee=Z>=K.left&&Z<=K.right&&re>=K.top&&re<=K.bottom}else{const K=H.current?qn(H.current):null;if(!K){w.target===w.currentTarget&&J();return}ee=Z>=K.x&&Z<=K.x+K.width&&re>=K.y&&re<=K.y+K.height}ee?he(H.current,Z,re):J()},fe=w=>{const $=w.target;($.classList.contains(z.thumbsWrapper)||$.classList.contains(z.thumbsContainer))&&se(w)};F.useEffect(()=>{if(!e)return;const w=$=>{var X,Z;if($.key==="Escape"){J();return}if($.key==="ArrowRight"){p(re=>(re+1)%Math.max(t.length,1)),(X=y.current)==null||X.go("+1");return}$.key==="ArrowLeft"&&(p(re=>(re-1+Math.max(t.length,1))%Math.max(t.length,1)),(Z=y.current)==null||Z.go("-1"))};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[e,J,t.length]),F.useEffect(()=>{if(e){if(p(0),_($=>$+1),B.current=!1,d(!1),m(!1),A({}),!E)return;const w=new CustomEvent("page-overlay",{detail:{itemId:E}});window.dispatchEvent(w)}return()=>{L.current&&v.current&&(L.current.removeEventListener("animationend",v.current),v.current=null),m(!1)}},[e,E]),F.useEffect(()=>{x.current!==null&&x.current!==g.type&&_(w=>w+1),x.current=g.type},[g.type]),F.useEffect(()=>{if(!e)return;const w=document.body.style.overflow,$=window.matchMedia("(max-width: 768px)").matches,X=Zn(R.color);document.body.style.overflow="hidden",m(!1);const Z=ee=>{ee.target===L.current&&!B.current&&ee.animationName&&($&&!i&&X>.9&&(document.body.style.backgroundColor=R.color),m(!0),L.current&&S.current&&L.current.removeEventListener("animationend",S.current),S.current=null)};L.current&&(S.current=Z,L.current.addEventListener("animationend",Z));const re=ee=>{const K=ee.target;K&&(K.closest(`.${z.thumbsWrapper}`)||K.closest(`.${z.thumbsContainer}`))||g.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=w,document.removeEventListener("touchmove",re),L.current&&S.current&&(L.current.removeEventListener("animationend",S.current),S.current=null),m(!1)}},[e,i,R.color,g.type]),F.useEffect(()=>{if(!e)return;const w=$=>{var Z,re;if(B.current){$.stopPropagation();return}if(W.current){W.current=!1;return}const X=$.target;if(!(X&&(X.closest(`.${z.thumbsContainer}`)||X.closest(`.${z.thumbItem}`)))){if(g.type==="slide"&&V.type==="drag"&&((re=(Z=y.current)==null?void 0:Z.splide)!=null&&re.root)){const ee=y.current.splide.root;if(X&&(ee.contains(X)||ee===X))return}if($.touches.length===0&&$.changedTouches.length>0){const ee=t[s],K=(ee==null?void 0:ee.image.objectFit)==="cover",ce=$.changedTouches[0];let ye;if(K&&H.current){const pe=Jn(H.current);ye=ce.clientX>=pe.left&&ce.clientX<=pe.right&&ce.clientY>=pe.top&&ce.clientY<=pe.bottom}else{const pe=H.current?qn(H.current):null;if(!pe)return;ye=ce.clientX>=pe.x&&ce.clientX<=pe.x+pe.width&&ce.clientY>=pe.y&&ce.clientY<=pe.y+pe.height}if(!ye){$.stopPropagation(),B.current=!0;const pe=ge=>{ge.stopPropagation(),ge.preventDefault(),document.removeEventListener("click",pe,!0)};document.addEventListener("click",pe,!0),J()}}}};return document.addEventListener("touchend",w,{passive:!0}),()=>{document.removeEventListener("touchend",w)}},[e,J,s,t]);const at=(g.type==="scale"||g.type==="fade")&&g.direction==="vert"&&V.type==="drag";F.useEffect(()=>{var ge,At;if(!e||!at||!((At=(ge=y.current)==null?void 0:ge.splide)!=null&&At.root))return;const w=y.current.splide.root,$=30,X=(te,de)=>{if(N.current){const Te=Math.abs(te-N.current.x),It=Math.abs(de-N.current.y);(Te>0||It>0)&&(W.current=!0)}},Z=te=>{N.current&&(te.preventDefault(),X(te.clientX,te.clientY))},re=te=>{N.current&&te.touches.length>0&&(te.preventDefault(),X(te.touches[0].clientX,te.touches[0].clientY))},ee=(te,de)=>{if(!N.current||!y.current){N.current=null;return}const Te=Math.abs(te-N.current.x),It=Math.abs(de-N.current.y);It>$&&It>Te&&y.current.go(de<N.current.y?"+1":"-1"),N.current=null},K=te=>{N.current&&ee(te.clientX,te.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",Z)},ce=te=>{if(N.current){if(te.changedTouches.length>0){const de=te.changedTouches[0];ee(de.clientX,de.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",re)}},ye=te=>{N.current={x:te.clientX,y:te.clientY},W.current=!1,document.addEventListener("pointermove",Z,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},pe=te=>{te.touches.length>0&&(N.current={x:te.touches[0].clientX,y:te.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return w.addEventListener("pointerdown",ye),w.addEventListener("touchstart",pe),()=>{w.removeEventListener("pointerdown",ye),w.removeEventListener("touchstart",pe),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),N.current=null,W.current=!1}},[e,at,a]);const Ct={backgroundColor:R.color,backdropFilter:`blur(${R.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(l)?Br.createPortal(f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:i?null:L,className:oe(z.background,h?Q:ne,{[z.editor]:i},{[z.hidden]:!e}),style:{...Ct,...u&&!i&&!h?{position:"absolute"}:{}}}),f.jsxs("div",{ref:i?L:null,className:oe(z.contentStyle,h?le:Y,{[z.editor]:i},{[z.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[f.jsx(Nn,{onMove:w=>p(w.index),ref:y,className:z.lightboxSplide,options:{arrows:!1,speed:g.duration?parseInt(g.duration):500,direction:g.direction==="horiz"||g.type==="fade"||g.type==="scale"?"ltr":"ttb",pagination:!1,drag:V.type==="drag"&&!at,perPage:1,width:"100%",height:"100%",type:g.type==="fade"||g.type==="scale"?"fade":"loop",padding:0,rewind:V.repeat!=="close",start:0},style:{"--splide-speed":g.duration},children:t.map((w,$)=>{const X=Lt(O.position,O.offset,i),Z=`${k(O.padding.top,i)} ${k(O.padding.right,i)} ${k(O.padding.bottom,i)} ${k(O.padding.left,i)}`,re=g.type==="scale"?(()=>{const{transform:ee,...K}=X;return{...K,position:"absolute",padding:Z,boxSizing:"border-box","--position-transform":ee||"none"}})():{...X,position:"absolute",padding:Z,boxSizing:"border-box"};return f.jsx(jn,{children:f.jsx("div",{className:z.imgWrapper,onClick:se,children:f.jsx("img",{ref:$===s?H:null,className:oe(z.imageStyle,{[z.contain]:w.image.objectFit==="contain",[z.cover]:w.image.objectFit==="cover",[z.scaleSlide]:g.type==="scale"}),src:w.image.url,alt:w.image.name??"",style:{...re,pointerEvents:w.image.objectFit==="contain"?"none":"auto"}})})},$)})},a),T.isActive&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:oe(z.arrow,{[z.arrowVertical]:g.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:f.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${k(T.offset.x,i)}, ${k(T.offset.y*(g.direction==="horiz"?1:-1),i)}) scale(${T.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("-1")},"aria-label":"Previous",children:[T.arrowsImgUrl&&f.jsx($e,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:oe(z.arrowImg,z.mirror)}),!T.arrowsImgUrl&&f.jsx(Qn,{color:T.color,className:oe(z.arrowIcon,z.arrowImg,z.mirror)})]})}),f.jsx("div",{className:oe(z.arrow,z.nextArrow,{[z.arrowVertical]:g.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:f.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${k(T.offset.x*(g.direction==="horiz"?-1:1),i)}, ${k(T.offset.y,i)}) scale(${T.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=y.current)==null?void 0:w.go("+1")},"aria-label":"Next",children:[T.arrowsImgUrl&&f.jsx($e,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:z.arrowImg}),!T.arrowsImgUrl&&f.jsx(Qn,{color:T.color,className:oe(z.arrowIcon,z.arrowImg)})]})})]}),R.closeIconUrl&&(()=>{const w=Lt(R.closeIconAlign,R.closeIconOffset,i),$=`scale(${R.closeIconScale})`,X=w.transform?`${w.transform} ${$}`:$;return f.jsx("button",{className:z.closeButton,style:{...w,transform:X},onClick:J,"aria-label":"Close lightbox",children:f.jsx($e,{url:R.closeIconUrl,fill:R.closeIconColor??"#000000",hoverFill:R.closeIconHover??"#cccccc"})})})(),b&&b.isActive&&n.imageCaption&&((M=t[s])==null?void 0:M.imageCaption)&&(()=>{const{widthSettings:w,fontSettings:$,letterSpacing:X,textAlign:Z,wordSpacing:re,fontSizeLineHeight:ee,textAppearance:K,color:ce}=n.imageCaption;return f.jsx("div",{className:z.caption,style:{...Lt(b.alignment,b.offset,i),fontFamily:$.fontFamily,fontWeight:$.fontWeight,fontStyle:$.fontStyle,width:w.sizing==="auto"?"max-content":k(w.width,i),letterSpacing:k(X,i),wordSpacing:k(re,i),textAlign:Z,fontSize:k(ee.fontSize,i),lineHeight:k(ee.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:ce},onClick:ye=>ye.stopPropagation(),children:f.jsx("div",{"data-styles":"imageCaption",className:z.captionTextInner,style:{"--link-color":b.linkColor,"--link-hover-color":b.linkHoverColor},children:f.jsx(Bt,{content:t[s].imageCaption})})})})(),j.isActive&&(()=>{const[w,$]=j.position.split("-"),X=g.direction==="horiz"?`${w}-left`:j.position,Z=Lt(X,j.offset,i),re=()=>{if(g.direction==="horiz"){if($==="left")return"flex-start";if($==="center")return"center";if($==="right")return"flex-end"}else{if(w==="top")return"flex-start";if(w==="middle")return"center";if(w==="bottom")return"flex-end"}return"flex-start"};return f.jsx("div",{ref:I,className:z.thumbsWrapper,onClick:ee=>fe(ee),style:{position:i?"absolute":"fixed",...Z,...g.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:f.jsx("div",{className:oe(z.thumbsContainer,{[z.thumbsContainerVertical]:g.direction==="vert",[z.thumbsAlignStart]:j.align==="start",[z.thumbsAlignCenter]:j.align==="center",[z.thumbsAlignEnd]:j.align==="end"}),style:{gap:k(j.grid.gap,i),justifyContent:D?"flex-start":re()},children:t.map((ee,K)=>{const ce=K===s,ye=C[K],ge=j.grid.size*(ce?j.activeState.scale:1),At=()=>{if(j.fit!=="fit")return{};if(!ye)return g.direction==="horiz"?{height:k(ge,i)}:{width:k(ge,i)};const te=ye.width/ye.height;if(g.direction==="horiz"){const de=ge,Te=de*te;return{width:k(Te,i),height:k(de,i)}}else{const de=ge,Te=de/te;return{width:k(de,i),height:k(Te,i)}}};return f.jsx("button",{className:z.thumbItem,style:{...g.direction==="horiz"&&j.fit!=="fit"?{height:k(ge,i)}:{},...g.direction==="vert"&&j.fit!=="fit"?{width:k(ge,i)}:{},...j.fit==="cover"?{width:k(ge,i),height:k(ge,i)}:{},...At(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?j.activeState.opacity/100:j.opacity/100,"--thumb-hover":j.activeState.opacity/100},onClick:te=>{var de;te.stopPropagation(),p(K),(de=y.current)==null||de.go(K)},onMouseEnter:()=>{var te;j.triggers==="hov"&&((te=y.current)==null||te.go(K))},children:f.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:te=>{const de=te.currentTarget;de.naturalWidth&&de.naturalHeight&&A(Te=>({...Te,[K]:{width:de.naturalWidth,height:de.naturalHeight}}))},style:{objectFit:j.fit==="cover"?"cover":"contain",...j.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...j.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${K}`)})})})})()]})]}),document.getElementById(l)):null};function Qn({color:e,className:r}){return f.jsx("svg",{viewBox:"0 0 10 18",className:r,children:f.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:f.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 Fa={element:Ba,id:"lightbox",name:"Lightbox",preview:{type:"video",url:"https://cdn.cntrl.site/component-assets/lightbox.mp4"},defaultSize:{width:440,height:550},schema:{type:"object",properties:{settings:{layoutBased:!0,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:{layoutBased:!1,type:"array",settings:{addItemFromFileExplorer:!0,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",minWidth:58,maxWidth:108},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",minWidth:300,maxWidth:550}}},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:{layoutBased:!0,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"]}},Ma="Testimonials-module__container___H14Dc",Ha="Testimonials-module__gradientCorners___5yVCO",Va="Testimonials-module__wrapper___eCRwv",$a="Testimonials-module__wrapperDropShadow___gOkGi",Ua="Testimonials-module__cover___5I7Fh",Ga="Testimonials-module__elementsOverlay___5BTW9",Ya="Testimonials-module__image___nHD1Y",Xa="Testimonials-module__icon___SstqT",Ka="Testimonials-module__controls___3Kkww",qa="Testimonials-module__arrow___NO6BN",Ja="Testimonials-module__nextArrow___L3G-W",Za="Testimonials-module__arrowInner___GSjnA",Qa="Testimonials-module__arrowIcon___fw7vy",el="Testimonials-module__arrowImg___7R9fl",tl="Testimonials-module__mirror___JkFna",nl="Testimonials-module__control___9n4l3",ie={container:Ma,gradientCorners:Ha,wrapper:Va,wrapperDropShadow:$a,cover:Ua,elementsOverlay:Ga,image:Ya,icon:Xa,controls:Ka,arrow:qa,nextArrow:Ja,arrowInner:Za,arrowIcon:Qa,arrowImg:el,mirror:tl,control:nl},rl=({isRtl:e,step:r,controls:t,isEditor:n,sliderRef:o})=>{const l=e?`+${r}`:`-${r}`,i=e?`-${r}`:`+${r}`,c=()=>{var a;(a=o.current)==null||a.go(l)},s=()=>{var a;(a=o.current)==null||a.go(i)},p=a=>{if(!a)return{};const[_,h]=a.split("-"),d={};return _==="middle"?(d.position="absolute",d.top="50%",d.left=0,d.right=0,d.transform="translateY(-50%)",d.display="flex"):_==="top"?(d.order=0,d.marginTop=0,d.marginBottom="auto"):(d.order=2,d.marginTop="auto",d.marginBottom=0),h==="left"?_==="middle"?d.justifyContent="flex-start":d.alignSelf="flex-start":h==="center"?d.justifyContent="center":d.justifyContent="flex-end",d};return f.jsxs("div",{className:ie.controls,style:{color:t==null?void 0:t.color,"--arrow-hover-color":t==null?void 0:t.hover,gap:k((t==null?void 0:t.gap)??0,n??!1),...p(t==null?void 0:t.align)},children:[f.jsx("div",{className:ie.arrow,children:f.jsxs("button",{className:ie.arrowInner,onClick:c,"aria-label":"Previous",style:{transform:`scale(${(t==null?void 0:t.scale)/100})`},children:[(t==null?void 0:t.arrowsImgUrl)&&f.jsx($e,{url:t==null?void 0:t.arrowsImgUrl,fill:t==null?void 0:t.color,hoverFill:t==null?void 0:t.hover,className:oe(ie.arrowImg,ie.mirror)}),!(t!=null&&t.arrowsImgUrl)&&f.jsx(er,{color:t==null?void 0:t.color,className:oe(ie.arrowIcon,ie.arrowImg,ie.mirror)})]})}),f.jsx("div",{className:oe(ie.arrow,ie.nextArrow),children:f.jsxs("button",{className:ie.arrowInner,onClick:s,"aria-label":"Next",style:{transform:`scale(${(t==null?void 0:t.scale)/100})`},children:[(t==null?void 0:t.arrowsImgUrl)&&f.jsx($e,{url:t==null?void 0:t.arrowsImgUrl,fill:t==null?void 0:t.color,hoverFill:t==null?void 0:t.hover,className:ie.arrowImg}),!(t!=null&&t.arrowsImgUrl)&&f.jsx(er,{color:t==null?void 0:t.color,className:oe(ie.arrowIcon,ie.arrowImg)})]})})]})};function er({color:e,className:r}){return f.jsx("svg",{viewBox:"0 0 10 18",className:r,children:f.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:f.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 il=e=>{if(!e)return 0;const r=e.match(/^(\d+)s$/);return r?parseInt(r[1],10)*1e3:0},ol=({settings:e,content:r,styles:t,isEditor:n})=>{var B,L;const o=F.useRef(null),[l,i]=F.useState(1),c=F.useRef(null),s=F.useRef(null),{general:p,card:a}=e,{width:_}=a.dimensions,h=p.autoplay==="on",d=e.general.speed?il(e.general.speed):0,u=e.card.dropShadow.active==="on"?e.card.dropShadow.blur+e.card.dropShadow.spread+Math.abs(e.card.dropShadow.right):0,m=k(_*r.length+e.card.gap*r.length+a.borders.width*2*r.length+u,n??!1),C=`${p.autoplay}-${r.length}`,A=e.card.dropShadow.active==="on",y=k(a.dimensions.height,n??!1),x=e.general.direction==="right",H=p.move==="one"?1:l;return F.useEffect(()=>{var v;if((v=o.current)!=null&&v.splide){const S=o.current.splide;S.options={...S.options,autoplay:h,perMove:1,perPage:h?r.length||3:l,interval:h?d||5e3:0,rewind:!h},S.refresh()}},[p.autoplay,d,r.length]),F.useEffect(()=>{(()=>{var I;if(!c.current)return;const S=c.current.clientWidth,N=(I=s.current)==null?void 0:I.clientWidth;if(!N||!S){i(1);return}const W=Math.max(1,Math.floor(S/N));i(W)})()},[e.card.gap,n,e.general.move]),f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{height:`calc(100% + ${k(Math.abs(a.dropShadow.down)+a.dropShadow.blur+a.dropShadow.spread,n??!1)} )`,transform:a.dropShadow.down>0?`translateY(-${k(a.dropShadow.down,n??!1)})`:`translateY(${k(a.dropShadow.down,n??!1)})`,"--gradient-color":e.general.gradientCorners.color},className:e.general.gradientCorners.active==="gradient"?ie.gradientCorners:void 0}),f.jsxs("div",{className:ie.container,style:{flexDirection:"column",alignItems:"center"},children:[f.jsx("div",{className:oe(ie.wrapper,!h&&ie.wrapperAutoplayOff,A&&ie.wrapperDropShadow),style:{...m?{width:m}:{},"--card-gap":h?0:`${k(e.card.gap,n??!1)}`},ref:c,children:f.jsx(Nn,{ref:o,options:{type:h||((B=p.controls)==null?void 0:B.isActive)==="visible"?"loop":"slide",fixedWidth:k(_+a.borders.width*2,n??!1),height:"auto",arrows:!1,perMove:1,perPage:l,gap:h?k(e.card.gap,n??!1):0,padding:0,drag:!1,autoplay:h,speed:d,interval:d||5e3,rewind:!h,easing:"linear",direction:e.general.direction==="left"?"ltr":"rtl",pagination:!1,pauseOnHover:e.general.pause==="hover",pauseOnFocus:e.general.pause==="click"},children:r.map((v,S)=>{var N,W,I,D;return f.jsx(jn,{children:f.jsxs("div",{ref:s,style:{padding:`${k(e.card.padding.top,n??!1)} ${k(e.card.padding.right,n??!1)} ${k(e.card.padding.bottom,n??!1)} ${k(e.card.padding.left,n??!1)}`,width:k(_+a.borders.width*2,n??!1),minHeight:y,height:"100%",borderRadius:k(e.card.corner,n??!1),border:`${k(e.card.borders.width,n??!1)} solid ${e.card.borders.color}`,boxSizing:"border-box",position:"relative",boxShadow:e.card.dropShadow.active==="on"?`${k(e.card.dropShadow.right,n??!1)} ${k(e.card.dropShadow.down,n??!1)} ${k(e.card.dropShadow.blur,n??!1)} ${k(e.card.dropShadow.spread,n??!1)} ${e.card.dropShadow.color}`:"none"},children:[((N=v.image)==null?void 0:N.url)&&f.jsx("img",{className:ie.image,src:(W=v.image)==null?void 0:W.url,alt:(I=v.image)==null?void 0:I.name,style:{objectFit:((D=v.image)==null?void 0:D.objectFit)||"cover",borderRadius:`${k(e.card.corner,n??!1)}`,height:y}}),f.jsx("div",{className:ie.cover,style:{background:e.card.bgColor,borderRadius:`${k(e.card.corner,n??!1)}`,height:"100%"}}),f.jsx("div",{className:ie.elementsOverlay,style:{display:"flex",flexDirection:"column",inset:0,pointerEvents:"none"},children:(e.elements.elements.order??(Array.isArray(e.elements.elements.order)?e.elements.elements.order:["text","icon","caption"])).map((V,g)=>({key:V,order:g})).map(({key:V,order:g})=>{var j,T;if(V==="icon")return f.jsxs("div",{style:{order:g,zIndex:g},children:[f.jsx("div",{"data-controls":"elements.icon.margin.top",className:ie.control,style:{height:k(e.elements.icon.margin.top,n??!1)}}),f.jsx("div",{style:{width:"100%",textAlign:e.elements.icon.align},children:f.jsx("img",{src:(j=v.icon)==null?void 0:j.url,alt:(T=v.icon)==null?void 0:T.name,className:ie.icon,style:{transform:`scale(${e.elements.icon.scale/100})`,pointerEvents:"auto"}})})]},"icon");if(V==="text"&&t.imageCaption){const{widthSettings:R,fontSettings:b,letterSpacing:O,textAlign:Y,wordSpacing:ne,fontSizeLineHeight:Q,textAppearance:le,color:E}=t.imageCaption;return f.jsxs("div",{style:{order:g,zIndex:g},children:[f.jsx("div",{"data-controls":"elements.text.margin.top",className:ie.control,style:{height:k(e.elements.text.margin.top,n??!1)}}),f.jsx("div",{"data-styles":"imageCaption",className:ie.caption,style:{fontFamily:b.fontFamily,fontWeight:b.fontWeight,fontStyle:b.fontStyle,minHeight:k(e.elements.text.minHeight,n??!1),letterSpacing:k(O,n),wordSpacing:k(ne,n),textAlign:Y,fontSize:k(Q.fontSize,n),lineHeight:k(Q.lineHeight,n),textTransform:le.textTransform??"none",textDecoration:le.textDecoration??"none",fontVariant:le.fontVariant??"normal",color:E,pointerEvents:"auto"},children:f.jsx(Bt,{content:v.imageCaption})})]},"text")}if(V==="caption"&&t.caption){const{widthSettings:R,fontSettings:b,letterSpacing:O,textAlign:Y,wordSpacing:ne,fontSizeLineHeight:Q,textAppearance:le,color:E}=t.caption;return f.jsxs("div",{style:{order:g,zIndex:g},children:[f.jsx("div",{"data-controls":"elements.caption.margin.top",className:ie.control,style:{height:k(e.elements.caption.margin.top,n??!1)}}),f.jsx("div",{"data-styles":"caption",className:ie.caption,style:{fontFamily:b.fontFamily,fontWeight:b.fontWeight,fontStyle:b.fontStyle,minHeight:k(e.elements.caption.minHeight,n??!1),letterSpacing:k(O,n),wordSpacing:k(ne,n),textAlign:Y,fontSize:k(Q.fontSize,n),lineHeight:k(Q.lineHeight,n),textTransform:le.textTransform??"none",textDecoration:le.textDecoration??"none",fontVariant:le.fontVariant??"normal",color:E,pointerEvents:"auto"},children:f.jsx(Bt,{content:v.caption})})]},"caption")}return null})})]})},S)})},C)}),((L=e.general.controls)==null?void 0:L.isActive)==="visible"&&p.autoplay==="off"&&f.jsx(rl,{isRtl:x,step:H,controls:e.general.controls,isEditor:n??!1,sliderRef:o})]})]})},al={element:ol,id:"testimonials",name:"Testimonials",preview:{type:"video",url:"https://cdn.cntrl.site/component-assets/testimonials.mp4"},defaultSize:{width:700,height:300},schema:{type:"object",properties:{settings:{layoutBased:!0,type:"object",display:{type:"settings-block"},properties:{general:{icon:"thumbnail",type:"object",properties:{autoplay:{type:"string",title:"Autoplay",display:{type:"ratio-group",direction:"horizontal"},enum:["on","off"]},move:{type:"string",title:"Move",display:{type:"ratio-group",direction:"horizontal"},enum:["one","view"]},speed:{type:["string","null"],title:"Speed",display:{type:"step-selector"},enum:["1s","2s","3s","4s","5s","6s","7s","8s","9s","10s"]},direction:{type:"string",display:{type:"ratio-group"},enum:["left","right"]},pause:{title:"Pause on",type:"string",display:{type:"ratio-group"},enum:["hover","click","off"]},controls:{title:"controls",type:"object",properties:{isActive:{type:"string",title:"Controls",display:{type:"ratio-group",direction:"vertical"},enum:["visible","hidden"]},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},align:{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"]},gap:{type:"number",title:"Gap",scalingEnabled:!0,display:{type:"numeric-input"}},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"}}}},gradientCorners:{type:"object",title:"",display:{type:"group"},properties:{active:{type:"string",title:"Corners",display:{type:"ratio-group",direction:"vertical"},enum:["gradient","none"]},color:{type:"string",title:"Gradient",display:{type:"settings-color-picker",format:"single"}}}}}},card:{icon:"card",type:"object",properties:{dimensions:{type:"object",title:"Size",display:{type:"group"},properties:{width:{type:"number",label:"W",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},height:{type:"number",title:"Min Height",label:"H",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}},corner:{type:"number",title:"Corners",scalingEnabled:!0,min:0,label:"icon:border-radius",display:{type:"numeric-input"}},borders:{type:"object",title:"Borders",display:{type:"group"},properties:{width:{type:"number",label:"icon:border-width",scalingEnabled:!0,min:0,display:{type:"numeric-input"}},color:{type:"string",display:{type:"settings-color-picker",format:"single"}}}},bgColor:{title:"BG color",type:"string",display:{type:"settings-color-picker",format:"single"}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"}},dropShadow:{type:"object",title:"Shadow",display:{type:"group"},properties:{active:{type:"string",title:"active",display:{type:"ratio-group",direction:"horizontal"},enum:["on","off"]},right:{type:"number",label:"x",scalingEnabled:!0,display:{type:"numeric-input"}},down:{type:"number",label:"y",scalingEnabled:!0,display:{type:"numeric-input"}},blur:{type:"number",label:"icon:blur",scalingEnabled:!0,display:{type:"numeric-input"}},spread:{type:"number",title:"Spread",scalingEnabled:!0,display:{type:"numeric-input"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}},elements:{title:"elements",icon:"star",type:"object",properties:{elements:{type:"array",display:{type:"order-selector"},items:{type:"string",enum:["text","icon","caption"]},default:{order:["text","icon","caption"],active:"text"}},text:{type:"object",display:{type:"group"},properties:{minHeight:{type:"number",label:"H",title:"Min Height",scalingEnabled:!0,display:{type:"numeric-input"}},margin:{type:"object",title:"Margin",display:{type:"group",visible:!1},properties:{top:{type:"number",label:"Top",scalingEnabled:!0,min:0,display:{type:"numeric-input",visible:!1}}}}}},icon:{type:"object",display:{type:"group"},properties:{margin:{type:"object",title:"Margin",display:{type:"group",visible:!1},properties:{top:{type:"number",label:"Top",scalingEnabled:!0,display:{type:"numeric-input",visible:!1}}}},align:{type:"string",title:"Align",label:"align",enum:["left","center","right"],display:{type:"align-group",direction:"vertical"}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control",visible:!1}}}},caption:{type:"object",display:{type:"group"},properties:{minHeight:{type:"number",label:"H",title:"Min Height",scalingEnabled:!0,display:{type:"numeric-input"}},margin:{type:"object",title:"Margin",display:{type:"group",visible:!1},properties:{top:{type:"number",label:"Top",scalingEnabled:!0,min:0,display:{type:"numeric-input",visible:!1}}}}}}}}},default:{general:{autoplay:"off",move:"one",speed:"5s",align:"left",direction:"left",pause:"off",controls:{isActive:"hidden",arrowsImgUrl:null,align:"top-center",gap:.02,scale:100,color:"#000000",hover:"#cccccc"},gradientCorners:{active:"none",color:"#ffffff"}},card:{dimensions:{width:.15,height:.2},gap:.02,corner:.005,borders:{width:.001,color:"#000000"},bgColor:"rgba(255, 255, 255, 0.2)",padding:{top:0,right:0,bottom:0,left:0},dropShadow:{active:"on",right:0,down:0,spread:0,blur:0,color:"#000000"}},elements:{elements:["text","icon","caption"],active:"text",text:{minHeight:.01,margin:{top:0}},icon:{margin:{top:0},scale:100,align:"left"},caption:{minHeight:.01,margin:{top:0}}}},displayRules:[{if:{name:"general.autoplay",value:"off"},then:{name:"properties.general.properties.move.display.visible",value:!0}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.move.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.direction.display.visible",value:!0}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.pause.display.visible",value:!0}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.align.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.gap.display.visible",value:!1}},{if:{name:"general.autoplay",value:"off"},then:{name:"properties.general.properties.direction.display.visible",value:!1}},{if:{name:"general.autoplay",value:"off"},then:{name:"properties.general.properties.pause.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.isActive.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.arrowsImgUrl.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.offset.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.scale.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.color.display.visible",value:!1}},{if:{name:"general.autoplay",value:"on"},then:{name:"properties.general.properties.controls.properties.hover.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"text"},then:{name:"properties.elements.properties.text.properties.minHeight.display.visible",value:!0}},{if:{name:"elements.elements.active",value:"text"},then:{name:"properties.elements.properties.caption.properties.minHeight.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"caption"},then:{name:"properties.elements.properties.caption.properties.minHeight.display.visible",value:!0}},{if:{name:"elements.elements.active",value:"caption"},then:{name:"properties.elements.properties.caption.properties.minHeight.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"caption"},then:{name:"properties.elements.properties.icon.properties.align.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"text"},then:{name:"properties.elements.properties.icon.properties.align.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"icon"},then:{name:"properties.elements.properties.text.properties.minHeight.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"icon"},then:{name:"properties.elements.properties.caption.properties.minHeight.display.visible",value:!1}},{if:{name:"elements.elements.active",value:"icon"},then:{name:"properties.elements.properties.icon.properties.scale.display.visible",value:!0}},{if:{name:"elements.elements.active",value:"icon"},then:{name:"properties.elements.properties.icon.properties.align.display.visible",value:!0}}]},content:{layoutBased:!1,type:"array",settings:{addItemFromFileExplorer:!1,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},icon:{type:"object",label:"Icon",display:{minWidth:58,maxWidth:108,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text",minWidth:300,maxWidth:550}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text",minWidth:300,maxWidth:550}}},required:["image"]},default:[{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},imageCaption:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]},styles:{layoutBased:!0,type:"object",properties:{imageCaption:{dataName:"imageCaption",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"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}},caption:{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"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase"]},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:"manual"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.01,lineHeight:.01},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},caption:{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.01,lineHeight:.01},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}},required:["settings","content","styles"]}}},ll=[Uo,Zo,Fa,al];exports.components=ll;
|
|
6
|
+
*/const Uo="RichTextRenderer-module__link___BWeZ2",Go={link:Uo},Wr=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?b.jsx("a",{className:Go.link,href:r.value,target:r.target,children:t(r.children)},o):b.jsx("span",{style:Yo(r),children:r.text},o));return b.jsx(b.Fragment,{children:e.map((n,r)=>{const o=n.children;return b.jsx("div",{children:t(o)},r)})})};function Yo(e){return{...e.fontFamily&&{fontFamily: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 Xo="SvgImage-module__svg___q3xE-",qo="SvgImage-module__img___VsTm-",Xn={svg:Xo,img:qo},ut=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r=""})=>{const[o,a]=D.useState(!0);return D.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(i)}},[]),!e.endsWith(".svg")||!o?b.jsx("img",{src:e,alt:"",className:se(Xn.img,r)}):b.jsx("span",{"data-supports-mask":o,className:se(Xn.svg,r),style:{"--svg":`url(${e})`,"--fill":t,"--hover-fill":n}})},Ko={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function Jo({settings:e,content:t,styles:n,isEditor:r}){const[o,a]=D.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:x,textAppearance:m,color:h}=n.imageCaption,[c,d]=D.useState(void 0),[w,v]=D.useState(null),[g,C]=D.useState(0),[W,F]=D.useState(0),{direction:I,transition:y,controls:A,pagination:k,imageCaption:$,triggers:E}=e,O=D.useRef(y.type),{x:V,y:G}=e.controls.offset,M=f=>{o&&o.go(f)};return D.useEffect(()=>{if(!w)return;const f=new ResizeObserver(N=>{if(!o)return;const[T]=N;d({width:Math.round(T.contentRect.width),height:Math.round(T.contentRect.height)})});return f.observe(w),()=>f.unobserve(w)},[w]),D.useEffect(()=>{!o||O.current===y.type||(F(f=>f+1),O.current=y.type)},[y.type]),b.jsx("div",{className:se(U.wrapper,{[U.editor]:r}),ref:v,children:b.jsxs("div",{className:U.sliderInner,style:{width:c?c.width:"100%",height:c?c.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&b.jsx("div",{className:se(U.captionBlock),children:b.jsx("div",{className:U.captionTextWrapper,children:t.map((f,N)=>b.jsx("div",{className:se(U.captionText,Ko[$.alignment],{[U.withPointerEvents]:N===g&&r,[U.active]:N===g}),style:{fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":B.scalingValue(i.width,r),letterSpacing:B.scalingValue(l,r),wordSpacing:B.scalingValue(u,r),textAlign:p,fontSize:B.scalingValue(x.fontSize,r),lineHeight:B.scalingValue(x.lineHeight,r),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:h,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:b.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:B.scalingValue($.offset.y,r),left:B.scalingValue($.offset.x,r)},children:b.jsx(Wr,{content:f.imageCaption})})},N))})}),b.jsx(zr,{onMove:f=>{C(f.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:I==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:c?c.width:"100%",height:c?c.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,N)=>b.jsx(Dr,{children:b.jsx("div",{className:U.sliderItem,children:b.jsx("div",{className:U.imgWrapper,children:b.jsx("img",{className:se(U.sliderImage,{[U.contain]:f.image.objectFit==="contain",[U.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},N))},W),A.isActive&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:se(U.arrow,{[U.arrowVertical]:I==="vert",[U.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:b.jsxs("button",{onClick:()=>{M("-1")},className:U.arrowInner,style:{transform:`translate(${B.scalingValue(V,r)}, ${B.scalingValue(G*(I==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&b.jsx(ut,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:se(U.arrowImg,U.mirror)}),!A.arrowsImgUrl&&b.jsx(qn,{color:A.color,className:se(U.arrowIcon,U.arrowImg,U.mirror)})]})}),b.jsx("div",{className:se(U.arrow,U.nextArrow,{[U.arrowVertical]:I==="vert",[U.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:b.jsxs("button",{className:U.arrowInner,onClick:()=>M("+1"),style:{transform:`translate(${B.scalingValue(V*(I==="horiz"?-1:1),r)}, ${B.scalingValue(G,r)}) scale(${e.controls.scale/100}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&b.jsx(ut,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:U.arrowImg}),!A.arrowsImgUrl&&b.jsx(qn,{color:A.color,className:se(U.arrowIcon,U.arrowImg)})]})})]}),E.triggersList.click&&b.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),k.isActive&&b.jsx("div",{className:se(U.pagination,{[U.paginationInsideBottom]:k.position==="inside-1"&&I==="horiz",[U.paginationInsideTop]:k.position==="inside-2"&&I==="horiz",[U.paginationOutsideBottom]:k.position==="outside-1"&&I==="horiz",[U.paginationOutsideTop]:k.position==="outside-2"&&I==="horiz",[U.paginationInsideLeft]:k.position==="inside-1"&&I==="vert",[U.paginationInsideRight]:k.position==="inside-2"&&I==="vert",[U.paginationOutsideLeft]:k.position==="outside-1"&&I==="vert",[U.paginationOutsideRight]:k.position==="outside-2"&&I==="vert",[U.paginationVertical]:I==="vert"}),children:b.jsx("div",{className:U.paginationInner,style:{backgroundColor:k.colors[2],transform:`scale(${k.scale/100}) translate(${B.scalingValue(k.offset.x,r)}, ${B.scalingValue(k.offset.y,r)}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:t.map((f,N)=>b.jsx("button",{onClick:()=>{o&&o.go(N)},className:se(U.paginationItem),children:b.jsx("div",{className:se(U.dot,{[U.activeDot]:N===g}),style:{backgroundColor:N===g?k.colors[0]:k.colors[1],"--pagination-hover-color":k.hover}})},N))})})]})})}function qn({color:e,className:t}){return b.jsx("svg",{viewBox:"0 0 10 18",className:t,children:b.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:b.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 Zo={element:Jo,id:"control-slider",name:"Slider",preview:{type:"video",url:"https://cdn.cntrl.site/component-assets/Control-slider-preview.mp4"},defaultSize:{width:400,height:400},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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"]}},Qo="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ea="ImageRevealSlider-module__image___Qjt-e",ta="ImageRevealSlider-module__link___N-iLG",na="ImageRevealSlider-module__cursor___2U03d",qe={imageRevealSlider:Qo,image:ea,link:ta,cursor:na};function Kn(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const a=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,s=a/2,l=i/2;if(e>=r.x-s&&e<=r.x+s&&t>=r.y-l&&t<=r.y+l)return!0}return!1}function en(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ra(e,t,n,r){let o,a;if(t==="custom"){o=n;const i=await en(e);a=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await en(e);a=i.height/i.width*o}else{const i=await en(e);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function ia({settings:e,content:t,isEditor:n}){const[r,o]=D.useState(null),[a,i]=D.useState([]),[s,l]=D.useState(0),p=D.useRef(0),[u,x]=D.useState({x:0,y:0}),[m,h]=D.useState(1),[c,d]=D.useState("none"),w=D.useRef({x:0,y:0}),[v,g]=D.useState(!1),{sizeType:C,imageWidth:W,randomRangeImageWidth:F}=e.imageSize,{revealPosition:I,visible:y}=e.position,{cursorType:A,target:k,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:O,hoverCursor:V}=e.cursor;D.useEffect(()=>{if(!r)return;const f=(R,S)=>{const j=r.getBoundingClientRect(),Y=R-j.left,re=S-j.top;if(x({x:Y,y:re}),A==="system"){d("none"),h(1);return}const ne=Y,me=re,L=document.elementFromPoint(j.left+ne,j.top+me);if(L&&L.closest("a")){d("none"),h(1);return}const J=Kn(ne,me,a)||k==="area"?{img:V??"none",scale:O}:{img:E??"none",scale:$};d(J.img),h(J.scale)},N=R=>{R.stopPropagation(),w.current={x:R.clientX,y:R.clientY},f(R.clientX,R.clientY)},T=()=>{v&&f(w.current.x,w.current.y)};return r.addEventListener("mousemove",N),window.addEventListener("scroll",T,!0),()=>{r.removeEventListener("mousemove",N),window.removeEventListener("scroll",T,!0)}},[r,v,u,A,k,V,E,O,$,a]),D.useEffect(()=>{v||(d("none"),h(0))},[v]);const G=async(f,N,T,R={})=>{const{width:S,height:j,finalWidth:Y}=await ra(f.image.url,C,W,F);let re=0,ne=0;I==="same"?(re=N/2,ne=T/2):(re=R.x??Math.random()*N,ne=R.y??Math.random()*T);const me=Math.min(Math.max(re,S/2),N-S/2),L=Math.min(Math.max(ne,j/2),T-j/2);return{id:p.current++,url:f.image.url,link:f.link,name:f.image.name,x:me,y:L,width:Y}};D.useEffect(()=>{if(!r||t.length===0)return;const f=r.getBoundingClientRect(),N=f.width,T=f.height,R=[];(async()=>{const j=t[0],Y=await G(j,N,T);R.push(Y),i(R),l(1)})()},[C,W,F,I,r]),D.useEffect(()=>{y==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[y]);const M=async f=>{if(!r)return;const N=r.getBoundingClientRect(),T=f.clientX-N.left,R=f.clientY-N.top;if(k==="image"&&!Kn(T,R,a))return;let S=0,j=0;I==="on Click"?(S=T,j=R):I==="same"?(S=N.width/2,j=N.height/2):(S=Math.random()*N.width,j=Math.random()*N.height);const Y=t[s],re=await G(Y,N.width,N.height,{x:S,y:j});i(ne=>y==="all"?[...ne,re]:[re]),l(ne=>ne>=t.length-1?0:ne+1)};return b.jsxs("div",{ref:o,onClick:M,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),className:qe.imageRevealSlider,style:{cursor:c==="none"?"default":"none"},children:[a.map(f=>b.jsx("div",{className:qe.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:c==="none"?"default":"none"},children:k==="area"&&f.link?b.jsx("a",{href:f.link,target:"_blank",className:qe.link,children:b.jsx("img",{src:f.url,alt:f.name,className:qe.image},f.id)}):b.jsx("img",{src:f.url,alt:f.name,className:qe.image},f.id)},f.id)),v&&b.jsx("div",{className:qe.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${m})`,backgroundImage:`url('${c}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const oa={element:ia,id:"control-image-reveal",name:"Click Gallery",preview:{type:"video",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7EQ3WSW43JG5YMC8B2HTPKT.mp4"},defaultSize:{width:"100%",height:"100%"},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,minWidth:58,maxWidth:108,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",minWidth:300,maxWidth:550}}},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:""}]}}}},aa="LightBox-module__hidden___9s-9x",la="LightBox-module__heroImage___sTxNF",sa="LightBox-module__background___rm9ml",ca="LightBox-module__editor___4ACaY",ua="LightBox-module__contentStyle___Bgnsq",pa="LightBox-module__imageStyle___tLIlB",da="LightBox-module__imgWrapper___LuFUp",ga="LightBox-module__contain___8-yaS",fa="LightBox-module__cover___hNvOG",ma="LightBox-module__caption___b6L2I",ha="LightBox-module__captionTextInner___rCGNH",ya="LightBox-module__lightboxSplide___XFuWC",va="LightBox-module__arrow___iz38X",ba="LightBox-module__arrowVertical___Zfz81",_a="LightBox-module__nextArrow___zkAQN",Sa="LightBox-module__arrowInner___p48sW",xa="LightBox-module__arrowIcon___3VaFf",Ca="LightBox-module__arrowImg___pNV88",wa="LightBox-module__mirror___pjeXc",Ea="LightBox-module__thumbsWrapper___GB-nU",Aa="LightBox-module__thumbsContainerVertical___wttk5",Ia="LightBox-module__thumbsContainer___osSma",Ta="LightBox-module__thumbsAlignStart___MO6tY",La="LightBox-module__thumbsAlignCenter___Q4sUx",Ra="LightBox-module__thumbsAlignEnd___p4y9R",ka="LightBox-module__thumbItem___HvnF3",Na="LightBox-module__closeButton___g2khP",ja="LightBox-module__fadeIn___0m5GW",Oa="LightBox-module__slideInLeft___gPYwC",Va="LightBox-module__slideInRight___S-pPp",$a="LightBox-module__slideInTop___DFdAj",Pa="LightBox-module__slideInBottom___m27kZ",Ba="LightBox-module__fadeOut___55qBR",Fa="LightBox-module__slideOutLeft___NvU7P",za="LightBox-module__slideOutRight___SK7eC",Da="LightBox-module__slideOutTop___Vgg0z",Wa="LightBox-module__slideOutBottom___nJ0Ef",Ma="LightBox-module__scaleSlide___vZriG",P={hidden:aa,heroImage:la,background:sa,editor:ca,contentStyle:ua,imageStyle:pa,imgWrapper:da,contain:ga,cover:fa,caption:ma,captionTextInner:ha,lightboxSplide:ya,arrow:va,arrowVertical:ba,nextArrow:_a,arrowInner:Sa,arrowIcon:xa,arrowImg:Ca,mirror:wa,thumbsWrapper:Ea,thumbsContainerVertical:Aa,thumbsContainer:Ia,thumbsAlignStart:Ta,thumbsAlignCenter:La,thumbsAlignEnd:Ra,thumbItem:ka,closeButton:Na,fadeIn:ja,slideInLeft:Oa,slideInRight:Va,slideInTop:$a,slideInBottom:Pa,fadeOut:Ba,slideOutLeft:Fa,slideOutRight:za,slideOutTop:Da,slideOutBottom:Wa,scaleSlide:Ma},Lt=(e,t,n)=>{const r={},[o,a]=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"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),o==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${B.scalingValue(t.x,n)}), calc(-50% + ${B.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${B.scalingValue(t.x,n)}, calc(-50% + ${B.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${B.scalingValue(t.x,n)}), ${B.scalingValue(t.y,n)})`:r.transform=`translate(${B.scalingValue(t.x,n)}, ${B.scalingValue(t.y,n)})`,r};function Mr(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 Jn(e){const t=e.getBoundingClientRect(),n=Mr(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,s=r/o,l=a/i;let p,u;l>s?(p=r,u=r/l):(u=o,p=o*l);const x=t.left+n.left,m=t.top+n.top,h=(r-p)/2+x,c=(o-u)/2+m;return{x:h,y:c,width:p,height:u}}function Zn(e){const t=e.getBoundingClientRect(),n=Mr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Qn(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 Ha(e,t){const n=(()=>{if(e==="fade in")return P.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return P.slideInLeft;case"right":return P.slideInRight;case"top":return P.slideInTop;case"bottom":return P.slideInBottom;default:return P.slideInRight}return P.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return P.fadeIn;if(e==="slide in")switch(t){case"left":return P.slideInLeft;case"right":return P.slideInRight;case"top":return P.slideInTop;case"bottom":return P.slideInBottom;default:return P.slideInRight}return P.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return P.fadeOut;if(e==="slide in")switch(t){case"left":return P.slideOutLeft;case"right":return P.slideOutRight;case"top":return P.slideOutTop;case"bottom":return P.slideOutBottom;default:return P.slideOutRight}return P.fadeOut})(),a=(()=>{if(e==="fade in")return P.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return P.slideOutLeft;case"right":return P.slideOutRight;case"top":return P.slideOutTop;case"bottom":return P.slideOutBottom;default:return P.slideOutRight}return P.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:a}}const Ua=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:a})=>{const[i,s]=D.useState(!1),{url:l}=e.thumbnailBlock.cover;return D.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),b.jsxs(b.Fragment,{children:[b.jsx("img",{src:l,alt:"Cover",className:P.heroImage,onClick:()=>s(!0)}),b.jsx(Ga,{isOpen:i,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},Ga=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:a,isEditor:i,metadata:s})=>{var z;const[l,p]=D.useState(0),[u,x]=D.useState(0),[m,h]=D.useState(!1),[c,d]=D.useState(!1),[w,v]=D.useState({}),g=D.useRef(null),C=D.useRef(null),W=D.useRef(null),F=D.useRef(!1),I=D.useRef(null),y=D.useRef(null),A=D.useRef(null),k=D.useRef(null),$=D.useRef(!1),E=D.useRef(null),[O,V]=D.useState(!1),{appear:G,triggers:M,slider:f,thumbnail:N,controls:T,area:R,caption:S,layout:j}=o.lightboxBlock,{appearClass:Y,backdropAppearClass:re,backdropDisappearClass:ne,disappearClass:me}=Ha(G.type,G.direction),L=(s==null?void 0:s.itemId)??null;D.useEffect(()=>{const _=()=>{setTimeout(()=>{var X,Q;(Q=(X=g.current)==null?void 0:X.splide)==null||Q.refresh()},16)},H=()=>{x(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",_),window.addEventListener("ArticleEditor.ComponentContent:change",H),()=>{window.removeEventListener("ArticleEditor.Layout:change",_),window.removeEventListener("ArticleEditor.ComponentContent:change",H)}},[]),D.useEffect(()=>{if(!e||!N.isActive){V(!1);return}const _=E.current;if(!_)return;const H=()=>{f.direction==="horiz"?V(_.scrollWidth>_.clientWidth):V(_.scrollHeight>_.clientHeight)};H();const X=new ResizeObserver(H);return X.observe(_),()=>X.disconnect()},[e,N.isActive,n.length,w,f.direction]);const J=D.useCallback(()=>{const _=window.matchMedia("(max-width: 768px)").matches,H=Qn(R.color);_&&!i&&H>.9&&(document.body.style.backgroundColor=""),h(!0),F.current=!0;const X=Q=>{Q.target===I.current&&Q.animationName&&(I.current&&y.current&&I.current.removeEventListener("animationend",y.current),y.current=null,F.current&&(F.current=!1,t()),h(!1))};I.current&&(y.current=X,I.current.addEventListener("animationend",X))},[t,R.color,i]),fe=(_,H,X)=>{var Q,ie;if(_){if(M.type==="click"&&M.switch==="image")M.repeat==="close"&&l===n.length-1?J():(Q=g.current)==null||Q.go("+1");else if(M.type==="click"&&M.switch==="50/50"){const ee=_.getBoundingClientRect(),q=H-ee.left,le=X-ee.top,ve=ee.width,ue=ee.height;let he;f.direction==="horiz"?he=q<ve/2?"-1":"+1":he=le<ue/2?"-1":"+1",(ie=g.current)==null||ie.go(he)}}},ae=_=>{if($.current){$.current=!1;return}const H=n[l],X=(H==null?void 0:H.image.objectFit)==="cover";let Q,ie;if("changedTouches"in _&&_.changedTouches.length>0)Q=_.changedTouches[0].clientX,ie=_.changedTouches[0].clientY;else if("clientX"in _)Q=_.clientX,ie=_.clientY;else return;let ee;if(X&&W.current){const q=Zn(W.current);ee=Q>=q.left&&Q<=q.right&&ie>=q.top&&ie<=q.bottom}else{const q=W.current?Jn(W.current):null;if(!q){_.target===_.currentTarget&&J();return}ee=Q>=q.x&&Q<=q.x+q.width&&ie>=q.y&&ie<=q.y+q.height}ee?fe(W.current,Q,ie):J()},Z=_=>{const H=_.target;(H.classList.contains(P.thumbsWrapper)||H.classList.contains(P.thumbsContainer))&&ae(_)};D.useEffect(()=>{if(!e)return;const _=H=>{var X,Q;if(H.key==="Escape"){J();return}if(H.key==="ArrowRight"){p(ie=>(ie+1)%Math.max(n.length,1)),(X=g.current)==null||X.go("+1");return}H.key==="ArrowLeft"&&(p(ie=>(ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=g.current)==null||Q.go("-1"))};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[e,J,n.length]),D.useEffect(()=>{if(e){if(p(0),x(H=>H+1),F.current=!1,h(!1),d(!1),v({}),!L)return;const _=new CustomEvent("page-overlay",{detail:{itemId:L}});window.dispatchEvent(_)}return()=>{I.current&&y.current&&(I.current.removeEventListener("animationend",y.current),y.current=null),d(!1)}},[e,L]),D.useEffect(()=>{C.current!==null&&C.current!==f.type&&x(_=>_+1),C.current=f.type},[f.type]),D.useEffect(()=>{if(!e)return;const _=document.body.style.overflow,H=window.matchMedia("(max-width: 768px)").matches,X=Qn(R.color);document.body.style.overflow="hidden",d(!1);const Q=ee=>{ee.target===I.current&&!F.current&&ee.animationName&&(H&&!i&&X>.9&&(document.body.style.backgroundColor=R.color),d(!0),I.current&&A.current&&I.current.removeEventListener("animationend",A.current),A.current=null)};I.current&&(A.current=Q,I.current.addEventListener("animationend",Q));const ie=ee=>{const q=ee.target;q&&(q.closest(`.${P.thumbsWrapper}`)||q.closest(`.${P.thumbsContainer}`))||f.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",ie,{passive:!1}),()=>{document.body.style.overflow=_,document.removeEventListener("touchmove",ie),I.current&&A.current&&(I.current.removeEventListener("animationend",A.current),A.current=null),d(!1)}},[e,i,R.color,f.type]),D.useEffect(()=>{if(!e)return;const _=H=>{var Q,ie;if(F.current){H.stopPropagation();return}if($.current){$.current=!1;return}const X=H.target;if(!(X&&(X.closest(`.${P.thumbsContainer}`)||X.closest(`.${P.thumbItem}`)))){if(f.type==="slide"&&M.type==="drag"&&((ie=(Q=g.current)==null?void 0:Q.splide)!=null&&ie.root)){const ee=g.current.splide.root;if(X&&(ee.contains(X)||ee===X))return}if(H.touches.length===0&&H.changedTouches.length>0){const ee=n[l],q=(ee==null?void 0:ee.image.objectFit)==="cover",le=H.changedTouches[0];let ve;if(q&&W.current){const ue=Zn(W.current);ve=le.clientX>=ue.left&&le.clientX<=ue.right&&le.clientY>=ue.top&&le.clientY<=ue.bottom}else{const ue=W.current?Jn(W.current):null;if(!ue)return;ve=le.clientX>=ue.x&&le.clientX<=ue.x+ue.width&&le.clientY>=ue.y&&le.clientY<=ue.y+ue.height}if(!ve){H.stopPropagation(),F.current=!0;const ue=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",ue,!0)};document.addEventListener("click",ue,!0),J()}}}};return document.addEventListener("touchend",_,{passive:!0}),()=>{document.removeEventListener("touchend",_)}},[e,J,l,n]);const _e=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&M.type==="drag";D.useEffect(()=>{var he,At;if(!e||!_e||!((At=(he=g.current)==null?void 0:he.splide)!=null&&At.root))return;const _=g.current.splide.root,H=30,X=(te,pe)=>{if(k.current){const Re=Math.abs(te-k.current.x),It=Math.abs(pe-k.current.y);(Re>0||It>0)&&($.current=!0)}},Q=te=>{k.current&&(te.preventDefault(),X(te.clientX,te.clientY))},ie=te=>{k.current&&te.touches.length>0&&(te.preventDefault(),X(te.touches[0].clientX,te.touches[0].clientY))},ee=(te,pe)=>{if(!k.current||!g.current){k.current=null;return}const Re=Math.abs(te-k.current.x),It=Math.abs(pe-k.current.y);It>H&&It>Re&&g.current.go(pe<k.current.y?"+1":"-1"),k.current=null},q=te=>{k.current&&ee(te.clientX,te.clientY),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("pointermove",Q)},le=te=>{if(k.current){if(te.changedTouches.length>0){const pe=te.changedTouches[0];ee(pe.clientX,pe.clientY)}document.removeEventListener("touchend",le),document.removeEventListener("touchcancel",le),document.removeEventListener("touchmove",ie)}},ve=te=>{k.current={x:te.clientX,y:te.clientY},$.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",q),document.addEventListener("pointercancel",q)},ue=te=>{te.touches.length>0&&(k.current={x:te.touches[0].clientX,y:te.touches[0].clientY},$.current=!1,document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",le),document.addEventListener("touchcancel",le))};return _.addEventListener("pointerdown",ve),_.addEventListener("touchstart",ue),()=>{_.removeEventListener("pointerdown",ve),_.removeEventListener("touchstart",ue),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",le),document.removeEventListener("touchcancel",le),k.current=null,$.current=!1}},[e,_e,u]);const de={backgroundColor:R.color,backdropFilter:`blur(${R.blur}px)`,animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?Hr.createPortal(b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:i?null:I,className:se(P.background,m?ne:re,{[P.editor]:i},{[P.hidden]:!e}),style:{...de,...c&&!i&&!m?{position:"absolute"}:{}}}),b.jsxs("div",{ref:i?I:null,className:se(P.contentStyle,m?me:Y,{[P.editor]:i},{[P.hidden]:!e}),style:{animationDuration:`${parseInt(G.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[b.jsx(zr,{onMove:_=>p(_.index),ref:g,className:P.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:M.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:M.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((_,H)=>{const X=Lt(j.position,j.offset,i),Q=`${B.scalingValue(j.padding.top,i)} ${B.scalingValue(j.padding.right,i)} ${B.scalingValue(j.padding.bottom,i)} ${B.scalingValue(j.padding.left,i)}`,ie=f.type==="scale"?(()=>{const{transform:ee,...q}=X;return{...q,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":ee||"none"}})():{...X,position:"absolute",padding:Q,boxSizing:"border-box"};return b.jsx(Dr,{children:b.jsx("div",{className:P.imgWrapper,onClick:ae,children:b.jsx("img",{ref:H===l?W:null,className:se(P.imageStyle,{[P.contain]:_.image.objectFit==="contain",[P.cover]:_.image.objectFit==="cover",[P.scaleSlide]:f.type==="scale"}),src:_.image.url,alt:_.image.name??"",style:{...ie,pointerEvents:_.image.objectFit==="contain"?"none":"auto"}})})},H)})},u),T.isActive&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:se(P.arrow,{[P.arrowVertical]:f.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:b.jsxs("button",{className:P.arrowInner,style:{transform:`translate(${B.scalingValue(T.offset.x,i)}, ${B.scalingValue(T.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${T.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=g.current)==null?void 0:_.go("-1")},"aria-label":"Previous",children:[T.arrowsImgUrl&&b.jsx(ut,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:se(P.arrowImg,P.mirror)}),!T.arrowsImgUrl&&b.jsx(er,{color:T.color,className:se(P.arrowIcon,P.arrowImg,P.mirror)})]})}),b.jsx("div",{className:se(P.arrow,P.nextArrow,{[P.arrowVertical]:f.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:b.jsxs("button",{className:P.arrowInner,style:{transform:`translate(${B.scalingValue(T.offset.x*(f.direction==="horiz"?-1:1),i)}, ${B.scalingValue(T.offset.y,i)}) scale(${T.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=g.current)==null?void 0:_.go("+1")},"aria-label":"Next",children:[T.arrowsImgUrl&&b.jsx(ut,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:P.arrowImg}),!T.arrowsImgUrl&&b.jsx(er,{color:T.color,className:se(P.arrowIcon,P.arrowImg)})]})})]}),R.closeIconUrl&&(()=>{const _=Lt(R.closeIconAlign,R.closeIconOffset,i),H=`scale(${R.closeIconScale})`,X=_.transform?`${_.transform} ${H}`:H;return b.jsx("button",{className:P.closeButton,style:{..._,transform:X},onClick:J,"aria-label":"Close lightbox",children:b.jsx(ut,{url:R.closeIconUrl,fill:R.closeIconColor??"#000000",hoverFill:R.closeIconHover??"#cccccc"})})})(),S&&S.isActive&&r.imageCaption&&((z=n[l])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:_,fontSettings:H,letterSpacing:X,textAlign:Q,wordSpacing:ie,fontSizeLineHeight:ee,textAppearance:q,color:le}=r.imageCaption;return b.jsx("div",{className:P.caption,style:{...Lt(S.alignment,S.offset,i),fontFamily:H.fontFamily,fontWeight:H.fontWeight,fontStyle:H.fontStyle,width:_.sizing==="auto"?"max-content":B.scalingValue(_.width,i),letterSpacing:B.scalingValue(X,i),wordSpacing:B.scalingValue(ie,i),textAlign:Q,fontSize:B.scalingValue(ee.fontSize,i),lineHeight:B.scalingValue(ee.lineHeight,i),textTransform:q.textTransform??"none",textDecoration:q.textDecoration??"none",fontVariant:q.fontVariant??"normal",color:le},onClick:ve=>ve.stopPropagation(),children:b.jsx("div",{"data-styles":"imageCaption",className:P.captionTextInner,style:{"--link-color":S.linkColor,"--link-hover-color":S.linkHoverColor},children:b.jsx(Wr,{content:n[l].imageCaption})})})})(),N.isActive&&(()=>{const[_,H]=N.position.split("-"),X=f.direction==="horiz"?`${_}-left`:N.position,Q=Lt(X,N.offset,i),ie=()=>{if(f.direction==="horiz"){if(H==="left")return"flex-start";if(H==="center")return"center";if(H==="right")return"flex-end"}else{if(_==="top")return"flex-start";if(_==="middle")return"center";if(_==="bottom")return"flex-end"}return"flex-start"};return b.jsx("div",{ref:E,className:P.thumbsWrapper,onClick:ee=>Z(ee),style:{position:i?"absolute":"fixed",...Q,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:b.jsx("div",{className:se(P.thumbsContainer,{[P.thumbsContainerVertical]:f.direction==="vert",[P.thumbsAlignStart]:N.align==="start",[P.thumbsAlignCenter]:N.align==="center",[P.thumbsAlignEnd]:N.align==="end"}),style:{gap:B.scalingValue(N.grid.gap,i),justifyContent:O?"flex-start":ie()},children:n.map((ee,q)=>{const le=q===l,ve=w[q],he=N.grid.size*(le?N.activeState.scale:1),At=()=>{if(N.fit!=="fit")return{};if(!ve)return f.direction==="horiz"?{height:B.scalingValue(he,i)}:{width:B.scalingValue(he,i)};const te=ve.width/ve.height;if(f.direction==="horiz"){const pe=he,Re=pe*te;return{width:B.scalingValue(Re,i),height:B.scalingValue(pe,i)}}else{const pe=he,Re=pe/te;return{width:B.scalingValue(pe,i),height:B.scalingValue(Re,i)}}};return b.jsx("button",{className:P.thumbItem,style:{...f.direction==="horiz"&&N.fit!=="fit"?{height:B.scalingValue(he,i)}:{},...f.direction==="vert"&&N.fit!=="fit"?{width:B.scalingValue(he,i)}:{},...N.fit==="cover"?{width:B.scalingValue(he,i),height:B.scalingValue(he,i)}:{},...At(),transition:le?"all 0.25s ease-out":"none",opacity:le?N.activeState.opacity/100:N.opacity/100,"--thumb-hover":N.activeState.opacity/100},onClick:te=>{var pe;te.stopPropagation(),p(q),(pe=g.current)==null||pe.go(q)},onMouseEnter:()=>{var te;N.triggers==="hov"&&((te=g.current)==null||te.go(q))},children:b.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:te=>{const pe=te.currentTarget;pe.naturalWidth&&pe.naturalHeight&&v(Re=>({...Re,[q]:{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%"}:{}}})},`${ee.image.name}-${q}`)})})})})()]})]}),document.getElementById(a)):null};function er({color:e,className:t}){return b.jsx("svg",{viewBox:"0 0 10 18",className:t,children:b.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:b.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 Ya={element:Ua,id:"lightbox",name:"Lightbox",preview:{type:"video",url:"https://cdn.cntrl.site/component-assets/lightbox.mp4"},defaultSize:{width:440,height:550},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,defaultWidth:500},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",minWidth:58,maxWidth:108},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",minWidth:300,maxWidth:550}}},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 Ke(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Xa(e){return`
|
|
7
|
+
.${e}-wrapper {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
width: 100%;
|
|
11
|
+
min-height: ${Ke(48)};
|
|
12
|
+
}
|
|
13
|
+
.${e}-form {
|
|
14
|
+
display: flex;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
.${e}-form.${e}-horizontal {
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
.${e}-form.${e}-vertical {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
.${e}-fields {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex: 1;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
}
|
|
29
|
+
.${e}-fields.${e}-horizontal {
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
}
|
|
32
|
+
.${e}-fields.${e}-vertical {
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
.${e}-field-group {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex: 1;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
}
|
|
41
|
+
.${e}-field-group.${e}-labeled {
|
|
42
|
+
gap: ${Ke(4)};
|
|
43
|
+
}
|
|
44
|
+
.${e}-field-label {
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
.${e}-input {
|
|
48
|
+
width: 100%;
|
|
49
|
+
line-height: 1.4;
|
|
50
|
+
background: transparent;
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
53
|
+
.${e}-input::placeholder {
|
|
54
|
+
color: var(--placeholder-color);
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
.${e}-input:focus {
|
|
58
|
+
border-color: #333;
|
|
59
|
+
}
|
|
60
|
+
.${e}-input[data-field-type="textarea"] {
|
|
61
|
+
resize: vertical;
|
|
62
|
+
min-height: 60px;
|
|
63
|
+
}
|
|
64
|
+
.${e}-input:disabled {
|
|
65
|
+
background: #f5f5f5;
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
.${e}-button {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
.${e}-success {
|
|
73
|
+
margin-top: ${Ke(8)};
|
|
74
|
+
font-size: ${Ke(14)};
|
|
75
|
+
color: #22c55e;
|
|
76
|
+
}
|
|
77
|
+
.${e}-error {
|
|
78
|
+
margin-top: ${Ke(8)};
|
|
79
|
+
font-size: ${Ke(14)};
|
|
80
|
+
color: #ef4444;
|
|
81
|
+
}
|
|
82
|
+
.${e}-overlay-anchor {
|
|
83
|
+
position: relative;
|
|
84
|
+
height: auto;
|
|
85
|
+
}
|
|
86
|
+
.${e}-gap-spacer {
|
|
87
|
+
flex: 0 0 auto;
|
|
88
|
+
align-self: stretch;
|
|
89
|
+
}
|
|
90
|
+
.${e}-fields-gap-spacer {
|
|
91
|
+
flex: 0 0 auto;
|
|
92
|
+
}
|
|
93
|
+
`}function qa({settings:e,isEditor:t,metadata:n}){const{prefix:r}=B.useScopedStyles(),{type:o="A",fieldsToShow:a=2,fields:i=[],buttonLabel:s="Sign up",input:l,button:p,gap:u=.008,fieldsGap:x=.008,label:m,buttonCorners:h,buttonStroke:c,inputCorners:d,inputStroke:w,buttonPadding:v,inputPadding:g,inputColor:C,inputTextColor:W,inputBorderColor:F,placeholderColor:I,buttonColor:y,buttonTextColor:A,buttonBorderColor:k,labelTextColor:$}=e,E=o==="A"?"horizontal":"vertical",O=o==="C",V=i.slice(0,Math.min(a,i.length)),M={...l?tn(l,t):void 0,borderStyle:"solid",borderRadius:B.scalingValue(d??0,t),borderWidth:B.scalingValue(w??0,t),paddingTop:B.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:B.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:B.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:B.scalingValue((g==null?void 0:g.left)??0,t),backgroundColor:C,color:W,borderColor:F,"--placeholder-color":I},f=p?tn(p,t):void 0,N=m?tn(m,t):void 0,[T,R]=D.useState(()=>Object.fromEntries(V.map(Z=>[Z.name,""]))),[S,j]=D.useState("idle"),[Y,re]=D.useState(null),ne=n==null?void 0:n.apiBase,me=n==null?void 0:n.projectId,L=n==null?void 0:n.pluginConfigId,J=!!(ne&&me&&L),fe=(Z,_e)=>{R(de=>({...de,[Z]:_e}))},ae=async Z=>{Z.preventDefault();const _e=Object.fromEntries(V.map(de=>{var z;return[de.name,((z=T[de.name])==null?void 0:z.trim())??""]}).filter(([,de])=>de));if(!(!J||Object.keys(_e).length===0)){j("submitting"),re(null);try{const de=`${ne}/projects/${me}/forms/${L}/submit`,z=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({..._e,pageUrl:typeof window<"u"?window.location.href:""})});if(!z.ok){const _=await z.text();throw new Error(_||`Request failed: ${z.status}`)}j("success"),R(Object.fromEntries(V.map(_=>[_.name,""])))}catch(de){j("error"),re(de instanceof Error?de.message:"Something went wrong")}}};return b.jsxs("div",{className:`${r}-wrapper`,children:[b.jsx("style",{children:Xa(r)}),b.jsxs("form",{onSubmit:ae,className:`${r}-form ${r}-${E}`,children:[b.jsx("div",{className:`${r}-fields ${r}-${E}`,children:V.map((Z,_e)=>b.jsxs(D.Fragment,{children:[b.jsxs("div",{className:`${r}-field-group${O?` ${r}-labeled`:""}`,children:[O&&b.jsx("span",{className:`${r}-field-label`,style:{...N,color:$},children:Z.label||Z.name}),Z.type==="textarea"?b.jsx("textarea",{name:Z.name,autoComplete:"off",value:T[Z.name]??"",onChange:de=>fe(Z.name,de.target.value),placeholder:Z.placeholder,className:`${r}-input`,style:M,rows:3,"data-field-type":"textarea"}):b.jsx("input",{type:Z.type==="phone"?"tel":Z.type==="email"?"email":"text",name:Z.name,autoComplete:"off",value:T[Z.name]??"",onChange:de=>fe(Z.name,de.target.value),placeholder:Z.placeholder,required:Z.type==="email",className:`${r}-input`,style:M})]}),_e<V.length-1&&b.jsx("div",{"data-axis":E==="horizontal"?"x":"y",className:`${r}-overlay-anchor ${r}-fields-gap-spacer`,"data-controls":"settings.fieldsGap",style:E==="horizontal"?{width:B.scalingValue(x,t),height:"auto"}:{height:B.scalingValue(x,t),width:"100%"}})]},_e))}),b.jsx("div",{"data-axis":E==="horizontal"?"x":"y",className:`${r}-overlay-anchor ${r}-gap-spacer`,"data-controls":"settings.gap",style:E==="horizontal"?{width:B.scalingValue(u,t)}:{height:B.scalingValue(u,t),width:"100%"}}),b.jsx("div",{className:`${r}-overlay-anchor`,children:b.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:B.scalingValue(h??0,t),borderWidth:B.scalingValue(c??0,t),paddingTop:B.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:B.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:B.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:B.scalingValue((v==null?void 0:v.left)??0,t),backgroundColor:y,color:A,borderColor:k},children:b.jsx("span",{className:`${r}-overlay-anchor`,style:f,children:S==="submitting"?"...":s})})})]}),S==="success"&&b.jsx("p",{className:`${r}-success`,children:"Thanks for subscribing!"}),S==="error"&&Y&&b.jsx("p",{className:`${r}-error`,role:"alert",children:Y})]})}function tn(e,t){var n,r,o;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:B.scalingValue(e.letterSpacing,t),wordSpacing:B.scalingValue(e.wordSpacing,t),fontSize:B.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?B.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant}}const Ka=`import React, { useState } from 'react';
|
|
94
|
+
import { CommonComponentProps } from '../props';
|
|
95
|
+
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
96
|
+
|
|
97
|
+
function sv(px: number): string {
|
|
98
|
+
return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function getCSS(P: string): string {
|
|
102
|
+
return \`
|
|
103
|
+
.\${P}-wrapper {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
width: 100%;
|
|
107
|
+
min-height: \${sv(48)};
|
|
108
|
+
}
|
|
109
|
+
.\${P}-form {
|
|
110
|
+
display: flex;
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
.\${P}-form.\${P}-horizontal {
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
align-items: center;
|
|
116
|
+
}
|
|
117
|
+
.\${P}-form.\${P}-vertical {
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
}
|
|
120
|
+
.\${P}-fields {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex: 1;
|
|
123
|
+
min-width: 0;
|
|
124
|
+
}
|
|
125
|
+
.\${P}-fields.\${P}-horizontal {
|
|
126
|
+
flex-direction: row;
|
|
127
|
+
}
|
|
128
|
+
.\${P}-fields.\${P}-vertical {
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
}
|
|
131
|
+
.\${P}-field-group {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
flex: 1;
|
|
135
|
+
min-width: 0;
|
|
136
|
+
}
|
|
137
|
+
.\${P}-field-group.\${P}-labeled {
|
|
138
|
+
gap: \${sv(4)};
|
|
139
|
+
}
|
|
140
|
+
.\${P}-field-label {
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
}
|
|
143
|
+
.\${P}-input {
|
|
144
|
+
width: 100%;
|
|
145
|
+
line-height: 1.4;
|
|
146
|
+
background: transparent;
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
.\${P}-input::placeholder {
|
|
150
|
+
color: var(--placeholder-color);
|
|
151
|
+
opacity: 1;
|
|
152
|
+
}
|
|
153
|
+
.\${P}-input:focus {
|
|
154
|
+
border-color: #333;
|
|
155
|
+
}
|
|
156
|
+
.\${P}-input[data-field-type="textarea"] {
|
|
157
|
+
resize: vertical;
|
|
158
|
+
min-height: 60px;
|
|
159
|
+
}
|
|
160
|
+
.\${P}-input:disabled {
|
|
161
|
+
background: #f5f5f5;
|
|
162
|
+
cursor: not-allowed;
|
|
163
|
+
}
|
|
164
|
+
.\${P}-button {
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
white-space: nowrap;
|
|
167
|
+
}
|
|
168
|
+
.\${P}-success {
|
|
169
|
+
margin-top: \${sv(8)};
|
|
170
|
+
font-size: \${sv(14)};
|
|
171
|
+
color: #22c55e;
|
|
172
|
+
}
|
|
173
|
+
.\${P}-error {
|
|
174
|
+
margin-top: \${sv(8)};
|
|
175
|
+
font-size: \${sv(14)};
|
|
176
|
+
color: #ef4444;
|
|
177
|
+
}
|
|
178
|
+
.\${P}-overlay-anchor {
|
|
179
|
+
position: relative;
|
|
180
|
+
height: auto;
|
|
181
|
+
}
|
|
182
|
+
.\${P}-gap-spacer {
|
|
183
|
+
flex: 0 0 auto;
|
|
184
|
+
align-self: stretch;
|
|
185
|
+
}
|
|
186
|
+
.\${P}-fields-gap-spacer {
|
|
187
|
+
flex: 0 0 auto;
|
|
188
|
+
}
|
|
189
|
+
\`;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
type FormProps = {
|
|
193
|
+
settings: FormSettings;
|
|
194
|
+
content?: unknown;
|
|
195
|
+
isEditor?: boolean;
|
|
196
|
+
onUpdateSettings?: (settings: FormSettings) => void;
|
|
197
|
+
} & CommonComponentProps;
|
|
198
|
+
|
|
199
|
+
export function Form({ settings, isEditor, metadata }: FormProps) {
|
|
200
|
+
const { prefix: P } = useScopedStyles();
|
|
201
|
+
const {
|
|
202
|
+
type = 'A',
|
|
203
|
+
fieldsToShow = 2,
|
|
204
|
+
fields = [],
|
|
205
|
+
buttonLabel = 'Sign up',
|
|
206
|
+
input: inputTextStyle,
|
|
207
|
+
button: buttonTextStyle,
|
|
208
|
+
gap = 0.008,
|
|
209
|
+
fieldsGap = 0.008,
|
|
210
|
+
label: labelTextStyle,
|
|
211
|
+
buttonCorners,
|
|
212
|
+
buttonStroke,
|
|
213
|
+
inputCorners,
|
|
214
|
+
inputStroke,
|
|
215
|
+
buttonPadding,
|
|
216
|
+
inputPadding,
|
|
217
|
+
inputColor,
|
|
218
|
+
inputTextColor,
|
|
219
|
+
inputBorderColor,
|
|
220
|
+
placeholderColor,
|
|
221
|
+
buttonColor,
|
|
222
|
+
buttonTextColor,
|
|
223
|
+
buttonBorderColor,
|
|
224
|
+
labelTextColor
|
|
225
|
+
} = settings;
|
|
226
|
+
|
|
227
|
+
const layout = type === 'A' ? 'horizontal' : 'vertical';
|
|
228
|
+
const showLabels = type === 'C';
|
|
229
|
+
const visibleFields = fields.slice(0, Math.min(fieldsToShow, fields.length));
|
|
230
|
+
const inputCss = inputTextStyle ? textStylesToCss(inputTextStyle, isEditor) : undefined;
|
|
231
|
+
const inputFieldCss = {
|
|
232
|
+
...inputCss,
|
|
233
|
+
borderStyle: 'solid',
|
|
234
|
+
borderRadius: scalingValue(inputCorners ?? 0, isEditor),
|
|
235
|
+
borderWidth: scalingValue(inputStroke ?? 0, isEditor),
|
|
236
|
+
paddingTop: scalingValue(inputPadding?.top ?? 0, isEditor),
|
|
237
|
+
paddingRight: scalingValue(inputPadding?.right ?? 0, isEditor),
|
|
238
|
+
paddingBottom: scalingValue(inputPadding?.bottom ?? 0, isEditor),
|
|
239
|
+
paddingLeft: scalingValue(inputPadding?.left ?? 0, isEditor),
|
|
240
|
+
backgroundColor: inputColor,
|
|
241
|
+
color: inputTextColor,
|
|
242
|
+
borderColor: inputBorderColor,
|
|
243
|
+
'--placeholder-color': placeholderColor,
|
|
244
|
+
} as React.CSSProperties;
|
|
245
|
+
const buttonTextCss = buttonTextStyle ? textStylesToCss(buttonTextStyle, isEditor) : undefined;
|
|
246
|
+
const labelTextCss = labelTextStyle ? textStylesToCss(labelTextStyle, isEditor) : undefined;
|
|
247
|
+
|
|
248
|
+
const [fieldValues, setFieldValues] = useState<Record<string, string>>(() =>
|
|
249
|
+
Object.fromEntries(visibleFields.map((f) => [f.name, '']))
|
|
250
|
+
);
|
|
251
|
+
const [status, setStatus] = useState<'idle' | 'submitting' | 'success' | 'error'>('idle');
|
|
252
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
253
|
+
|
|
254
|
+
const apiBase = metadata?.apiBase as string | undefined;
|
|
255
|
+
const projectId = metadata?.projectId as string | undefined;
|
|
256
|
+
const configId = metadata?.pluginConfigId as string | undefined;
|
|
257
|
+
const canSubmit = Boolean(apiBase && projectId && configId);
|
|
258
|
+
|
|
259
|
+
const handleFieldChange = (name: string, value: string) => {
|
|
260
|
+
setFieldValues((prev) => ({ ...prev, [name]: value }));
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const handleSubmit = async (e: React.FormEvent) => {
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
const payload = Object.fromEntries(
|
|
266
|
+
visibleFields.map((f) => [f.name, fieldValues[f.name]?.trim() ?? '']).filter(([, v]) => v)
|
|
267
|
+
);
|
|
268
|
+
if (!canSubmit || Object.keys(payload).length === 0) return;
|
|
269
|
+
|
|
270
|
+
setStatus('submitting');
|
|
271
|
+
setErrorMessage(null);
|
|
272
|
+
|
|
273
|
+
try {
|
|
274
|
+
const url = \`\${apiBase}/projects/\${projectId}/forms/\${configId}/submit\`;
|
|
275
|
+
const res = await fetch(url, {
|
|
276
|
+
method: 'POST',
|
|
277
|
+
headers: { 'Content-Type': 'application/json' },
|
|
278
|
+
body: JSON.stringify({
|
|
279
|
+
...payload,
|
|
280
|
+
pageUrl: typeof window !== 'undefined' ? window.location.href : '',
|
|
281
|
+
}),
|
|
282
|
+
});
|
|
283
|
+
if (!res.ok) {
|
|
284
|
+
const text = await res.text();
|
|
285
|
+
throw new Error(text || \`Request failed: \${res.status}\`);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
setStatus('success');
|
|
289
|
+
setFieldValues(Object.fromEntries(visibleFields.map((f) => [f.name, ''])));
|
|
290
|
+
} catch (err) {
|
|
291
|
+
setStatus('error');
|
|
292
|
+
setErrorMessage(err instanceof Error ? err.message : 'Something went wrong');
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
return (
|
|
297
|
+
<div className={\`\${P}-wrapper\`}>
|
|
298
|
+
<style>{getCSS(P)}</style>
|
|
299
|
+
<form
|
|
300
|
+
onSubmit={handleSubmit}
|
|
301
|
+
className={\`\${P}-form \${P}-\${layout}\`}
|
|
302
|
+
>
|
|
303
|
+
<div className={\`\${P}-fields \${P}-\${layout}\`}>
|
|
304
|
+
{visibleFields.map((field, index) => (
|
|
305
|
+
<React.Fragment key={index}>
|
|
306
|
+
<div className={\`\${P}-field-group\${showLabels ? \` \${P}-labeled\` : ''}\`}>
|
|
307
|
+
{showLabels && (
|
|
308
|
+
<span className={\`\${P}-field-label\`} style={{ ...labelTextCss, color: labelTextColor }}>
|
|
309
|
+
{field.label || field.name}
|
|
310
|
+
</span>
|
|
311
|
+
)}
|
|
312
|
+
{field.type === 'textarea' ? (
|
|
313
|
+
<textarea
|
|
314
|
+
name={field.name}
|
|
315
|
+
autoComplete="off"
|
|
316
|
+
value={fieldValues[field.name] ?? ''}
|
|
317
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
318
|
+
placeholder={field.placeholder}
|
|
319
|
+
className={\`\${P}-input\`}
|
|
320
|
+
style={inputFieldCss}
|
|
321
|
+
rows={3}
|
|
322
|
+
data-field-type="textarea"
|
|
323
|
+
/>
|
|
324
|
+
) : (
|
|
325
|
+
<input
|
|
326
|
+
type={field.type === 'phone' ? 'tel' : field.type === 'email' ? 'email' : 'text'}
|
|
327
|
+
name={field.name}
|
|
328
|
+
autoComplete="off"
|
|
329
|
+
value={fieldValues[field.name] ?? ''}
|
|
330
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
331
|
+
placeholder={field.placeholder}
|
|
332
|
+
required={field.type === 'email'}
|
|
333
|
+
className={\`\${P}-input\`}
|
|
334
|
+
style={inputFieldCss}
|
|
335
|
+
/>
|
|
336
|
+
)}
|
|
337
|
+
</div>
|
|
338
|
+
{index < visibleFields.length - 1 && (
|
|
339
|
+
<div
|
|
340
|
+
data-axis={layout === 'horizontal' ? 'x' : 'y'}
|
|
341
|
+
className={\`\${P}-overlay-anchor \${P}-fields-gap-spacer\`}
|
|
342
|
+
data-controls="settings.fieldsGap"
|
|
343
|
+
style={layout === 'horizontal'
|
|
344
|
+
? ({ width: scalingValue(fieldsGap, isEditor), height: 'auto' })
|
|
345
|
+
: ({ height: scalingValue(fieldsGap, isEditor), width: '100%' })}
|
|
346
|
+
/>
|
|
347
|
+
)}
|
|
348
|
+
</React.Fragment>
|
|
349
|
+
))}
|
|
350
|
+
</div>
|
|
351
|
+
<div
|
|
352
|
+
data-axis={layout === 'horizontal' ? 'x' : 'y'}
|
|
353
|
+
className={\`\${P}-overlay-anchor \${P}-gap-spacer\`}
|
|
354
|
+
data-controls="settings.gap"
|
|
355
|
+
style={layout === 'horizontal'
|
|
356
|
+
? ({ width: scalingValue(gap, isEditor) })
|
|
357
|
+
: ({ height: scalingValue(gap, isEditor), width: '100%' })}
|
|
358
|
+
/>
|
|
359
|
+
<div className={\`\${P}-overlay-anchor\`}>
|
|
360
|
+
<button
|
|
361
|
+
type="submit"
|
|
362
|
+
className={\`\${P}-button\`}
|
|
363
|
+
style={{
|
|
364
|
+
borderStyle: 'solid',
|
|
365
|
+
borderRadius: scalingValue(buttonCorners ?? 0, isEditor),
|
|
366
|
+
borderWidth: scalingValue(buttonStroke ?? 0, isEditor),
|
|
367
|
+
paddingTop: scalingValue(buttonPadding?.top ?? 0, isEditor),
|
|
368
|
+
paddingRight: scalingValue(buttonPadding?.right ?? 0, isEditor),
|
|
369
|
+
paddingBottom: scalingValue(buttonPadding?.bottom ?? 0, isEditor),
|
|
370
|
+
paddingLeft: scalingValue(buttonPadding?.left ?? 0, isEditor),
|
|
371
|
+
backgroundColor: buttonColor,
|
|
372
|
+
color: buttonTextColor,
|
|
373
|
+
borderColor: buttonBorderColor,
|
|
374
|
+
}}
|
|
375
|
+
>
|
|
376
|
+
<span className={\`\${P}-overlay-anchor\`} style={buttonTextCss}>
|
|
377
|
+
{status === 'submitting' ? '...' : buttonLabel}
|
|
378
|
+
</span>
|
|
379
|
+
</button>
|
|
380
|
+
</div>
|
|
381
|
+
</form>
|
|
382
|
+
{status === 'success' && <p className={\`\${P}-success\`}>Thanks for subscribing!</p>}
|
|
383
|
+
{status === 'error' && errorMessage && (
|
|
384
|
+
<p className={\`\${P}-error\`} role="alert">{errorMessage}</p>
|
|
385
|
+
)}
|
|
386
|
+
</div>
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export type FormFieldType = 'text' | 'textarea' | 'phone' | 'email';
|
|
391
|
+
|
|
392
|
+
export type FormFieldItem = {
|
|
393
|
+
name: string;
|
|
394
|
+
type: FormFieldType;
|
|
395
|
+
placeholder: string;
|
|
396
|
+
label?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
type TextStyles = {
|
|
400
|
+
fontSettings: {
|
|
401
|
+
fontFamily: string;
|
|
402
|
+
fontWeight: number;
|
|
403
|
+
fontStyle: string;
|
|
404
|
+
};
|
|
405
|
+
letterSpacing: number;
|
|
406
|
+
wordSpacing: number;
|
|
407
|
+
fontSize: number;
|
|
408
|
+
lineHeight?: number;
|
|
409
|
+
textAppearance?: {
|
|
410
|
+
textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
411
|
+
textDecoration?: 'none' | 'underline';
|
|
412
|
+
fontVariant?: 'normal' | 'small-caps';
|
|
413
|
+
};
|
|
414
|
+
color: string;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
type Padding = {
|
|
418
|
+
top?: number;
|
|
419
|
+
right?: number;
|
|
420
|
+
bottom?: number;
|
|
421
|
+
left?: number;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
type FormSettings = {
|
|
425
|
+
type: 'A' | 'B' | 'C';
|
|
426
|
+
fieldsToShow: number;
|
|
427
|
+
fields: FormFieldItem[];
|
|
428
|
+
buttonLabel?: string;
|
|
429
|
+
input?: TextStyles;
|
|
430
|
+
button?: TextStyles;
|
|
431
|
+
gap?: number;
|
|
432
|
+
fieldsGap?: number;
|
|
433
|
+
label?: TextStyles;
|
|
434
|
+
buttonCorners?: number;
|
|
435
|
+
buttonStroke?: number;
|
|
436
|
+
inputCorners?: number;
|
|
437
|
+
inputStroke?: number;
|
|
438
|
+
buttonPadding?: Padding;
|
|
439
|
+
inputPadding?: Padding;
|
|
440
|
+
inputColor: string;
|
|
441
|
+
inputTextColor: string;
|
|
442
|
+
inputBorderColor: string;
|
|
443
|
+
placeholderColor: string;
|
|
444
|
+
buttonColor: string;
|
|
445
|
+
buttonTextColor: string;
|
|
446
|
+
buttonBorderColor: string;
|
|
447
|
+
labelTextColor: string;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSProperties {
|
|
451
|
+
return {
|
|
452
|
+
fontFamily: textStyles.fontSettings.fontFamily,
|
|
453
|
+
fontWeight: textStyles.fontSettings.fontWeight,
|
|
454
|
+
fontStyle: textStyles.fontSettings.fontStyle,
|
|
455
|
+
letterSpacing: scalingValue(textStyles.letterSpacing, isEditor),
|
|
456
|
+
wordSpacing: scalingValue(textStyles.wordSpacing, isEditor),
|
|
457
|
+
fontSize: scalingValue(textStyles.fontSize, isEditor),
|
|
458
|
+
lineHeight: textStyles.lineHeight !== undefined ? scalingValue(textStyles.lineHeight, isEditor) : undefined,
|
|
459
|
+
textTransform: textStyles.textAppearance?.textTransform,
|
|
460
|
+
textDecoration: textStyles.textAppearance?.textDecoration,
|
|
461
|
+
fontVariant: textStyles.textAppearance?.fontVariant
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
`,Ja=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email"},{name:"name",type:"text",placeholder:"Enter your name",label:"Name"},{name:"company",type:"text",placeholder:"Enter company",label:"Company"},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone"},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3"}],nn={fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},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"]}}}},rn=e=>({fontSettings:{fontFamily:"Arial",fontWeight:e,fontStyle:"normal"},lineHeight:0,letterSpacing:0,wordSpacing:0,fontSize:.01,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),Za={type:"object",version:1,settings:{sizing:"auto",properties:{fieldsToShow:{type:"number",scope:"layout",title:"Fields",display:{type:"number"},min:1,max:8},fields:{type:"array",scope:"common",items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"}}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},inputColor:{type:"string",scope:"layout",title:"Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Text Color",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Border Color",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"layout",title:"Placeholder Color",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"layout",title:"Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Text Color",display:{type:"palette-color-picker"}},buttonBorderColor:{type:"string",scope:"layout",title:"Border Color",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"layout",title:"Text Color",display:{type:"palette-color-picker"}},labelBorderColor:{type:"string",scope:"layout",title:"Border Color",display:{type:"palette-color-picker"}},input:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["letterSpacing","wordSpacing","fontSize","lineHeight"]},"textAppearance"]},button:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["letterSpacing","wordSpacing","fontSize","lineHeight"]},"textAppearance"]},label:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["letterSpacing","wordSpacing","fontSize","lineHeight"]},"textAppearance"]}},defaults:{fieldsToShow:2,fields:Ja,type:"A",gap:.008,fieldsGap:.008,buttonStroke:.001,buttonCorners:0,inputStroke:.001,inputCorners:0,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputColor:"#000000",inputTextColor:"#999999",inputBorderColor:"#cccccc",buttonColor:"#666666",buttonTextColor:"#ffffff",buttonBorderColor:"#cccccc",labelTextColor:"#999999",input:rn(400),button:rn(700),label:rn(400)}},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__template__","fieldsToShow"]},"type",{type:"group",title:"BUTTON",items:[{type:"row",items:[{type:"switcher",title:"",options:{Button:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"Padding",items:["buttonPadding"]}],Input:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"Padding",items:["inputPadding"]}]}}]}]},{type:"row",items:["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"switcher",title:"",options:{Input:["input"],Button:["button"],Label:["label"]}}]}],allowedPlugins:"newsletter"},Qa={element:qa,id:"form",name:"Form",version:1,defaultSize:{width:400,height:42},schema:Za,sourceCode:Ka},el="OnelinerForm-module__wrapper___BCMAA",tl="OnelinerForm-module__form___ED-dE",nl="OnelinerForm-module__input___Dylt7",rl="OnelinerForm-module__submitBtn___aHZXa",il="OnelinerForm-module__success___KhwKm",ol="OnelinerForm-module__error___c8WbI",al="OnelinerForm-module__overlayAnchor___zxYKj",Pe={wrapper:el,form:tl,input:nl,submitBtn:rl,success:il,error:ol,overlayAnchor:al};function ll({settings:e,isEditor:t,metadata:n}){const{field:r={name:"email",type:"email",placeholder:"Your email"},buttonLabel:o="Submit",input:a,button:i,corners:s=40,stroke:l=1,strokeColor:p="#cccccc"}=e,[u,x]=D.useState(""),[m,h]=D.useState("idle"),[c,d]=D.useState(null),w=n==null?void 0:n.apiBase,v=n==null?void 0:n.projectId,g=!!(w&&v),C=a?tr(a,t):void 0,W=i?tr(i,t):void 0,F={borderRadius:B.scalingValue(s/1440,t),borderWidth:B.scalingValue(l/1440,t),borderStyle:"solid",borderColor:p},I={borderLeftWidth:B.scalingValue(l/1440,t),borderLeftStyle:"solid",borderLeftColor:p},y=async A=>{A.preventDefault();const k=u.trim();if(!(!g||!k)){h("submitting"),d(null);try{const $=await fetch(`${w}/projects/${v}/forms/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r.name]:k,pageUrl:typeof window<"u"?window.location.href:""})});if(!$.ok){const E=await $.text();throw new Error(E||`Request failed: ${$.status}`)}h("success"),x("")}catch($){h("error"),d($ instanceof Error?$.message:"Something went wrong")}}};return b.jsxs("div",{className:Pe.wrapper,children:[b.jsxs("form",{onSubmit:y,className:Pe.form,style:F,children:[b.jsx("div",{className:Pe.overlayAnchor,style:{flex:1,minWidth:0},children:b.jsx("input",{type:r.type==="email"?"email":r.type==="phone"?"tel":"text",name:r.name,autoComplete:"off",value:u,onChange:A=>x(A.target.value),placeholder:r.placeholder,required:r.type==="email",className:Pe.input,style:C})}),b.jsx("div",{className:Pe.overlayAnchor,children:b.jsx("button",{type:"submit",className:Pe.submitBtn,style:{...W,...I},children:m==="submitting"?"...":o})})]}),m==="success"&&b.jsx("p",{className:Pe.success,children:"Thanks for subscribing!"}),m==="error"&&c&&b.jsx("p",{className:Pe.error,role:"alert",children:c})]})}function tr(e,t){return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:B.scalingValue(e.letterSpacing,t),wordSpacing:B.scalingValue(e.wordSpacing,t),fontSize:B.scalingValue(e.fontSize,t),color:e.color}}const nr={fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},color:{type:"string",display:{type:"style-panel-color-picker"}}},rr=(e,t)=>({fontSettings:{fontFamily:"Arial",fontWeight:e,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,fontSize:.01,color:t}),sl={type:"object",version:1,settings:{properties:{field:{type:"object",scope:"common",title:"Field",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"}}},buttonLabel:{type:"string",scope:"common",title:"Button Label"},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:10},strokeColor:{type:"string",scope:"layout",title:"Border",display:{type:"style-panel-color-picker"}},input:{type:"object",scope:"layout",properties:nr},button:{type:"object",scope:"layout",properties:nr}},defaults:{field:{name:"email",type:"email",placeholder:"Your email"},buttonLabel:"Submit",corners:40,stroke:1,strokeColor:"#cccccc",input:rr(400,"#999999"),button:rr(400,"#666666")}},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__template__","corners"]},"stroke","strokeColor"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"switcher",title:"Element",options:{Input:["input"],Button:["button"]}}]}]},cl={element:ll,id:"oneliner-form",name:"Oneliner",version:1,defaultSize:{width:"50%",height:60},schema:sl},ul=[Zo,oa,Ya,Qa,cl];exports.components=ul;exports.isSchemaV1=Ur;
|