@cntrl-site/components 1.0.1-alpha.0 → 1.0.1-alpha.10
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 +1 -1
- package/dist/Components/Form/Form.d.ts +28 -4
- package/dist/Components/Form/FormComponent.d.ts +4 -0
- package/dist/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +1 -1
- package/dist/Components/OnelinerForm/OnelinerForm.d.ts +64 -4
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +10 -2
- package/dist/Components/utils/formFieldValidation.d.ts +9 -0
- package/dist/Components/utils/index.d.ts +2 -0
- package/dist/components.css +1 -1
- package/dist/index.js +366 -158
- package/dist/index.mjs +3149 -2392
- package/dist/types/SchemaV1.d.ts +20 -1
- package/dist/useScopedStyles-Bibm8h9Z.js +1 -0
- package/dist/useScopedStyles-Da2iLz5N.mjs +34 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +6 -3
- package/package.json +1 -1
- package/dist/useScopedStyles-b8cb4EW8.js +0 -1
- package/dist/useScopedStyles-c-B_XeP_.mjs +0 -15
package/dist/index.js
CHANGED
|
@@ -1,37 +1,26 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),D=require("react"),ue=require("classnames"),P=require("./useScopedStyles-b8cb4EW8.js"),Ur=require("react-dom");function Gr(e){return e.type==="object"&&e.version===1}const Yr="ControlSlider-module__wrapper___sHEkd",Xr="ControlSlider-module__hoverArrow___A-dOH",qr="ControlSlider-module__sliderItem___QQSkR",Kr="ControlSlider-module__sliderImage___9hRl-",Jr="ControlSlider-module__arrow___05ghY",Zr="ControlSlider-module__arrowVertical___tBfVN",Qr="ControlSlider-module__nextArrow___-30Yc",eo="ControlSlider-module__arrowInner___aEra3",to="ControlSlider-module__arrowIcon___S4ztF",no="ControlSlider-module__arrowImg___2dwJW",ro="ControlSlider-module__mirror___brd6U",oo="ControlSlider-module__pagination___bicLF",io="ControlSlider-module__paginationInner___bT-P-",ao="ControlSlider-module__paginationVertical___zYqKw",lo="ControlSlider-module__paginationItem___nTRbk",so="ControlSlider-module__dot___p1Qun",co="ControlSlider-module__activeDot___LHFaj",uo="ControlSlider-module__paginationInsideBottom___R3FWn",po="ControlSlider-module__paginationInsideTop___V-qb-",go="ControlSlider-module__paginationOutsideBottom___14w8D",fo="ControlSlider-module__paginationOutsideTop___SCLqB",mo="ControlSlider-module__paginationInsideLeft___yOBRZ",ho="ControlSlider-module__paginationInsideRight___Rtt3o",vo="ControlSlider-module__paginationOutsideLeft___lahaw",yo="ControlSlider-module__paginationOutsideRight___EtuQa",bo="ControlSlider-module__imgWrapper___UjEgB",_o="ControlSlider-module__captionBlock___dJ6-j",So="ControlSlider-module__captionTextWrapper___HFlpf",xo="ControlSlider-module__captionText___uGBVc",Co="ControlSlider-module__active___WZK4G",wo="ControlSlider-module__withPointerEvents___t-18M",Eo="ControlSlider-module__topLeftAlignment___zjnGM",Ao="ControlSlider-module__topCenterAlignment___gD1xW",To="ControlSlider-module__topRightAlignment___NMapS",Io="ControlSlider-module__middleLeftAlignment___OnUrY",$o="ControlSlider-module__middleCenterAlignment___Tdkl0",Lo="ControlSlider-module__middleRightAlignment___wEbfX",Ro="ControlSlider-module__bottomLeftAlignment___cTP2-",ko="ControlSlider-module__bottomCenterAlignment___c54fB",No="ControlSlider-module__bottomRightAlignment___kEwrz",Oo="ControlSlider-module__clickOverlay___DZA28",jo="ControlSlider-module__contain___pLyq7",Vo="ControlSlider-module__cover___KdDat",G={wrapper:Yr,hoverArrow:Xr,sliderItem:qr,sliderImage:Kr,arrow:Jr,arrowVertical:Zr,nextArrow:Qr,arrowInner:eo,arrowIcon:to,arrowImg:no,mirror:ro,pagination:oo,paginationInner:io,paginationVertical:ao,paginationItem:lo,dot:so,activeDot:co,paginationInsideBottom:uo,paginationInsideTop:po,paginationOutsideBottom:go,paginationOutsideTop:fo,paginationInsideLeft:mo,paginationInsideRight:ho,paginationOutsideLeft:vo,paginationOutsideRight:yo,imgWrapper:bo,captionBlock:_o,captionTextWrapper:So,captionText:xo,active:Co,withPointerEvents:wo,topLeftAlignment:Eo,topCenterAlignment:Ao,topRightAlignment:To,middleLeftAlignment:Io,middleCenterAlignment:$o,middleRightAlignment:Lo,bottomLeftAlignment:Ro,bottomCenterAlignment:ko,bottomRightAlignment:No,clickOverlay:Oo,contain:jo,cover:Vo};function Po(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 Bo(e,t,n){return t&&Po(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var On="(prefers-reduced-motion: reduce)",et=1,Fo=2,rt=3,at=4,bt=5,Lt=6,Ot=7,zo={CREATED:et,MOUNTED:Fo,IDLE:rt,MOVING:at,SCROLLING:bt,DRAGGING:Lt,DESTROYED:Ot};function Oe(e){e.length=0}function De(e,t,n){return Array.prototype.slice.call(e,t,n)}function se(e){return e.bind.apply(e,[null].concat(De(arguments,1)))}var ir=setTimeout,on=function(){};function jn(e){return requestAnimationFrame(e)}function Ft(e,t){return typeof t===e}function dt(e){return!mn(e)&&Ft("object",e)}var fn=Array.isArray,ar=se(Ft,"function"),Fe=se(Ft,"string"),_t=se(Ft,"undefined");function mn(e){return e===null}function lr(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function St(e){return fn(e)?e:[e]}function Se(e,t){St(e).forEach(t)}function hn(e,t){return e.indexOf(t)>-1}function Rt(e,t){return e.push.apply(e,St(t)),e}function Re(e,t,n){e&&Se(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Ae(e,t){Re(e,Fe(t)?t.split(" "):t,!0)}function xt(e,t){Se(t,e.appendChild.bind(e))}function vn(e,t){Se(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function gt(e,t){return lr(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function sr(e,t){var n=e?De(e.children):[];return t?n.filter(function(r){return gt(r,t)}):n}function Ct(e,t){return t?sr(e,t)[0]:e.firstElementChild}var ft=Object.keys;function Ge(e,t,n){return e&&(n?ft(e).reverse():ft(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function mt(e){return De(arguments,1).forEach(function(t){Ge(t,function(n,r){e[r]=t[r]})}),e}function Be(e){return De(arguments,1).forEach(function(t){Ge(t,function(n,r){fn(n)?e[r]=n.slice():dt(n)?e[r]=Be({},dt(e[r])?e[r]:{},n):e[r]=n})}),e}function Vn(e,t){Se(t||ft(e),function(n){delete e[n]})}function Te(e,t){Se(e,function(n){Se(t,function(r){n&&n.removeAttribute(r)})})}function Z(e,t,n){dt(t)?Ge(t,function(r,o){Z(e,o,r)}):Se(e,function(r){mn(n)||n===""?Te(r,t):r.setAttribute(t,String(n))})}function tt(e,t,n){var r=document.createElement(e);return t&&(Fe(t)?Ae(r,t):Z(r,t)),n&&xt(n,r),r}function Ce(e,t,n){if(_t(n))return getComputedStyle(e)[t];mn(n)||(e.style[t]=""+n)}function ht(e,t){Ce(e,"display",t)}function cr(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function we(e,t){return e.getAttribute(t)}function Pn(e,t){return e&&e.classList.contains(t)}function be(e){return e.getBoundingClientRect()}function Ye(e){Se(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ur(e){return Ct(new DOMParser().parseFromString(e,"text/html").body)}function Le(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function pr(e,t){return e&&e.querySelector(t)}function yn(e,t){return t?De(e.querySelectorAll(t)):[]}function ke(e,t){Re(e,t,!1)}function an(e){return e.timeStamp}function Ue(e){return Fe(e)?e:e?e+"px":""}var wt="splide",bn="data-"+wt;function ct(e,t){if(!e)throw new Error("["+wt+"] "+(t||""))}var ze=Math.min,jt=Math.max,Vt=Math.floor,vt=Math.ceil,ye=Math.abs;function dr(e,t,n){return ye(e-t)<n}function kt(e,t,n,r){var o=ze(t,n),a=jt(t,n);return r?o<e&&e<a:o<=e&&e<=a}function Ze(e,t,n){var r=ze(t,n),o=jt(t,n);return ze(jt(r,e),o)}function ln(e){return+(e>0)-+(e<0)}function sn(e,t){return Se(t,function(n){e=e.replace("%s",""+n)}),e}function _n(e){return e<10?"0"+e:""+e}var Bn={};function Do(e){return""+e+_n(Bn[e]=(Bn[e]||0)+1)}function gr(){var e=[];function t(i,s,l,p){o(i,s,function(c,x,m){var h="addEventListener"in c,u=h?c.removeEventListener.bind(c,x,l,p):c.removeListener.bind(c,l);h?c.addEventListener(x,l,p):c.addListener(l),e.push([c,x,m,l,u])})}function n(i,s,l){o(i,s,function(p,c,x){e=e.filter(function(m){return m[0]===p&&m[1]===c&&m[2]===x&&(!l||m[3]===l)?(m[4](),!1):!0})})}function r(i,s,l){var p,c=!0;return typeof CustomEvent=="function"?p=new CustomEvent(s,{bubbles:c,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(s,c,!1,l)),i.dispatchEvent(p),p}function o(i,s,l){Se(i,function(p){p&&Se(s,function(c){c.split(" ").forEach(function(x){var m=x.split(".");l(p,m[0],m[1])})})})}function a(){e.forEach(function(i){i[4]()}),Oe(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Me="mounted",cn="ready",je="move",lt="moved",Sn="click",fr="active",mr="inactive",hr="visible",vr="hidden",ge="refresh",ve="updated",ot="resize",zt="resized",yr="drag",br="dragging",_r="dragged",Dt="scroll",qe="scrolled",Mo="overflow",xn="destroy",Sr="arrows:mounted",xr="arrows:updated",Cr="pagination:mounted",wr="pagination:updated",Cn="navigation:mounted",wn="autoplay:play",Er="autoplay:playing",En="autoplay:pause",An="lazyload:loaded",Ar="sk",Tr="sh",Pt="ei";function pe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=gr();function r(a,i){n.bind(t,St(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),mt(n,{bus:t,on:r,off:se(n.unbind,t),emit:o})}function Mt(e,t,n,r){var o=Date.now,a,i=0,s,l=!0,p=0;function c(){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=jn(c)}}function x(w){w||u(),a=o()-(w?i*e:0),l=!1,s=jn(c)}function m(){l=!0}function h(){a=o(),i=0,n&&n(i)}function u(){s&&cancelAnimationFrame(s),i=0,s=0,l=!0}function d(w){e=w}function C(){return l}return{start:x,rewind:h,pause:m,cancel:u,set:d,isPaused:C}}function Wo(e){var t=e;function n(o){t=o}function r(o){return hn(St(o),t)}return{set:n,is:r}}function Ho(e,t){var n=Mt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Uo(e,t,n){var r=e.state,o=n.breakpoints||{},a=n.reducedMotion||{},i=gr(),s=[];function l(){var u=n.mediaQuery==="min";ft(o).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){c(o[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(a,On),x()}function p(u){u&&i.destroy()}function c(u,d){var C=matchMedia(d);i.bind(C,"change",x),s.push([u,C])}function x(){var u=r.is(Ot),d=n.direction,C=s.reduce(function(w,g){return Be(w,g[1].matches?g[0]:{})},{});Vn(n),h(C),n.destroy?e.destroy(n.destroy==="completely"):u?(p(!0),e.mount()):d!==n.direction&&e.refresh()}function m(u){matchMedia(On).matches&&(u?Be(n,a):Vn(n,ft(a)))}function h(u,d,C){Be(n,u),d&&Be(Object.getPrototypeOf(n),u),(C||!r.is(et))&&e.emit(ve,n)}return{setup:l,destroy:p,reduce:m,set:h}}var Wt="Arrow",Ht=Wt+"Left",Ut=Wt+"Right",Ir=Wt+"Up",$r=Wt+"Down",Fn="rtl",Gt="ttb",Kt={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ir,Ut],ArrowRight:[$r,Ht]};function Go(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,c){var x=Kt[p.toLowerCase()][l]||p;return c>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 Ne="role",nt="tabindex",Yo="disabled",Ee="aria-",Et=Ee+"controls",Lr=Ee+"current",zn=Ee+"selected",_e=Ee+"label",Tn=Ee+"labelledby",Rr=Ee+"hidden",In=Ee+"orientation",yt=Ee+"roledescription",Dn=Ee+"live",Mn=Ee+"busy",Wn=Ee+"atomic",$n=[Ne,nt,Yo,Et,Lr,_e,Tn,Rr,In,yt],Ie=wt+"__",We="is-",Jt=wt,Hn=Ie+"track",Xo=Ie+"list",Yt=Ie+"slide",kr=Yt+"--clone",qo=Yt+"__container",Ln=Ie+"arrows",Xt=Ie+"arrow",Nr=Xt+"--prev",Or=Xt+"--next",qt=Ie+"pagination",jr=qt+"__page",Ko=Ie+"progress",Jo=Ko+"__bar",Zo=Ie+"toggle",Qo=Ie+"spinner",ei=Ie+"sr",ti=We+"initialized",Xe=We+"active",Vr=We+"prev",Pr=We+"next",un=We+"visible",pn=We+"loading",Br=We+"focus-in",Fr=We+"overflow",ni=[Xe,un,Vr,Pr,pn,Br,Fr],ri={slide:Yt,clone:kr,arrows:Ln,arrow:Xt,prev:Nr,next:Or,pagination:qt,page:jr,spinner:Qo};function oi(e,t){if(ar(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!gt(n,t);)n=n.parentElement;return n}var ii=5,Un=200,zr="touchstart mousedown",Zt="touchmove mousemove",Qt="touchend touchcancel mouseup click";function ai(e,t,n){var r=pe(e),o=r.on,a=r.bind,i=e.root,s=n.i18n,l={},p=[],c=[],x=[],m,h,u;function d(){v(),M(),g()}function C(){o(ge,w),o(ge,d),o(ve,g),a(document,zr+" keydown",function(y){u=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Re(i,Br,!!u)})}function w(y){var E=$n.concat("style");Oe(p),ke(i,c),ke(m,x),Te([m,h],E),Te(i,y?E:["style",yt])}function g(){ke(i,c),ke(m,x),c=T(Jt),x=T(Hn),Ae(i,c),Ae(m,x),Z(i,_e,n.label),Z(i,Tn,n.labelledby)}function v(){m=F("."+Hn),h=Ct(m,"."+Xo),ct(m&&h,"A track/list element is missing."),Rt(p,sr(h,"."+Yt+":not(."+kr+")")),Ge({arrows:Ln,pagination:qt,prev:Nr,next:Or,bar:Jo,toggle:Zo},function(y,E){l[E]=F("."+y)}),mt(l,{root:i,track:m,list:h,slides:p})}function M(){var y=i.id||Do(wt),E=n.role;i.id=y,m.id=m.id||y+"-track",h.id=h.id||y+"-list",!we(i,Ne)&&i.tagName!=="SECTION"&&E&&Z(i,Ne,E),Z(i,yt,s.carousel),Z(h,Ne,"presentation")}function F(y){var E=pr(i,y);return E&&oi(E,"."+Jt)===i?E:void 0}function T(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===Jt&&Xe]}return mt(l,{setup:d,mount:C,destroy:w})}var it="slide",st="loop",At="fade";function li(e,t,n,r){var o=pe(e),a=o.on,i=o.emit,s=o.bind,l=e.Components,p=e.root,c=e.options,x=c.isNavigation,m=c.updateOnMove,h=c.i18n,u=c.pagination,d=c.slideFocus,C=l.Direction.resolve,w=we(r,"style"),g=we(r,_e),v=n>-1,M=Ct(r,"."+qo),F;function T(){v||(r.id=p.id+"-slide"+_n(t+1),Z(r,Ne,u?"tabpanel":"group"),Z(r,yt,h.slide),Z(r,_e,g||sn(h.slideLabel,[t+1,e.length]))),y()}function y(){s(r,"click",se(i,Sn,A)),s(r,"keydown",se(i,Ar,A)),a([lt,Tr,qe],$),a(Cn,k),m&&a(je,j)}function E(){F=!0,o.destroy(),ke(r,ni),Te(r,$n),Z(r,"style",w),Z(r,_e,g||"")}function k(){var L=e.splides.map(function(S){var R=S.splide.Components.Slides.getAt(t);return R?R.slide.id:""}).join(" ");Z(r,_e,sn(h.slideX,(v?n:t)+1)),Z(r,Et,L),Z(r,Ne,d?"button":""),d&&Te(r,yt)}function j(){F||$()}function $(){if(!F){var L=e.index;O(),B(),Re(r,Vr,t===L-1),Re(r,Pr,t===L+1)}}function O(){var L=U();L!==Pn(r,Xe)&&(Re(r,Xe,L),Z(r,Lr,x&&L||""),i(L?fr:mr,A))}function B(){var L=f(),S=!L&&(!U()||v);if(e.state.is([at,bt])||Z(r,Rr,S||""),Z(yn(r,c.focusableNodes||""),nt,S?-1:""),d&&Z(r,nt,S?-1:0),L!==Pn(r,un)&&(Re(r,un,L),i(L?hr:vr,A)),!L&&document.activeElement===r){var R=l.Slides.getAt(e.index);R&&cr(R.slide)}}function H(L,S,R){Ce(R&&M||r,L,S)}function U(){var L=e.index;return L===t||c.cloneStatus&&L===n}function f(){if(e.is(At))return U();var L=be(l.Elements.track),S=be(r),R=C("left",!0),X=C("right",!0);return Vt(L[R])<=vt(S[R])&&Vt(S[X])<=vt(L[X])}function N(L,S){var R=ye(L-t);return!v&&(c.rewind||e.is(st))&&(R=ze(R,e.length-R)),R<=S}var A={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:T,destroy:E,update:$,style:H,isWithin:N};return A}function si(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=r.bind,s=t.Elements,l=s.slides,p=s.list,c=[];function x(){m(),o(ge,h),o(ge,m)}function m(){l.forEach(function($,O){d($,O,-1)})}function h(){F(function($){$.destroy()}),Oe(c)}function u(){F(function($){$.update()})}function d($,O,B){var H=li(e,O,B,$);H.mount(),c.push(H),c.sort(function(U,f){return U.index-f.index})}function C($){return $?T(function(O){return!O.isClone}):c}function w($){var O=t.Controller,B=O.toIndex($),H=O.hasFocus()?1:n.perPage;return T(function(U){return kt(U.index,B,B+H-1)})}function g($){return T($)[0]}function v($,O){Se($,function(B){if(Fe(B)&&(B=ur(B)),lr(B)){var H=l[O];H?vn(B,H):xt(p,B),Ae(B,n.classes.slide),E(B,se(a,ot))}}),a(ge)}function M($){Ye(T($).map(function(O){return O.slide})),a(ge)}function F($,O){C(O).forEach($)}function T($){return c.filter(ar($)?$:function(O){return Fe($)?gt(O.slide,$):hn(St($),O.index)})}function y($,O,B){F(function(H){H.style($,O,B)})}function E($,O){var B=yn($,"img"),H=B.length;H?B.forEach(function(U){i(U,"load error",function(){--H||O()})}):O()}function k($){return $?l.length:c.length}function j(){return c.length>n.perPage}return{mount:x,destroy:h,update:u,register:d,get:C,getIn:w,getAt:g,add:v,remove:M,forEach:F,filter:T,style:y,getLength:k,isEnough:j}}function ci(e,t,n){var r=pe(e),o=r.on,a=r.bind,i=r.emit,s=t.Slides,l=t.Direction.resolve,p=t.Elements,c=p.root,x=p.track,m=p.list,h=s.getAt,u=s.style,d,C,w;function g(){v(),a(window,"resize load",Ho(se(i,ot))),o([ve,ge],v),o(ot,M)}function v(){d=n.direction===Gt,Ce(c,"maxWidth",Ue(n.width)),Ce(x,l("paddingLeft"),F(!1)),Ce(x,l("paddingRight"),F(!0)),M(!0)}function M(A){var L=be(c);(A||C.width!==L.width||C.height!==L.height)&&(Ce(x,"height",T()),u(l("marginRight"),Ue(n.gap)),u("width",E()),u("height",k(),!0),C=L,i(zt),w!==(w=N())&&(Re(c,Fr,w),i(Mo,w)))}function F(A){var L=n.padding,S=l(A?"right":"left");return L&&Ue(L[S]||(dt(L)?0:L))||"0px"}function T(){var A="";return d&&(A=y(),ct(A,"height or heightRatio is missing."),A="calc("+A+" - "+F(!1)+" - "+F(!0)+")"),A}function y(){return Ue(n.height||be(m).width*n.heightRatio)}function E(){return n.autoWidth?null:Ue(n.fixedWidth)||(d?"":j())}function k(){return Ue(n.fixedHeight)||(d?n.autoHeight?null:j():y())}function j(){var A=Ue(n.gap);return"calc((100%"+(A&&" + "+A)+")/"+(n.perPage||1)+(A&&" - "+A)+")"}function $(){return be(m)[l("width")]}function O(A,L){var S=h(A||0);return S?be(S.slide)[l("width")]+(L?0:U()):0}function B(A,L){var S=h(A);if(S){var R=be(S.slide)[l("right")],X=be(m)[l("left")];return ye(R-X)+(L?0:U())}return 0}function H(A){return B(e.length-1)-B(0)+O(0,A)}function U(){var A=h(0);return A&&parseFloat(Ce(A.slide,l("marginRight")))||0}function f(A){return parseFloat(Ce(x,l("padding"+(A?"Right":"Left"))))||0}function N(){return e.is(At)||H(!0)>$()}return{mount:g,resize:M,listSize:$,slideSize:O,sliderSize:H,totalSize:B,getPadding:f,isOverflow:N}}var ui=2;function pi(e,t,n){var r=pe(e),o=r.on,a=t.Elements,i=t.Slides,s=t.Direction.resolve,l=[],p;function c(){o(ge,x),o([ve,ot],h),(p=C())&&(u(p),t.Layout.resize(!0))}function x(){m(),c()}function m(){Ye(l),Oe(l),r.destroy()}function h(){var w=C();p!==w&&(p<w||!w)&&r.emit(ge)}function u(w){var g=i.get().slice(),v=g.length;if(v){for(;g.length<w;)Rt(g,g);Rt(g.slice(-w),g.slice(0,w)).forEach(function(M,F){var T=F<w,y=d(M.slide,F);T?vn(y,g[0].slide):xt(a.list,y),Rt(l,y),i.register(y,F-w+(T?0:v),M.index)})}}function d(w,g){var v=w.cloneNode(!0);return Ae(v,n.classes.clone),v.id=e.root.id+"-clone"+_n(g+1),v}function C(){var w=n.clones;if(!e.is(st))w=0;else if(_t(w)){var g=n[s("fixedWidth")]&&t.Layout.slideSize(0),v=g&&vt(be(a.track)[s("width")]/g);w=v||n[s("autoWidth")]&&e.length||n.perPage*ui}return w}return{mount:c,destroy:m}}function di(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=e.state.set,s=t.Layout,l=s.slideSize,p=s.getPadding,c=s.totalSize,x=s.listSize,m=s.sliderSize,h=t.Direction,u=h.resolve,d=h.orient,C=t.Elements,w=C.list,g=C.track,v;function M(){v=t.Transition,o([Me,zt,ve,ge],F)}function F(){t.Controller.isBusy()||(t.Scroll.cancel(),y(e.index),t.Slides.update())}function T(S,R,X,ie){S!==R&&A(S>X)&&($(),E(j(H(),S>X),!0)),i(at),a(je,R,X,S),v.start(R,function(){i(rt),a(lt,R,X,S),ie&&ie()})}function y(S){E(B(S,!0))}function E(S,R){if(!e.is(At)){var X=R?S:k(S);Ce(w,"transform","translate"+u("X")+"("+X+"px)"),S!==X&&a(Tr)}}function k(S){if(e.is(st)){var R=O(S),X=R>t.Controller.getEnd(),ie=R<0;(ie||X)&&(S=j(S,X))}return S}function j(S,R){var X=S-N(R),ie=m();return S-=d(ie*(vt(ye(X)/ie)||1))*(R?1:-1),S}function $(){E(H(),!0),v.cancel()}function O(S){for(var R=t.Slides.get(),X=0,ie=1/0,re=0;re<R.length;re++){var he=R[re].index,I=ye(B(he,!0)-S);if(I<=ie)ie=I,X=he;else break}return X}function B(S,R){var X=d(c(S-1)-f(S));return R?U(X):X}function H(){var S=u("left");return be(w)[S]-be(g)[S]+d(p(!1))}function U(S){return n.trimSpace&&e.is(it)&&(S=Ze(S,0,d(m(!0)-x()))),S}function f(S){var R=n.focus;return R==="center"?(x()-l(S,!0))/2:+R*l(S)||0}function N(S){return B(S?t.Controller.getEnd():0,!!n.trimSpace)}function A(S){var R=d(j(H(),S));return S?R>=0:R<=w[u("scrollWidth")]-be(g)[u("width")]}function L(S,R){R=_t(R)?H():R;var X=S!==!0&&d(R)<d(N(!1)),ie=S!==!1&&d(R)>d(N(!0));return X||ie}return{mount:M,move:T,jump:y,translate:E,shift:j,cancel:$,toIndex:O,toPosition:B,getPosition:H,getLimit:N,exceededLimit:L,reposition:F}}function gi(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=t.Move,s=i.getPosition,l=i.getLimit,p=i.toPosition,c=t.Slides,x=c.isEnough,m=c.getLength,h=n.omitEnd,u=e.is(st),d=e.is(it),C=se(H,!1),w=se(H,!0),g=n.start||0,v,M=g,F,T,y;function E(){k(),o([ve,ge,Pt],k),o(zt,j)}function k(){F=m(!0),T=n.perMove,y=n.perPage,v=A();var I=Ze(g,0,h?v:F-1);I!==g&&(g=I,i.reposition())}function j(){v!==A()&&a(Pt)}function $(I,K,fe){if(!he()){var le=B(I),me=N(le);me>-1&&(K||me!==g)&&(X(me),i.move(le,me,M,fe))}}function O(I,K,fe,le){t.Scroll.scroll(I,K,fe,function(){var me=N(i.toIndex(s()));X(h?ze(me,v):me),le&&le()})}function B(I){var K=g;if(Fe(I)){var fe=I.match(/([+\-<>])(\d+)?/)||[],le=fe[1],me=fe[2];le==="+"||le==="-"?K=U(g+ +(""+le+(+me||1)),g):le===">"?K=me?L(+me):C(!0):le==="<"&&(K=w(!0))}else K=u?I:Ze(I,0,v);return K}function H(I,K){var fe=T||(re()?1:y),le=U(g+fe*(I?-1:1),g,!(T||re()));return le===-1&&d&&!dr(s(),l(!I),1)?I?0:v:K?le:N(le)}function U(I,K,fe){if(x()||re()){var le=f(I);le!==I&&(K=I,I=le,fe=!1),I<0||I>v?!T&&(kt(0,I,K,!0)||kt(v,K,I,!0))?I=L(S(I)):u?I=fe?I<0?-(F%y||y):F:I:n.rewind?I=I<0?v:0:I=-1:fe&&I!==K&&(I=L(S(K)+(I<K?-1:1)))}else I=-1;return I}function f(I){if(d&&n.trimSpace==="move"&&I!==g)for(var K=s();K===p(I,!0)&&kt(I,0,e.length-1,!n.rewind);)I<g?--I:++I;return I}function N(I){return u?(I+F)%F||0:I}function A(){for(var I=F-(re()||u&&T?1:y);h&&I-- >0;)if(p(F-1,!0)!==p(I,!0)){I++;break}return Ze(I,0,F-1)}function L(I){return Ze(re()?I:y*I,0,v)}function S(I){return re()?ze(I,v):Vt((I>=v?F-1:I)/y)}function R(I){var K=i.toIndex(I);return d?Ze(K,0,v):K}function X(I){I!==g&&(M=g,g=I)}function ie(I){return I?M:g}function re(){return!_t(n.focus)||n.isNavigation}function he(){return e.state.is([at,bt])&&!!n.waitForTransition}return{mount:E,go:$,scroll:O,getNext:C,getPrev:w,getAdjacent:H,getEnd:A,setIndex:X,getIndex:ie,toIndex:L,toPage:S,toDest:R,hasFocus:re,isBusy:he}}var fi="http://www.w3.org/2000/svg",mi="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",It=40;function hi(e,t,n){var r=pe(e),o=r.on,a=r.bind,i=r.emit,s=n.classes,l=n.i18n,p=t.Elements,c=t.Controller,x=p.arrows,m=p.track,h=x,u=p.prev,d=p.next,C,w,g={};function v(){F(),o(ve,M)}function M(){T(),v()}function F(){var O=n.arrows;O&&!(u&&d)&&k(),u&&d&&(mt(g,{prev:u,next:d}),ht(h,O?"":"none"),Ae(h,w=Ln+"--"+n.direction),O&&(y(),$(),Z([u,d],Et,m.id),i(Sr,u,d)))}function T(){r.destroy(),ke(h,w),C?(Ye(x?[u,d]:h),u=d=null):Te([u,d],$n)}function y(){o([Me,lt,ge,qe,Pt],$),a(d,"click",se(E,">")),a(u,"click",se(E,"<"))}function E(O){c.go(O,!0)}function k(){h=x||tt("div",s.arrows),u=j(!0),d=j(!1),C=!0,xt(h,[u,d]),!x&&vn(h,m)}function j(O){var B='<button class="'+s.arrow+" "+(O?s.prev:s.next)+'" type="button"><svg xmlns="'+fi+'" viewBox="0 0 '+It+" "+It+'" width="'+It+'" height="'+It+'" focusable="false"><path d="'+(n.arrowPath||mi)+'" />';return ur(B)}function $(){if(u&&d){var O=e.index,B=c.getPrev(),H=c.getNext(),U=B>-1&&O<B?l.last:l.prev,f=H>-1&&O>H?l.first:l.next;u.disabled=B<0,d.disabled=H<0,Z(u,_e,U),Z(d,_e,f),i(xr,u,d,B,H)}}return{arrows:g,mount:v,destroy:T,update:$}}var vi=bn+"-interval";function yi(e,t,n){var r=pe(e),o=r.on,a=r.bind,i=r.emit,s=Mt(n.interval,e.go.bind(e,">"),y),l=s.isPaused,p=t.Elements,c=t.Elements,x=c.root,m=c.toggle,h=n.autoplay,u,d,C=h==="pause";function w(){h&&(g(),m&&Z(m,Et,p.track.id),C||v(),T())}function g(){n.pauseOnHover&&a(x,"mouseenter mouseleave",function(k){u=k.type==="mouseenter",F()}),n.pauseOnFocus&&a(x,"focusin focusout",function(k){d=k.type==="focusin",F()}),m&&a(m,"click",function(){C?v():M(!0)}),o([je,Dt,ge],s.rewind),o(je,E)}function v(){l()&&t.Slides.isEnough()&&(s.start(!n.resetProgress),d=u=C=!1,T(),i(wn))}function M(k){k===void 0&&(k=!0),C=!!k,T(),l()||(s.pause(),i(En))}function F(){C||(u||d?M(!1):v())}function T(){m&&(Re(m,Xe,!C),Z(m,_e,n.i18n[C?"play":"pause"]))}function y(k){var j=p.bar;j&&Ce(j,"width",k*100+"%"),i(Er,k)}function E(k){var j=t.Slides.getAt(k);s.set(j&&+we(j.slide,vi)||n.interval)}return{mount:w,destroy:s.cancel,play:v,pause:M,isPaused:l}}function bi(e,t,n){var r=pe(e),o=r.on;function a(){n.cover&&(o(An,se(s,!0)),o([Me,ve,ge],se(i,!0)))}function i(l){t.Slides.forEach(function(p){var c=Ct(p.container||p.slide,"img");c&&c.src&&s(l,c,p)})}function s(l,p,c){c.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),ht(p,l?"none":"")}return{mount:a,destroy:se(i,!1)}}var _i=10,Si=600,xi=.6,Ci=1.5,wi=800;function Ei(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=e.state.set,s=t.Move,l=s.getPosition,p=s.getLimit,c=s.exceededLimit,x=s.translate,m=e.is(it),h,u,d=1;function C(){o(je,M),o([ve,ge],F)}function w(y,E,k,j,$){var O=l();if(M(),k&&(!m||!c())){var B=t.Layout.sliderSize(),H=ln(y)*B*Vt(ye(y)/B)||0;y=s.toPosition(t.Controller.toDest(y%B))+H}var U=dr(O,y,1);d=1,E=U?0:E||jt(ye(y-O)/Ci,wi),u=j,h=Mt(E,g,se(v,O,y,$),1),i(bt),a(Dt),h.start()}function g(){i(rt),u&&u(),a(qe)}function v(y,E,k,j){var $=l(),O=y+(E-y)*T(j),B=(O-$)*d;x($+B),m&&!k&&c()&&(d*=xi,ye(B)<_i&&w(p(c(!0)),Si,!1,u,!0))}function M(){h&&h.cancel()}function F(){h&&!h.isPaused()&&(M(),g())}function T(y){var E=n.easingFunc;return E?E(y):1-Math.pow(1-y,4)}return{mount:C,destroy:M,scroll:w,cancel:F}}var Qe={passive:!1,capture:!0};function Ai(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=r.bind,s=r.unbind,l=e.state,p=t.Move,c=t.Scroll,x=t.Controller,m=t.Elements.track,h=t.Media.reduce,u=t.Direction,d=u.resolve,C=u.orient,w=p.getPosition,g=p.exceededLimit,v,M,F,T,y,E=!1,k,j,$;function O(){i(m,Zt,on,Qe),i(m,Qt,on,Qe),i(m,zr,H,Qe),i(m,"click",N,{capture:!0}),i(m,"dragstart",Le),o([Me,ve],B)}function B(){var z=n.drag;He(!z),T=z==="free"}function H(z){if(k=!1,!j){var _=me(z);le(z.target)&&(_||!z.button)&&(x.isBusy()?Le(z,!0):($=_?m:window,y=l.is([at,bt]),F=null,i($,Zt,U,Qe),i($,Qt,f,Qe),p.cancel(),c.cancel(),A(z)))}}function U(z){if(l.is(Lt)||(l.set(Lt),a(yr)),z.cancelable)if(y){p.translate(v+fe(re(z)));var _=he(z)>Un,W=E!==(E=g());(_||W)&&A(z),k=!0,a(br),Le(z)}else R(z)&&(y=S(z),Le(z))}function f(z){l.is(Lt)&&(l.set(rt),a(_r)),y&&(L(z),Le(z)),s($,Zt,U),s($,Qt,f),y=!1}function N(z){!j&&k&&Le(z,!0)}function A(z){F=M,M=z,v=w()}function L(z){var _=X(z),W=ie(_),Y=n.rewind&&n.rewindByDrag;h(!1),T?x.scroll(W,0,n.snap):e.is(At)?x.go(C(ln(_))<0?Y?"<":"-":Y?">":"+"):e.is(it)&&E&&Y?x.go(g(!0)?">":"<"):x.go(x.toDest(W),!0),h(!0)}function S(z){var _=n.dragMinThreshold,W=dt(_),Y=W&&_.mouse||0,J=(W?_.touch:+_)||10;return ye(re(z))>(me(z)?J:Y)}function R(z){return ye(re(z))>ye(re(z,!0))}function X(z){if(e.is(st)||!E){var _=he(z);if(_&&_<Un)return re(z)/_}return 0}function ie(z){return w()+ln(z)*ze(ye(z)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function re(z,_){return K(z,_)-K(I(z),_)}function he(z){return an(z)-an(I(z))}function I(z){return M===z&&F||M}function K(z,_){return(me(z)?z.changedTouches[0]:z)["page"+d(_?"Y":"X")]}function fe(z){return z/(E&&e.is(it)?ii:1)}function le(z){var _=n.noDrag;return!gt(z,"."+jr+", ."+Xt)&&(!_||!gt(z,_))}function me(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function Ve(){return y}function He(z){j=z}return{mount:O,disable:He,isDragging:Ve}}var Ti={Spacebar:" ",Right:Ut,Left:Ht,Up:Ir,Down:$r};function Rn(e){return e=Fe(e)?e:e.key,Ti[e]||e}var Gn="keydown";function Ii(e,t,n){var r=pe(e),o=r.on,a=r.bind,i=r.unbind,s=e.root,l=t.Direction.resolve,p,c;function x(){m(),o(ve,h),o(ve,m),o(je,d)}function m(){var w=n.keyboard;w&&(p=w==="global"?window:s,a(p,Gn,C))}function h(){i(p,Gn)}function u(w){c=w}function d(){var w=c;c=!0,ir(function(){c=w})}function C(w){if(!c){var g=Rn(w);g===l(Ht)?e.go("<"):g===l(Ut)&&e.go(">")}}return{mount:x,destroy:h,disable:u}}var ut=bn+"-lazy",Nt=ut+"-srcset",$i="["+ut+"], ["+Nt+"]";function Li(e,t,n){var r=pe(e),o=r.on,a=r.off,i=r.bind,s=r.emit,l=n.lazyLoad==="sequential",p=[lt,qe],c=[];function x(){n.lazyLoad&&(m(),o(ge,m))}function m(){Oe(c),h(),l?w():(a(p),o(p,u),u())}function h(){t.Slides.forEach(function(g){yn(g.slide,$i).forEach(function(v){var M=we(v,ut),F=we(v,Nt);if(M!==v.src||F!==v.srcset){var T=n.classes.spinner,y=v.parentElement,E=Ct(y,"."+T)||tt("span",T,y);c.push([v,g,E]),v.src||ht(v,"none")}})})}function u(){c=c.filter(function(g){var v=n.perPage*((n.preloadPages||1)+1)-1;return g[1].isWithin(e.index,v)?d(g):!0}),c.length||a(p)}function d(g){var v=g[0];Ae(g[1].slide,pn),i(v,"load error",se(C,g)),Z(v,"src",we(v,ut)),Z(v,"srcset",we(v,Nt)),Te(v,ut),Te(v,Nt)}function C(g,v){var M=g[0],F=g[1];ke(F.slide,pn),v.type!=="error"&&(Ye(g[2]),ht(M,""),s(An,M,F),s(ot)),l&&w()}function w(){c.length&&d(c.shift())}return{mount:x,destroy:se(Oe,c),check:u}}function Ri(e,t,n){var r=pe(e),o=r.on,a=r.emit,i=r.bind,s=t.Slides,l=t.Elements,p=t.Controller,c=p.hasFocus,x=p.getIndex,m=p.go,h=t.Direction.resolve,u=l.pagination,d=[],C,w;function g(){v(),o([ve,ge,Pt],g);var j=n.pagination;u&&ht(u,j?"":"none"),j&&(o([je,Dt,qe],k),M(),k(),a(Cr,{list:C,items:d},E(e.index)))}function v(){C&&(Ye(u?De(C.children):C),ke(C,w),Oe(d),C=null),r.destroy()}function M(){var j=e.length,$=n.classes,O=n.i18n,B=n.perPage,H=c()?p.getEnd()+1:vt(j/B);C=u||tt("ul",$.pagination,l.track.parentElement),Ae(C,w=qt+"--"+y()),Z(C,Ne,"tablist"),Z(C,_e,O.select),Z(C,In,y()===Gt?"vertical":"");for(var U=0;U<H;U++){var f=tt("li",null,C),N=tt("button",{class:$.page,type:"button"},f),A=s.getIn(U).map(function(S){return S.slide.id}),L=!c()&&B>1?O.pageX:O.slideX;i(N,"click",se(F,U)),n.paginationKeyboard&&i(N,"keydown",se(T,U)),Z(f,Ne,"presentation"),Z(N,Ne,"tab"),Z(N,Et,A.join(" ")),Z(N,_e,sn(L,U+1)),Z(N,nt,-1),d.push({li:f,button:N,page:U})}}function F(j){m(">"+j,!0)}function T(j,$){var O=d.length,B=Rn($),H=y(),U=-1;B===h(Ut,!1,H)?U=++j%O:B===h(Ht,!1,H)?U=(--j+O)%O:B==="Home"?U=0:B==="End"&&(U=O-1);var f=d[U];f&&(cr(f.button),m(">"+U),Le($,!0))}function y(){return n.paginationDirection||n.direction}function E(j){return d[p.toPage(j)]}function k(){var j=E(x(!0)),$=E(x());if(j){var O=j.button;ke(O,Xe),Te(O,zn),Z(O,nt,-1)}if($){var B=$.button;Ae(B,Xe),Z(B,zn,!0),Z(B,nt,"")}a(wr,{list:C,items:d},j,$)}return{items:d,mount:g,destroy:v,getAt:E,update:k}}var ki=[" ","Enter"];function Ni(e,t,n){var r=n.isNavigation,o=n.slideFocus,a=[];function i(){e.splides.forEach(function(u){u.isParent||(p(e,u.splide),p(u.splide,e))}),r&&c()}function s(){a.forEach(function(u){u.destroy()}),Oe(a)}function l(){s(),i()}function p(u,d){var C=pe(u);C.on(je,function(w,g,v){d.go(d.is(st)?v:w)}),a.push(C)}function c(){var u=pe(e),d=u.on;d(Sn,m),d(Ar,h),d([Me,ve],x),a.push(u),u.emit(Cn,e.splides)}function x(){Z(t.Elements.list,In,n.direction===Gt?"vertical":"")}function m(u){e.go(u.index)}function h(u,d){hn(ki,Rn(d))&&(m(u),Le(d))}return{setup:se(t.Media.set,{slideFocus:_t(o)?r:o},!0),mount:i,destroy:s,remount:l}}function Oi(e,t,n){var r=pe(e),o=r.bind,a=0;function i(){n.wheel&&o(t.Elements.track,"wheel",s,Qe)}function s(p){if(p.cancelable){var c=p.deltaY,x=c<0,m=an(p),h=n.wheelMinThreshold||0,u=n.wheelSleep||0;ye(c)>h&&m-a>u&&(e.go(x?"<":">"),a=m),l(x)&&Le(p)}}function l(p){return!n.releaseWheel||e.state.is(at)||t.Controller.getAdjacent(p)!==-1}return{mount:i}}var ji=90;function Vi(e,t,n){var r=pe(e),o=r.on,a=t.Elements.track,i=n.live&&!n.isNavigation,s=tt("span",ei),l=Mt(ji,se(c,!1));function p(){i&&(m(!t.Autoplay.isPaused()),Z(a,Wn,!0),s.textContent="…",o(wn,se(m,!0)),o(En,se(m,!1)),o([lt,qe],se(c,!0)))}function c(h){Z(a,Mn,h),h?(xt(a,s),l.start()):(Ye(s),l.cancel())}function x(){Te(a,[Dn,Wn,Mn]),Ye(s)}function m(h){i&&Z(a,Dn,h?"off":"polite")}return{mount:p,disable:m,destroy:x}}var Pi=Object.freeze({__proto__:null,Media:Uo,Direction:Go,Elements:ai,Slides:si,Layout:ci,Clones:pi,Move:di,Controller:gi,Arrows:hi,Autoplay:yi,Cover:bi,Scroll:Ei,Drag:Ai,Keyboard:Ii,LazyLoad:Li,Pagination:Ri,Sync:Ni,Wheel:Oi,Live:Vi}),Bi={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"},Fi={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:ri,i18n:Bi,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function zi(e,t,n){var r=t.Slides;function o(){pe(e).on([Me,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 Di(e,t,n){var r=t.Move,o=t.Controller,a=t.Scroll,i=t.Elements.list,s=se(Ce,i,"transition"),l;function p(){pe(e).bind(i,"transitionend",function(h){h.target===i&&l&&(x(),l())})}function c(h,u){var d=r.toPosition(h,!0),C=r.getPosition(),w=m(h);ye(d-C)>=1&&w>=1?n.useScroll?a.scroll(d,w,!1,u):(s("transform "+w+"ms "+n.easing),r.translate(d,!0),l=u):(r.jump(h),u())}function x(){s(""),a.cancel()}function m(h){var u=n.rewindSpeed;if(e.is(it)&&u){var d=o.getIndex(!0),C=o.getEnd();if(d===0&&h>=C||d>=C&&h===0)return u}return n.speed}return{mount:p,start:c,cancel:x}}var Mi=(function(){function e(n,r){this.event=pe(),this.Components={},this.state=Wo(et),this.splides=[],this._o={},this._E={};var o=Fe(n)?pr(document,n):n;ct(o,o+" is invalid."),this.root=o,r=Be({label:we(o,_e)||"",labelledby:we(o,Tn)||""},Fi,e.defaults,r||{});try{Be(r,JSON.parse(we(o,bn)))}catch{ct(!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;ct(i.is([et,Ot]),"Already mounted!"),i.set(et),this._C=s,this._T=o||this._T||(this.is(At)?zi:Di),this._E=r||this._E;var l=mt({},Pi,this._E,{Transition:this._T});return Ge(l,function(p,c){var x=p(a,s,a._o);s[c]=x,x.setup&&x.setup()}),Ge(s,function(p){p.mount&&p.mount()}),this.emit(Me),Ae(this.root,ti),i.set(rt),this.emit(cn),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(rt)&&(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(et)?pe(this).on(cn,this.destroy.bind(this,r)):(Ge(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(xn),o.destroy(),r&&Oe(this.splides),a.set(Ot)),this},Bo(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})(),kn=Mi;kn.defaults={};kn.STATES=zo;var Yn=[[Me,"onMounted"],[cn,"onReady"],[je,"onMove"],[lt,"onMoved"],[Sn,"onClick"],[fr,"onActive"],[mr,"onInactive"],[hr,"onVisible"],[vr,"onHidden"],[ge,"onRefresh"],[ve,"onUpdated"],[ot,"onResize"],[zt,"onResized"],[yr,"onDrag"],[br,"onDragging"],[_r,"onDragged"],[Dt,"onScroll"],[qe,"onScrolled"],[xn,"onDestroy"],[Sr,"onArrowsMounted"],[xr,"onArrowsUpdated"],[Cr,"onPaginationMounted"],[wr,"onPaginationUpdated"],[Cn,"onNavigationMounted"],[wn,"onAutoplayPlay"],[Er,"onAutoplayPlaying"],[En,"onAutoplayPause"],[An,"onLazyLoadLoaded"]];function Nn(...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 Wi(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Hi(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 Hi(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 Ui=({children:e,className:t,...n})=>D.createElement("div",{className:Nn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Dr=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 kn(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();Wi(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:Nn("splide",e),ref:this.splideRef,...this.omit(o,["options",...Yn.map(a=>a[1])])},n?D.createElement(Ui,null,r):r)}},Mr=({children:e,className:t,...n})=>D.createElement("li",{className:Nn("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),D=require("react"),ue=require("classnames"),k=require("./useScopedStyles-Bibm8h9Z.js"),or=require("react-dom");function rr(e){return e.type==="object"&&e.version===1}const ir="ControlSlider-module__wrapper___sHEkd",ar="ControlSlider-module__hoverArrow___A-dOH",lr="ControlSlider-module__sliderItem___QQSkR",sr="ControlSlider-module__sliderImage___9hRl-",cr="ControlSlider-module__arrow___05ghY",ur="ControlSlider-module__arrowVertical___tBfVN",pr="ControlSlider-module__nextArrow___-30Yc",dr="ControlSlider-module__arrowInner___aEra3",gr="ControlSlider-module__arrowIcon___S4ztF",fr="ControlSlider-module__arrowImg___2dwJW",mr="ControlSlider-module__mirror___brd6U",yr="ControlSlider-module__pagination___bicLF",hr="ControlSlider-module__paginationInner___bT-P-",vr="ControlSlider-module__paginationVertical___zYqKw",br="ControlSlider-module__paginationItem___nTRbk",Sr="ControlSlider-module__dot___p1Qun",xr="ControlSlider-module__activeDot___LHFaj",Cr="ControlSlider-module__paginationInsideBottom___R3FWn",_r="ControlSlider-module__paginationInsideTop___V-qb-",wr="ControlSlider-module__paginationOutsideBottom___14w8D",$r="ControlSlider-module__paginationOutsideTop___SCLqB",Tr="ControlSlider-module__paginationInsideLeft___yOBRZ",Ar="ControlSlider-module__paginationInsideRight___Rtt3o",Er="ControlSlider-module__paginationOutsideLeft___lahaw",Lr="ControlSlider-module__paginationOutsideRight___EtuQa",Ir="ControlSlider-module__imgWrapper___UjEgB",kr="ControlSlider-module__captionBlock___dJ6-j",Rr="ControlSlider-module__captionTextWrapper___HFlpf",Fr="ControlSlider-module__captionText___uGBVc",Vr="ControlSlider-module__active___WZK4G",Nr="ControlSlider-module__withPointerEvents___t-18M",Or="ControlSlider-module__topLeftAlignment___zjnGM",jr="ControlSlider-module__topCenterAlignment___gD1xW",Br="ControlSlider-module__topRightAlignment___NMapS",zr="ControlSlider-module__middleLeftAlignment___OnUrY",Wr="ControlSlider-module__middleCenterAlignment___Tdkl0",Mr="ControlSlider-module__middleRightAlignment___wEbfX",Dr="ControlSlider-module__bottomLeftAlignment___cTP2-",Hr="ControlSlider-module__bottomCenterAlignment___c54fB",Pr="ControlSlider-module__bottomRightAlignment___kEwrz",Ur="ControlSlider-module__clickOverlay___DZA28",Gr="ControlSlider-module__contain___pLyq7",Yr="ControlSlider-module__cover___KdDat",Y={wrapper:ir,hoverArrow:ar,sliderItem:lr,sliderImage:sr,arrow:cr,arrowVertical:ur,nextArrow:pr,arrowInner:dr,arrowIcon:gr,arrowImg:fr,mirror:mr,pagination:yr,paginationInner:hr,paginationVertical:vr,paginationItem:br,dot:Sr,activeDot:xr,paginationInsideBottom:Cr,paginationInsideTop:_r,paginationOutsideBottom:wr,paginationOutsideTop:$r,paginationInsideLeft:Tr,paginationInsideRight:Ar,paginationOutsideLeft:Er,paginationOutsideRight:Lr,imgWrapper:Ir,captionBlock:kr,captionTextWrapper:Rr,captionText:Fr,active:Vr,withPointerEvents:Nr,topLeftAlignment:Or,topCenterAlignment:jr,topRightAlignment:Br,middleLeftAlignment:zr,middleCenterAlignment:Wr,middleRightAlignment:Mr,bottomLeftAlignment:Dr,bottomCenterAlignment:Hr,bottomRightAlignment:Pr,clickOverlay:Ur,contain:Gr,cover:Yr};function qr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xr(e,t,n){return t&&qr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Dn="(prefers-reduced-motion: reduce)",lt=1,Kr=2,ut=3,gt=4,Tt=5,jt=6,Mt=7,Jr={CREATED:lt,MOUNTED:Kr,IDLE:ut,MOVING:gt,SCROLLING:Tt,DRAGGING:jt,DESTROYED:Mt};function We(e){e.length=0}function Ye(e,t,n){return Array.prototype.slice.call(e,t,n)}function se(e){return e.bind.apply(e,[null].concat(Ye(arguments,1)))}var fo=setTimeout,pn=function(){};function Hn(e){return requestAnimationFrame(e)}function Gt(e,t){return typeof t===e}function bt(e){return!xn(e)&&Gt("object",e)}var Sn=Array.isArray,mo=se(Gt,"function"),Ue=se(Gt,"string"),At=se(Gt,"undefined");function xn(e){return e===null}function yo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Et(e){return Sn(e)?e:[e]}function Te(e,t){Et(e).forEach(t)}function Cn(e,t){return e.indexOf(t)>-1}function Bt(e,t){return e.push.apply(e,Et(t)),e}function je(e,t,n){e&&Te(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Re(e,t){je(e,Ue(t)?t.split(" "):t,!0)}function Lt(e,t){Te(t,e.appendChild.bind(e))}function _n(e,t){Te(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function St(e,t){return yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ho(e,t){var n=e?Ye(e.children):[];return t?n.filter(function(o){return St(o,t)}):n}function It(e,t){return t?ho(e,t)[0]:e.firstElementChild}var xt=Object.keys;function Je(e,t,n){return e&&(n?xt(e).reverse():xt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Ct(e){return Ye(arguments,1).forEach(function(t){Je(t,function(n,o){e[o]=t[o]})}),e}function Pe(e){return Ye(arguments,1).forEach(function(t){Je(t,function(n,o){Sn(n)?e[o]=n.slice():bt(n)?e[o]=Pe({},bt(e[o])?e[o]:{},n):e[o]=n})}),e}function Pn(e,t){Te(t||xt(e),function(n){delete e[n]})}function Fe(e,t){Te(e,function(n){Te(t,function(o){n&&n.removeAttribute(o)})})}function te(e,t,n){bt(t)?Je(t,function(o,r){te(e,r,o)}):Te(e,function(o){xn(n)||n===""?Fe(o,t):o.setAttribute(t,String(n))})}function st(e,t,n){var o=document.createElement(e);return t&&(Ue(t)?Re(o,t):te(o,t)),n&&Lt(n,o),o}function Ee(e,t,n){if(At(n))return getComputedStyle(e)[t];xn(n)||(e.style[t]=""+n)}function _t(e,t){Ee(e,"display",t)}function vo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Le(e,t){return e.getAttribute(t)}function Un(e,t){return e&&e.classList.contains(t)}function we(e){return e.getBoundingClientRect()}function Ze(e){Te(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function bo(e){return It(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function So(e,t){return e&&e.querySelector(t)}function wn(e,t){return t?Ye(e.querySelectorAll(t)):[]}function Be(e,t){je(e,t,!1)}function dn(e){return e.timeStamp}function Ke(e){return Ue(e)?e:e?e+"px":""}var kt="splide",$n="data-"+kt;function yt(e,t){if(!e)throw new Error("["+kt+"] "+(t||""))}var Ge=Math.min,Dt=Math.max,Ht=Math.floor,wt=Math.ceil,xe=Math.abs;function xo(e,t,n){return xe(e-t)<n}function zt(e,t,n,o){var r=Ge(t,n),a=Dt(t,n);return o?r<e&&e<a:r<=e&&e<=a}function it(e,t,n){var o=Ge(t,n),r=Dt(t,n);return Ge(Dt(o,e),r)}function gn(e){return+(e>0)-+(e<0)}function fn(e,t){return Te(t,function(n){e=e.replace("%s",""+n)}),e}function Tn(e){return e<10?"0"+e:""+e}var Gn={};function Zr(e){return""+e+Tn(Gn[e]=(Gn[e]||0)+1)}function Co(){var e=[];function t(i,s,l,d){r(i,s,function(p,_,m){var h="addEventListener"in p,c=h?p.removeEventListener.bind(p,_,l,d):p.removeListener.bind(p,l);h?p.addEventListener(_,l,d):p.addListener(l),e.push([p,_,m,l,c])})}function n(i,s,l){r(i,s,function(d,p,_){e=e.filter(function(m){return m[0]===d&&m[1]===p&&m[2]===_&&(!l||m[3]===l)?(m[4](),!1):!0})})}function o(i,s,l){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(s,{bubbles:p,detail:l}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(s,p,!1,l)),i.dispatchEvent(d),d}function r(i,s,l){Te(i,function(d){d&&Te(s,function(p){p.split(" ").forEach(function(_){var m=_.split(".");l(d,m[0],m[1])})})})}function a(){e.forEach(function(i){i[4]()}),We(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var qe="mounted",mn="ready",Me="move",ft="moved",An="click",_o="active",wo="inactive",$o="visible",To="hidden",he="refresh",Se="updated",pt="resize",Yt="resized",Ao="drag",Eo="dragging",Lo="dragged",qt="scroll",et="scrolled",Qr="overflow",En="destroy",Io="arrows:mounted",ko="arrows:updated",Ro="pagination:mounted",Fo="pagination:updated",Ln="navigation:mounted",In="autoplay:play",Vo="autoplay:playing",kn="autoplay:pause",Rn="lazyload:loaded",No="sk",Oo="sh",Pt="ei";function pe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Co();function o(a,i){n.bind(t,Et(a).join(" "),function(s){i.apply(i,Sn(s.detail)?s.detail:[])})}function r(a){n.dispatch(t,a,Ye(arguments,1))}return e&&e.event.on(En,n.destroy),Ct(n,{bus:t,on:o,off:se(n.unbind,t),emit:r})}function Xt(e,t,n,o){var r=Date.now,a,i=0,s,l=!0,d=0;function p(){if(!l){if(i=e?Ge((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++d>=o))return m();s=Hn(p)}}function _($){$||c(),a=r()-($?i*e:0),l=!1,s=Hn(p)}function m(){l=!0}function h(){a=r(),i=0,n&&n(i)}function c(){s&&cancelAnimationFrame(s),i=0,s=0,l=!0}function u($){e=$}function b(){return l}return{start:_,rewind:h,pause:m,cancel:c,set:u,isPaused:b}}function ei(e){var t=e;function n(r){t=r}function o(r){return Cn(Et(r),t)}return{set:n,is:o}}function ti(e,t){var n=Xt(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ni(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Co(),s=[];function l(){var c=n.mediaQuery==="min";xt(r).sort(function(u,b){return c?+u-+b:+b-+u}).forEach(function(u){p(r[u],"("+(c?"min":"max")+"-width:"+u+"px)")}),p(a,Dn),_()}function d(c){c&&i.destroy()}function p(c,u){var b=matchMedia(u);i.bind(b,"change",_),s.push([c,b])}function _(){var c=o.is(Mt),u=n.direction,b=s.reduce(function($,f){return Pe($,f[1].matches?f[0]:{})},{});Pn(n),h(b),n.destroy?e.destroy(n.destroy==="completely"):c?(d(!0),e.mount()):u!==n.direction&&e.refresh()}function m(c){matchMedia(Dn).matches&&(c?Pe(n,a):Pn(n,xt(a)))}function h(c,u,b){Pe(n,c),u&&Pe(Object.getPrototypeOf(n),c),(b||!o.is(lt))&&e.emit(Se,n)}return{setup:l,destroy:d,reduce:m,set:h}}var Kt="Arrow",Jt=Kt+"Left",Zt=Kt+"Right",jo=Kt+"Up",Bo=Kt+"Down",Yn="rtl",Qt="ttb",on={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[jo,Zt],ArrowRight:[Bo,Jt]};function oi(e,t,n){function o(a,i,s){s=s||n.direction;var l=s===Yn&&!i?1:s===Qt?0:-1;return on[a]&&on[a][l]||a.replace(/width|left|right/i,function(d,p){var _=on[d.toLowerCase()][l]||d;return p>0?_.charAt(0).toUpperCase()+_.slice(1):_})}function r(a){return a*(n.direction===Yn?1:-1)}return{resolve:o,orient:r}}var ze="role",ct="tabindex",ri="disabled",Ie="aria-",Rt=Ie+"controls",zo=Ie+"current",qn=Ie+"selected",$e=Ie+"label",Fn=Ie+"labelledby",Wo=Ie+"hidden",Vn=Ie+"orientation",$t=Ie+"roledescription",Xn=Ie+"live",Kn=Ie+"busy",Jn=Ie+"atomic",Nn=[ze,ct,ri,Rt,zo,$e,Fn,Wo,Vn,$t],Ve=kt+"__",Xe="is-",rn=kt,Zn=Ve+"track",ii=Ve+"list",en=Ve+"slide",Mo=en+"--clone",ai=en+"__container",On=Ve+"arrows",tn=Ve+"arrow",Do=tn+"--prev",Ho=tn+"--next",nn=Ve+"pagination",Po=nn+"__page",li=Ve+"progress",si=li+"__bar",ci=Ve+"toggle",ui=Ve+"spinner",pi=Ve+"sr",di=Xe+"initialized",Qe=Xe+"active",Uo=Xe+"prev",Go=Xe+"next",yn=Xe+"visible",hn=Xe+"loading",Yo=Xe+"focus-in",qo=Xe+"overflow",gi=[Qe,yn,Uo,Go,hn,Yo,qo],fi={slide:en,clone:Mo,arrows:On,arrow:tn,prev:Do,next:Ho,pagination:nn,page:Po,spinner:ui};function mi(e,t){if(mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!St(n,t);)n=n.parentElement;return n}var yi=5,Qn=200,Xo="touchstart mousedown",an="touchmove mousemove",ln="touchend touchcancel mouseup click";function hi(e,t,n){var o=pe(e),r=o.on,a=o.bind,i=e.root,s=n.i18n,l={},d=[],p=[],_=[],m,h,c;function u(){w(),B(),f()}function b(){r(he,$),r(he,u),r(Se,f),a(document,Xo+" keydown",function(v){c=v.type==="keydown"},{capture:!0}),a(i,"focusin",function(){je(i,Yo,!!c)})}function $(v){var T=Nn.concat("style");We(d),Be(i,p),Be(m,_),Fe([m,h],T),Fe(i,v?T:["style",$t])}function f(){Be(i,p),Be(m,_),p=E(rn),_=E(Zn),Re(i,p),Re(m,_),te(i,$e,n.label),te(i,Fn,n.labelledby)}function w(){m=z("."+Zn),h=It(m,"."+ii),yt(m&&h,"A track/list element is missing."),Bt(d,ho(h,"."+en+":not(."+Mo+")")),Je({arrows:On,pagination:nn,prev:Do,next:Ho,bar:si,toggle:ci},function(v,T){l[T]=z("."+v)}),Ct(l,{root:i,track:m,list:h,slides:d})}function B(){var v=i.id||Zr(kt),T=n.role;i.id=v,m.id=m.id||v+"-track",h.id=h.id||v+"-list",!Le(i,ze)&&i.tagName!=="SECTION"&&T&&te(i,ze,T),te(i,$t,s.carousel),te(h,ze,"presentation")}function z(v){var T=So(i,v);return T&&mi(T,"."+rn)===i?T:void 0}function E(v){return[v+"--"+n.type,v+"--"+n.direction,n.drag&&v+"--draggable",n.isNavigation&&v+"--nav",v===rn&&Qe]}return Ct(l,{setup:u,mount:b,destroy:$})}var dt="slide",mt="loop",Ft="fade";function vi(e,t,n,o){var r=pe(e),a=r.on,i=r.emit,s=r.bind,l=e.Components,d=e.root,p=e.options,_=p.isNavigation,m=p.updateOnMove,h=p.i18n,c=p.pagination,u=p.slideFocus,b=l.Direction.resolve,$=Le(o,"style"),f=Le(o,$e),w=n>-1,B=It(o,"."+ai),z;function E(){w||(o.id=d.id+"-slide"+Tn(t+1),te(o,ze,c?"tabpanel":"group"),te(o,$t,h.slide),te(o,$e,f||fn(h.slideLabel,[t+1,e.length]))),v()}function v(){s(o,"click",se(i,An,x)),s(o,"keydown",se(i,No,x)),a([ft,Oo,et],L),a(Ln,V),m&&a(Me,W)}function T(){z=!0,r.destroy(),Be(o,gi),Fe(o,Nn),te(o,"style",$),te(o,$e,f||"")}function V(){var A=e.splides.map(function(C){var N=C.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");te(o,$e,fn(h.slideX,(w?n:t)+1)),te(o,Rt,A),te(o,ze,u?"button":""),u&&Fe(o,$t)}function W(){z||L()}function L(){if(!z){var A=e.index;F(),O(),je(o,Uo,t===A-1),je(o,Go,t===A+1)}}function F(){var A=H();A!==Un(o,Qe)&&(je(o,Qe,A),te(o,zo,_&&A||""),i(A?_o:wo,x))}function O(){var A=g(),C=!A&&(!H()||w);if(e.state.is([gt,Tt])||te(o,Wo,C||""),te(wn(o,p.focusableNodes||""),ct,C?-1:""),u&&te(o,ct,C?-1:0),A!==Un(o,yn)&&(je(o,yn,A),i(A?$o:To,x)),!A&&document.activeElement===o){var N=l.Slides.getAt(e.index);N&&vo(N.slide)}}function U(A,C,N){Ee(N&&B||o,A,C)}function H(){var A=e.index;return A===t||p.cloneStatus&&A===n}function g(){if(e.is(Ft))return H();var A=we(l.Elements.track),C=we(o),N=b("left",!0),q=b("right",!0);return Ht(A[N])<=wt(C[N])&&Ht(C[q])<=wt(A[q])}function R(A,C){var N=xe(A-t);return!w&&(p.rewind||e.is(mt))&&(N=Ge(N,e.length-N)),N<=C}var x={index:t,slideIndex:n,slide:o,container:B,isClone:w,mount:E,destroy:T,update:L,style:U,isWithin:R};return x}function bi(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=o.bind,s=t.Elements,l=s.slides,d=s.list,p=[];function _(){m(),r(he,h),r(he,m)}function m(){l.forEach(function(L,F){u(L,F,-1)})}function h(){z(function(L){L.destroy()}),We(p)}function c(){z(function(L){L.update()})}function u(L,F,O){var U=vi(e,F,O,L);U.mount(),p.push(U),p.sort(function(H,g){return H.index-g.index})}function b(L){return L?E(function(F){return!F.isClone}):p}function $(L){var F=t.Controller,O=F.toIndex(L),U=F.hasFocus()?1:n.perPage;return E(function(H){return zt(H.index,O,O+U-1)})}function f(L){return E(L)[0]}function w(L,F){Te(L,function(O){if(Ue(O)&&(O=bo(O)),yo(O)){var U=l[F];U?_n(O,U):Lt(d,O),Re(O,n.classes.slide),T(O,se(a,pt))}}),a(he)}function B(L){Ze(E(L).map(function(F){return F.slide})),a(he)}function z(L,F){b(F).forEach(L)}function E(L){return p.filter(mo(L)?L:function(F){return Ue(L)?St(F.slide,L):Cn(Et(L),F.index)})}function v(L,F,O){z(function(U){U.style(L,F,O)})}function T(L,F){var O=wn(L,"img"),U=O.length;U?O.forEach(function(H){i(H,"load error",function(){--U||F()})}):F()}function V(L){return L?l.length:p.length}function W(){return p.length>n.perPage}return{mount:_,destroy:h,update:c,register:u,get:b,getIn:$,getAt:f,add:w,remove:B,forEach:z,filter:E,style:v,getLength:V,isEnough:W}}function Si(e,t,n){var o=pe(e),r=o.on,a=o.bind,i=o.emit,s=t.Slides,l=t.Direction.resolve,d=t.Elements,p=d.root,_=d.track,m=d.list,h=s.getAt,c=s.style,u,b,$;function f(){w(),a(window,"resize load",ti(se(i,pt))),r([Se,he],w),r(pt,B)}function w(){u=n.direction===Qt,Ee(p,"maxWidth",Ke(n.width)),Ee(_,l("paddingLeft"),z(!1)),Ee(_,l("paddingRight"),z(!0)),B(!0)}function B(x){var A=we(p);(x||b.width!==A.width||b.height!==A.height)&&(Ee(_,"height",E()),c(l("marginRight"),Ke(n.gap)),c("width",T()),c("height",V(),!0),b=A,i(Yt),$!==($=R())&&(je(p,qo,$),i(Qr,$)))}function z(x){var A=n.padding,C=l(x?"right":"left");return A&&Ke(A[C]||(bt(A)?0:A))||"0px"}function E(){var x="";return u&&(x=v(),yt(x,"height or heightRatio is missing."),x="calc("+x+" - "+z(!1)+" - "+z(!0)+")"),x}function v(){return Ke(n.height||we(m).width*n.heightRatio)}function T(){return n.autoWidth?null:Ke(n.fixedWidth)||(u?"":W())}function V(){return Ke(n.fixedHeight)||(u?n.autoHeight?null:W():v())}function W(){var x=Ke(n.gap);return"calc((100%"+(x&&" + "+x)+")/"+(n.perPage||1)+(x&&" - "+x)+")"}function L(){return we(m)[l("width")]}function F(x,A){var C=h(x||0);return C?we(C.slide)[l("width")]+(A?0:H()):0}function O(x,A){var C=h(x);if(C){var N=we(C.slide)[l("right")],q=we(m)[l("left")];return xe(N-q)+(A?0:H())}return 0}function U(x){return O(e.length-1)-O(0)+F(0,x)}function H(){var x=h(0);return x&&parseFloat(Ee(x.slide,l("marginRight")))||0}function g(x){return parseFloat(Ee(_,l("padding"+(x?"Right":"Left"))))||0}function R(){return e.is(Ft)||U(!0)>L()}return{mount:f,resize:B,listSize:L,slideSize:F,sliderSize:U,totalSize:O,getPadding:g,isOverflow:R}}var xi=2;function Ci(e,t,n){var o=pe(e),r=o.on,a=t.Elements,i=t.Slides,s=t.Direction.resolve,l=[],d;function p(){r(he,_),r([Se,pt],h),(d=b())&&(c(d),t.Layout.resize(!0))}function _(){m(),p()}function m(){Ze(l),We(l),o.destroy()}function h(){var $=b();d!==$&&(d<$||!$)&&o.emit(he)}function c($){var f=i.get().slice(),w=f.length;if(w){for(;f.length<$;)Bt(f,f);Bt(f.slice(-$),f.slice(0,$)).forEach(function(B,z){var E=z<$,v=u(B.slide,z);E?_n(v,f[0].slide):Lt(a.list,v),Bt(l,v),i.register(v,z-$+(E?0:w),B.index)})}}function u($,f){var w=$.cloneNode(!0);return Re(w,n.classes.clone),w.id=e.root.id+"-clone"+Tn(f+1),w}function b(){var $=n.clones;if(!e.is(mt))$=0;else if(At($)){var f=n[s("fixedWidth")]&&t.Layout.slideSize(0),w=f&&wt(we(a.track)[s("width")]/f);$=w||n[s("autoWidth")]&&e.length||n.perPage*xi}return $}return{mount:p,destroy:m}}function _i(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=e.state.set,s=t.Layout,l=s.slideSize,d=s.getPadding,p=s.totalSize,_=s.listSize,m=s.sliderSize,h=t.Direction,c=h.resolve,u=h.orient,b=t.Elements,$=b.list,f=b.track,w;function B(){w=t.Transition,r([qe,Yt,Se,he],z)}function z(){t.Controller.isBusy()||(t.Scroll.cancel(),v(e.index),t.Slides.update())}function E(C,N,q,ie){C!==N&&x(C>q)&&(L(),T(W(U(),C>q),!0)),i(gt),a(Me,N,q,C),w.start(N,function(){i(ut),a(ft,N,q,C),ie&&ie()})}function v(C){T(O(C,!0))}function T(C,N){if(!e.is(Ft)){var q=N?C:V(C);Ee($,"transform","translate"+c("X")+"("+q+"px)"),C!==q&&a(Oo)}}function V(C){if(e.is(mt)){var N=F(C),q=N>t.Controller.getEnd(),ie=N<0;(ie||q)&&(C=W(C,q))}return C}function W(C,N){var q=C-R(N),ie=m();return C-=u(ie*(wt(xe(q)/ie)||1))*(N?1:-1),C}function L(){T(U(),!0),w.cancel()}function F(C){for(var N=t.Slides.get(),q=0,ie=1/0,Q=0;Q<N.length;Q++){var me=N[Q].index,I=xe(O(me,!0)-C);if(I<=ie)ie=I,q=me;else break}return q}function O(C,N){var q=u(p(C-1)-g(C));return N?H(q):q}function U(){var C=c("left");return we($)[C]-we(f)[C]+u(d(!1))}function H(C){return n.trimSpace&&e.is(dt)&&(C=it(C,0,u(m(!0)-_()))),C}function g(C){var N=n.focus;return N==="center"?(_()-l(C,!0))/2:+N*l(C)||0}function R(C){return O(C?t.Controller.getEnd():0,!!n.trimSpace)}function x(C){var N=u(W(U(),C));return C?N>=0:N<=$[c("scrollWidth")]-we(f)[c("width")]}function A(C,N){N=At(N)?U():N;var q=C!==!0&&u(N)<u(R(!1)),ie=C!==!1&&u(N)>u(R(!0));return q||ie}return{mount:B,move:E,jump:v,translate:T,shift:W,cancel:L,toIndex:F,toPosition:O,getPosition:U,getLimit:R,exceededLimit:A,reposition:z}}function wi(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=t.Move,s=i.getPosition,l=i.getLimit,d=i.toPosition,p=t.Slides,_=p.isEnough,m=p.getLength,h=n.omitEnd,c=e.is(mt),u=e.is(dt),b=se(U,!1),$=se(U,!0),f=n.start||0,w,B=f,z,E,v;function T(){V(),r([Se,he,Pt],V),r(Yt,W)}function V(){z=m(!0),E=n.perMove,v=n.perPage,w=x();var I=it(f,0,h?w:z-1);I!==f&&(f=I,i.reposition())}function W(){w!==x()&&a(Pt)}function L(I,K,ye){if(!me()){var ae=O(I),de=R(ae);de>-1&&(K||de!==f)&&(q(de),i.move(ae,de,B,ye))}}function F(I,K,ye,ae){t.Scroll.scroll(I,K,ye,function(){var de=R(i.toIndex(s()));q(h?Ge(de,w):de),ae&&ae()})}function O(I){var K=f;if(Ue(I)){var ye=I.match(/([+\-<>])(\d+)?/)||[],ae=ye[1],de=ye[2];ae==="+"||ae==="-"?K=H(f+ +(""+ae+(+de||1)),f):ae===">"?K=de?A(+de):b(!0):ae==="<"&&(K=$(!0))}else K=c?I:it(I,0,w);return K}function U(I,K){var ye=E||(Q()?1:v),ae=H(f+ye*(I?-1:1),f,!(E||Q()));return ae===-1&&u&&!xo(s(),l(!I),1)?I?0:w:K?ae:R(ae)}function H(I,K,ye){if(_()||Q()){var ae=g(I);ae!==I&&(K=I,I=ae,ye=!1),I<0||I>w?!E&&(zt(0,I,K,!0)||zt(w,K,I,!0))?I=A(C(I)):c?I=ye?I<0?-(z%v||v):z:I:n.rewind?I=I<0?w:0:I=-1:ye&&I!==K&&(I=A(C(K)+(I<K?-1:1)))}else I=-1;return I}function g(I){if(u&&n.trimSpace==="move"&&I!==f)for(var K=s();K===d(I,!0)&&zt(I,0,e.length-1,!n.rewind);)I<f?--I:++I;return I}function R(I){return c?(I+z)%z||0:I}function x(){for(var I=z-(Q()||c&&E?1:v);h&&I-- >0;)if(d(z-1,!0)!==d(I,!0)){I++;break}return it(I,0,z-1)}function A(I){return it(Q()?I:v*I,0,w)}function C(I){return Q()?Ge(I,w):Ht((I>=w?z-1:I)/v)}function N(I){var K=i.toIndex(I);return u?it(K,0,w):K}function q(I){I!==f&&(B=f,f=I)}function ie(I){return I?B:f}function Q(){return!At(n.focus)||n.isNavigation}function me(){return e.state.is([gt,Tt])&&!!n.waitForTransition}return{mount:T,go:L,scroll:F,getNext:b,getPrev:$,getAdjacent:U,getEnd:x,setIndex:q,getIndex:ie,toIndex:A,toPage:C,toDest:N,hasFocus:Q,isBusy:me}}var $i="http://www.w3.org/2000/svg",Ti="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",Vt=40;function Ai(e,t,n){var o=pe(e),r=o.on,a=o.bind,i=o.emit,s=n.classes,l=n.i18n,d=t.Elements,p=t.Controller,_=d.arrows,m=d.track,h=_,c=d.prev,u=d.next,b,$,f={};function w(){z(),r(Se,B)}function B(){E(),w()}function z(){var F=n.arrows;F&&!(c&&u)&&V(),c&&u&&(Ct(f,{prev:c,next:u}),_t(h,F?"":"none"),Re(h,$=On+"--"+n.direction),F&&(v(),L(),te([c,u],Rt,m.id),i(Io,c,u)))}function E(){o.destroy(),Be(h,$),b?(Ze(_?[c,u]:h),c=u=null):Fe([c,u],Nn)}function v(){r([qe,ft,he,et,Pt],L),a(u,"click",se(T,">")),a(c,"click",se(T,"<"))}function T(F){p.go(F,!0)}function V(){h=_||st("div",s.arrows),c=W(!0),u=W(!1),b=!0,Lt(h,[c,u]),!_&&_n(h,m)}function W(F){var O='<button class="'+s.arrow+" "+(F?s.prev:s.next)+'" type="button"><svg xmlns="'+$i+'" viewBox="0 0 '+Vt+" "+Vt+'" width="'+Vt+'" height="'+Vt+'" focusable="false"><path d="'+(n.arrowPath||Ti)+'" />';return bo(O)}function L(){if(c&&u){var F=e.index,O=p.getPrev(),U=p.getNext(),H=O>-1&&F<O?l.last:l.prev,g=U>-1&&F>U?l.first:l.next;c.disabled=O<0,u.disabled=U<0,te(c,$e,H),te(u,$e,g),i(ko,c,u,O,U)}}return{arrows:f,mount:w,destroy:E,update:L}}var Ei=$n+"-interval";function Li(e,t,n){var o=pe(e),r=o.on,a=o.bind,i=o.emit,s=Xt(n.interval,e.go.bind(e,">"),v),l=s.isPaused,d=t.Elements,p=t.Elements,_=p.root,m=p.toggle,h=n.autoplay,c,u,b=h==="pause";function $(){h&&(f(),m&&te(m,Rt,d.track.id),b||w(),E())}function f(){n.pauseOnHover&&a(_,"mouseenter mouseleave",function(V){c=V.type==="mouseenter",z()}),n.pauseOnFocus&&a(_,"focusin focusout",function(V){u=V.type==="focusin",z()}),m&&a(m,"click",function(){b?w():B(!0)}),r([Me,qt,he],s.rewind),r(Me,T)}function w(){l()&&t.Slides.isEnough()&&(s.start(!n.resetProgress),u=c=b=!1,E(),i(In))}function B(V){V===void 0&&(V=!0),b=!!V,E(),l()||(s.pause(),i(kn))}function z(){b||(c||u?B(!1):w())}function E(){m&&(je(m,Qe,!b),te(m,$e,n.i18n[b?"play":"pause"]))}function v(V){var W=d.bar;W&&Ee(W,"width",V*100+"%"),i(Vo,V)}function T(V){var W=t.Slides.getAt(V);s.set(W&&+Le(W.slide,Ei)||n.interval)}return{mount:$,destroy:s.cancel,play:w,pause:B,isPaused:l}}function Ii(e,t,n){var o=pe(e),r=o.on;function a(){n.cover&&(r(Rn,se(s,!0)),r([qe,Se,he],se(i,!0)))}function i(l){t.Slides.forEach(function(d){var p=It(d.container||d.slide,"img");p&&p.src&&s(l,p,d)})}function s(l,d,p){p.style("background",l?'center/cover no-repeat url("'+d.src+'")':"",!0),_t(d,l?"none":"")}return{mount:a,destroy:se(i,!1)}}var ki=10,Ri=600,Fi=.6,Vi=1.5,Ni=800;function Oi(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=e.state.set,s=t.Move,l=s.getPosition,d=s.getLimit,p=s.exceededLimit,_=s.translate,m=e.is(dt),h,c,u=1;function b(){r(Me,B),r([Se,he],z)}function $(v,T,V,W,L){var F=l();if(B(),V&&(!m||!p())){var O=t.Layout.sliderSize(),U=gn(v)*O*Ht(xe(v)/O)||0;v=s.toPosition(t.Controller.toDest(v%O))+U}var H=xo(F,v,1);u=1,T=H?0:T||Dt(xe(v-F)/Vi,Ni),c=W,h=Xt(T,f,se(w,F,v,L),1),i(Tt),a(qt),h.start()}function f(){i(ut),c&&c(),a(et)}function w(v,T,V,W){var L=l(),F=v+(T-v)*E(W),O=(F-L)*u;_(L+O),m&&!V&&p()&&(u*=Fi,xe(O)<ki&&$(d(p(!0)),Ri,!1,c,!0))}function B(){h&&h.cancel()}function z(){h&&!h.isPaused()&&(B(),f())}function E(v){var T=n.easingFunc;return T?T(v):1-Math.pow(1-v,4)}return{mount:b,destroy:B,scroll:$,cancel:z}}var at={passive:!1,capture:!0};function ji(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=o.bind,s=o.unbind,l=e.state,d=t.Move,p=t.Scroll,_=t.Controller,m=t.Elements.track,h=t.Media.reduce,c=t.Direction,u=c.resolve,b=c.orient,$=d.getPosition,f=d.exceededLimit,w,B,z,E,v,T=!1,V,W,L;function F(){i(m,an,pn,at),i(m,ln,pn,at),i(m,Xo,U,at),i(m,"click",R,{capture:!0}),i(m,"dragstart",Oe),r([qe,Se],O)}function O(){var M=n.drag;De(!M),E=M==="free"}function U(M){if(V=!1,!W){var y=de(M);ae(M.target)&&(y||!M.button)&&(_.isBusy()?Oe(M,!0):(L=y?m:window,v=l.is([gt,Tt]),z=null,i(L,an,H,at),i(L,ln,g,at),d.cancel(),p.cancel(),x(M)))}}function H(M){if(l.is(jt)||(l.set(jt),a(Ao)),M.cancelable)if(v){d.translate(w+ye(Q(M)));var y=me(M)>Qn,P=T!==(T=f());(y||P)&&x(M),V=!0,a(Eo),Oe(M)}else N(M)&&(v=C(M),Oe(M))}function g(M){l.is(jt)&&(l.set(ut),a(Lo)),v&&(A(M),Oe(M)),s(L,an,H),s(L,ln,g),v=!1}function R(M){!W&&V&&Oe(M,!0)}function x(M){z=B,B=M,w=$()}function A(M){var y=q(M),P=ie(y),G=n.rewind&&n.rewindByDrag;h(!1),E?_.scroll(P,0,n.snap):e.is(Ft)?_.go(b(gn(y))<0?G?"<":"-":G?">":"+"):e.is(dt)&&T&&G?_.go(f(!0)?">":"<"):_.go(_.toDest(P),!0),h(!0)}function C(M){var y=n.dragMinThreshold,P=bt(y),G=P&&y.mouse||0,J=(P?y.touch:+y)||10;return xe(Q(M))>(de(M)?J:G)}function N(M){return xe(Q(M))>xe(Q(M,!0))}function q(M){if(e.is(mt)||!T){var y=me(M);if(y&&y<Qn)return Q(M)/y}return 0}function ie(M){return $()+gn(M)*Ge(xe(M)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function Q(M,y){return K(M,y)-K(I(M),y)}function me(M){return dn(M)-dn(I(M))}function I(M){return B===M&&z||B}function K(M,y){return(de(M)?M.changedTouches[0]:M)["page"+u(y?"Y":"X")]}function ye(M){return M/(T&&e.is(dt)?yi:1)}function ae(M){var y=n.noDrag;return!St(M,"."+Po+", ."+tn)&&(!y||!St(M,y))}function de(M){return typeof TouchEvent<"u"&&M instanceof TouchEvent}function ge(){return v}function De(M){W=M}return{mount:F,disable:De,isDragging:ge}}var Bi={Spacebar:" ",Right:Zt,Left:Jt,Up:jo,Down:Bo};function jn(e){return e=Ue(e)?e:e.key,Bi[e]||e}var eo="keydown";function zi(e,t,n){var o=pe(e),r=o.on,a=o.bind,i=o.unbind,s=e.root,l=t.Direction.resolve,d,p;function _(){m(),r(Se,h),r(Se,m),r(Me,u)}function m(){var $=n.keyboard;$&&(d=$==="global"?window:s,a(d,eo,b))}function h(){i(d,eo)}function c($){p=$}function u(){var $=p;p=!0,fo(function(){p=$})}function b($){if(!p){var f=jn($);f===l(Jt)?e.go("<"):f===l(Zt)&&e.go(">")}}return{mount:_,destroy:h,disable:c}}var ht=$n+"-lazy",Wt=ht+"-srcset",Wi="["+ht+"], ["+Wt+"]";function Mi(e,t,n){var o=pe(e),r=o.on,a=o.off,i=o.bind,s=o.emit,l=n.lazyLoad==="sequential",d=[ft,et],p=[];function _(){n.lazyLoad&&(m(),r(he,m))}function m(){We(p),h(),l?$():(a(d),r(d,c),c())}function h(){t.Slides.forEach(function(f){wn(f.slide,Wi).forEach(function(w){var B=Le(w,ht),z=Le(w,Wt);if(B!==w.src||z!==w.srcset){var E=n.classes.spinner,v=w.parentElement,T=It(v,"."+E)||st("span",E,v);p.push([w,f,T]),w.src||_t(w,"none")}})})}function c(){p=p.filter(function(f){var w=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,w)?u(f):!0}),p.length||a(d)}function u(f){var w=f[0];Re(f[1].slide,hn),i(w,"load error",se(b,f)),te(w,"src",Le(w,ht)),te(w,"srcset",Le(w,Wt)),Fe(w,ht),Fe(w,Wt)}function b(f,w){var B=f[0],z=f[1];Be(z.slide,hn),w.type!=="error"&&(Ze(f[2]),_t(B,""),s(Rn,B,z),s(pt)),l&&$()}function $(){p.length&&u(p.shift())}return{mount:_,destroy:se(We,p),check:c}}function Di(e,t,n){var o=pe(e),r=o.on,a=o.emit,i=o.bind,s=t.Slides,l=t.Elements,d=t.Controller,p=d.hasFocus,_=d.getIndex,m=d.go,h=t.Direction.resolve,c=l.pagination,u=[],b,$;function f(){w(),r([Se,he,Pt],f);var W=n.pagination;c&&_t(c,W?"":"none"),W&&(r([Me,qt,et],V),B(),V(),a(Ro,{list:b,items:u},T(e.index)))}function w(){b&&(Ze(c?Ye(b.children):b),Be(b,$),We(u),b=null),o.destroy()}function B(){var W=e.length,L=n.classes,F=n.i18n,O=n.perPage,U=p()?d.getEnd()+1:wt(W/O);b=c||st("ul",L.pagination,l.track.parentElement),Re(b,$=nn+"--"+v()),te(b,ze,"tablist"),te(b,$e,F.select),te(b,Vn,v()===Qt?"vertical":"");for(var H=0;H<U;H++){var g=st("li",null,b),R=st("button",{class:L.page,type:"button"},g),x=s.getIn(H).map(function(C){return C.slide.id}),A=!p()&&O>1?F.pageX:F.slideX;i(R,"click",se(z,H)),n.paginationKeyboard&&i(R,"keydown",se(E,H)),te(g,ze,"presentation"),te(R,ze,"tab"),te(R,Rt,x.join(" ")),te(R,$e,fn(A,H+1)),te(R,ct,-1),u.push({li:g,button:R,page:H})}}function z(W){m(">"+W,!0)}function E(W,L){var F=u.length,O=jn(L),U=v(),H=-1;O===h(Zt,!1,U)?H=++W%F:O===h(Jt,!1,U)?H=(--W+F)%F:O==="Home"?H=0:O==="End"&&(H=F-1);var g=u[H];g&&(vo(g.button),m(">"+H),Oe(L,!0))}function v(){return n.paginationDirection||n.direction}function T(W){return u[d.toPage(W)]}function V(){var W=T(_(!0)),L=T(_());if(W){var F=W.button;Be(F,Qe),Fe(F,qn),te(F,ct,-1)}if(L){var O=L.button;Re(O,Qe),te(O,qn,!0),te(O,ct,"")}a(Fo,{list:b,items:u},W,L)}return{items:u,mount:f,destroy:w,getAt:T,update:V}}var Hi=[" ","Enter"];function Pi(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(c){c.isParent||(d(e,c.splide),d(c.splide,e))}),o&&p()}function s(){a.forEach(function(c){c.destroy()}),We(a)}function l(){s(),i()}function d(c,u){var b=pe(c);b.on(Me,function($,f,w){u.go(u.is(mt)?w:$)}),a.push(b)}function p(){var c=pe(e),u=c.on;u(An,m),u(No,h),u([qe,Se],_),a.push(c),c.emit(Ln,e.splides)}function _(){te(t.Elements.list,Vn,n.direction===Qt?"vertical":"")}function m(c){e.go(c.index)}function h(c,u){Cn(Hi,jn(u))&&(m(c),Oe(u))}return{setup:se(t.Media.set,{slideFocus:At(r)?o:r},!0),mount:i,destroy:s,remount:l}}function Ui(e,t,n){var o=pe(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",s,at)}function s(d){if(d.cancelable){var p=d.deltaY,_=p<0,m=dn(d),h=n.wheelMinThreshold||0,c=n.wheelSleep||0;xe(p)>h&&m-a>c&&(e.go(_?"<":">"),a=m),l(_)&&Oe(d)}}function l(d){return!n.releaseWheel||e.state.is(gt)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var Gi=90;function Yi(e,t,n){var o=pe(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,s=st("span",pi),l=Xt(Gi,se(p,!1));function d(){i&&(m(!t.Autoplay.isPaused()),te(a,Jn,!0),s.textContent="…",r(In,se(m,!0)),r(kn,se(m,!1)),r([ft,et],se(p,!0)))}function p(h){te(a,Kn,h),h?(Lt(a,s),l.start()):(Ze(s),l.cancel())}function _(){Fe(a,[Xn,Jn,Kn]),Ze(s)}function m(h){i&&te(a,Xn,h?"off":"polite")}return{mount:d,disable:m,destroy:_}}var qi=Object.freeze({__proto__:null,Media:ni,Direction:oi,Elements:hi,Slides:bi,Layout:Si,Clones:Ci,Move:_i,Controller:wi,Arrows:Ai,Autoplay:Li,Cover:Ii,Scroll:Oi,Drag:ji,Keyboard:zi,LazyLoad:Mi,Pagination:Di,Sync:Pi,Wheel:Ui,Live:Yi}),Xi={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"},Ki={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:fi,i18n:Xi,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ji(e,t,n){var o=t.Slides;function r(){pe(e).on([qe,he],a)}function a(){o.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function i(s,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),fo(l)}return{mount:r,start:i,cancel:pn}}function Zi(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,s=se(Ee,i,"transition"),l;function d(){pe(e).bind(i,"transitionend",function(h){h.target===i&&l&&(_(),l())})}function p(h,c){var u=o.toPosition(h,!0),b=o.getPosition(),$=m(h);xe(u-b)>=1&&$>=1?n.useScroll?a.scroll(u,$,!1,c):(s("transform "+$+"ms "+n.easing),o.translate(u,!0),l=c):(o.jump(h),c())}function _(){s(""),a.cancel()}function m(h){var c=n.rewindSpeed;if(e.is(dt)&&c){var u=r.getIndex(!0),b=r.getEnd();if(u===0&&h>=b||u>=b&&h===0)return c}return n.speed}return{mount:d,start:p,cancel:_}}var Qi=(function(){function e(n,o){this.event=pe(),this.Components={},this.state=ei(lt),this.splides=[],this._o={},this._E={};var r=Ue(n)?So(document,n):n;yt(r,r+" is invalid."),this.root=r,o=Pe({label:Le(r,$e)||"",labelledby:Le(r,Fn)||""},Ki,e.defaults,o||{});try{Pe(o,JSON.parse(Le(r,$n)))}catch{yt(!1,"Invalid JSON")}this._o=Object.create(Pe({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,s=this.Components;yt(i.is([lt,Mt]),"Already mounted!"),i.set(lt),this._C=s,this._T=r||this._T||(this.is(Ft)?Ji:Zi),this._E=o||this._E;var l=Ct({},qi,this._E,{Transition:this._T});return Je(l,function(d,p){var _=d(a,s,a._o);s[p]=_,_.setup&&_.setup()}),Je(s,function(d){d.mount&&d.mount()}),this.emit(qe),Re(this.root,di),i.set(ut),this.emit(mn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ut)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Ye(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(he),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(lt)?pe(this).on(mn,this.destroy.bind(this,o)):(Je(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(En),r.destroy(),o&&We(this.splides),a.set(Mt)),this},Xr(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Bn=Qi;Bn.defaults={};Bn.STATES=Jr;var to=[[qe,"onMounted"],[mn,"onReady"],[Me,"onMove"],[ft,"onMoved"],[An,"onClick"],[_o,"onActive"],[wo,"onInactive"],[$o,"onVisible"],[To,"onHidden"],[he,"onRefresh"],[Se,"onUpdated"],[pt,"onResize"],[Yt,"onResized"],[Ao,"onDrag"],[Eo,"onDragging"],[Lo,"onDragged"],[qt,"onScroll"],[et,"onScrolled"],[En,"onDestroy"],[Io,"onArrowsMounted"],[ko,"onArrowsUpdated"],[Ro,"onPaginationMounted"],[Fo,"onPaginationUpdated"],[Ln,"onNavigationMounted"],[In,"onAutoplayPlay"],[Vo,"onAutoplayPlaying"],[kn,"onAutoplayPause"],[Rn,"onLazyLoadLoaded"]];function zn(...e){return e.filter(Boolean).join(" ")}function Ut(e){return e!==null&&typeof e=="object"}function vn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!vn(n,t[o]));if(Ut(e)&&Ut(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!vn(e[r],t[r]))}return e===t}function ea(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ta(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function bn(e,t){const n=e;return ta(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():Ut(o)?n[r]=bn(Ut(n[r])?n[r]:{},o):n[r]=o}),n}var na=({children:e,className:t,...n})=>D.createElement("div",{className:zn("splide__track",t),...n},D.createElement("ul",{className:"splide__list"},e)),Ko=class extends D.Component{constructor(){super(...arguments),this.splideRef=D.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Bn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=bn({},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&&!vn(this.options,e)&&(this.splide.options=e,this.options=bn({},e));const t=this.getSlides();ea(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){to.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}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:o,...r}=this.props;return D.createElement(t,{className:zn("splide",e),ref:this.splideRef,...this.omit(r,["options",...to.map(a=>a[1])])},n?D.createElement(na,null,o):o)}},Jo=({children:e,className:t,...n})=>D.createElement("li",{className:zn("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 Gi="RichTextRenderer-module__link___BWeZ2",Yi={link:Gi},Wr=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?b.jsx("a",{className:Yi.link,href:r.value,target:r.target,children:t(r.children)},o):b.jsx("span",{style:Xi(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 Xi(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 qi="SvgImage-module__svg___q3xE-",Ki="SvgImage-module__img___VsTm-",Xn={svg:qi,img:Ki},pt=({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:ue(Xn.img,r)}):b.jsx("span",{"data-supports-mask":o,className:ue(Xn.svg,r),style:{"--svg":`url(${e})`,"--fill":t,"--hover-fill":n}})},Ji={"top-left":G.topLeftAlignment,"top-center":G.topCenterAlignment,"top-right":G.topRightAlignment,"middle-left":G.middleLeftAlignment,"middle-center":G.middleCenterAlignment,"middle-right":G.middleRightAlignment,"bottom-left":G.bottomLeftAlignment,"bottom-center":G.bottomCenterAlignment,"bottom-right":G.bottomRightAlignment};function Zi({settings:e,content:t,styles:n,isEditor:r}){const[o,a]=D.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:l,textAlign:p,wordSpacing:c,fontSizeLineHeight:x,textAppearance:m,color:h}=n.imageCaption,[u,d]=D.useState(void 0),[C,w]=D.useState(null),[g,v]=D.useState(0),[M,F]=D.useState(0),{direction:T,transition:y,controls:E,pagination:k,imageCaption:j,triggers:$}=e,O=D.useRef(y.type),{x:B,y:H}=e.controls.offset,U=f=>{o&&o.go(f)};return D.useEffect(()=>{if(!C)return;const f=new ResizeObserver(N=>{if(!o)return;const[A]=N;d({width:Math.round(A.contentRect.width),height:Math.round(A.contentRect.height)})});return f.observe(C),()=>f.unobserve(C)},[C]),D.useEffect(()=>{!o||O.current===y.type||(F(f=>f+1),O.current=y.type)},[y.type]),b.jsx("div",{className:ue(G.wrapper,{[G.editor]:r}),ref:w,children:b.jsxs("div",{className:G.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&b.jsx("div",{className:ue(G.captionBlock),children:b.jsx("div",{className:G.captionTextWrapper,children:t.map((f,N)=>b.jsx("div",{className:ue(G.captionText,Ji[j.alignment],{[G.withPointerEvents]:N===g&&r,[G.active]:N===g}),style:{fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":P.scalingValue(i.width,r),letterSpacing:P.scalingValue(l,r),wordSpacing:P.scalingValue(c,r),textAlign:p,fontSize:P.scalingValue(x.fontSize,r),lineHeight:P.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:G.captionTextInner,style:{"--link-hover-color":j.linkHoverColor,"--link-color":j.linkColor,position:"relative",top:P.scalingValue(j.offset.y,r),left:P.scalingValue(j.offset.x,r)},children:b.jsx(Wr,{content:f.imageCaption})})},N))})}),b.jsx(Dr,{onMove:f=>{v(f.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:$.autoPlay!==null,...$.autoPlay!==null&&{interval:parseInt($.autoPlay)*1e3},direction:T==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:$.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,N)=>b.jsx(Mr,{children:b.jsx("div",{className:G.sliderItem,children:b.jsx("div",{className:G.imgWrapper,children:b.jsx("img",{className:ue(G.sliderImage,{[G.contain]:f.image.objectFit==="contain",[G.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},N))},M),E.isActive&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:ue(G.arrow,{[G.arrowVertical]:T==="vert",[G.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:b.jsxs("button",{onClick:()=>{U("-1")},className:G.arrowInner,style:{transform:`translate(${P.scalingValue(B,r)}, ${P.scalingValue(H*(T==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&b.jsx(pt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:ue(G.arrowImg,G.mirror)}),!E.arrowsImgUrl&&b.jsx(qn,{color:E.color,className:ue(G.arrowIcon,G.arrowImg,G.mirror)})]})}),b.jsx("div",{className:ue(G.arrow,G.nextArrow,{[G.arrowVertical]:T==="vert",[G.hoverArrow]:E.show==="on hover"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:b.jsxs("button",{className:G.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${P.scalingValue(B*(T==="horiz"?-1:1),r)}, ${P.scalingValue(H,r)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[E.arrowsImgUrl&&b.jsx(pt,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:G.arrowImg}),!E.arrowsImgUrl&&b.jsx(qn,{color:E.color,className:ue(G.arrowIcon,G.arrowImg)})]})})]}),$.triggersList.click&&b.jsx("div",{className:G.clickOverlay,onClick:()=>{o&&o.go("+1")}}),k.isActive&&b.jsx("div",{className:ue(G.pagination,{[G.paginationInsideBottom]:k.position==="inside-1"&&T==="horiz",[G.paginationInsideTop]:k.position==="inside-2"&&T==="horiz",[G.paginationOutsideBottom]:k.position==="outside-1"&&T==="horiz",[G.paginationOutsideTop]:k.position==="outside-2"&&T==="horiz",[G.paginationInsideLeft]:k.position==="inside-1"&&T==="vert",[G.paginationInsideRight]:k.position==="inside-2"&&T==="vert",[G.paginationOutsideLeft]:k.position==="outside-1"&&T==="vert",[G.paginationOutsideRight]:k.position==="outside-2"&&T==="vert",[G.paginationVertical]:T==="vert"}),children:b.jsx("div",{className:G.paginationInner,style:{backgroundColor:k.colors[2],transform:`scale(${k.scale/100}) translate(${P.scalingValue(k.offset.x,r)}, ${P.scalingValue(k.offset.y,r)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((f,N)=>b.jsx("button",{onClick:()=>{o&&o.go(N)},className:ue(G.paginationItem),children:b.jsx("div",{className:ue(G.dot,{[G.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 Qi={element:Zi,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"]}},ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ta="ImageRevealSlider-module__image___Qjt-e",na="ImageRevealSlider-module__link___N-iLG",ra="ImageRevealSlider-module__cursor___2U03d",Ke={imageRevealSlider:ea,image:ta,link:na,cursor:ra};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 oa(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),[c,x]=D.useState({x:0,y:0}),[m,h]=D.useState(1),[u,d]=D.useState("none"),C=D.useRef({x:0,y:0}),[w,g]=D.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:F}=e.imageSize,{revealPosition:T,visible:y}=e.position,{cursorType:E,target:k,defaultCursorScale:j,defaultCursor:$,hoverCursorScale:O,hoverCursor:B}=e.cursor;D.useEffect(()=>{if(!r)return;const f=(L,S)=>{const R=r.getBoundingClientRect(),X=L-R.left,ie=S-R.top;if(x({x:X,y:ie}),E==="system"){d("none"),h(1);return}const re=X,he=ie,I=document.elementFromPoint(R.left+re,R.top+he);if(I&&I.closest("a")){d("none"),h(1);return}const K=Kn(re,he,a)||k==="area"?{img:B??"none",scale:O}:{img:$??"none",scale:j};d(K.img),h(K.scale)},N=L=>{L.stopPropagation(),C.current={x:L.clientX,y:L.clientY},f(L.clientX,L.clientY)},A=()=>{w&&f(C.current.x,C.current.y)};return r.addEventListener("mousemove",N),window.addEventListener("scroll",A,!0),()=>{r.removeEventListener("mousemove",N),window.removeEventListener("scroll",A,!0)}},[r,w,c,E,k,B,$,O,j,a]),D.useEffect(()=>{w||(d("none"),h(0))},[w]);const H=async(f,N,A,L={})=>{const{width:S,height:R,finalWidth:X}=await oa(f.image.url,v,M,F);let ie=0,re=0;T==="same"?(ie=N/2,re=A/2):(ie=L.x??Math.random()*N,re=L.y??Math.random()*A);const he=Math.min(Math.max(ie,S/2),N-S/2),I=Math.min(Math.max(re,R/2),A-R/2);return{id:p.current++,url:f.image.url,link:f.link,name:f.image.name,x:he,y:I,width:X}};D.useEffect(()=>{if(!r||t.length===0)return;const f=r.getBoundingClientRect(),N=f.width,A=f.height,L=[];(async()=>{const R=t[0],X=await H(R,N,A);L.push(X),i(L),l(1)})()},[v,M,F,T,r]),D.useEffect(()=>{y==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[y]);const U=async f=>{if(!r)return;const N=r.getBoundingClientRect(),A=f.clientX-N.left,L=f.clientY-N.top;if(k==="image"&&!Kn(A,L,a))return;let S=0,R=0;T==="on Click"?(S=A,R=L):T==="same"?(S=N.width/2,R=N.height/2):(S=Math.random()*N.width,R=Math.random()*N.height);const X=t[s],ie=await H(X,N.width,N.height,{x:S,y:R});i(re=>y==="all"?[...re,ie]:[ie]),l(re=>re>=t.length-1?0:re+1)};return b.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),className:Ke.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(f=>b.jsx("div",{className:Ke.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:k==="area"&&f.link?b.jsx("a",{href:f.link,target:"_blank",className:Ke.link,children:b.jsx("img",{src:f.url,alt:f.name,className:Ke.image},f.id)}):b.jsx("img",{src:f.url,alt:f.name,className:Ke.image},f.id)},f.id)),w&&b.jsx("div",{className:Ke.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${m})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const aa={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:""}]}}}},la="LightBox-module__hidden___9s-9x",sa="LightBox-module__heroImage___sTxNF",ca="LightBox-module__background___rm9ml",ua="LightBox-module__editor___4ACaY",pa="LightBox-module__contentStyle___Bgnsq",da="LightBox-module__imageStyle___tLIlB",ga="LightBox-module__imgWrapper___LuFUp",fa="LightBox-module__contain___8-yaS",ma="LightBox-module__cover___hNvOG",ha="LightBox-module__caption___b6L2I",va="LightBox-module__captionTextInner___rCGNH",ya="LightBox-module__lightboxSplide___XFuWC",ba="LightBox-module__arrow___iz38X",_a="LightBox-module__arrowVertical___Zfz81",Sa="LightBox-module__nextArrow___zkAQN",xa="LightBox-module__arrowInner___p48sW",Ca="LightBox-module__arrowIcon___3VaFf",wa="LightBox-module__arrowImg___pNV88",Ea="LightBox-module__mirror___pjeXc",Aa="LightBox-module__thumbsWrapper___GB-nU",Ta="LightBox-module__thumbsContainerVertical___wttk5",Ia="LightBox-module__thumbsContainer___osSma",$a="LightBox-module__thumbsAlignStart___MO6tY",La="LightBox-module__thumbsAlignCenter___Q4sUx",Ra="LightBox-module__thumbsAlignEnd___p4y9R",ka="LightBox-module__thumbItem___HvnF3",Na="LightBox-module__closeButton___g2khP",Oa="LightBox-module__fadeIn___0m5GW",ja="LightBox-module__slideInLeft___gPYwC",Va="LightBox-module__slideInRight___S-pPp",Pa="LightBox-module__slideInTop___DFdAj",Ba="LightBox-module__slideInBottom___m27kZ",Fa="LightBox-module__fadeOut___55qBR",za="LightBox-module__slideOutLeft___NvU7P",Da="LightBox-module__slideOutRight___SK7eC",Ma="LightBox-module__slideOutTop___Vgg0z",Wa="LightBox-module__slideOutBottom___nJ0Ef",Ha="LightBox-module__scaleSlide___vZriG",V={hidden:la,heroImage:sa,background:ca,editor:ua,contentStyle:pa,imageStyle:da,imgWrapper:ga,contain:fa,cover:ma,caption:ha,captionTextInner:va,lightboxSplide:ya,arrow:ba,arrowVertical:_a,nextArrow:Sa,arrowInner:xa,arrowIcon:Ca,arrowImg:wa,mirror:Ea,thumbsWrapper:Aa,thumbsContainerVertical:Ta,thumbsContainer:Ia,thumbsAlignStart:$a,thumbsAlignCenter:La,thumbsAlignEnd:Ra,thumbItem:ka,closeButton:Na,fadeIn:Oa,slideInLeft:ja,slideInRight:Va,slideInTop:Pa,slideInBottom:Ba,fadeOut:Fa,slideOutLeft:za,slideOutRight:Da,slideOutTop:Ma,slideOutBottom:Wa,scaleSlide:Ha},$t=(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% + ${P.scalingValue(t.x,n)}), calc(-50% + ${P.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${P.scalingValue(t.x,n)}, calc(-50% + ${P.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${P.scalingValue(t.x,n)}), ${P.scalingValue(t.y,n)})`:r.transform=`translate(${P.scalingValue(t.x,n)}, ${P.scalingValue(t.y,n)})`,r};function Hr(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=Hr(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,c;l>s?(p=r,c=r/l):(c=o,p=o*l);const x=t.left+n.left,m=t.top+n.top,h=(r-p)/2+x,u=(o-c)/2+m;return{x:h,y:u,width:p,height:c}}function Zn(e){const t=e.getBoundingClientRect(),n=Hr(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 Ua(e,t){const n=(()=>{if(e==="fade in")return V.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return V.slideInLeft;case"right":return V.slideInRight;case"top":return V.slideInTop;case"bottom":return V.slideInBottom;default:return V.slideInRight}return V.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return V.fadeIn;if(e==="slide in")switch(t){case"left":return V.slideInLeft;case"right":return V.slideInRight;case"top":return V.slideInTop;case"bottom":return V.slideInBottom;default:return V.slideInRight}return V.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return V.fadeOut;if(e==="slide in")switch(t){case"left":return V.slideOutLeft;case"right":return V.slideOutRight;case"top":return V.slideOutTop;case"bottom":return V.slideOutBottom;default:return V.slideOutRight}return V.fadeOut})(),a=(()=>{if(e==="fade in")return V.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return V.slideOutLeft;case"right":return V.slideOutRight;case"top":return V.slideOutTop;case"bottom":return V.slideOutBottom;default:return V.slideOutRight}return V.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:a}}const Ga=({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:V.heroImage,onClick:()=>s(!0)}),b.jsx(Ya,{isOpen:i,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},Ya=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:a,isEditor:i,metadata:s})=>{var z;const[l,p]=D.useState(0),[c,x]=D.useState(0),[m,h]=D.useState(!1),[u,d]=D.useState(!1),[C,w]=D.useState({}),g=D.useRef(null),v=D.useRef(null),M=D.useRef(null),F=D.useRef(!1),T=D.useRef(null),y=D.useRef(null),E=D.useRef(null),k=D.useRef(null),j=D.useRef(!1),$=D.useRef(null),[O,B]=D.useState(!1),{appear:H,triggers:U,slider:f,thumbnail:N,controls:A,area:L,caption:S,layout:R}=o.lightboxBlock,{appearClass:X,backdropAppearClass:ie,backdropDisappearClass:re,disappearClass:he}=Ua(H.type,H.direction),I=(s==null?void 0:s.itemId)??null;D.useEffect(()=>{const _=()=>{setTimeout(()=>{var Y,J;(J=(Y=g.current)==null?void 0:Y.splide)==null||J.refresh()},16)},W=()=>{x(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",_),window.addEventListener("ArticleEditor.ComponentContent:change",W),()=>{window.removeEventListener("ArticleEditor.Layout:change",_),window.removeEventListener("ArticleEditor.ComponentContent:change",W)}},[]),D.useEffect(()=>{if(!e||!N.isActive){B(!1);return}const _=$.current;if(!_)return;const W=()=>{f.direction==="horiz"?B(_.scrollWidth>_.clientWidth):B(_.scrollHeight>_.clientHeight)};W();const Y=new ResizeObserver(W);return Y.observe(_),()=>Y.disconnect()},[e,N.isActive,n.length,C,f.direction]);const K=D.useCallback(()=>{const _=window.matchMedia("(max-width: 768px)").matches,W=Qn(L.color);_&&!i&&W>.9&&(document.body.style.backgroundColor=""),h(!0),F.current=!0;const Y=J=>{J.target===T.current&&J.animationName&&(T.current&&y.current&&T.current.removeEventListener("animationend",y.current),y.current=null,F.current&&(F.current=!1,t()),h(!1))};T.current&&(y.current=Y,T.current.addEventListener("animationend",Y))},[t,L.color,i]),fe=(_,W,Y)=>{var J,oe;if(_){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&l===n.length-1?K():(J=g.current)==null||J.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const ee=_.getBoundingClientRect(),q=W-ee.left,ce=Y-ee.top,te=ee.width,ae=ee.height;let ne;f.direction==="horiz"?ne=q<te/2?"-1":"+1":ne=ce<ae/2?"-1":"+1",(oe=g.current)==null||oe.go(ne)}}},le=_=>{if(j.current){j.current=!1;return}const W=n[l],Y=(W==null?void 0:W.image.objectFit)==="cover";let J,oe;if("changedTouches"in _&&_.changedTouches.length>0)J=_.changedTouches[0].clientX,oe=_.changedTouches[0].clientY;else if("clientX"in _)J=_.clientX,oe=_.clientY;else return;let ee;if(Y&&M.current){const q=Zn(M.current);ee=J>=q.left&&J<=q.right&&oe>=q.top&&oe<=q.bottom}else{const q=M.current?Jn(M.current):null;if(!q){_.target===_.currentTarget&&K();return}ee=J>=q.x&&J<=q.x+q.width&&oe>=q.y&&oe<=q.y+q.height}ee?fe(M.current,J,oe):K()},me=_=>{const W=_.target;(W.classList.contains(V.thumbsWrapper)||W.classList.contains(V.thumbsContainer))&&le(_)};D.useEffect(()=>{if(!e)return;const _=W=>{var Y,J;if(W.key==="Escape"){K();return}if(W.key==="ArrowRight"){p(oe=>(oe+1)%Math.max(n.length,1)),(Y=g.current)==null||Y.go("+1");return}W.key==="ArrowLeft"&&(p(oe=>(oe-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",_),()=>{window.removeEventListener("keydown",_)}},[e,K,n.length]),D.useEffect(()=>{if(e){if(p(0),x(W=>W+1),F.current=!1,h(!1),d(!1),w({}),!I)return;const _=new CustomEvent("page-overlay",{detail:{itemId:I}});window.dispatchEvent(_)}return()=>{T.current&&y.current&&(T.current.removeEventListener("animationend",y.current),y.current=null),d(!1)}},[e,I]),D.useEffect(()=>{v.current!==null&&v.current!==f.type&&x(_=>_+1),v.current=f.type},[f.type]),D.useEffect(()=>{if(!e)return;const _=document.body.style.overflow,W=window.matchMedia("(max-width: 768px)").matches,Y=Qn(L.color);document.body.style.overflow="hidden",d(!1);const J=ee=>{ee.target===T.current&&!F.current&&ee.animationName&&(W&&!i&&Y>.9&&(document.body.style.backgroundColor=L.color),d(!0),T.current&&E.current&&T.current.removeEventListener("animationend",E.current),E.current=null)};T.current&&(E.current=J,T.current.addEventListener("animationend",J));const oe=ee=>{const q=ee.target;q&&(q.closest(`.${V.thumbsWrapper}`)||q.closest(`.${V.thumbsContainer}`))||f.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",oe,{passive:!1}),()=>{document.body.style.overflow=_,document.removeEventListener("touchmove",oe),T.current&&E.current&&(T.current.removeEventListener("animationend",E.current),E.current=null),d(!1)}},[e,i,L.color,f.type]),D.useEffect(()=>{if(!e)return;const _=W=>{var J,oe;if(F.current){W.stopPropagation();return}if(j.current){j.current=!1;return}const Y=W.target;if(!(Y&&(Y.closest(`.${V.thumbsContainer}`)||Y.closest(`.${V.thumbItem}`)))){if(f.type==="slide"&&U.type==="drag"&&((oe=(J=g.current)==null?void 0:J.splide)!=null&&oe.root)){const ee=g.current.splide.root;if(Y&&(ee.contains(Y)||ee===Y))return}if(W.touches.length===0&&W.changedTouches.length>0){const ee=n[l],q=(ee==null?void 0:ee.image.objectFit)==="cover",ce=W.changedTouches[0];let te;if(q&&M.current){const ae=Zn(M.current);te=ce.clientX>=ae.left&&ce.clientX<=ae.right&&ce.clientY>=ae.top&&ce.clientY<=ae.bottom}else{const ae=M.current?Jn(M.current):null;if(!ae)return;te=ce.clientX>=ae.x&&ce.clientX<=ae.x+ae.width&&ce.clientY>=ae.y&&ce.clientY<=ae.y+ae.height}if(!te){W.stopPropagation(),F.current=!0;const ae=ne=>{ne.stopPropagation(),ne.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),K()}}}};return document.addEventListener("touchend",_,{passive:!0}),()=>{document.removeEventListener("touchend",_)}},[e,K,l,n]);const Ve=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&U.type==="drag";D.useEffect(()=>{var ne,xe;if(!e||!Ve||!((xe=(ne=g.current)==null?void 0:ne.splide)!=null&&xe.root))return;const _=g.current.splide.root,W=30,Y=(Q,de)=>{if(k.current){const $e=Math.abs(Q-k.current.x),Tt=Math.abs(de-k.current.y);($e>0||Tt>0)&&(j.current=!0)}},J=Q=>{k.current&&(Q.preventDefault(),Y(Q.clientX,Q.clientY))},oe=Q=>{k.current&&Q.touches.length>0&&(Q.preventDefault(),Y(Q.touches[0].clientX,Q.touches[0].clientY))},ee=(Q,de)=>{if(!k.current||!g.current){k.current=null;return}const $e=Math.abs(Q-k.current.x),Tt=Math.abs(de-k.current.y);Tt>W&&Tt>$e&&g.current.go(de<k.current.y?"+1":"-1"),k.current=null},q=Q=>{k.current&&ee(Q.clientX,Q.clientY),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("pointermove",J)},ce=Q=>{if(k.current){if(Q.changedTouches.length>0){const de=Q.changedTouches[0];ee(de.clientX,de.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",oe)}},te=Q=>{k.current={x:Q.clientX,y:Q.clientY},j.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",q),document.addEventListener("pointercancel",q)},ae=Q=>{Q.touches.length>0&&(k.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},j.current=!1,document.addEventListener("touchmove",oe,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return _.addEventListener("pointerdown",te),_.addEventListener("touchstart",ae),()=>{_.removeEventListener("pointerdown",te),_.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("touchmove",oe),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),k.current=null,j.current=!1}},[e,Ve,c]);const He={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(H.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?Ur.createPortal(b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:i?null:T,className:ue(V.background,m?re:ie,{[V.editor]:i},{[V.hidden]:!e}),style:{...He,...u&&!i&&!m?{position:"absolute"}:{}}}),b.jsxs("div",{ref:i?T:null,className:ue(V.contentStyle,m?he:X,{[V.editor]:i},{[V.hidden]:!e}),style:{animationDuration:`${parseInt(H.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[b.jsx(Dr,{onMove:_=>p(_.index),ref:g,className:V.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:U.type==="drag"&&!Ve,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((_,W)=>{const Y=$t(R.position,R.offset,i),J=`${P.scalingValue(R.padding.top,i)} ${P.scalingValue(R.padding.right,i)} ${P.scalingValue(R.padding.bottom,i)} ${P.scalingValue(R.padding.left,i)}`,oe=f.type==="scale"?(()=>{const{transform:ee,...q}=Y;return{...q,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{...Y,position:"absolute",padding:J,boxSizing:"border-box"};return b.jsx(Mr,{children:b.jsx("div",{className:V.imgWrapper,onClick:le,children:b.jsx("img",{ref:W===l?M:null,className:ue(V.imageStyle,{[V.contain]:_.image.objectFit==="contain",[V.cover]:_.image.objectFit==="cover",[V.scaleSlide]:f.type==="scale"}),src:_.image.url,alt:_.image.name??"",style:{...oe,pointerEvents:_.image.objectFit==="contain"?"none":"auto"}})})},W)})},c),A.isActive&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:ue(V.arrow,{[V.arrowVertical]:f.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:b.jsxs("button",{className:V.arrowInner,style:{transform:`translate(${P.scalingValue(A.offset.x,i)}, ${P.scalingValue(A.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${A.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=g.current)==null?void 0:_.go("-1")},"aria-label":"Previous",children:[A.arrowsImgUrl&&b.jsx(pt,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:ue(V.arrowImg,V.mirror)}),!A.arrowsImgUrl&&b.jsx(er,{color:A.color,className:ue(V.arrowIcon,V.arrowImg,V.mirror)})]})}),b.jsx("div",{className:ue(V.arrow,V.nextArrow,{[V.arrowVertical]:f.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:b.jsxs("button",{className:V.arrowInner,style:{transform:`translate(${P.scalingValue(A.offset.x*(f.direction==="horiz"?-1:1),i)}, ${P.scalingValue(A.offset.y,i)}) scale(${A.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var _;return(_=g.current)==null?void 0:_.go("+1")},"aria-label":"Next",children:[A.arrowsImgUrl&&b.jsx(pt,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:V.arrowImg}),!A.arrowsImgUrl&&b.jsx(er,{color:A.color,className:ue(V.arrowIcon,V.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const _=$t(L.closeIconAlign,L.closeIconOffset,i),W=`scale(${L.closeIconScale})`,Y=_.transform?`${_.transform} ${W}`:W;return b.jsx("button",{className:V.closeButton,style:{..._,transform:Y},onClick:K,"aria-label":"Close lightbox",children:b.jsx(pt,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),S&&S.isActive&&r.imageCaption&&((z=n[l])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:_,fontSettings:W,letterSpacing:Y,textAlign:J,wordSpacing:oe,fontSizeLineHeight:ee,textAppearance:q,color:ce}=r.imageCaption;return b.jsx("div",{className:V.caption,style:{...$t(S.alignment,S.offset,i),fontFamily:W.fontFamily,fontWeight:W.fontWeight,fontStyle:W.fontStyle,width:_.sizing==="auto"?"max-content":P.scalingValue(_.width,i),letterSpacing:P.scalingValue(Y,i),wordSpacing:P.scalingValue(oe,i),textAlign:J,fontSize:P.scalingValue(ee.fontSize,i),lineHeight:P.scalingValue(ee.lineHeight,i),textTransform:q.textTransform??"none",textDecoration:q.textDecoration??"none",fontVariant:q.fontVariant??"normal",color:ce},onClick:te=>te.stopPropagation(),children:b.jsx("div",{"data-styles":"imageCaption",className:V.captionTextInner,style:{"--link-color":S.linkColor,"--link-hover-color":S.linkHoverColor},children:b.jsx(Wr,{content:n[l].imageCaption})})})})(),N.isActive&&(()=>{const[_,W]=N.position.split("-"),Y=f.direction==="horiz"?`${_}-left`:N.position,J=$t(Y,N.offset,i),oe=()=>{if(f.direction==="horiz"){if(W==="left")return"flex-start";if(W==="center")return"center";if(W==="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:$,className:V.thumbsWrapper,onClick:ee=>me(ee),style:{position:i?"absolute":"fixed",...J,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:b.jsx("div",{className:ue(V.thumbsContainer,{[V.thumbsContainerVertical]:f.direction==="vert",[V.thumbsAlignStart]:N.align==="start",[V.thumbsAlignCenter]:N.align==="center",[V.thumbsAlignEnd]:N.align==="end"}),style:{gap:P.scalingValue(N.grid.gap,i),justifyContent:O?"flex-start":oe()},children:n.map((ee,q)=>{const ce=q===l,te=C[q],ne=N.grid.size*(ce?N.activeState.scale:1),xe=()=>{if(N.fit!=="fit")return{};if(!te)return f.direction==="horiz"?{height:P.scalingValue(ne,i)}:{width:P.scalingValue(ne,i)};const Q=te.width/te.height;if(f.direction==="horiz"){const de=ne,$e=de*Q;return{width:P.scalingValue($e,i),height:P.scalingValue(de,i)}}else{const de=ne,$e=de/Q;return{width:P.scalingValue(de,i),height:P.scalingValue($e,i)}}};return b.jsx("button",{className:V.thumbItem,style:{...f.direction==="horiz"&&N.fit!=="fit"?{height:P.scalingValue(ne,i)}:{},...f.direction==="vert"&&N.fit!=="fit"?{width:P.scalingValue(ne,i)}:{},...N.fit==="cover"?{width:P.scalingValue(ne,i),height:P.scalingValue(ne,i)}:{},...xe(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?N.activeState.opacity/100:N.opacity/100,"--thumb-hover":N.activeState.opacity/100},onClick:Q=>{var de;Q.stopPropagation(),p(q),(de=g.current)==null||de.go(q)},onMouseEnter:()=>{var Q;N.triggers==="hov"&&((Q=g.current)==null||Q.go(q))},children:b.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:Q=>{const de=Q.currentTarget;de.naturalWidth&&de.naturalHeight&&w($e=>({...$e,[q]:{width:de.naturalWidth,height:de.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 Xa={element:Ga,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 Je(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qa(e){return`
|
|
6
|
+
*/const oa="RichTextRenderer-module__link___BWeZ2",ra={link:oa},Zo=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?S.jsx("a",{className:ra.link,href:o.value,target:o.target,children:t(o.children)},r):S.jsx("span",{style:ia(o),children:o.text},r));return S.jsx(S.Fragment,{children:e.map((n,o)=>{const r=n.children;return S.jsx("div",{children:t(r)},o)})})};function ia(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 aa="SvgImage-module__svg___q3xE-",la="SvgImage-module__img___VsTm-",no={svg:aa,img:la},vt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o=""})=>{const[r,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")||!r?S.jsx("img",{src:e,alt:"",className:ue(no.img,o)}):S.jsx("span",{"data-supports-mask":r,className:ue(no.svg,o),style:{"--svg":`url(${e})`,"--fill":t,"--hover-fill":n}})},sa={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function ca({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=D.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:l,textAlign:d,wordSpacing:p,fontSizeLineHeight:_,textAppearance:m,color:h}=n.imageCaption,[c,u]=D.useState(void 0),[b,$]=D.useState(null),[f,w]=D.useState(0),[B,z]=D.useState(0),{direction:E,transition:v,controls:T,pagination:V,imageCaption:W,triggers:L}=e,F=D.useRef(v.type),{x:O,y:U}=e.controls.offset,H=g=>{r&&r.go(g)};return D.useEffect(()=>{if(!b)return;const g=new ResizeObserver(R=>{if(!r)return;const[x]=R;u({width:Math.round(x.contentRect.width),height:Math.round(x.contentRect.height)})});return g.observe(b),()=>g.unobserve(b)},[b]),D.useEffect(()=>{!r||F.current===v.type||(z(g=>g+1),F.current=v.type)},[v.type]),S.jsx("div",{className:ue(Y.wrapper,{[Y.editor]:o}),ref:$,children:S.jsxs("div",{className:Y.sliderInner,style:{width:c?c.width:"100%",height:c?c.height:"100%",backgroundColor:v.backgroundColor&&v.type==="fade in"?v.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&S.jsx("div",{className:ue(Y.captionBlock),children:S.jsx("div",{className:Y.captionTextWrapper,children:t.map((g,R)=>S.jsx("div",{className:ue(Y.captionText,sa[W.alignment],{[Y.withPointerEvents]:R===f&&o,[Y.active]:R===f}),style:{fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":k.scalingValue(i.width,o),letterSpacing:k.scalingValue(l,o),wordSpacing:k.scalingValue(p,o),textAlign:d,fontSize:k.scalingValue(_.fontSize,o),lineHeight:k.scalingValue(_.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:h,transitionDuration:v.duration?`${Math.round(parseInt(v.duration)/2)}ms`:"500ms"},children:S.jsx("div",{"data-styles":"imageCaption",className:Y.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:k.scalingValue(W.offset.y,o),left:k.scalingValue(W.offset.x,o)},children:S.jsx(Zo,{content:g.imageCaption})})},R))})}),S.jsx(Ko,{onMove:g=>{w(g.index)},ref:a,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:E==="horiz"||v.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:c?c.width:"100%",height:c?c.height:"100%",type:v.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((g,R)=>S.jsx(Jo,{children:S.jsx("div",{className:Y.sliderItem,children:S.jsx("div",{className:Y.imgWrapper,children:S.jsx("img",{className:ue(Y.sliderImage,{[Y.contain]:g.image.objectFit==="contain",[Y.cover]:g.image.objectFit==="cover"}),src:g.image.url,alt:g.image.name??""})})})},R))},B),T.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:ue(Y.arrow,{[Y.arrowVertical]:E==="vert",[Y.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:S.jsxs("button",{onClick:()=>{H("-1")},className:Y.arrowInner,style:{transform:`translate(${k.scalingValue(O,o)}, ${k.scalingValue(U*(E==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&S.jsx(vt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:ue(Y.arrowImg,Y.mirror)}),!T.arrowsImgUrl&&S.jsx(oo,{color:T.color,className:ue(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),S.jsx("div",{className:ue(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:E==="vert",[Y.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:S.jsxs("button",{className:Y.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${k.scalingValue(O*(E==="horiz"?-1:1),o)}, ${k.scalingValue(U,o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&S.jsx(vt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:Y.arrowImg}),!T.arrowsImgUrl&&S.jsx(oo,{color:T.color,className:ue(Y.arrowIcon,Y.arrowImg)})]})})]}),L.triggersList.click&&S.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),V.isActive&&S.jsx("div",{className:ue(Y.pagination,{[Y.paginationInsideBottom]:V.position==="inside-1"&&E==="horiz",[Y.paginationInsideTop]:V.position==="inside-2"&&E==="horiz",[Y.paginationOutsideBottom]:V.position==="outside-1"&&E==="horiz",[Y.paginationOutsideTop]:V.position==="outside-2"&&E==="horiz",[Y.paginationInsideLeft]:V.position==="inside-1"&&E==="vert",[Y.paginationInsideRight]:V.position==="inside-2"&&E==="vert",[Y.paginationOutsideLeft]:V.position==="outside-1"&&E==="vert",[Y.paginationOutsideRight]:V.position==="outside-2"&&E==="vert",[Y.paginationVertical]:E==="vert"}),children:S.jsx("div",{className:Y.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${k.scalingValue(V.offset.x,o)}, ${k.scalingValue(V.offset.y,o)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((g,R)=>S.jsx("button",{onClick:()=>{r&&r.go(R)},className:ue(Y.paginationItem),children:S.jsx("div",{className:ue(Y.dot,{[Y.activeDot]:R===f}),style:{backgroundColor:R===f?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},R))})})]})})}function oo({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.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 ua={element:ca,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},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"]}},pa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",da="ImageRevealSlider-module__image___Qjt-e",ga="ImageRevealSlider-module__link___N-iLG",fa="ImageRevealSlider-module__cursor___2U03d",ot={imageRevealSlider:pa,image:da,link:ga,cursor:fa};function ro(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,s=a/2,l=i/2;if(e>=o.x-s&&e<=o.x+s&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function sn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ma(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await sn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await sn(e);a=i.height/i.width*r}else{const i=await sn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function ya({settings:e,content:t,isEditor:n}){const[o,r]=D.useState(null),[a,i]=D.useState([]),[s,l]=D.useState(0),d=D.useRef(0),[p,_]=D.useState({x:0,y:0}),[m,h]=D.useState(1),[c,u]=D.useState("none"),b=D.useRef({x:0,y:0}),[$,f]=D.useState(!1),{sizeType:w,imageWidth:B,randomRangeImageWidth:z}=e.imageSize,{revealPosition:E,visible:v}=e.position,{cursorType:T,target:V,defaultCursorScale:W,defaultCursor:L,hoverCursorScale:F,hoverCursor:O}=e.cursor;D.useEffect(()=>{if(!o)return;const g=(A,C)=>{const N=o.getBoundingClientRect(),q=A-N.left,ie=C-N.top;if(_({x:q,y:ie}),T==="system"){u("none"),h(1);return}const Q=q,me=ie,I=document.elementFromPoint(N.left+Q,N.top+me);if(I&&I.closest("a")){u("none"),h(1);return}const K=ro(Q,me,a)||V==="area"?{img:O??"none",scale:F}:{img:L??"none",scale:W};u(K.img),h(K.scale)},R=A=>{A.stopPropagation(),b.current={x:A.clientX,y:A.clientY},g(A.clientX,A.clientY)},x=()=>{$&&g(b.current.x,b.current.y)};return o.addEventListener("mousemove",R),window.addEventListener("scroll",x,!0),()=>{o.removeEventListener("mousemove",R),window.removeEventListener("scroll",x,!0)}},[o,$,p,T,V,O,L,F,W,a]),D.useEffect(()=>{$||(u("none"),h(0))},[$]);const U=async(g,R,x,A={})=>{const{width:C,height:N,finalWidth:q}=await ma(g.image.url,w,B,z);let ie=0,Q=0;E==="same"?(ie=R/2,Q=x/2):(ie=A.x??Math.random()*R,Q=A.y??Math.random()*x);const me=Math.min(Math.max(ie,C/2),R-C/2),I=Math.min(Math.max(Q,N/2),x-N/2);return{id:d.current++,url:g.image.url,link:g.link,name:g.image.name,x:me,y:I,width:q}};D.useEffect(()=>{if(!o||t.length===0)return;const g=o.getBoundingClientRect(),R=g.width,x=g.height,A=[];(async()=>{const N=t[0],q=await U(N,R,x);A.push(q),i(A),l(1)})()},[w,B,z,E,o]),D.useEffect(()=>{v==="last One"&&i(g=>g.length>0?[g[g.length-1]]:[])},[v]);const H=async g=>{if(!o)return;const R=o.getBoundingClientRect(),x=g.clientX-R.left,A=g.clientY-R.top;if(V==="image"&&!ro(x,A,a))return;let C=0,N=0;E==="on Click"?(C=x,N=A):E==="same"?(C=R.width/2,N=R.height/2):(C=Math.random()*R.width,N=Math.random()*R.height);const q=t[s],ie=await U(q,R.width,R.height,{x:C,y:N});i(Q=>v==="all"?[...Q,ie]:[ie]),l(Q=>Q>=t.length-1?0:Q+1)};return S.jsxs("div",{ref:r,onClick:H,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:ot.imageRevealSlider,style:{cursor:c==="none"?"default":"none"},children:[a.map(g=>S.jsx("div",{className:ot.wrapper,style:{top:`${g.y}px`,left:`${g.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:g.width??"auto",height:"auto",cursor:c==="none"?"default":"none"},children:V==="area"&&g.link?S.jsx("a",{href:g.link,target:"_blank",className:ot.link,children:S.jsx("img",{src:g.url,alt:g.name,className:ot.image},g.id)}):S.jsx("img",{src:g.url,alt:g.name,className:ot.image},g.id)},g.id)),$&&S.jsx("div",{className:ot.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${m})`,backgroundImage:`url('${c}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ha={element:ya,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},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:""}]}}}},va="LightBox-module__hidden___9s-9x",ba="LightBox-module__heroImage___sTxNF",Sa="LightBox-module__background___rm9ml",xa="LightBox-module__editor___4ACaY",Ca="LightBox-module__contentStyle___Bgnsq",_a="LightBox-module__imageStyle___tLIlB",wa="LightBox-module__imgWrapper___LuFUp",$a="LightBox-module__contain___8-yaS",Ta="LightBox-module__cover___hNvOG",Aa="LightBox-module__caption___b6L2I",Ea="LightBox-module__captionTextInner___rCGNH",La="LightBox-module__lightboxSplide___XFuWC",Ia="LightBox-module__arrow___iz38X",ka="LightBox-module__arrowVertical___Zfz81",Ra="LightBox-module__nextArrow___zkAQN",Fa="LightBox-module__arrowInner___p48sW",Va="LightBox-module__arrowIcon___3VaFf",Na="LightBox-module__arrowImg___pNV88",Oa="LightBox-module__mirror___pjeXc",ja="LightBox-module__thumbsWrapper___GB-nU",Ba="LightBox-module__thumbsContainerVertical___wttk5",za="LightBox-module__thumbsContainer___osSma",Wa="LightBox-module__thumbsAlignStart___MO6tY",Ma="LightBox-module__thumbsAlignCenter___Q4sUx",Da="LightBox-module__thumbsAlignEnd___p4y9R",Ha="LightBox-module__thumbItem___HvnF3",Pa="LightBox-module__closeButton___g2khP",Ua="LightBox-module__fadeIn___0m5GW",Ga="LightBox-module__slideInLeft___gPYwC",Ya="LightBox-module__slideInRight___S-pPp",qa="LightBox-module__slideInTop___DFdAj",Xa="LightBox-module__slideInBottom___m27kZ",Ka="LightBox-module__fadeOut___55qBR",Ja="LightBox-module__slideOutLeft___NvU7P",Za="LightBox-module__slideOutRight___SK7eC",Qa="LightBox-module__slideOutTop___Vgg0z",el="LightBox-module__slideOutBottom___nJ0Ef",tl="LightBox-module__scaleSlide___vZriG",j={hidden:va,heroImage:ba,background:Sa,editor:xa,contentStyle:Ca,imageStyle:_a,imgWrapper:wa,contain:$a,cover:Ta,caption:Aa,captionTextInner:Ea,lightboxSplide:La,arrow:Ia,arrowVertical:ka,nextArrow:Ra,arrowInner:Fa,arrowIcon:Va,arrowImg:Na,mirror:Oa,thumbsWrapper:ja,thumbsContainerVertical:Ba,thumbsContainer:za,thumbsAlignStart:Wa,thumbsAlignCenter:Ma,thumbsAlignEnd:Da,thumbItem:Ha,closeButton:Pa,fadeIn:Ua,slideInLeft:Ga,slideInRight:Ya,slideInTop:qa,slideInBottom:Xa,fadeOut:Ka,slideOutLeft:Ja,slideOutRight:Za,slideOutTop:Qa,slideOutBottom:el,scaleSlide:tl},Nt=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:o.transform=`translate(${k.scalingValue(t.x,n)}, ${k.scalingValue(t.y,n)})`,o};function Qo(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 io(e){const t=e.getBoundingClientRect(),n=Qo(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,s=o/r,l=a/i;let d,p;l>s?(d=o,p=o/l):(p=r,d=r*l);const _=t.left+n.left,m=t.top+n.top,h=(o-d)/2+_,c=(r-p)/2+m;return{x:h,y:c,width:d,height:p}}function ao(e){const t=e.getBoundingClientRect(),n=Qo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function lo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function nl(e,t){const n=(()=>{if(e==="fade in")return j.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return j.slideInLeft;case"right":return j.slideInRight;case"top":return j.slideInTop;case"bottom":return j.slideInBottom;default:return j.slideInRight}return j.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return j.fadeIn;if(e==="slide in")switch(t){case"left":return j.slideInLeft;case"right":return j.slideInRight;case"top":return j.slideInTop;case"bottom":return j.slideInBottom;default:return j.slideInRight}return j.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return j.fadeOut;if(e==="slide in")switch(t){case"left":return j.slideOutLeft;case"right":return j.slideOutRight;case"top":return j.slideOutTop;case"bottom":return j.slideOutBottom;default:return j.slideOutRight}return j.fadeOut})(),a=(()=>{if(e==="fade in")return j.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return j.slideOutLeft;case"right":return j.slideOutRight;case"top":return j.slideOutTop;case"bottom":return j.slideOutBottom;default:return j.slideOutRight}return j.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const ol=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,s]=D.useState(!1),{url:l}=e.thumbnailBlock.cover;return D.useEffect(()=>{r==="close"&&s(!1),r==="open"&&s(!0)},[r]),S.jsxs(S.Fragment,{children:[S.jsx("img",{src:l,alt:"Cover",className:j.heroImage,onClick:()=>s(!0)}),S.jsx(rl,{isOpen:i,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},rl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:s})=>{var M;const[l,d]=D.useState(0),[p,_]=D.useState(0),[m,h]=D.useState(!1),[c,u]=D.useState(!1),[b,$]=D.useState({}),f=D.useRef(null),w=D.useRef(null),B=D.useRef(null),z=D.useRef(!1),E=D.useRef(null),v=D.useRef(null),T=D.useRef(null),V=D.useRef(null),W=D.useRef(!1),L=D.useRef(null),[F,O]=D.useState(!1),{appear:U,triggers:H,slider:g,thumbnail:R,controls:x,area:A,caption:C,layout:N}=r.lightboxBlock,{appearClass:q,backdropAppearClass:ie,backdropDisappearClass:Q,disappearClass:me}=nl(U.type,U.direction),I=(s==null?void 0:s.itemId)??null;D.useEffect(()=>{const y=()=>{setTimeout(()=>{var G,J;(J=(G=f.current)==null?void 0:G.splide)==null||J.refresh()},16)},P=()=>{_(G=>G+1)};return window.addEventListener("ArticleEditor.Layout:change",y),window.addEventListener("ArticleEditor.ComponentContent:change",P),()=>{window.removeEventListener("ArticleEditor.Layout:change",y),window.removeEventListener("ArticleEditor.ComponentContent:change",P)}},[]),D.useEffect(()=>{if(!e||!R.isActive){O(!1);return}const y=L.current;if(!y)return;const P=()=>{g.direction==="horiz"?O(y.scrollWidth>y.clientWidth):O(y.scrollHeight>y.clientHeight)};P();const G=new ResizeObserver(P);return G.observe(y),()=>G.disconnect()},[e,R.isActive,n.length,b,g.direction]);const K=D.useCallback(()=>{const y=window.matchMedia("(max-width: 768px)").matches,P=lo(A.color);y&&!i&&P>.9&&(document.body.style.backgroundColor=""),h(!0),z.current=!0;const G=J=>{J.target===E.current&&J.animationName&&(E.current&&v.current&&E.current.removeEventListener("animationend",v.current),v.current=null,z.current&&(z.current=!1,t()),h(!1))};E.current&&(v.current=G,E.current.addEventListener("animationend",G))},[t,A.color,i]),ye=(y,P,G)=>{var J,re;if(y){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&l===n.length-1?K():(J=f.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Z=y.getBoundingClientRect(),X=P-Z.left,oe=G-Z.top,ve=Z.width,le=Z.height;let ce;g.direction==="horiz"?ce=X<ve/2?"-1":"+1":ce=oe<le/2?"-1":"+1",(re=f.current)==null||re.go(ce)}}},ae=y=>{if(W.current){W.current=!1;return}const P=n[l],G=(P==null?void 0:P.image.objectFit)==="cover";let J,re;if("changedTouches"in y&&y.changedTouches.length>0)J=y.changedTouches[0].clientX,re=y.changedTouches[0].clientY;else if("clientX"in y)J=y.clientX,re=y.clientY;else return;let Z;if(G&&B.current){const X=ao(B.current);Z=J>=X.left&&J<=X.right&&re>=X.top&&re<=X.bottom}else{const X=B.current?io(B.current):null;if(!X){y.target===y.currentTarget&&K();return}Z=J>=X.x&&J<=X.x+X.width&&re>=X.y&&re<=X.y+X.height}Z?ye(B.current,J,re):K()},de=y=>{const P=y.target;(P.classList.contains(j.thumbsWrapper)||P.classList.contains(j.thumbsContainer))&&ae(y)};D.useEffect(()=>{if(!e)return;const y=P=>{var G,J;if(P.key==="Escape"){K();return}if(P.key==="ArrowRight"){d(re=>(re+1)%Math.max(n.length,1)),(G=f.current)==null||G.go("+1");return}P.key==="ArrowLeft"&&(d(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[e,K,n.length]),D.useEffect(()=>{if(e){if(d(0),_(P=>P+1),z.current=!1,h(!1),u(!1),$({}),!I)return;const y=new CustomEvent("page-overlay",{detail:{itemId:I}});window.dispatchEvent(y)}return()=>{E.current&&v.current&&(E.current.removeEventListener("animationend",v.current),v.current=null),u(!1)}},[e,I]),D.useEffect(()=>{w.current!==null&&w.current!==g.type&&_(y=>y+1),w.current=g.type},[g.type]),D.useEffect(()=>{if(!e)return;const y=document.body.style.overflow,P=window.matchMedia("(max-width: 768px)").matches,G=lo(A.color);document.body.style.overflow="hidden",u(!1);const J=Z=>{Z.target===E.current&&!z.current&&Z.animationName&&(P&&!i&&G>.9&&(document.body.style.backgroundColor=A.color),u(!0),E.current&&T.current&&E.current.removeEventListener("animationend",T.current),T.current=null)};E.current&&(T.current=J,E.current.addEventListener("animationend",J));const re=Z=>{const X=Z.target;X&&(X.closest(`.${j.thumbsWrapper}`)||X.closest(`.${j.thumbsContainer}`))||g.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=y,document.removeEventListener("touchmove",re),E.current&&T.current&&(E.current.removeEventListener("animationend",T.current),T.current=null),u(!1)}},[e,i,A.color,g.type]),D.useEffect(()=>{if(!e)return;const y=P=>{var J,re;if(z.current){P.stopPropagation();return}if(W.current){W.current=!1;return}const G=P.target;if(!(G&&(G.closest(`.${j.thumbsContainer}`)||G.closest(`.${j.thumbItem}`)))){if(g.type==="slide"&&H.type==="drag"&&((re=(J=f.current)==null?void 0:J.splide)!=null&&re.root)){const Z=f.current.splide.root;if(G&&(Z.contains(G)||Z===G))return}if(P.touches.length===0&&P.changedTouches.length>0){const Z=n[l],X=(Z==null?void 0:Z.image.objectFit)==="cover",oe=P.changedTouches[0];let ve;if(X&&B.current){const le=ao(B.current);ve=oe.clientX>=le.left&&oe.clientX<=le.right&&oe.clientY>=le.top&&oe.clientY<=le.bottom}else{const le=B.current?io(B.current):null;if(!le)return;ve=oe.clientX>=le.x&&oe.clientX<=le.x+le.width&&oe.clientY>=le.y&&oe.clientY<=le.y+le.height}if(!ve){P.stopPropagation(),z.current=!0;const le=ce=>{ce.stopPropagation(),ce.preventDefault(),document.removeEventListener("click",le,!0)};document.addEventListener("click",le,!0),K()}}}};return document.addEventListener("touchend",y,{passive:!0}),()=>{document.removeEventListener("touchend",y)}},[e,K,l,n]);const ge=(g.type==="scale"||g.type==="fade")&&g.direction==="vert"&&H.type==="drag";D.useEffect(()=>{var ce,Ne;if(!e||!ge||!((Ne=(ce=f.current)==null?void 0:ce.splide)!=null&&Ne.root))return;const y=f.current.splide.root,P=30,G=(ee,ne)=>{if(V.current){const be=Math.abs(ee-V.current.x),Ce=Math.abs(ne-V.current.y);(be>0||Ce>0)&&(W.current=!0)}},J=ee=>{V.current&&(ee.preventDefault(),G(ee.clientX,ee.clientY))},re=ee=>{V.current&&ee.touches.length>0&&(ee.preventDefault(),G(ee.touches[0].clientX,ee.touches[0].clientY))},Z=(ee,ne)=>{if(!V.current||!f.current){V.current=null;return}const be=Math.abs(ee-V.current.x),Ce=Math.abs(ne-V.current.y);Ce>P&&Ce>be&&f.current.go(ne<V.current.y?"+1":"-1"),V.current=null},X=ee=>{V.current&&Z(ee.clientX,ee.clientY),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("pointermove",J)},oe=ee=>{if(V.current){if(ee.changedTouches.length>0){const ne=ee.changedTouches[0];Z(ne.clientX,ne.clientY)}document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),document.removeEventListener("touchmove",re)}},ve=ee=>{V.current={x:ee.clientX,y:ee.clientY},W.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",X),document.addEventListener("pointercancel",X)},le=ee=>{ee.touches.length>0&&(V.current={x:ee.touches[0].clientX,y:ee.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",oe),document.addEventListener("touchcancel",oe))};return y.addEventListener("pointerdown",ve),y.addEventListener("touchstart",le),()=>{y.removeEventListener("pointerdown",ve),y.removeEventListener("touchstart",le),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),V.current=null,W.current=!1}},[e,ge,p]);const De={backgroundColor:A.color,backdropFilter:`blur(${A.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return document.getElementById(a)?or.createPortal(S.jsxs(S.Fragment,{children:[S.jsx("div",{ref:i?null:E,className:ue(j.background,m?Q:ie,{[j.editor]:i},{[j.hidden]:!e}),style:{...De,...c&&!i&&!m?{position:"absolute"}:{}}}),S.jsxs("div",{ref:i?E:null,className:ue(j.contentStyle,m?me:q,{[j.editor]:i},{[j.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[S.jsx(Ko,{onMove:y=>d(y.index),ref:f,className:j.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:H.type==="drag"&&!ge,perPage:1,width:"100%",height:"100%",type:g.type==="fade"||g.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":g.duration},children:n.map((y,P)=>{const G=Nt(N.position,N.offset,i),J=`${k.scalingValue(N.padding.top,i)} ${k.scalingValue(N.padding.right,i)} ${k.scalingValue(N.padding.bottom,i)} ${k.scalingValue(N.padding.left,i)}`,re=g.type==="scale"?(()=>{const{transform:Z,...X}=G;return{...X,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Z||"none"}})():{...G,position:"absolute",padding:J,boxSizing:"border-box"};return S.jsx(Jo,{children:S.jsx("div",{className:j.imgWrapper,onClick:ae,children:S.jsx("img",{ref:P===l?B:null,className:ue(j.imageStyle,{[j.contain]:y.image.objectFit==="contain",[j.cover]:y.image.objectFit==="cover",[j.scaleSlide]:g.type==="scale"}),src:y.image.url,alt:y.image.name??"",style:{...re,pointerEvents:y.image.objectFit==="contain"?"none":"auto"}})})},P)})},p),x.isActive&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:ue(j.arrow,{[j.arrowVertical]:g.direction==="vert"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:S.jsxs("button",{className:j.arrowInner,style:{transform:`translate(${k.scalingValue(x.offset.x,i)}, ${k.scalingValue(x.offset.y*(g.direction==="horiz"?1:-1),i)}) scale(${x.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var y;return(y=f.current)==null?void 0:y.go("-1")},"aria-label":"Previous",children:[x.arrowsImgUrl&&S.jsx(vt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:ue(j.arrowImg,j.mirror)}),!x.arrowsImgUrl&&S.jsx(so,{color:x.color,className:ue(j.arrowIcon,j.arrowImg,j.mirror)})]})}),S.jsx("div",{className:ue(j.arrow,j.nextArrow,{[j.arrowVertical]:g.direction==="vert"}),style:{color:x.color,"--arrow-hover-color":x.hover},children:S.jsxs("button",{className:j.arrowInner,style:{transform:`translate(${k.scalingValue(x.offset.x*(g.direction==="horiz"?-1:1),i)}, ${k.scalingValue(x.offset.y,i)}) scale(${x.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var y;return(y=f.current)==null?void 0:y.go("+1")},"aria-label":"Next",children:[x.arrowsImgUrl&&S.jsx(vt,{url:x.arrowsImgUrl,fill:x.color,hoverFill:x.hover,className:j.arrowImg}),!x.arrowsImgUrl&&S.jsx(so,{color:x.color,className:ue(j.arrowIcon,j.arrowImg)})]})})]}),A.closeIconUrl&&(()=>{const y=Nt(A.closeIconAlign,A.closeIconOffset,i),P=`scale(${A.closeIconScale})`,G=y.transform?`${y.transform} ${P}`:P;return S.jsx("button",{className:j.closeButton,style:{...y,transform:G},onClick:K,"aria-label":"Close lightbox",children:S.jsx(vt,{url:A.closeIconUrl,fill:A.closeIconColor??"#000000",hoverFill:A.closeIconHover??"#cccccc"})})})(),C&&C.isActive&&o.imageCaption&&((M=n[l])==null?void 0:M.imageCaption)&&(()=>{const{widthSettings:y,fontSettings:P,letterSpacing:G,textAlign:J,wordSpacing:re,fontSizeLineHeight:Z,textAppearance:X,color:oe}=o.imageCaption;return S.jsx("div",{className:j.caption,style:{...Nt(C.alignment,C.offset,i),fontFamily:P.fontFamily,fontWeight:P.fontWeight,fontStyle:P.fontStyle,width:y.sizing==="auto"?"max-content":k.scalingValue(y.width,i),letterSpacing:k.scalingValue(G,i),wordSpacing:k.scalingValue(re,i),textAlign:J,fontSize:k.scalingValue(Z.fontSize,i),lineHeight:k.scalingValue(Z.lineHeight,i),textTransform:X.textTransform??"none",textDecoration:X.textDecoration??"none",fontVariant:X.fontVariant??"normal",color:oe},onClick:ve=>ve.stopPropagation(),children:S.jsx("div",{"data-styles":"imageCaption",className:j.captionTextInner,style:{"--link-color":C.linkColor,"--link-hover-color":C.linkHoverColor},children:S.jsx(Zo,{content:n[l].imageCaption})})})})(),R.isActive&&(()=>{const[y,P]=R.position.split("-"),G=g.direction==="horiz"?`${y}-left`:R.position,J=Nt(G,R.offset,i),re=()=>{if(g.direction==="horiz"){if(P==="left")return"flex-start";if(P==="center")return"center";if(P==="right")return"flex-end"}else{if(y==="top")return"flex-start";if(y==="middle")return"center";if(y==="bottom")return"flex-end"}return"flex-start"};return S.jsx("div",{ref:L,className:j.thumbsWrapper,onClick:Z=>de(Z),style:{position:i?"absolute":"fixed",...J,...g.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:S.jsx("div",{className:ue(j.thumbsContainer,{[j.thumbsContainerVertical]:g.direction==="vert",[j.thumbsAlignStart]:R.align==="start",[j.thumbsAlignCenter]:R.align==="center",[j.thumbsAlignEnd]:R.align==="end"}),style:{gap:k.scalingValue(R.grid.gap,i),justifyContent:F?"flex-start":re()},children:n.map((Z,X)=>{const oe=X===l,ve=b[X],ce=R.grid.size*(oe?R.activeState.scale:1),Ne=()=>{if(R.fit!=="fit")return{};if(!ve)return g.direction==="horiz"?{height:k.scalingValue(ce,i)}:{width:k.scalingValue(ce,i)};const ee=ve.width/ve.height;if(g.direction==="horiz"){const ne=ce,be=ne*ee;return{width:k.scalingValue(be,i),height:k.scalingValue(ne,i)}}else{const ne=ce,be=ne/ee;return{width:k.scalingValue(ne,i),height:k.scalingValue(be,i)}}};return S.jsx("button",{className:j.thumbItem,style:{...g.direction==="horiz"&&R.fit!=="fit"?{height:k.scalingValue(ce,i)}:{},...g.direction==="vert"&&R.fit!=="fit"?{width:k.scalingValue(ce,i)}:{},...R.fit==="cover"?{width:k.scalingValue(ce,i),height:k.scalingValue(ce,i)}:{},...Ne(),transition:oe?"all 0.25s ease-out":"none",opacity:oe?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:ee=>{var ne;ee.stopPropagation(),d(X),(ne=f.current)==null||ne.go(X)},onMouseEnter:()=>{var ee;R.triggers==="hov"&&((ee=f.current)==null||ee.go(X))},children:S.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:ee=>{const ne=ee.currentTarget;ne.naturalWidth&&ne.naturalHeight&&$(be=>({...be,[X]:{width:ne.naturalWidth,height:ne.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${X}`)})})})})()]})]}),document.getElementById(a)):null};function so({color:e,className:t}){return S.jsx("svg",{viewBox:"0 0 10 18",className:t,children:S.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:S.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={element:ol,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},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 rt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function al(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${rt(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-form {
|
|
14
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
15
|
flex-direction: column;
|
|
16
|
+
width: 100%;
|
|
23
17
|
}
|
|
24
18
|
.${e}-fields {
|
|
25
19
|
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
26
21
|
flex: 1;
|
|
27
22
|
min-width: 0;
|
|
28
23
|
}
|
|
29
|
-
.${e}-fields.${e}-horizontal {
|
|
30
|
-
flex-direction: row;
|
|
31
|
-
}
|
|
32
|
-
.${e}-fields.${e}-vertical {
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
}
|
|
35
24
|
.${e}-field-group {
|
|
36
25
|
display: flex;
|
|
37
26
|
flex-direction: column;
|
|
@@ -39,7 +28,7 @@
|
|
|
39
28
|
min-width: 0;
|
|
40
29
|
}
|
|
41
30
|
.${e}-field-group.${e}-labeled {
|
|
42
|
-
gap: ${
|
|
31
|
+
gap: ${rt(4)};
|
|
43
32
|
}
|
|
44
33
|
.${e}-field-label {
|
|
45
34
|
white-space: nowrap;
|
|
@@ -47,15 +36,18 @@
|
|
|
47
36
|
}
|
|
48
37
|
.${e}-input {
|
|
49
38
|
width: 100%;
|
|
39
|
+
box-sizing: border-box;
|
|
50
40
|
line-height: 1.4;
|
|
51
41
|
outline: none;
|
|
52
42
|
background-color: var(--${e}-input-color);
|
|
53
43
|
color: var(--${e}-input-text-color);
|
|
54
44
|
border-color: var(--${e}-input-border-color);
|
|
45
|
+
transition: color 250, border-color 250ms, background-color 250ms, outline 250ms;
|
|
55
46
|
}
|
|
56
47
|
.${e}-input::placeholder {
|
|
57
48
|
color: var(--${e}-placeholder-color);
|
|
58
49
|
opacity: 1;
|
|
50
|
+
transition: color 250ms, opacity 250ms;
|
|
59
51
|
}
|
|
60
52
|
.${e}-input:hover {
|
|
61
53
|
background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
|
|
@@ -68,6 +60,7 @@
|
|
|
68
60
|
border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
|
|
69
61
|
}
|
|
70
62
|
.${e}-input:focus,
|
|
63
|
+
.${e}-input:focus-visible,
|
|
71
64
|
.${e}-wrapper.${e}-state-focus .${e}-input {
|
|
72
65
|
background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
|
|
73
66
|
color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
|
|
@@ -86,7 +79,6 @@
|
|
|
86
79
|
}
|
|
87
80
|
.${e}-input[data-field-type="textarea"] {
|
|
88
81
|
resize: vertical;
|
|
89
|
-
min-height: 60px;
|
|
90
82
|
}
|
|
91
83
|
.${e}-input:disabled {
|
|
92
84
|
background: #f5f5f5;
|
|
@@ -95,9 +87,11 @@
|
|
|
95
87
|
.${e}-button {
|
|
96
88
|
cursor: pointer;
|
|
97
89
|
white-space: nowrap;
|
|
90
|
+
outline: none;
|
|
98
91
|
background-color: var(--${e}-button-color);
|
|
99
92
|
color: var(--${e}-button-text-color);
|
|
100
93
|
border-color: var(--${e}-button-border-color);
|
|
94
|
+
transition: color 250ms, background-color 250ms, border-color 250ms;
|
|
101
95
|
}
|
|
102
96
|
.${e}-button:hover {
|
|
103
97
|
background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
|
|
@@ -109,30 +103,38 @@
|
|
|
109
103
|
color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
|
|
110
104
|
border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
|
|
111
105
|
}
|
|
106
|
+
.${e}-button:focus,
|
|
107
|
+
.${e}-button:focus-visible,
|
|
108
|
+
.${e}-wrapper.${e}-state-focus .${e}-button {
|
|
109
|
+
background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
|
|
110
|
+
color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
|
|
111
|
+
border-color: var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
|
|
112
|
+
}
|
|
113
|
+
.${e}-input:focus-visible,
|
|
114
|
+
.${e}-wrapper.${e}-state-focus .${e}-input {
|
|
115
|
+
outline: 1px solid var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
|
|
116
|
+
}
|
|
117
|
+
.${e}-button:focus-visible,
|
|
118
|
+
.${e}-wrapper.${e}-state-focus .${e}-button {
|
|
119
|
+
outline: 1px solid var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
|
|
120
|
+
}
|
|
112
121
|
.${e}-success {
|
|
113
|
-
margin-top: ${
|
|
114
|
-
font-size: ${
|
|
122
|
+
margin-top: ${rt(8)};
|
|
123
|
+
font-size: ${rt(14)};
|
|
115
124
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
116
125
|
}
|
|
117
126
|
.${e}-error {
|
|
118
|
-
margin-top: ${
|
|
119
|
-
font-size: ${
|
|
127
|
+
margin-top: ${rt(8)};
|
|
128
|
+
font-size: ${rt(14)};
|
|
120
129
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
121
130
|
}
|
|
122
131
|
.${e}-overlay-anchor {
|
|
123
132
|
position: relative;
|
|
124
133
|
height: auto;
|
|
125
134
|
}
|
|
126
|
-
|
|
127
|
-
flex: 0 0 auto;
|
|
128
|
-
align-self: stretch;
|
|
129
|
-
}
|
|
130
|
-
.${e}-fields-gap-spacer {
|
|
131
|
-
flex: 0 0 auto;
|
|
132
|
-
}
|
|
133
|
-
`}function Ka({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=P.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:s=[],buttonLabel:l="Sign up",input:p,button:c,gap:x=.008,fieldsGap:m=.008,label:h,buttonCorners:u,buttonStroke:d,inputCorners:C,inputStroke:w,buttonPadding:g,inputPadding:v,inputColor:M,inputTextColor:F,inputBorderColor:T,placeholderColor:y,buttonColor:E,buttonTextColor:k,buttonBorderColor:j,labelTextColor:$,successColor:O,errorColor:B,fontFamily:H,successMessage:U,errorMessage:f,stateOverrides:N}=e,A=a==="A"?"horizontal":"vertical",L=a==="C",S=s.slice(0,Math.min(i,s.length)),R=p?tn({...p,fontSettings:{...p.fontSettings,fontFamily:H}},t):void 0,X={...R,borderStyle:"solid",borderRadius:P.scalingValue(C??0,t),borderWidth:P.scalingValue(w??0,t),paddingTop:P.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:P.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:P.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:P.scalingValue((v==null?void 0:v.left)??0,t)},ie=c?tn({...c,fontSettings:{...c.fontSettings,fontFamily:H}},t):void 0,re=h?tn({...h,fontSettings:{...h.fontSettings,fontFamily:H}},t):void 0,he=Za(o,{inputColor:M,inputTextColor:F,inputBorderColor:T,placeholderColor:y,buttonColor:E,buttonTextColor:k,buttonBorderColor:j,labelTextColor:$,successColor:O,errorColor:B},N),[I,K]=D.useState(()=>Object.fromEntries(S.map(te=>[te.name,""]))),[fe,le]=D.useState("idle"),[me,Ve]=D.useState(null),He=r==="success"?"success":r==="error"?"error":fe,z=r==="error"?f:me,_=r==="filled"?Object.fromEntries(S.map(te=>[te.name,"Filled"])):I,W=r&&r!=="default"?`${o}-state-${r}`:"",Y=n==null?void 0:n.apiBase,J=n==null?void 0:n.projectId,oe=n==null?void 0:n.pluginConfigId,ee=!!(Y&&J&&oe),q=(te,ae)=>{K(ne=>({...ne,[te]:ae}))},ce=async te=>{te.preventDefault();const ae=Object.fromEntries(S.map(ne=>{var xe;return[ne.name,((xe=I[ne.name])==null?void 0:xe.trim())??""]}).filter(([,ne])=>ne));if(!(!ee||Object.keys(ae).length===0)){le("submitting"),Ve(null);try{const ne=`${Y}/projects/${J}/forms/${oe}/submit`,xe=await fetch(ne,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ae,pageUrl:typeof window<"u"?window.location.href:""})});if(!xe.ok){const Q=await xe.text();throw new Error(Q||`Request failed: ${xe.status}`)}le("success"),K(Object.fromEntries(S.map(Q=>[Q.name,""])))}catch(ne){le("error"),Ve(ne instanceof Error?ne.message:"Something went wrong")}}};return b.jsxs("div",{className:`${o}-wrapper ${W}`.trim(),style:he,children:[b.jsx("style",{children:qa(o)}),b.jsxs("form",{onSubmit:ce,className:`${o}-form ${o}-${A}`,children:[b.jsx("div",{className:`${o}-fields ${o}-${A}`,children:S.map((te,ae)=>b.jsxs(D.Fragment,{children:[b.jsxs("div",{className:`${o}-field-group${L?` ${o}-labeled`:""}`,children:[L&&b.jsx("span",{className:`${o}-field-label`,style:re,children:te.label||te.name}),te.type==="textarea"?b.jsx("textarea",{name:te.name,autoComplete:"off",value:_[te.name]??"",onChange:ne=>q(te.name,ne.target.value),placeholder:te.placeholder,className:`${o}-input`,style:X,rows:3,"data-field-type":"textarea"}):b.jsx("input",{type:te.type==="phone"?"tel":te.type==="email"?"email":"text",name:te.name,autoComplete:"off",value:_[te.name]??"",onChange:ne=>q(te.name,ne.target.value),placeholder:te.placeholder,required:te.type==="email",className:`${o}-input`,style:X})]}),ae<S.length-1&&b.jsx("div",{"data-axis":A==="horizontal"?"x":"y",className:`${o}-overlay-anchor ${o}-fields-gap-spacer`,"data-controls":"settings.fieldsGap",style:A==="horizontal"?{width:P.scalingValue(m,t),height:"auto"}:{height:P.scalingValue(m,t),width:"100%"}})]},ae))}),b.jsx("div",{"data-axis":A==="horizontal"?"x":"y",className:`${o}-overlay-anchor ${o}-gap-spacer`,"data-controls":"settings.gap",style:A==="horizontal"?{width:P.scalingValue(x,t)}:{height:P.scalingValue(x,t),width:"100%"}}),b.jsx("div",{className:`${o}-overlay-anchor`,children:b.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:P.scalingValue(u??0,t),borderWidth:P.scalingValue(d??0,t),paddingTop:P.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:P.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:P.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:P.scalingValue((g==null?void 0:g.left)??0,t),...ie},children:b.jsx("span",{className:`${o}-overlay-anchor`,children:fe==="submitting"?"...":l})})})]}),He==="success"&&b.jsx("p",{className:`${o}-success`,style:{...R,lineHeight:R==null?void 0:R.fontSize},children:U}),He==="error"&&b.jsx("p",{className:`${o}-error`,style:{...R,lineHeight:R==null?void 0:R.fontSize},role:"alert",children:z??f})]})}const tr={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Ja=["hover","focus","filled","success","error"];function Za(e,t,n){const r={};for(const[o,a]of Object.entries(tr))r[`--${e}-${a}`]=t[o];if(n)for(const o of Ja){const a=n[o];if(a)for(const[i,s]of Object.entries(tr)){const l=a[i];l!==void 0&&(r[`--${e}-${o}-${s}`]=l)}}return r}function tn(e,t){var n,r,o;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:P.scalingValue(e.letterSpacing,t),wordSpacing:P.scalingValue(e.wordSpacing,t),fontSize:P.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?P.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 Qa=`import React, { useState } from 'react';
|
|
135
|
+
`}function ll({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=k.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:s=[],buttonLabel:l,gap:d=.008,fieldsGap:p=.008,buttonCorners:_,buttonStroke:m,inputCorners:h,inputStroke:c,buttonPadding:u,inputPadding:b,inputColor:$,inputTextColor:f,inputBorderColor:w,placeholderColor:B,buttonColor:z,buttonTextColor:E,buttonBorderColor:v,labelTextColor:T,successColor:V,errorColor:W,fontFamily:L,inputFontSettings:F,inputFontSize:O,inputLineHeight:U,inputLetterSpacing:H,inputWordSpacing:g,inputTextAppearance:R,buttonFontSettings:x,buttonFontSize:A,buttonLineHeight:C,buttonLetterSpacing:N,buttonWordSpacing:q,buttonTextAppearance:ie,labelFontSettings:Q,labelFontSize:me,labelLineHeight:I,labelLetterSpacing:K,labelWordSpacing:ye,labelTextAppearance:ae,successMessage:de,errorMessage:ge,stateOverrides:De}=e,M=a==="B",y=s.slice(0,Math.min(i,s.length)),P={fontSettings:{fontFamily:L,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:O??.01,lineHeight:U,letterSpacing:H??0,wordSpacing:g??0,textAppearance:R},G=cn(P,t),J={...G,borderStyle:"solid",borderRadius:k.scalingValue(h??0,t),borderWidth:k.scalingValue(c??0,t),paddingTop:k.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:k.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:k.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:k.scalingValue((b==null?void 0:b.left)??0,t)},re={fontSettings:{fontFamily:L,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:A??.01,lineHeight:C,letterSpacing:N??0,wordSpacing:q??0,textAppearance:ie},Z=cn(re,t),X={fontSettings:{fontFamily:L,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:me??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:ye??0,textAppearance:ae},oe=cn(X,t),ve=cl(r,{inputColor:$,inputTextColor:f,inputBorderColor:w,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:z,buttonTextColor:E,buttonBorderColor:v,labelTextColor:T,successColor:V,errorColor:W},De),[le,ce]=D.useState(()=>Object.fromEntries(y.map(fe=>[fe.name,""]))),[Ne,ee]=D.useState("idle"),[ne,be]=D.useState(null),Ce=o==="success"?"success":o==="error"?"error":Ne,_e=o==="error"?ge:ne,ke=o==="filled"?Object.fromEntries(y.map(fe=>[fe.name,"Filled"])):le,er=Ce==="error"?k.getFormFieldValidationError(y,ke):null,tr=o&&o!=="default"?`${r}-state-${o}`:"",Wn=n==null?void 0:n.submitUrl,Mn=(fe,tt)=>{ce(He=>({...He,[fe]:tt}))},nr=async fe=>{fe.preventDefault();const tt=Object.fromEntries(y.map(Ae=>{var nt;return[Ae.name,((nt=le[Ae.name])==null?void 0:nt.trim())??""]}).filter(([,Ae])=>Ae));if(!Wn||Object.keys(tt).length===0)return;const He=k.getFormFieldValidationError(y,le);if(He){ee("error"),be(He);return}ee("submitting"),be(null);try{const Ae=await fetch(Wn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt)});if(!Ae.ok){const nt=await Ae.text();throw new Error(nt||`Request failed: ${Ae.status}`)}ee("success"),ce(Object.fromEntries(y.map(nt=>[nt.name,""])))}catch(Ae){ee("error"),be(Ae instanceof Error?Ae.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${tr}`.trim(),style:ve,children:[S.jsx("style",{children:al(r)}),S.jsxs("form",{onSubmit:nr,className:`${r}-form`,style:{gap:k.scalingValue(d,t)},children:[S.jsx("div",{className:`${r}-fields`,style:{gap:k.scalingValue(p,t)},children:y.map((fe,tt)=>S.jsxs("div",{className:`${r}-field-group${M?` ${r}-labeled`:""}`,children:[M&&S.jsx("span",{className:`${r}-field-label`,style:oe?{...oe,lineHeight:oe.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?S.jsx("textarea",{name:fe.name,autoComplete:"off",value:ke[fe.name]??"",onChange:He=>Mn(fe.name,He.target.value),placeholder:fe.placeholder,className:`${r}-input`,style:J,rows:1,"data-field-type":"textarea"}):S.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:ke[fe.name]??"",onChange:He=>Mn(fe.name,He.target.value),placeholder:fe.placeholder,required:fe.type==="email",className:`${r}-input`,style:J})]},tt))}),S.jsx("div",{className:`${r}-overlay-anchor`,children:S.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:k.scalingValue(_??0,t),borderWidth:k.scalingValue(m??0,t),paddingTop:k.scalingValue((u==null?void 0:u.top)??0,t),paddingRight:k.scalingValue((u==null?void 0:u.right)??0,t),paddingBottom:k.scalingValue((u==null?void 0:u.bottom)??0,t),paddingLeft:k.scalingValue((u==null?void 0:u.left)??0,t),...Z},children:S.jsx("span",{className:`${r}-overlay-anchor`,children:Ne==="submitting"?"...":l})})})]}),Ce==="success"&&S.jsx("p",{className:`${r}-success`,style:{...G,lineHeight:G==null?void 0:G.fontSize},children:de}),Ce==="error"&&S.jsx("p",{className:`${r}-error`,style:{...G,lineHeight:G==null?void 0:G.fontSize},role:"alert",children:er??_e??ge})]})}const co={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},sl=["hover","focus","filled","success","error"];function cl(e,t,n){const o={};for(const[r,a]of Object.entries(co))o[`--${e}-${a}`]=t[r];if(n)for(const r of sl){const a=n[r];if(a)for(const[i,s]of Object.entries(co)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${s}`]=l)}}return o}function cn(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?k.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant}}const ul=`import React, { useState } from 'react';
|
|
134
136
|
import { CommonComponentProps } from '../props';
|
|
135
|
-
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
137
|
+
import { getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
136
138
|
|
|
137
139
|
function sv(px: number): string {
|
|
138
140
|
return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
|
|
@@ -148,26 +150,15 @@ function getCSS(P: string): string {
|
|
|
148
150
|
}
|
|
149
151
|
.\${P}-form {
|
|
150
152
|
display: flex;
|
|
151
|
-
width: 100%;
|
|
152
|
-
}
|
|
153
|
-
.\${P}-form.\${P}-horizontal {
|
|
154
|
-
flex-direction: row;
|
|
155
|
-
align-items: center;
|
|
156
|
-
}
|
|
157
|
-
.\${P}-form.\${P}-vertical {
|
|
158
153
|
flex-direction: column;
|
|
154
|
+
width: 100%;
|
|
159
155
|
}
|
|
160
156
|
.\${P}-fields {
|
|
161
157
|
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
162
159
|
flex: 1;
|
|
163
160
|
min-width: 0;
|
|
164
161
|
}
|
|
165
|
-
.\${P}-fields.\${P}-horizontal {
|
|
166
|
-
flex-direction: row;
|
|
167
|
-
}
|
|
168
|
-
.\${P}-fields.\${P}-vertical {
|
|
169
|
-
flex-direction: column;
|
|
170
|
-
}
|
|
171
162
|
.\${P}-field-group {
|
|
172
163
|
display: flex;
|
|
173
164
|
flex-direction: column;
|
|
@@ -183,15 +174,18 @@ function getCSS(P: string): string {
|
|
|
183
174
|
}
|
|
184
175
|
.\${P}-input {
|
|
185
176
|
width: 100%;
|
|
177
|
+
box-sizing: border-box;
|
|
186
178
|
line-height: 1.4;
|
|
187
179
|
outline: none;
|
|
188
180
|
background-color: var(--\${P}-input-color);
|
|
189
181
|
color: var(--\${P}-input-text-color);
|
|
190
182
|
border-color: var(--\${P}-input-border-color);
|
|
183
|
+
transition: color 250, border-color 250ms, background-color 250ms, outline 250ms;
|
|
191
184
|
}
|
|
192
185
|
.\${P}-input::placeholder {
|
|
193
186
|
color: var(--\${P}-placeholder-color);
|
|
194
187
|
opacity: 1;
|
|
188
|
+
transition: color 250ms, opacity 250ms;
|
|
195
189
|
}
|
|
196
190
|
.\${P}-input:hover {
|
|
197
191
|
background-color: var(--\${P}-hover-input-color, var(--\${P}-input-color));
|
|
@@ -204,6 +198,7 @@ function getCSS(P: string): string {
|
|
|
204
198
|
border-color: var(--\${P}-hover-input-border-color, var(--\${P}-input-border-color));
|
|
205
199
|
}
|
|
206
200
|
.\${P}-input:focus,
|
|
201
|
+
.\${P}-input:focus-visible,
|
|
207
202
|
.\${P}-wrapper.\${P}-state-focus .\${P}-input {
|
|
208
203
|
background-color: var(--\${P}-focus-input-color, var(--\${P}-input-color));
|
|
209
204
|
color: var(--\${P}-focus-input-text-color, var(--\${P}-input-text-color));
|
|
@@ -222,7 +217,6 @@ function getCSS(P: string): string {
|
|
|
222
217
|
}
|
|
223
218
|
.\${P}-input[data-field-type="textarea"] {
|
|
224
219
|
resize: vertical;
|
|
225
|
-
min-height: 60px;
|
|
226
220
|
}
|
|
227
221
|
.\${P}-input:disabled {
|
|
228
222
|
background: #f5f5f5;
|
|
@@ -231,9 +225,11 @@ function getCSS(P: string): string {
|
|
|
231
225
|
.\${P}-button {
|
|
232
226
|
cursor: pointer;
|
|
233
227
|
white-space: nowrap;
|
|
228
|
+
outline: none;
|
|
234
229
|
background-color: var(--\${P}-button-color);
|
|
235
230
|
color: var(--\${P}-button-text-color);
|
|
236
231
|
border-color: var(--\${P}-button-border-color);
|
|
232
|
+
transition: color 250ms, background-color 250ms, border-color 250ms;
|
|
237
233
|
}
|
|
238
234
|
.\${P}-button:hover {
|
|
239
235
|
background-color: var(--\${P}-hover-button-color, var(--\${P}-button-color));
|
|
@@ -245,6 +241,21 @@ function getCSS(P: string): string {
|
|
|
245
241
|
color: var(--\${P}-hover-button-text-color, var(--\${P}-button-text-color));
|
|
246
242
|
border-color: var(--\${P}-hover-button-border-color, var(--\${P}-button-border-color));
|
|
247
243
|
}
|
|
244
|
+
.\${P}-button:focus,
|
|
245
|
+
.\${P}-button:focus-visible,
|
|
246
|
+
.\${P}-wrapper.\${P}-state-focus .\${P}-button {
|
|
247
|
+
background-color: var(--\${P}-focus-button-color, var(--\${P}-button-color));
|
|
248
|
+
color: var(--\${P}-focus-button-text-color, var(--\${P}-button-text-color));
|
|
249
|
+
border-color: var(--\${P}-focus-button-border-color, var(--\${P}-button-border-color));
|
|
250
|
+
}
|
|
251
|
+
.\${P}-input:focus-visible,
|
|
252
|
+
.\${P}-wrapper.\${P}-state-focus .\${P}-input {
|
|
253
|
+
outline: 1px solid var(--\${P}-focus-input-border-color, var(--\${P}-input-border-color));
|
|
254
|
+
}
|
|
255
|
+
.\${P}-button:focus-visible,
|
|
256
|
+
.\${P}-wrapper.\${P}-state-focus .\${P}-button {
|
|
257
|
+
outline: 1px solid var(--\${P}-focus-button-border-color, var(--\${P}-button-border-color));
|
|
258
|
+
}
|
|
248
259
|
.\${P}-success {
|
|
249
260
|
margin-top: \${sv(8)};
|
|
250
261
|
font-size: \${sv(14)};
|
|
@@ -259,13 +270,6 @@ function getCSS(P: string): string {
|
|
|
259
270
|
position: relative;
|
|
260
271
|
height: auto;
|
|
261
272
|
}
|
|
262
|
-
.\${P}-gap-spacer {
|
|
263
|
-
flex: 0 0 auto;
|
|
264
|
-
align-self: stretch;
|
|
265
|
-
}
|
|
266
|
-
.\${P}-fields-gap-spacer {
|
|
267
|
-
flex: 0 0 auto;
|
|
268
|
-
}
|
|
269
273
|
\`;
|
|
270
274
|
}
|
|
271
275
|
|
|
@@ -283,12 +287,9 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
283
287
|
type = 'A',
|
|
284
288
|
fieldsToShow = 2,
|
|
285
289
|
fields = [],
|
|
286
|
-
buttonLabel
|
|
287
|
-
input: inputTextStyle,
|
|
288
|
-
button: buttonTextStyle,
|
|
290
|
+
buttonLabel,
|
|
289
291
|
gap = 0.008,
|
|
290
292
|
fieldsGap = 0.008,
|
|
291
|
-
label: labelTextStyle,
|
|
292
293
|
buttonCorners,
|
|
293
294
|
buttonStroke,
|
|
294
295
|
inputCorners,
|
|
@@ -306,23 +307,46 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
306
307
|
successColor,
|
|
307
308
|
errorColor,
|
|
308
309
|
fontFamily,
|
|
310
|
+
inputFontSettings,
|
|
311
|
+
inputFontSize,
|
|
312
|
+
inputLineHeight,
|
|
313
|
+
inputLetterSpacing,
|
|
314
|
+
inputWordSpacing,
|
|
315
|
+
inputTextAppearance,
|
|
316
|
+
buttonFontSettings,
|
|
317
|
+
buttonFontSize,
|
|
318
|
+
buttonLineHeight,
|
|
319
|
+
buttonLetterSpacing,
|
|
320
|
+
buttonWordSpacing,
|
|
321
|
+
buttonTextAppearance,
|
|
322
|
+
labelFontSettings,
|
|
323
|
+
labelFontSize,
|
|
324
|
+
labelLineHeight,
|
|
325
|
+
labelLetterSpacing,
|
|
326
|
+
labelWordSpacing,
|
|
327
|
+
labelTextAppearance,
|
|
309
328
|
successMessage,
|
|
310
329
|
errorMessage: errorMessageText,
|
|
311
330
|
stateOverrides,
|
|
312
331
|
} = settings;
|
|
313
332
|
|
|
314
|
-
const
|
|
315
|
-
const showLabels = type === 'C';
|
|
333
|
+
const showLabels = type === 'B';
|
|
316
334
|
const visibleFields = fields.slice(0, Math.min(fieldsToShow, fields.length));
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
:
|
|
335
|
+
|
|
336
|
+
const resolvedInputTextStyle: TextStyles = {
|
|
337
|
+
fontSettings: {
|
|
338
|
+
fontFamily,
|
|
339
|
+
fontWeight: inputFontSettings?.fontWeight ?? 400,
|
|
340
|
+
fontStyle: inputFontSettings?.fontStyle ?? 'normal',
|
|
341
|
+
},
|
|
342
|
+
fontSize: inputFontSize ?? 0.01,
|
|
343
|
+
lineHeight: inputLineHeight,
|
|
344
|
+
letterSpacing: inputLetterSpacing ?? 0,
|
|
345
|
+
wordSpacing: inputWordSpacing ?? 0,
|
|
346
|
+
textAppearance: inputTextAppearance,
|
|
347
|
+
color: inputTextColor,
|
|
348
|
+
};
|
|
349
|
+
const inputCss = textStylesToCss(resolvedInputTextStyle, isEditor);
|
|
326
350
|
const inputFieldCss = {
|
|
327
351
|
...inputCss,
|
|
328
352
|
borderStyle: 'solid',
|
|
@@ -333,29 +357,48 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
333
357
|
paddingBottom: scalingValue(inputPadding?.bottom ?? 0, isEditor),
|
|
334
358
|
paddingLeft: scalingValue(inputPadding?.left ?? 0, isEditor),
|
|
335
359
|
} as React.CSSProperties;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
:
|
|
360
|
+
|
|
361
|
+
const resolvedButtonTextStyle: TextStyles = {
|
|
362
|
+
fontSettings: {
|
|
363
|
+
fontFamily,
|
|
364
|
+
fontWeight: buttonFontSettings?.fontWeight ?? 400,
|
|
365
|
+
fontStyle: buttonFontSettings?.fontStyle ?? 'normal',
|
|
366
|
+
},
|
|
367
|
+
fontSize: buttonFontSize ?? 0.01,
|
|
368
|
+
lineHeight: buttonLineHeight,
|
|
369
|
+
letterSpacing: buttonLetterSpacing ?? 0,
|
|
370
|
+
wordSpacing: buttonWordSpacing ?? 0,
|
|
371
|
+
textAppearance: buttonTextAppearance,
|
|
372
|
+
color: buttonTextColor,
|
|
373
|
+
};
|
|
374
|
+
const buttonTextCss = textStylesToCss(resolvedButtonTextStyle, isEditor);
|
|
375
|
+
|
|
376
|
+
const resolvedLabelTextStyle: TextStyles = {
|
|
377
|
+
fontSettings: {
|
|
378
|
+
fontFamily,
|
|
379
|
+
fontWeight: labelFontSettings?.fontWeight ?? 400,
|
|
380
|
+
fontStyle: labelFontSettings?.fontStyle ?? 'normal',
|
|
381
|
+
},
|
|
382
|
+
fontSize: labelFontSize ?? 0.01,
|
|
383
|
+
lineHeight: labelLineHeight,
|
|
384
|
+
letterSpacing: labelLetterSpacing ?? 0,
|
|
385
|
+
wordSpacing: labelWordSpacing ?? 0,
|
|
386
|
+
textAppearance: labelTextAppearance,
|
|
387
|
+
color: labelTextColor,
|
|
388
|
+
};
|
|
389
|
+
const labelTextCss = textStylesToCss(resolvedLabelTextStyle, isEditor);
|
|
354
390
|
|
|
355
391
|
const colorVars = buildColorVars(P, {
|
|
356
|
-
inputColor,
|
|
357
|
-
|
|
358
|
-
|
|
392
|
+
inputColor,
|
|
393
|
+
inputTextColor,
|
|
394
|
+
inputBorderColor,
|
|
395
|
+
placeholderColor: placeholderColor?.trim() ? placeholderColor : '#cccccc',
|
|
396
|
+
buttonColor,
|
|
397
|
+
buttonTextColor,
|
|
398
|
+
buttonBorderColor,
|
|
399
|
+
labelTextColor,
|
|
400
|
+
successColor,
|
|
401
|
+
errorColor,
|
|
359
402
|
}, stateOverrides);
|
|
360
403
|
|
|
361
404
|
const [fieldValues, setFieldValues] = useState<Record<string, string>>(() =>
|
|
@@ -371,13 +414,13 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
371
414
|
const displayValues = activeEvent === 'filled'
|
|
372
415
|
? Object.fromEntries(visibleFields.map((f) => [f.name, 'Filled']))
|
|
373
416
|
: fieldValues;
|
|
417
|
+
const validationErrorMessage =
|
|
418
|
+
displayStatus === 'error'
|
|
419
|
+
? getFormFieldValidationError(visibleFields, displayValues)
|
|
420
|
+
: null;
|
|
374
421
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
375
422
|
|
|
376
|
-
const
|
|
377
|
-
const projectId = metadata?.projectId as string | undefined;
|
|
378
|
-
const configId = metadata?.pluginConfigId as string | undefined;
|
|
379
|
-
const canSubmit = Boolean(apiBase && projectId && configId);
|
|
380
|
-
|
|
423
|
+
const submitUrl = metadata?.submitUrl as string | undefined;
|
|
381
424
|
const handleFieldChange = (name: string, value: string) => {
|
|
382
425
|
setFieldValues((prev) => ({ ...prev, [name]: value }));
|
|
383
426
|
};
|
|
@@ -387,20 +430,23 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
387
430
|
const payload = Object.fromEntries(
|
|
388
431
|
visibleFields.map((f) => [f.name, fieldValues[f.name]?.trim() ?? '']).filter(([, v]) => v)
|
|
389
432
|
);
|
|
390
|
-
if (!
|
|
433
|
+
if (!submitUrl || Object.keys(payload).length === 0) return;
|
|
434
|
+
|
|
435
|
+
const validationError = getFormFieldValidationError(visibleFields, fieldValues);
|
|
436
|
+
if (validationError) {
|
|
437
|
+
setStatus('error');
|
|
438
|
+
setErrorMessage(validationError);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
391
441
|
|
|
392
442
|
setStatus('submitting');
|
|
393
443
|
setErrorMessage(null);
|
|
394
444
|
|
|
395
445
|
try {
|
|
396
|
-
const
|
|
397
|
-
const res = await fetch(url, {
|
|
446
|
+
const res = await fetch(submitUrl, {
|
|
398
447
|
method: 'POST',
|
|
399
448
|
headers: { 'Content-Type': 'application/json' },
|
|
400
|
-
body: JSON.stringify(
|
|
401
|
-
...payload,
|
|
402
|
-
pageUrl: typeof window !== 'undefined' ? window.location.href : '',
|
|
403
|
-
}),
|
|
449
|
+
body: JSON.stringify(payload),
|
|
404
450
|
});
|
|
405
451
|
if (!res.ok) {
|
|
406
452
|
const text = await res.text();
|
|
@@ -420,64 +466,48 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
420
466
|
<style>{getCSS(P)}</style>
|
|
421
467
|
<form
|
|
422
468
|
onSubmit={handleSubmit}
|
|
423
|
-
className={\`\${P}-form
|
|
469
|
+
className={\`\${P}-form\`}
|
|
470
|
+
style={{ gap: scalingValue(gap, isEditor) }}
|
|
424
471
|
>
|
|
425
|
-
<div
|
|
472
|
+
<div
|
|
473
|
+
className={\`\${P}-fields\`}
|
|
474
|
+
style={{ gap: scalingValue(fieldsGap, isEditor) }}
|
|
475
|
+
>
|
|
426
476
|
{visibleFields.map((field, index) => (
|
|
427
|
-
<
|
|
428
|
-
|
|
429
|
-
{
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
style={inputFieldCss}
|
|
457
|
-
/>
|
|
458
|
-
)}
|
|
459
|
-
</div>
|
|
460
|
-
{index < visibleFields.length - 1 && (
|
|
461
|
-
<div
|
|
462
|
-
data-axis={layout === 'horizontal' ? 'x' : 'y'}
|
|
463
|
-
className={\`\${P}-overlay-anchor \${P}-fields-gap-spacer\`}
|
|
464
|
-
data-controls="settings.fieldsGap"
|
|
465
|
-
style={layout === 'horizontal'
|
|
466
|
-
? ({ width: scalingValue(fieldsGap, isEditor), height: 'auto' })
|
|
467
|
-
: ({ height: scalingValue(fieldsGap, isEditor), width: '100%' })}
|
|
477
|
+
<div key={index} className={\`\${P}-field-group\${showLabels ? \` \${P}-labeled\` : ''}\`}>
|
|
478
|
+
{showLabels && (
|
|
479
|
+
<span className={\`\${P}-field-label\`} style={labelTextCss ? { ...labelTextCss, lineHeight: labelTextCss.fontSize } : undefined}>
|
|
480
|
+
{field.label || field.name}
|
|
481
|
+
</span>
|
|
482
|
+
)}
|
|
483
|
+
{field.type === 'textarea' ? (
|
|
484
|
+
<textarea
|
|
485
|
+
name={field.name}
|
|
486
|
+
autoComplete="off"
|
|
487
|
+
value={displayValues[field.name] ?? ''}
|
|
488
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
489
|
+
placeholder={field.placeholder}
|
|
490
|
+
className={\`\${P}-input\`}
|
|
491
|
+
style={inputFieldCss}
|
|
492
|
+
rows={1}
|
|
493
|
+
data-field-type="textarea"
|
|
494
|
+
/>
|
|
495
|
+
) : (
|
|
496
|
+
<input
|
|
497
|
+
type={field.type === 'phone' ? 'tel' : field.type === 'email' ? 'email' : 'text'}
|
|
498
|
+
name={field.name}
|
|
499
|
+
autoComplete="off"
|
|
500
|
+
value={displayValues[field.name] ?? ''}
|
|
501
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
502
|
+
placeholder={field.placeholder}
|
|
503
|
+
required={field.type === 'email'}
|
|
504
|
+
className={\`\${P}-input\`}
|
|
505
|
+
style={inputFieldCss}
|
|
468
506
|
/>
|
|
469
507
|
)}
|
|
470
|
-
</
|
|
508
|
+
</div>
|
|
471
509
|
))}
|
|
472
510
|
</div>
|
|
473
|
-
<div
|
|
474
|
-
data-axis={layout === 'horizontal' ? 'x' : 'y'}
|
|
475
|
-
className={\`\${P}-overlay-anchor \${P}-gap-spacer\`}
|
|
476
|
-
data-controls="settings.gap"
|
|
477
|
-
style={layout === 'horizontal'
|
|
478
|
-
? ({ width: scalingValue(gap, isEditor) })
|
|
479
|
-
: ({ height: scalingValue(gap, isEditor), width: '100%' })}
|
|
480
|
-
/>
|
|
481
511
|
<div className={\`\${P}-overlay-anchor\`}>
|
|
482
512
|
<button
|
|
483
513
|
type="submit"
|
|
@@ -513,7 +543,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
513
543
|
style={{ ...inputCss, lineHeight: inputCss?.fontSize }}
|
|
514
544
|
role="alert"
|
|
515
545
|
>
|
|
516
|
-
{displayError ?? errorMessageText}
|
|
546
|
+
{validationErrorMessage ?? displayError ?? errorMessageText}
|
|
517
547
|
</p>
|
|
518
548
|
)}
|
|
519
549
|
</div>
|
|
@@ -569,16 +599,31 @@ type ColorKeys =
|
|
|
569
599
|
type StateColorOverrides = Partial<Record<ColorKeys, string>>;
|
|
570
600
|
|
|
571
601
|
type FormSettings = {
|
|
572
|
-
type: 'A' | 'B'
|
|
602
|
+
type: 'A' | 'B';
|
|
573
603
|
fontFamily: string;
|
|
574
604
|
fieldsToShow: number;
|
|
575
605
|
fields: FormFieldItem[];
|
|
576
606
|
buttonLabel?: string;
|
|
577
|
-
input?: TextStyles;
|
|
578
|
-
button?: TextStyles;
|
|
579
607
|
gap?: number;
|
|
580
608
|
fieldsGap?: number;
|
|
581
|
-
|
|
609
|
+
inputFontSettings?: { fontWeight: number; fontStyle: string };
|
|
610
|
+
inputFontSize?: number;
|
|
611
|
+
inputLineHeight?: number;
|
|
612
|
+
inputLetterSpacing?: number;
|
|
613
|
+
inputWordSpacing?: number;
|
|
614
|
+
inputTextAppearance?: TextStyles['textAppearance'];
|
|
615
|
+
buttonFontSettings?: { fontWeight: number; fontStyle: string };
|
|
616
|
+
buttonFontSize?: number;
|
|
617
|
+
buttonLineHeight?: number;
|
|
618
|
+
buttonLetterSpacing?: number;
|
|
619
|
+
buttonWordSpacing?: number;
|
|
620
|
+
buttonTextAppearance?: TextStyles['textAppearance'];
|
|
621
|
+
labelFontSettings?: { fontWeight: number; fontStyle: string };
|
|
622
|
+
labelFontSize?: number;
|
|
623
|
+
labelLineHeight?: number;
|
|
624
|
+
labelLetterSpacing?: number;
|
|
625
|
+
labelWordSpacing?: number;
|
|
626
|
+
labelTextAppearance?: TextStyles['textAppearance'];
|
|
582
627
|
buttonCorners?: number;
|
|
583
628
|
buttonStroke?: number;
|
|
584
629
|
inputCorners?: number;
|
|
@@ -653,4 +698,167 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
653
698
|
fontVariant: textStyles.textAppearance?.fontVariant
|
|
654
699
|
};
|
|
655
700
|
}
|
|
656
|
-
`,el=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Email is required"},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Name is required"},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Company is required"},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Phone is required"},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],nn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}},tl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],rn=e=>({fontSettings:{fontWeight:e,fontStyle:"normal"},lineHeight:0,letterSpacing:0,wordSpacing:0,fontSize:.01,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),nl={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",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},successMessage:{type:"string",scope:"layout",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"layout",title:"Error Message",display:{type:"text-input"}},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:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Input 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:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},buttonBorderColor:{type:"string",scope:"layout",title:"Button Border Color",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"layout",title:"Label Color",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"layout"},fontFamily:{type:"string",scope:"layout",title:"Font family",display:{type:"font-family-select"}},input:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]},button:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]},label:{type:"object",scope:"layout",properties:nn,layout:["fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}},defaults:{fieldsToShow:2,fields:el,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",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{},fontFamily:"Arial",input:rn(400),button:rn(700),label:rn(400),successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."}},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:"accordion",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"]}]}}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"accordion",title:"",options:{Input:["input"],Button:["button"]}}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","successMessage","errorMessage"]}],paletteBookmark:{items:[...tl],panelIds:["general","typeStyle"],stateItems:{default:["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonColor","buttonTextColor","buttonBorderColor"],focus:["inputColor","inputTextColor","inputBorderColor"],filled:["inputColor","inputTextColor","inputBorderColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},rl={element:Ka,id:"form",name:"Form",version:1,defaultSize:{width:400,height:42},schema:nl,sourceCode:Qa},ol="OnelinerForm-module__wrapper___BCMAA",il="OnelinerForm-module__form___ED-dE",al="OnelinerForm-module__input___Dylt7",ll="OnelinerForm-module__submitBtn___aHZXa",sl="OnelinerForm-module__success___KhwKm",cl="OnelinerForm-module__error___c8WbI",ul="OnelinerForm-module__overlayAnchor___zxYKj",Pe={wrapper:ol,form:il,input:al,submitBtn:ll,success:sl,error:cl,overlayAnchor:ul};function pl({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,[c,x]=D.useState(""),[m,h]=D.useState("idle"),[u,d]=D.useState(null),C=n==null?void 0:n.apiBase,w=n==null?void 0:n.projectId,g=!!(C&&w),v=a?nr(a,t):void 0,M=i?nr(i,t):void 0,F={borderRadius:P.scalingValue(s/1440,t),borderWidth:P.scalingValue(l/1440,t),borderStyle:"solid",borderColor:p},T={borderLeftWidth:P.scalingValue(l/1440,t),borderLeftStyle:"solid",borderLeftColor:p},y=async E=>{E.preventDefault();const k=c.trim();if(!(!g||!k)){h("submitting"),d(null);try{const j=await fetch(`${C}/projects/${w}/forms/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r.name]:k,pageUrl:typeof window<"u"?window.location.href:""})});if(!j.ok){const $=await j.text();throw new Error($||`Request failed: ${j.status}`)}h("success"),x("")}catch(j){h("error"),d(j instanceof Error?j.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:c,onChange:E=>x(E.target.value),placeholder:r.placeholder,required:r.type==="email",className:Pe.input,style:v})}),b.jsx("div",{className:Pe.overlayAnchor,children:b.jsx("button",{type:"submit",className:Pe.submitBtn,style:{...M,...T},children:m==="submitting"?"...":o})})]}),m==="success"&&b.jsx("p",{className:Pe.success,children:"Thanks for subscribing!"}),m==="error"&&u&&b.jsx("p",{className:Pe.error,role:"alert",children:u})]})}function nr(e,t){return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:P.scalingValue(e.letterSpacing,t),wordSpacing:P.scalingValue(e.wordSpacing,t),fontSize:P.scalingValue(e.fontSize,t),color:e.color}}const rr={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"}}},or=(e,t)=>({fontSettings:{fontFamily:"Arial",fontWeight:e,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,fontSize:.01,color:t}),dl={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:rr},button:{type:"object",scope:"layout",properties:rr}},defaults:{field:{name:"email",type:"email",placeholder:"Your email"},buttonLabel:"Submit",corners:40,stroke:1,strokeColor:"#cccccc",input:or(400,"#999999"),button:or(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"]}}]}]},gl={element:pl,id:"oneliner-form",name:"Oneliner",version:1,defaultSize:{width:"50%",height:60},schema:dl},fl=[Qi,aa,Xa,rl,gl];exports.components=fl;exports.isSchemaV1=Gr;
|
|
701
|
+
`,pl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],un={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},dl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],gl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:8},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},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:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text Color",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"layout",title:"Input 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:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},buttonBorderColor:{type:"string",scope:"layout",title:"Button Border Color",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"layout",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"layout"},fontFamily:{type:"string",scope:"layout",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...un.fontSettings,scope:"layout",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...un.fontSettings,scope:"layout",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...un.fontSettings,scope:"layout",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}}},defaults:{fieldsToShow:2,fields:pl,type:"A",inputColor:"#FFFFFF",inputTextColor:"#999999",inputBorderColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:.0026,buttonCorners:.192,inputStroke:.0026,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.0373,inputLineHeight:.0373,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:.001,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"row",title:"Button",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"Input",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"Button",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"Label",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...dl],panelIds:["general","typeStyle"],stateItems:{default:["inputColor","inputBorderColor","placeholderColor","placeholderTextColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor"],filled:["inputColor","inputTextColor","inputBorderColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},fl={element:ll,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:400,height:42},schema:gl,sourceCode:ul};function Ot(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ml(e){return`
|
|
702
|
+
.${e}-wrapper {
|
|
703
|
+
display: flex;
|
|
704
|
+
flex-direction: column;
|
|
705
|
+
width: 100%;
|
|
706
|
+
height: 100%;
|
|
707
|
+
align-items: stretch;
|
|
708
|
+
justify-content: center;
|
|
709
|
+
}
|
|
710
|
+
.${e}-form {
|
|
711
|
+
display: flex;
|
|
712
|
+
width: 100%;
|
|
713
|
+
align-items: stretch;
|
|
714
|
+
overflow: hidden;
|
|
715
|
+
border-color: var(--${e}-stroke-color);
|
|
716
|
+
transition: border-color 250ms;
|
|
717
|
+
}
|
|
718
|
+
.${e}-form:hover {
|
|
719
|
+
border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
|
|
720
|
+
}
|
|
721
|
+
.${e}-form:focus-within {
|
|
722
|
+
border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
|
|
723
|
+
}
|
|
724
|
+
.${e}-wrapper.${e}-state-hover .${e}-form {
|
|
725
|
+
border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
|
|
726
|
+
}
|
|
727
|
+
.${e}-wrapper.${e}-state-focus .${e}-form {
|
|
728
|
+
border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
|
|
729
|
+
}
|
|
730
|
+
.${e}-wrapper.${e}-state-filled .${e}-form {
|
|
731
|
+
border-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
|
|
732
|
+
}
|
|
733
|
+
.${e}-inputWrap {
|
|
734
|
+
position: relative;
|
|
735
|
+
display: flex;
|
|
736
|
+
align-items: center;
|
|
737
|
+
flex: 1;
|
|
738
|
+
min-width: 0;
|
|
739
|
+
background-color: var(--${e}-input-color);
|
|
740
|
+
transition: background-color 250ms;
|
|
741
|
+
}
|
|
742
|
+
.${e}-inputWrap:hover,
|
|
743
|
+
.${e}-wrapper.${e}-state-hover .${e}-inputWrap {
|
|
744
|
+
background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
|
|
745
|
+
}
|
|
746
|
+
.${e}-inputWrap:focus-within,
|
|
747
|
+
.${e}-wrapper.${e}-state-focus .${e}-inputWrap {
|
|
748
|
+
background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
|
|
749
|
+
}
|
|
750
|
+
.${e}-wrapper.${e}-state-filled .${e}-inputWrap {
|
|
751
|
+
background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
|
|
752
|
+
}
|
|
753
|
+
.${e}-input {
|
|
754
|
+
flex: 1;
|
|
755
|
+
min-width: 0;
|
|
756
|
+
background: transparent;
|
|
757
|
+
border: none;
|
|
758
|
+
outline: none;
|
|
759
|
+
color: var(--${e}-input-text-color);
|
|
760
|
+
transition: color 250ms, background-color 250ms, border-color 250ms;
|
|
761
|
+
}
|
|
762
|
+
.${e}-input:hover {
|
|
763
|
+
color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
|
|
764
|
+
}
|
|
765
|
+
.${e}-inputWrap:hover .${e}-input,
|
|
766
|
+
.${e}-wrapper.${e}-state-hover .${e}-input {
|
|
767
|
+
color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
|
|
768
|
+
}
|
|
769
|
+
.${e}-input:focus,
|
|
770
|
+
.${e}-wrapper.${e}-state-focus .${e}-input {
|
|
771
|
+
color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
|
|
772
|
+
}
|
|
773
|
+
.${e}-wrapper.${e}-state-filled .${e}-input {
|
|
774
|
+
color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
|
|
775
|
+
}
|
|
776
|
+
.${e}-input::placeholder {
|
|
777
|
+
color: var(--${e}-placeholder-color);
|
|
778
|
+
opacity: 1;
|
|
779
|
+
transition: color 250ms, opacity 250ms;
|
|
780
|
+
}
|
|
781
|
+
.${e}-inputWrap:hover .${e}-input::placeholder,
|
|
782
|
+
.${e}-wrapper.${e}-state-hover .${e}-input::placeholder {
|
|
783
|
+
color: var(--${e}-hover-placeholder-color, var(--${e}-placeholder-color));
|
|
784
|
+
}
|
|
785
|
+
.${e}-inputWrap:focus-within .${e}-input::placeholder,
|
|
786
|
+
.${e}-wrapper.${e}-state-focus .${e}-input::placeholder {
|
|
787
|
+
color: var(--${e}-focus-placeholder-color, var(--${e}-placeholder-color));
|
|
788
|
+
}
|
|
789
|
+
.${e}-wrapper.${e}-state-filled .${e}-input::placeholder {
|
|
790
|
+
color: var(--${e}-filled-placeholder-color, var(--${e}-placeholder-color));
|
|
791
|
+
}
|
|
792
|
+
.${e}-submitBtn {
|
|
793
|
+
box-sizing: border-box;
|
|
794
|
+
height: 100%;
|
|
795
|
+
display: flex;
|
|
796
|
+
align-items: center;
|
|
797
|
+
justify-content: center;
|
|
798
|
+
border: none;
|
|
799
|
+
cursor: pointer;
|
|
800
|
+
white-space: nowrap;
|
|
801
|
+
background-color: var(--${e}-button-color);
|
|
802
|
+
color: var(--${e}-button-text-color);
|
|
803
|
+
border-left-style: solid;
|
|
804
|
+
border-left-color: var(--${e}-stroke-color);
|
|
805
|
+
transition: color 250ms, background-color 250ms, border-color 250ms;
|
|
806
|
+
}
|
|
807
|
+
.${e}-submitBtn img {
|
|
808
|
+
display: block;
|
|
809
|
+
box-sizing: border-box;
|
|
810
|
+
flex: 0 1 auto;
|
|
811
|
+
min-width: 0;
|
|
812
|
+
height: 100%;
|
|
813
|
+
width: auto;
|
|
814
|
+
max-width: 100%;
|
|
815
|
+
max-height: 100%;
|
|
816
|
+
object-fit: contain;
|
|
817
|
+
}
|
|
818
|
+
.${e}-submitBtn svg {
|
|
819
|
+
display: block;
|
|
820
|
+
box-sizing: border-box;
|
|
821
|
+
flex: 0 1 auto;
|
|
822
|
+
min-width: 0;
|
|
823
|
+
height: 100%;
|
|
824
|
+
width: auto;
|
|
825
|
+
max-width: 100%;
|
|
826
|
+
max-height: 100%;
|
|
827
|
+
}
|
|
828
|
+
.${e}-submitBtn:hover,
|
|
829
|
+
.${e}-wrapper.${e}-state-hover .${e}-submitBtn {
|
|
830
|
+
background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
|
|
831
|
+
color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
|
|
832
|
+
border-left-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
|
|
833
|
+
}
|
|
834
|
+
.${e}-submitBtn:focus,
|
|
835
|
+
.${e}-wrapper.${e}-state-focus .${e}-submitBtn {
|
|
836
|
+
background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
|
|
837
|
+
color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
|
|
838
|
+
border-left-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
|
|
839
|
+
}
|
|
840
|
+
.${e}-wrapper.${e}-state-filled .${e}-submitBtn {
|
|
841
|
+
background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
|
|
842
|
+
color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
|
|
843
|
+
border-left-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
|
|
844
|
+
}
|
|
845
|
+
.${e}-wrapper.${e}-state-success .${e}-input,
|
|
846
|
+
.${e}-wrapper.${e}-state-success .${e}-submitBtn {
|
|
847
|
+
pointer-events: none;
|
|
848
|
+
}
|
|
849
|
+
.${e}-overlayAnchor {
|
|
850
|
+
position: relative;
|
|
851
|
+
display: flex;
|
|
852
|
+
align-items: center;
|
|
853
|
+
}
|
|
854
|
+
.${e}-success {
|
|
855
|
+
margin-top: ${Ot(8)};
|
|
856
|
+
font-size: ${Ot(14)};
|
|
857
|
+
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
858
|
+
}
|
|
859
|
+
.${e}-error {
|
|
860
|
+
margin-top: ${Ot(8)};
|
|
861
|
+
font-size: ${Ot(14)};
|
|
862
|
+
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
863
|
+
}
|
|
864
|
+
`}const yl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=k.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,submitButtonContent:s,buttonLabel:l,buttonIcon:d,fieldsToShow:p=1,fontFamily:_,input:m,button:h,inputFontSettings:c,inputFontSize:u,inputLineHeight:b,inputLetterSpacing:$,inputWordSpacing:f,inputTextAppearance:w,buttonFontSettings:B,buttonFontSize:z,buttonLineHeight:E,buttonLetterSpacing:v,buttonWordSpacing:T,buttonTextAppearance:V,minHeight:W,corners:L,stroke:F,stateOverrides:O,inputPadding:U,buttonPadding:H,successMessage:g="Thanks for subscribing!",errorMessage:R="Please, fill all required fields."}=e,x=a.slice(0,Math.min(p,a.length)),[A,C]=D.useState(()=>Object.fromEntries(x.map(ne=>[ne.name,""]))),[N,q]=D.useState("idle"),[ie,Q]=D.useState(null),me=o==="success"?"success":o==="error"?"error":N,I=o==="error"?R:ie,K=o==="filled"?Object.fromEntries(x.map(ne=>[ne.name,"Filled"])):A,ye=me==="error"?k.getFormFieldValidationError(x,K):null,ae=o&&o!=="default"?`${r}-state-${o}`:"",de=n==null?void 0:n.submitUrl,ge=i,De=(ge==null?void 0:ge.mode)==="Icon"||(ge==null?void 0:ge.mode)==="Label"?ge.mode:s==="Icon"?"Icon":"Label",M=ge===void 0?l:ge.label!==void 0?ge.label:l,y=ge===void 0?d:ge.icon!==void 0?ge.icon:d,P=M??"",G=y??"",J=De==="Icon",re=P||"Submit",Z=c||u!==void 0||b!==void 0||$!==void 0||f!==void 0||w!==void 0?{fontSettings:{fontFamily:_,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:u??.01,lineHeight:b,letterSpacing:$??0,wordSpacing:f??0,textAppearance:w,color:e.inputTextColor??"#111111"}:m?{...m,fontSettings:{...m.fontSettings,fontFamily:_??m.fontSettings.fontFamily},color:e.inputTextColor??m.color??"#111111"}:void 0,X=B||z!==void 0||E!==void 0||v!==void 0||T!==void 0||V!==void 0?{fontSettings:{fontFamily:_,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:z??.01,lineHeight:E,letterSpacing:v??0,wordSpacing:T??0,textAppearance:V,color:e.buttonTextColor??"#ffffff"}:h?{...h,fontSettings:{...h.fontSettings,fontFamily:_??h.fontSettings.fontFamily},color:e.buttonTextColor??h.color??"#ffffff"}:void 0,oe=Z?po(Z,t):void 0,ve=X?po(X,t):void 0,le=vl(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Z==null?void 0:Z.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},O),ce={borderRadius:k.scalingValue(L,t),borderWidth:k.scalingValue(F,t),borderStyle:"solid"},Ne={borderLeftWidth:k.scalingValue(F,t)},ee=async ne=>{ne.preventDefault();const be=Object.fromEntries(x.map(_e=>{var ke;return[_e.name,((ke=A[_e.name])==null?void 0:ke.trim())??""]}).filter(([,_e])=>_e));if(!de||Object.keys(be).length===0)return;const Ce=k.getFormFieldValidationError(x,A);if(Ce){q("error"),Q(Ce);return}q("submitting"),Q(null);try{const _e=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)});if(!_e.ok){const ke=await _e.text();throw new Error(ke||`Request failed: ${_e.status}`)}q("success"),C(Object.fromEntries(x.map(ke=>[ke.name,""])))}catch(_e){q("error"),Q(_e instanceof Error?_e.message:"Something went wrong")}};return S.jsxs("div",{className:`${r}-wrapper ${ae}`.trim(),style:le,children:[S.jsx("style",{children:ml(r)}),S.jsxs("form",{onSubmit:ee,className:`${r}-form`,style:{...ce,height:k.scalingValue(W,t),minHeight:k.scalingValue(W,t)},children:[S.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:x.map(ne=>S.jsx("input",{type:ne.type==="email"?"email":ne.type==="phone"?"tel":"text",name:ne.name,autoComplete:"off",value:K[ne.name]??"",onChange:be=>C(Ce=>({...Ce,[ne.name]:be.target.value})),placeholder:ne.placeholder,required:ne.type==="email",className:`${r}-input`,style:{...oe,paddingRight:k.scalingValue(U.right,t),paddingLeft:k.scalingValue(U.left,t),paddingTop:k.scalingValue(U.top,t),paddingBottom:k.scalingValue(U.bottom,t)}},ne.name))}),S.jsx("div",{className:`${r}-overlayAnchor`,children:S.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":re,style:{...ve,...Ne,paddingRight:k.scalingValue(H.right,t),paddingLeft:k.scalingValue(H.left,t),paddingTop:k.scalingValue(H.top,t),paddingBottom:k.scalingValue(H.bottom,t)},children:N==="submitting"?"...":J?G?S.jsx("img",{src:G,alt:"",draggable:!1}):null:P})})]}),me==="success"&&S.jsx("p",{className:`${r}-success`,style:{...oe,lineHeight:oe==null?void 0:oe.fontSize},children:g}),me==="error"&&S.jsx("p",{className:`${r}-error`,style:{...oe,lineHeight:oe==null?void 0:oe.fontSize},role:"alert",children:ye??I??R})]})},uo={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},hl=["hover","focus","filled","success","error"];function vl(e,t,n){const o={};for(const[r,a]of Object.entries(uo))o[`--${e}-${a}`]=t[r];if(n)for(const r of hl){const a=n[r];if(a)for(const[i,s]of Object.entries(uo)){const l=a[i];l!==void 0&&(o[`--${e}-${r}-${s}`]=l)}}return o}function po(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?k.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant}}const bl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],go={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Sl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],xl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonContent:{type:"object",scope:"common",display:{type:"button-content-switch"},properties:{mode:{type:"string",enum:["Label","Icon"]},label:{type:["string","null"],title:"Label",message:"Subscribe",display:{type:"text-input"}},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},fontFamily:{type:"string",scope:"layout",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"layout",title:"Border Color",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"layout",title:"Input Color",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"layout",title:"Input Text 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:"Button Color",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"layout",title:"Button Text Color",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"layout",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"layout",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"layout",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"layout",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"layout"},inputFontSettings:{...go.fontSettings,scope:"layout",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...go.fontSettings,scope:"layout",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:bl,fieldsToShow:1,buttonContent:{mode:"Icon",label:"Submit",icon:"https://cdn.cntrl.site/component-assets/arrow.svg"},fontFamily:"Arial",inputPadding:{right:.01,left:.01,top:.01,bottom:.01},buttonPadding:{right:.01,left:.01,top:.005,bottom:.005},minHeight:.028,corners:.05,stroke:.001,strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#0A00F8",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputFontSize:.01,inputLineHeight:.01,inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonFontSize:.01,buttonLineHeight:.01,buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonContent"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"Input",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"Button",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","successMessage","errorMessage"]}],paletteBookmark:{items:[...Sl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],hover:["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],focus:["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],filled:["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Cl={element:yl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:"30%",height:60},schema:xl},_l=[ua,ha,il,fl,Cl];exports.components=_l;exports.isSchemaV1=rr;
|