@cntrl-site/components 1.0.97-7 → 1.0.97-9
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/Pretext/Pretext.d.ts +2 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +15 -6
- package/dist/Components/utils/embedMedia.d.ts +24 -5
- package/dist/Components/utils/index.d.ts +2 -2
- package/dist/EmbedMediaFrame-C__c1jQ6.js +1 -0
- package/dist/EmbedMediaFrame-Mkas2vMk.mjs +296 -0
- package/dist/index.js +100 -191
- package/dist/index.mjs +8396 -8543
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +12 -10
- package/package.json +1 -1
- package/dist/EmbedMediaFrame-BqqoaiHc.mjs +0 -236
- package/dist/EmbedMediaFrame-C5O6lDaq.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Et=require("classnames"),b=require("./EmbedMediaFrame-C5O6lDaq.js"),qn=require("react-dom");function pm(e){return e.type==="object"&&e.version===1}const mm="ControlSlider-module__wrapper___sHEkd",gm="ControlSlider-module__hoverArrow___A-dOH",hm="ControlSlider-module__sliderItem___QQSkR",fm="ControlSlider-module__sliderImage___9hRl-",ym="ControlSlider-module__arrow___05ghY",vm="ControlSlider-module__arrowVertical___tBfVN",xm="ControlSlider-module__nextArrow___-30Yc",bm="ControlSlider-module__arrowInner___aEra3",Sm="ControlSlider-module__arrowIcon___S4ztF",wm="ControlSlider-module__arrowImg___2dwJW",$m="ControlSlider-module__mirror___brd6U",Cm="ControlSlider-module__pagination___bicLF",Tm="ControlSlider-module__paginationInner___bT-P-",Im="ControlSlider-module__paginationVertical___zYqKw",Lm="ControlSlider-module__paginationItem___nTRbk",Mm="ControlSlider-module__dot___p1Qun",Pm="ControlSlider-module__activeDot___LHFaj",Em="ControlSlider-module__paginationInsideBottom___R3FWn",Rm="ControlSlider-module__paginationInsideTop___V-qb-",km="ControlSlider-module__paginationOutsideBottom___14w8D",Am="ControlSlider-module__paginationOutsideTop___SCLqB",Fm="ControlSlider-module__paginationInsideLeft___yOBRZ",Nm="ControlSlider-module__paginationInsideRight___Rtt3o",_m="ControlSlider-module__paginationOutsideLeft___lahaw",Hm="ControlSlider-module__paginationOutsideRight___EtuQa",Wm="ControlSlider-module__imgWrapper___UjEgB",Om="ControlSlider-module__captionBlock___dJ6-j",Dm="ControlSlider-module__captionTextWrapper___HFlpf",zm="ControlSlider-module__captionText___uGBVc",Bm="ControlSlider-module__active___WZK4G",jm="ControlSlider-module__withPointerEvents___t-18M",Vm="ControlSlider-module__topLeftAlignment___zjnGM",Gm="ControlSlider-module__topCenterAlignment___gD1xW",Xm="ControlSlider-module__topRightAlignment___NMapS",Um="ControlSlider-module__middleLeftAlignment___OnUrY",qm="ControlSlider-module__middleCenterAlignment___Tdkl0",Km="ControlSlider-module__middleRightAlignment___wEbfX",Ym="ControlSlider-module__bottomLeftAlignment___cTP2-",Qm="ControlSlider-module__bottomCenterAlignment___c54fB",Zm="ControlSlider-module__bottomRightAlignment___kEwrz",Jm="ControlSlider-module__clickOverlay___DZA28",eg="ControlSlider-module__contain___pLyq7",tg="ControlSlider-module__cover___KdDat",Pt={wrapper:mm,hoverArrow:gm,sliderItem:hm,sliderImage:fm,arrow:ym,arrowVertical:vm,nextArrow:xm,arrowInner:bm,arrowIcon:Sm,arrowImg:wm,mirror:$m,pagination:Cm,paginationInner:Tm,paginationVertical:Im,paginationItem:Lm,dot:Mm,activeDot:Pm,paginationInsideBottom:Em,paginationInsideTop:Rm,paginationOutsideBottom:km,paginationOutsideTop:Am,paginationInsideLeft:Fm,paginationInsideRight:Nm,paginationOutsideLeft:_m,paginationOutsideRight:Hm,imgWrapper:Wm,captionBlock:Om,captionTextWrapper:Dm,captionText:zm,active:Bm,withPointerEvents:jm,topLeftAlignment:Vm,topCenterAlignment:Gm,topRightAlignment:Xm,middleLeftAlignment:Um,middleCenterAlignment:qm,middleRightAlignment:Km,bottomLeftAlignment:Ym,bottomCenterAlignment:Qm,bottomRightAlignment:Zm,clickOverlay:Jm,contain:eg,cover:tg};function ng(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ig(e,t,n){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ic="(prefers-reduced-motion: reduce)",go=1,og=2,Co=3,Wo=4,Cr=5,la=6,ya=7,rg={CREATED:go,MOUNTED:og,IDLE:Co,MOVING:Wo,SCROLLING:Cr,DRAGGING:la,DESTROYED:ya};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var pu=setTimeout,_s=function(){};function oc(e){return requestAnimationFrame(e)}function Ea(e,t){return typeof t===e}function dr(e){return!ml(e)&&Ea("object",e)}var pl=Array.isArray,mu=tn(Ea,"function"),Mi=tn(Ea,"string"),Tr=tn(Ea,"undefined");function ml(e){return e===null}function gu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return pl(e)?e:[e]}function kn(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function ca(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&kn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Mi(t)?t.split(" "):t,!0)}function Lr(e,t){kn(t,e.appendChild.bind(e))}function hl(e,t){kn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return gu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function hu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Mr(e,t){return t?hu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){pl(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function rc(e,t){kn(t||pr(e),function(n){delete e[n]})}function Xn(e,t){kn(e,function(n){kn(t,function(i){n&&n.removeAttribute(i)})})}function Xt(e,t,n){dr(t)?qi(t,function(i,o){Xt(e,o,i)}):kn(e,function(i){ml(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Mi(t)?Gn(i,t):Xt(i,t)),n&&Lr(n,i),i}function _n(e,t,n){if(Tr(n))return getComputedStyle(e)[t];ml(n)||(e.style[t]=""+n)}function gr(e,t){_n(e,"display",t)}function fu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Hn(e,t){return e.getAttribute(t)}function ac(e,t){return e&&e.classList.contains(t)}function Mn(e){return e.getBoundingClientRect()}function Yi(e){kn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function yu(e){return Mr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function vu(e,t){return e&&e.querySelector(t)}function fl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function Hs(e){return e.timeStamp}function _i(e){return Mi(e)?e:e?e+"px":""}var Pr="splide",yl="data-"+Pr;function ar(e,t){if(!e)throw new Error("["+Pr+"] "+(t||""))}var Pi=Math.min,va=Math.max,xa=Math.floor,hr=Math.ceil,xn=Math.abs;function xu(e,t,n){return xn(e-t)<n}function da(e,t,n,i){var o=Pi(t,n),r=va(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Pi(t,n),o=va(t,n);return Pi(va(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return kn(t,function(n){e=e.replace("%s",""+n)}),e}function vl(e){return e<10?"0"+e:""+e}var sc={};function ag(e){return""+e+vl(sc[e]=(sc[e]||0)+1)}function bu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var m="addEventListener"in p,f=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,f])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){kn(l,function(u){u&&kn(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Ds="ready",di="move",Oo="moved",xl="click",Su="active",wu="inactive",$u="visible",Cu="hidden",ln="refresh",hn="updated",To="resize",Ra="resized",Tu="drag",Iu="dragging",Lu="dragged",ka="scroll",Ji="scrolled",sg="overflow",bl="destroy",Mu="arrows:mounted",Pu="arrows:updated",Eu="pagination:mounted",Ru="pagination:updated",Sl="navigation:mounted",wl="autoplay:play",ku="autoplay:playing",$l="autoplay:pause",Cl="lazyload:loaded",Au="sk",Fu="sh",ba="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=bu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,pl(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(bl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function Aa(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Pi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=oc(p)}}function y(N){N||f(),r=o()-(N?l*e:0),d=!1,c=oc(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function f(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function S(N){e=N}function w(){return d}return{start:y,rewind:m,pause:x,cancel:f,set:S,isPaused:w}}function lg(e){var t=e;function n(o){t=o}function i(o){return gl(Ir(o),t)}return{set:n,is:i}}function cg(e,t){var n=Aa(0,e,null,1);return function(){n.isPaused()&&n.start()}}function dg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=bu(),c=[];function d(){var f=n.mediaQuery==="min";pr(o).sort(function(S,w){return f?+S-+w:+w-+S}).forEach(function(S){p(o[S],"("+(f?"min":"max")+"-width:"+S+"px)")}),p(r,ic),y()}function u(f){f&&l.destroy()}function p(f,S){var w=matchMedia(S);l.bind(w,"change",y),c.push([f,w])}function y(){var f=i.is(ya),S=n.direction,w=c.reduce(function(N,v){return Ci(N,v[1].matches?v[0]:{})},{});rc(n),m(w),n.destroy?e.destroy(n.destroy==="completely"):f?(u(!0),e.mount()):S!==n.direction&&e.refresh()}function x(f){matchMedia(ic).matches&&(f?Ci(n,r):rc(n,pr(r)))}function m(f,S,w){Ci(n,f),S&&Ci(Object.getPrototypeOf(n),f),(w||!i.is(go))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Fa="Arrow",Na=Fa+"Left",_a=Fa+"Right",Nu=Fa+"Up",_u=Fa+"Down",lc="rtl",Ha="ttb",Ka={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Nu,_a],ArrowRight:[_u,Na]};function ug(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===lc&&!l?1:c===Ha?0:-1;return Ka[r]&&Ka[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Ka[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===lc?1:-1)}return{resolve:i,orient:o}}var ai="role",bo="tabindex",pg="disabled",Wn="aria-",Er=Wn+"controls",Hu=Wn+"current",cc=Wn+"selected",En=Wn+"label",Tl=Wn+"labelledby",Wu=Wn+"hidden",Il=Wn+"orientation",fr=Wn+"roledescription",dc=Wn+"live",uc=Wn+"busy",pc=Wn+"atomic",Ll=[ai,bo,pg,Er,Hu,En,Tl,Wu,Il,fr],Kn=Pr+"__",Ni="is-",Ya=Pr,mc=Kn+"track",mg=Kn+"list",Wa=Kn+"slide",Ou=Wa+"--clone",gg=Wa+"__container",Ml=Kn+"arrows",Oa=Kn+"arrow",Du=Oa+"--prev",zu=Oa+"--next",Da=Kn+"pagination",Bu=Da+"__page",hg=Kn+"progress",fg=hg+"__bar",yg=Kn+"toggle",vg=Kn+"spinner",xg=Kn+"sr",bg=Ni+"initialized",Qi=Ni+"active",ju=Ni+"prev",Vu=Ni+"next",zs=Ni+"visible",Bs=Ni+"loading",Gu=Ni+"focus-in",Xu=Ni+"overflow",Sg=[Qi,zs,ju,Vu,Bs,Gu,Xu],wg={slide:Wa,clone:Ou,arrows:Ml,arrow:Oa,prev:Du,next:zu,pagination:Da,page:Bu,spinner:vg};function $g(e,t){if(mu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var Cg=5,gc=200,Uu="touchstart mousedown",Qa="touchmove mousemove",Za="touchend touchcancel mouseup click";function Tg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,m,f;function S(){M(),E(),v()}function w(){o(ln,N),o(ln,S),o(hn,v),r(document,Uu+" keydown",function(D){f=D.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Gu,!!f)})}function N(D){var _=Ll.concat("style");ci(u),ri(l,p),ri(x,y),Xn([x,m],_),Xn(l,D?_:["style",fr])}function v(){ri(l,p),ri(x,y),p=X(Ya),y=X(mc),Gn(l,p),Gn(x,y),Xt(l,En,n.label),Xt(l,Tl,n.labelledby)}function M(){x=U("."+mc),m=Mr(x,"."+mg),ar(x&&m,"A track/list element is missing."),ca(u,hu(m,"."+Wa+":not(."+Ou+")")),qi({arrows:Ml,pagination:Da,prev:Du,next:zu,bar:fg,toggle:yg},function(D,_){d[_]=U("."+D)}),mr(d,{root:l,track:x,list:m,slides:u})}function E(){var D=l.id||ag(Pr),_=n.role;l.id=D,x.id=x.id||D+"-track",m.id=m.id||D+"-list",!Hn(l,ai)&&l.tagName!=="SECTION"&&_&&Xt(l,ai,_),Xt(l,fr,c.carousel),Xt(m,ai,"presentation")}function U(D){var _=vu(l,D);return _&&$g(_,"."+Ya)===l?_:void 0}function X(D){return[D+"--"+n.type,D+"--"+n.direction,n.drag&&D+"--draggable",n.isNavigation&&D+"--nav",D===Ya&&Qi]}return mr(d,{setup:S,mount:w,destroy:N})}var Io="slide",Do="loop",Rr="fade";function Ig(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,m=p.i18n,f=p.pagination,S=p.slideFocus,w=d.Direction.resolve,N=Hn(i,"style"),v=Hn(i,En),M=n>-1,E=Mr(i,"."+gg),U;function X(){M||(i.id=u.id+"-slide"+vl(t+1),Xt(i,ai,f?"tabpanel":"group"),Xt(i,fr,m.slide),Xt(i,En,v||Os(m.slideLabel,[t+1,e.length]))),D()}function D(){c(i,"click",tn(l,xl,K)),c(i,"keydown",tn(l,Au,K)),r([Oo,Fu,Ji],C),r(Sl,W),x&&r(di,T)}function _(){U=!0,o.destroy(),ri(i,Sg),Xn(i,Ll),Xt(i,"style",N),Xt(i,En,v||"")}function W(){var P=e.splides.map(function(h){var J=h.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");Xt(i,En,Os(m.slideX,(M?n:t)+1)),Xt(i,Er,P),Xt(i,ai,S?"button":""),S&&Xn(i,fr)}function T(){U||C()}function C(){if(!U){var P=e.index;q(),R(),oi(i,ju,t===P-1),oi(i,Vu,t===P+1)}}function q(){var P=I();P!==ac(i,Qi)&&(oi(i,Qi,P),Xt(i,Hu,y&&P||""),l(P?Su:wu,K))}function R(){var P=j(),h=!P&&(!I()||M);if(e.state.is([Wo,Cr])||Xt(i,Wu,h||""),Xt(fl(i,p.focusableNodes||""),bo,h?-1:""),S&&Xt(i,bo,h?-1:0),P!==ac(i,zs)&&(oi(i,zs,P),l(P?$u:Cu,K)),!P&&document.activeElement===i){var J=d.Slides.getAt(e.index);J&&fu(J.slide)}}function $(P,h,J){_n(J&&E||i,P,h)}function I(){var P=e.index;return P===t||p.cloneStatus&&P===n}function j(){if(e.is(Rr))return I();var P=Mn(d.Elements.track),h=Mn(i),J=w("left",!0),V=w("right",!0);return xa(P[J])<=hr(h[J])&&xa(h[V])<=hr(P[V])}function F(P,h){var J=xn(P-t);return!M&&(p.rewind||e.is(Do))&&(J=Pi(J,e.length-J)),J<=h}var K={index:t,slideIndex:n,slide:i,container:E,isClone:M,mount:X,destroy:_,update:C,style:$,isWithin:F};return K}function Lg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(ln,m),o(ln,x)}function x(){d.forEach(function(C,q){S(C,q,-1)})}function m(){U(function(C){C.destroy()}),ci(p)}function f(){U(function(C){C.update()})}function S(C,q,R){var $=Ig(e,q,R,C);$.mount(),p.push($),p.sort(function(I,j){return I.index-j.index})}function w(C){return C?X(function(q){return!q.isClone}):p}function N(C){var q=t.Controller,R=q.toIndex(C),$=q.hasFocus()?1:n.perPage;return X(function(I){return da(I.index,R,R+$-1)})}function v(C){return X(C)[0]}function M(C,q){kn(C,function(R){if(Mi(R)&&(R=yu(R)),gu(R)){var $=d[q];$?hl(R,$):Lr(u,R),Gn(R,n.classes.slide),_(R,tn(r,To))}}),r(ln)}function E(C){Yi(X(C).map(function(q){return q.slide})),r(ln)}function U(C,q){w(q).forEach(C)}function X(C){return p.filter(mu(C)?C:function(q){return Mi(C)?ur(q.slide,C):gl(Ir(C),q.index)})}function D(C,q,R){U(function($){$.style(C,q,R)})}function _(C,q){var R=fl(C,"img"),$=R.length;$?R.forEach(function(I){l(I,"load error",function(){--$||q()})}):q()}function W(C){return C?d.length:p.length}function T(){return p.length>n.perPage}return{mount:y,destroy:m,update:f,register:S,get:w,getIn:N,getAt:v,add:M,remove:E,forEach:U,filter:X,style:D,getLength:W,isEnough:T}}function Mg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,m=c.getAt,f=c.style,S,w,N;function v(){M(),r(window,"resize load",cg(tn(l,To))),o([hn,ln],M),o(To,E)}function M(){S=n.direction===Ha,_n(p,"maxWidth",_i(n.width)),_n(y,d("paddingLeft"),U(!1)),_n(y,d("paddingRight"),U(!0)),E(!0)}function E(K){var P=Mn(p);(K||w.width!==P.width||w.height!==P.height)&&(_n(y,"height",X()),f(d("marginRight"),_i(n.gap)),f("width",_()),f("height",W(),!0),w=P,l(Ra),N!==(N=F())&&(oi(p,Xu,N),l(sg,N)))}function U(K){var P=n.padding,h=d(K?"right":"left");return P&&_i(P[h]||(dr(P)?0:P))||"0px"}function X(){var K="";return S&&(K=D(),ar(K,"height or heightRatio is missing."),K="calc("+K+" - "+U(!1)+" - "+U(!0)+")"),K}function D(){return _i(n.height||Mn(x).width*n.heightRatio)}function _(){return n.autoWidth?null:_i(n.fixedWidth)||(S?"":T())}function W(){return _i(n.fixedHeight)||(S?n.autoHeight?null:T():D())}function T(){var K=_i(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function C(){return Mn(x)[d("width")]}function q(K,P){var h=m(K||0);return h?Mn(h.slide)[d("width")]+(P?0:I()):0}function R(K,P){var h=m(K);if(h){var J=Mn(h.slide)[d("right")],V=Mn(x)[d("left")];return xn(J-V)+(P?0:I())}return 0}function $(K){return R(e.length-1)-R(0)+q(0,K)}function I(){var K=m(0);return K&&parseFloat(_n(K.slide,d("marginRight")))||0}function j(K){return parseFloat(_n(y,d("padding"+(K?"Right":"Left"))))||0}function F(){return e.is(Rr)||$(!0)>C()}return{mount:v,resize:E,listSize:C,slideSize:q,sliderSize:$,totalSize:R,getPadding:j,isOverflow:F}}var Pg=2;function Eg(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,To],m),(u=w())&&(f(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Yi(d),ci(d),i.destroy()}function m(){var N=w();u!==N&&(u<N||!N)&&i.emit(ln)}function f(N){var v=l.get().slice(),M=v.length;if(M){for(;v.length<N;)ca(v,v);ca(v.slice(-N),v.slice(0,N)).forEach(function(E,U){var X=U<N,D=S(E.slide,U);X?hl(D,v[0].slide):Lr(r.list,D),ca(d,D),l.register(D,U-N+(X?0:M),E.index)})}}function S(N,v){var M=N.cloneNode(!0);return Gn(M,n.classes.clone),M.id=e.root.id+"-clone"+vl(v+1),M}function w(){var N=n.clones;if(!e.is(Do))N=0;else if(Tr(N)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),M=v&&hr(Mn(r.track)[c("width")]/v);N=M||n[c("autoWidth")]&&e.length||n.perPage*Pg}return N}return{mount:p,destroy:x}}function Rg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,m=t.Direction,f=m.resolve,S=m.orient,w=t.Elements,N=w.list,v=w.track,M;function E(){M=t.Transition,o([Fi,Ra,hn,ln],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),D(e.index),t.Slides.update())}function X(h,J,V,he){h!==J&&K(h>V)&&(C(),_(T($(),h>V),!0)),l(Wo),r(di,J,V,h),M.start(J,function(){l(Co),r(Oo,J,V,h),he&&he()})}function D(h){_(R(h,!0))}function _(h,J){if(!e.is(Rr)){var V=J?h:W(h);_n(N,"transform","translate"+f("X")+"("+V+"px)"),h!==V&&r(Fu)}}function W(h){if(e.is(Do)){var J=q(h),V=J>t.Controller.getEnd(),he=J<0;(he||V)&&(h=T(h,V))}return h}function T(h,J){var V=h-F(J),he=x();return h-=S(he*(hr(xn(V)/he)||1))*(J?1:-1),h}function C(){_($(),!0),M.cancel()}function q(h){for(var J=t.Slides.get(),V=0,he=1/0,k=0;k<J.length;k++){var ce=J[k].index,L=xn(R(ce,!0)-h);if(L<=he)he=L,V=ce;else break}return V}function R(h,J){var V=S(p(h-1)-j(h));return J?I(V):V}function $(){var h=f("left");return Mn(N)[h]-Mn(v)[h]+S(u(!1))}function I(h){return n.trimSpace&&e.is(Io)&&(h=co(h,0,S(x(!0)-y()))),h}function j(h){var J=n.focus;return J==="center"?(y()-d(h,!0))/2:+J*d(h)||0}function F(h){return R(h?t.Controller.getEnd():0,!!n.trimSpace)}function K(h){var J=S(T($(),h));return h?J>=0:J<=N[f("scrollWidth")]-Mn(v)[f("width")]}function P(h,J){J=Tr(J)?$():J;var V=h!==!0&&S(J)<S(F(!1)),he=h!==!1&&S(J)>S(F(!0));return V||he}return{mount:E,move:X,jump:D,translate:_,shift:T,cancel:C,toIndex:q,toPosition:R,getPosition:$,getLimit:F,exceededLimit:P,reposition:U}}function kg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,m=n.omitEnd,f=e.is(Do),S=e.is(Io),w=tn($,!1),N=tn($,!0),v=n.start||0,M,E=v,U,X,D;function _(){W(),o([hn,ln,ba],W),o(Ra,T)}function W(){U=x(!0),X=n.perMove,D=n.perPage,M=K();var L=co(v,0,m?M:U-1);L!==v&&(v=L,l.reposition())}function T(){M!==K()&&r(ba)}function C(L,me,te){if(!ce()){var ve=R(L),Le=F(ve);Le>-1&&(me||Le!==v)&&(V(Le),l.move(ve,Le,E,te))}}function q(L,me,te,ve){t.Scroll.scroll(L,me,te,function(){var Le=F(l.toIndex(c()));V(m?Pi(Le,M):Le),ve&&ve()})}function R(L){var me=v;if(Mi(L)){var te=L.match(/([+\-<>])(\d+)?/)||[],ve=te[1],Le=te[2];ve==="+"||ve==="-"?me=I(v+ +(""+ve+(+Le||1)),v):ve===">"?me=Le?P(+Le):w(!0):ve==="<"&&(me=N(!0))}else me=f?L:co(L,0,M);return me}function $(L,me){var te=X||(k()?1:D),ve=I(v+te*(L?-1:1),v,!(X||k()));return ve===-1&&S&&!xu(c(),d(!L),1)?L?0:M:me?ve:F(ve)}function I(L,me,te){if(y()||k()){var ve=j(L);ve!==L&&(me=L,L=ve,te=!1),L<0||L>M?!X&&(da(0,L,me,!0)||da(M,me,L,!0))?L=P(h(L)):f?L=te?L<0?-(U%D||D):U:L:n.rewind?L=L<0?M:0:L=-1:te&&L!==me&&(L=P(h(me)+(L<me?-1:1)))}else L=-1;return L}function j(L){if(S&&n.trimSpace==="move"&&L!==v)for(var me=c();me===u(L,!0)&&da(L,0,e.length-1,!n.rewind);)L<v?--L:++L;return L}function F(L){return f?(L+U)%U||0:L}function K(){for(var L=U-(k()||f&&X?1:D);m&&L-- >0;)if(u(U-1,!0)!==u(L,!0)){L++;break}return co(L,0,U-1)}function P(L){return co(k()?L:D*L,0,M)}function h(L){return k()?Pi(L,M):xa((L>=M?U-1:L)/D)}function J(L){var me=l.toIndex(L);return S?co(me,0,M):me}function V(L){L!==v&&(E=v,v=L)}function he(L){return L?E:v}function k(){return!Tr(n.focus)||n.isNavigation}function ce(){return e.state.is([Wo,Cr])&&!!n.waitForTransition}return{mount:_,go:C,scroll:q,getNext:w,getPrev:N,getAdjacent:$,getEnd:K,setIndex:V,getIndex:he,toIndex:P,toPage:h,toDest:J,hasFocus:k,isBusy:ce}}var Ag="http://www.w3.org/2000/svg",Fg="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",Hr=40;function Ng(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,m=y,f=u.prev,S=u.next,w,N,v={};function M(){U(),o(hn,E)}function E(){X(),M()}function U(){var q=n.arrows;q&&!(f&&S)&&W(),f&&S&&(mr(v,{prev:f,next:S}),gr(m,q?"":"none"),Gn(m,N=Ml+"--"+n.direction),q&&(D(),C(),Xt([f,S],Er,x.id),l(Mu,f,S)))}function X(){i.destroy(),ri(m,N),w?(Yi(y?[f,S]:m),f=S=null):Xn([f,S],Ll)}function D(){o([Fi,Oo,ln,Ji,ba],C),r(S,"click",tn(_,">")),r(f,"click",tn(_,"<"))}function _(q){p.go(q,!0)}function W(){m=y||xo("div",c.arrows),f=T(!0),S=T(!1),w=!0,Lr(m,[f,S]),!y&&hl(m,x)}function T(q){var R='<button class="'+c.arrow+" "+(q?c.prev:c.next)+'" type="button"><svg xmlns="'+Ag+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Fg)+'" />';return yu(R)}function C(){if(f&&S){var q=e.index,R=p.getPrev(),$=p.getNext(),I=R>-1&&q<R?d.last:d.prev,j=$>-1&&q>$?d.first:d.next;f.disabled=R<0,S.disabled=$<0,Xt(f,En,I),Xt(S,En,j),l(Pu,f,S,R,$)}}return{arrows:v,mount:M,destroy:X,update:C}}var _g=yl+"-interval";function Hg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=Aa(n.interval,e.go.bind(e,">"),D),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,m=n.autoplay,f,S,w=m==="pause";function N(){m&&(v(),x&&Xt(x,Er,u.track.id),w||M(),X())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(W){f=W.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(W){S=W.type==="focusin",U()}),x&&r(x,"click",function(){w?M():E(!0)}),o([di,ka,ln],c.rewind),o(di,_)}function M(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),S=f=w=!1,X(),l(wl))}function E(W){W===void 0&&(W=!0),w=!!W,X(),d()||(c.pause(),l($l))}function U(){w||(f||S?E(!1):M())}function X(){x&&(oi(x,Qi,!w),Xt(x,En,n.i18n[w?"play":"pause"]))}function D(W){var T=u.bar;T&&_n(T,"width",W*100+"%"),l(ku,W)}function _(W){var T=t.Slides.getAt(W);c.set(T&&+Hn(T.slide,_g)||n.interval)}return{mount:N,destroy:c.cancel,play:M,pause:E,isPaused:d}}function Wg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o(Cl,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Mr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Og=10,Dg=600,zg=.6,Bg=1.5,jg=800;function Vg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Io),m,f,S=1;function w(){o(di,E),o([hn,ln],U)}function N(D,_,W,T,C){var q=d();if(E(),W&&(!x||!p())){var R=t.Layout.sliderSize(),$=Ws(D)*R*xa(xn(D)/R)||0;D=c.toPosition(t.Controller.toDest(D%R))+$}var I=xu(q,D,1);S=1,_=I?0:_||va(xn(D-q)/Bg,jg),f=T,m=Aa(_,v,tn(M,q,D,C),1),l(Cr),r(ka),m.start()}function v(){l(Co),f&&f(),r(Ji)}function M(D,_,W,T){var C=d(),q=D+(_-D)*X(T),R=(q-C)*S;y(C+R),x&&!W&&p()&&(S*=zg,xn(R)<Og&&N(u(p(!0)),Dg,!1,f,!0))}function E(){m&&m.cancel()}function U(){m&&!m.isPaused()&&(E(),v())}function X(D){var _=n.easingFunc;return _?_(D):1-Math.pow(1-D,4)}return{mount:w,destroy:E,scroll:N,cancel:U}}var uo={passive:!1,capture:!0};function Gg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,m=t.Media.reduce,f=t.Direction,S=f.resolve,w=f.orient,N=u.getPosition,v=u.exceededLimit,M,E,U,X,D,_=!1,W,T,C;function q(){l(x,Qa,_s,uo),l(x,Za,_s,uo),l(x,Uu,$,uo),l(x,"click",F,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],R)}function R(){var Z=n.drag;ue(!Z),X=Z==="free"}function $(Z){if(W=!1,!T){var le=Le(Z);ve(Z.target)&&(le||!Z.button)&&(y.isBusy()?ni(Z,!0):(C=le?x:window,D=d.is([Wo,Cr]),U=null,l(C,Qa,I,uo),l(C,Za,j,uo),u.cancel(),p.cancel(),K(Z)))}}function I(Z){if(d.is(la)||(d.set(la),r(Tu)),Z.cancelable)if(D){u.translate(M+te(k(Z)));var le=ce(Z)>gc,oe=_!==(_=v());(le||oe)&&K(Z),W=!0,r(Iu),ni(Z)}else J(Z)&&(D=h(Z),ni(Z))}function j(Z){d.is(la)&&(d.set(Co),r(Lu)),D&&(P(Z),ni(Z)),c(C,Qa,I),c(C,Za,j),D=!1}function F(Z){!T&&W&&ni(Z,!0)}function K(Z){U=E,E=Z,M=N()}function P(Z){var le=V(Z),oe=he(le),ge=n.rewind&&n.rewindByDrag;m(!1),X?y.scroll(oe,0,n.snap):e.is(Rr)?y.go(w(Ws(le))<0?ge?"<":"-":ge?">":"+"):e.is(Io)&&_&&ge?y.go(v(!0)?">":"<"):y.go(y.toDest(oe),!0),m(!0)}function h(Z){var le=n.dragMinThreshold,oe=dr(le),ge=oe&&le.mouse||0,Se=(oe?le.touch:+le)||10;return xn(k(Z))>(Le(Z)?Se:ge)}function J(Z){return xn(k(Z))>xn(k(Z,!0))}function V(Z){if(e.is(Do)||!_){var le=ce(Z);if(le&&le<gc)return k(Z)/le}return 0}function he(Z){return N()+Ws(Z)*Pi(xn(Z)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(Z,le){return me(Z,le)-me(L(Z),le)}function ce(Z){return Hs(Z)-Hs(L(Z))}function L(Z){return E===Z&&U||E}function me(Z,le){return(Le(Z)?Z.changedTouches[0]:Z)["page"+S(le?"Y":"X")]}function te(Z){return Z/(_&&e.is(Io)?Cg:1)}function ve(Z){var le=n.noDrag;return!ur(Z,"."+Bu+", ."+Oa)&&(!le||!ur(Z,le))}function Le(Z){return typeof TouchEvent<"u"&&Z instanceof TouchEvent}function de(){return D}function ue(Z){T=Z}return{mount:q,disable:ue,isDragging:de}}var Xg={Spacebar:" ",Right:_a,Left:Na,Up:Nu,Down:_u};function Pl(e){return e=Mi(e)?e:e.key,Xg[e]||e}var hc="keydown";function Ug(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(hn,m),o(hn,x),o(di,S)}function x(){var N=n.keyboard;N&&(u=N==="global"?window:c,r(u,hc,w))}function m(){l(u,hc)}function f(N){p=N}function S(){var N=p;p=!0,pu(function(){p=N})}function w(N){if(!p){var v=Pl(N);v===d(Na)?e.go("<"):v===d(_a)&&e.go(">")}}return{mount:y,destroy:m,disable:f}}var sr=yl+"-lazy",ua=sr+"-srcset",qg="["+sr+"], ["+ua+"]";function Kg(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function y(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),m(),d?N():(r(u),o(u,f),f())}function m(){t.Slides.forEach(function(v){fl(v.slide,qg).forEach(function(M){var E=Hn(M,sr),U=Hn(M,ua);if(E!==M.src||U!==M.srcset){var X=n.classes.spinner,D=M.parentElement,_=Mr(D,"."+X)||xo("span",X,D);p.push([M,v,_]),M.src||gr(M,"none")}})})}function f(){p=p.filter(function(v){var M=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,M)?S(v):!0}),p.length||r(u)}function S(v){var M=v[0];Gn(v[1].slide,Bs),l(M,"load error",tn(w,v)),Xt(M,"src",Hn(M,sr)),Xt(M,"srcset",Hn(M,ua)),Xn(M,sr),Xn(M,ua)}function w(v,M){var E=v[0],U=v[1];ri(U.slide,Bs),M.type!=="error"&&(Yi(v[2]),gr(E,""),c(Cl,E,U),c(To)),d&&N()}function N(){p.length&&S(p.shift())}return{mount:y,destroy:tn(ci,p),check:f}}function Yg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,m=t.Direction.resolve,f=d.pagination,S=[],w,N;function v(){M(),o([hn,ln,ba],v);var T=n.pagination;f&&gr(f,T?"":"none"),T&&(o([di,ka,Ji],W),E(),W(),r(Eu,{list:w,items:S},_(e.index)))}function M(){w&&(Yi(f?Ai(w.children):w),ri(w,N),ci(S),w=null),i.destroy()}function E(){var T=e.length,C=n.classes,q=n.i18n,R=n.perPage,$=p()?u.getEnd()+1:hr(T/R);w=f||xo("ul",C.pagination,d.track.parentElement),Gn(w,N=Da+"--"+D()),Xt(w,ai,"tablist"),Xt(w,En,q.select),Xt(w,Il,D()===Ha?"vertical":"");for(var I=0;I<$;I++){var j=xo("li",null,w),F=xo("button",{class:C.page,type:"button"},j),K=c.getIn(I).map(function(h){return h.slide.id}),P=!p()&&R>1?q.pageX:q.slideX;l(F,"click",tn(U,I)),n.paginationKeyboard&&l(F,"keydown",tn(X,I)),Xt(j,ai,"presentation"),Xt(F,ai,"tab"),Xt(F,Er,K.join(" ")),Xt(F,En,Os(P,I+1)),Xt(F,bo,-1),S.push({li:j,button:F,page:I})}}function U(T){x(">"+T,!0)}function X(T,C){var q=S.length,R=Pl(C),$=D(),I=-1;R===m(_a,!1,$)?I=++T%q:R===m(Na,!1,$)?I=(--T+q)%q:R==="Home"?I=0:R==="End"&&(I=q-1);var j=S[I];j&&(fu(j.button),x(">"+I),ni(C,!0))}function D(){return n.paginationDirection||n.direction}function _(T){return S[u.toPage(T)]}function W(){var T=_(y(!0)),C=_(y());if(T){var q=T.button;ri(q,Qi),Xn(q,cc),Xt(q,bo,-1)}if(C){var R=C.button;Gn(R,Qi),Xt(R,cc,!0),Xt(R,bo,"")}r(Ru,{list:w,items:S},T,C)}return{items:S,mount:v,destroy:M,getAt:_,update:W}}var Qg=[" ","Enter"];function Zg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(f){f.isParent||(u(e,f.splide),u(f.splide,e))}),i&&p()}function c(){r.forEach(function(f){f.destroy()}),ci(r)}function d(){c(),l()}function u(f,S){var w=an(f);w.on(di,function(N,v,M){S.go(S.is(Do)?M:N)}),r.push(w)}function p(){var f=an(e),S=f.on;S(xl,x),S(Au,m),S([Fi,hn],y),r.push(f),f.emit(Sl,e.splides)}function y(){Xt(t.Elements.list,Il,n.direction===Ha?"vertical":"")}function x(f){e.go(f.index)}function m(f,S){gl(Qg,Pl(S))&&(x(f),ni(S))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Jg(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,uo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=Hs(u),m=n.wheelMinThreshold||0,f=n.wheelSleep||0;xn(p)>m&&x-r>f&&(e.go(y?"<":">"),r=x),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var eh=90;function th(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",xg),d=Aa(eh,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Xt(r,pc,!0),c.textContent="…",o(wl,tn(x,!0)),o($l,tn(x,!1)),o([Oo,Ji],tn(p,!0)))}function p(m){Xt(r,uc,m),m?(Lr(r,c),d.start()):(Yi(c),d.cancel())}function y(){Xn(r,[dc,pc,uc]),Yi(c)}function x(m){l&&Xt(r,dc,m?"off":"polite")}return{mount:u,disable:x,destroy:y}}var nh=Object.freeze({__proto__:null,Media:dg,Direction:ug,Elements:Tg,Slides:Lg,Layout:Mg,Clones:Eg,Move:Rg,Controller:kg,Arrows:Ng,Autoplay:Hg,Cover:Wg,Scroll:Vg,Drag:Gg,Keyboard:Ug,LazyLoad:Kg,Pagination:Yg,Sync:Zg,Wheel:Jg,Live:th}),ih={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"},oh={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:wg,i18n:ih,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function rh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),pu(d)}return{mount:o,start:l,cancel:_s}}function ah(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(_n,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,f){var S=i.toPosition(m,!0),w=i.getPosition(),N=x(m);xn(S-w)>=1&&N>=1?n.useScroll?r.scroll(S,N,!1,f):(c("transform "+N+"ms "+n.easing),i.translate(S,!0),d=f):(i.jump(m),f())}function y(){c(""),r.cancel()}function x(m){var f=n.rewindSpeed;if(e.is(Io)&&f){var S=o.getIndex(!0),w=o.getEnd();if(S===0&&m>=w||S>=w&&m===0)return f}return n.speed}return{mount:u,start:p,cancel:y}}var sh=(function(){function e(n,i){this.event=an(),this.Components={},this.state=lg(go),this.splides=[],this._o={},this._E={};var o=Mi(n)?vu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:Hn(o,En)||"",labelledby:Hn(o,Tl)||""},oh,e.defaults,i||{});try{Ci(i,JSON.parse(Hn(o,yl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([go,ya]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Rr)?rh:ah),this._E=i||this._E;var d=mr({},nh,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,bg),l.set(Co),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ai(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?an(this).on(Ds,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(bl),o.destroy(),i&&ci(this.splides),r.set(ya)),this},ig(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),El=sh;El.defaults={};El.STATES=rg;var fc=[[Fi,"onMounted"],[Ds,"onReady"],[di,"onMove"],[Oo,"onMoved"],[xl,"onClick"],[Su,"onActive"],[wu,"onInactive"],[$u,"onVisible"],[Cu,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[To,"onResize"],[Ra,"onResized"],[Tu,"onDrag"],[Iu,"onDragging"],[Lu,"onDragged"],[ka,"onScroll"],[Ji,"onScrolled"],[bl,"onDestroy"],[Mu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Eu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[Sl,"onNavigationMounted"],[wl,"onAutoplayPlay"],[ku,"onAutoplayPlaying"],[$l,"onAutoplayPause"],[Cl,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function Sa(e){return e!==null&&typeof e=="object"}function js(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!js(n,t[i]));if(Sa(e)&&Sa(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!js(e[o],t[o]))}return e===t}function lh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function ch(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Vs(e,t){const n=e;return ch(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Sa(i)?n[o]=Vs(Sa(n[o])?n[o]:{},i):n[o]=i}),n}var dh=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),kl=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new El(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Vs({},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&&!js(this.options,e)&&(this.splide.options=e,this.options=Vs({},e));const t=this.getSlides();lh(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){fc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...fc.map(r=>r[1])])},n?s.createElement(dh,null,i):i)}},Al=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Et=require("classnames"),b=require("./EmbedMediaFrame-C__c1jQ6.js"),qn=require("react-dom");function pm(e){return e.type==="object"&&e.version===1}const mm="ControlSlider-module__wrapper___sHEkd",gm="ControlSlider-module__hoverArrow___A-dOH",hm="ControlSlider-module__sliderItem___QQSkR",fm="ControlSlider-module__sliderImage___9hRl-",ym="ControlSlider-module__arrow___05ghY",vm="ControlSlider-module__arrowVertical___tBfVN",xm="ControlSlider-module__nextArrow___-30Yc",bm="ControlSlider-module__arrowInner___aEra3",Sm="ControlSlider-module__arrowIcon___S4ztF",wm="ControlSlider-module__arrowImg___2dwJW",$m="ControlSlider-module__mirror___brd6U",Cm="ControlSlider-module__pagination___bicLF",Tm="ControlSlider-module__paginationInner___bT-P-",Im="ControlSlider-module__paginationVertical___zYqKw",Lm="ControlSlider-module__paginationItem___nTRbk",Pm="ControlSlider-module__dot___p1Qun",Mm="ControlSlider-module__activeDot___LHFaj",Em="ControlSlider-module__paginationInsideBottom___R3FWn",Rm="ControlSlider-module__paginationInsideTop___V-qb-",km="ControlSlider-module__paginationOutsideBottom___14w8D",Am="ControlSlider-module__paginationOutsideTop___SCLqB",Fm="ControlSlider-module__paginationInsideLeft___yOBRZ",Nm="ControlSlider-module__paginationInsideRight___Rtt3o",_m="ControlSlider-module__paginationOutsideLeft___lahaw",Hm="ControlSlider-module__paginationOutsideRight___EtuQa",Wm="ControlSlider-module__imgWrapper___UjEgB",Om="ControlSlider-module__captionBlock___dJ6-j",Dm="ControlSlider-module__captionTextWrapper___HFlpf",zm="ControlSlider-module__captionText___uGBVc",Bm="ControlSlider-module__active___WZK4G",jm="ControlSlider-module__withPointerEvents___t-18M",Vm="ControlSlider-module__topLeftAlignment___zjnGM",Gm="ControlSlider-module__topCenterAlignment___gD1xW",Xm="ControlSlider-module__topRightAlignment___NMapS",Um="ControlSlider-module__middleLeftAlignment___OnUrY",qm="ControlSlider-module__middleCenterAlignment___Tdkl0",Km="ControlSlider-module__middleRightAlignment___wEbfX",Ym="ControlSlider-module__bottomLeftAlignment___cTP2-",Qm="ControlSlider-module__bottomCenterAlignment___c54fB",Zm="ControlSlider-module__bottomRightAlignment___kEwrz",Jm="ControlSlider-module__clickOverlay___DZA28",eg="ControlSlider-module__contain___pLyq7",tg="ControlSlider-module__cover___KdDat",Mt={wrapper:mm,hoverArrow:gm,sliderItem:hm,sliderImage:fm,arrow:ym,arrowVertical:vm,nextArrow:xm,arrowInner:bm,arrowIcon:Sm,arrowImg:wm,mirror:$m,pagination:Cm,paginationInner:Tm,paginationVertical:Im,paginationItem:Lm,dot:Pm,activeDot:Mm,paginationInsideBottom:Em,paginationInsideTop:Rm,paginationOutsideBottom:km,paginationOutsideTop:Am,paginationInsideLeft:Fm,paginationInsideRight:Nm,paginationOutsideLeft:_m,paginationOutsideRight:Hm,imgWrapper:Wm,captionBlock:Om,captionTextWrapper:Dm,captionText:zm,active:Bm,withPointerEvents:jm,topLeftAlignment:Vm,topCenterAlignment:Gm,topRightAlignment:Xm,middleLeftAlignment:Um,middleCenterAlignment:qm,middleRightAlignment:Km,bottomLeftAlignment:Ym,bottomCenterAlignment:Qm,bottomRightAlignment:Zm,clickOverlay:Jm,contain:eg,cover:tg};function ng(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ig(e,t,n){return t&&ng(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ic="(prefers-reduced-motion: reduce)",go=1,og=2,Co=3,Wo=4,Cr=5,la=6,ya=7,rg={CREATED:go,MOUNTED:og,IDLE:Co,MOVING:Wo,SCROLLING:Cr,DRAGGING:la,DESTROYED:ya};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var pu=setTimeout,_s=function(){};function oc(e){return requestAnimationFrame(e)}function Ea(e,t){return typeof t===e}function dr(e){return!ml(e)&&Ea("object",e)}var pl=Array.isArray,mu=tn(Ea,"function"),Pi=tn(Ea,"string"),Tr=tn(Ea,"undefined");function ml(e){return e===null}function gu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return pl(e)?e:[e]}function kn(e,t){Ir(e).forEach(t)}function gl(e,t){return e.indexOf(t)>-1}function ca(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&kn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Pi(t)?t.split(" "):t,!0)}function Lr(e,t){kn(t,e.appendChild.bind(e))}function hl(e,t){kn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return gu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function hu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?hu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function qi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){qi(t,function(n,i){pl(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function rc(e,t){kn(t||pr(e),function(n){delete e[n]})}function Xn(e,t){kn(e,function(n){kn(t,function(i){n&&n.removeAttribute(i)})})}function jt(e,t,n){dr(t)?qi(t,function(i,o){jt(e,o,i)}):kn(e,function(i){ml(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function xo(e,t,n){var i=document.createElement(e);return t&&(Pi(t)?Gn(i,t):jt(i,t)),n&&Lr(n,i),i}function _n(e,t,n){if(Tr(n))return getComputedStyle(e)[t];ml(n)||(e.style[t]=""+n)}function gr(e,t){_n(e,"display",t)}function fu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Hn(e,t){return e.getAttribute(t)}function ac(e,t){return e&&e.classList.contains(t)}function Pn(e){return e.getBoundingClientRect()}function Yi(e){kn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function yu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function vu(e,t){return e&&e.querySelector(t)}function fl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function Hs(e){return e.timeStamp}function _i(e){return Pi(e)?e:e?e+"px":""}var Mr="splide",yl="data-"+Mr;function ar(e,t){if(!e)throw new Error("["+Mr+"] "+(t||""))}var Mi=Math.min,va=Math.max,xa=Math.floor,hr=Math.ceil,xn=Math.abs;function xu(e,t,n){return xn(e-t)<n}function da(e,t,n,i){var o=Mi(t,n),r=va(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Mi(t,n),o=va(t,n);return Mi(va(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return kn(t,function(n){e=e.replace("%s",""+n)}),e}function vl(e){return e<10?"0"+e:""+e}var sc={};function ag(e){return""+e+vl(sc[e]=(sc[e]||0)+1)}function bu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,S){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,S,d,h])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(S){return S[0]===u&&S[1]===p&&S[2]===y&&(!d||S[3]===d)?(S[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){kn(l,function(u){u&&kn(c,function(p){p.split(" ").forEach(function(y){var S=y.split(".");d(u,S[0],S[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Ds="ready",di="move",Oo="moved",xl="click",Su="active",wu="inactive",$u="visible",Cu="hidden",ln="refresh",hn="updated",To="resize",Ra="resized",Tu="drag",Iu="dragging",Lu="dragged",ka="scroll",Ji="scrolled",sg="overflow",bl="destroy",Pu="arrows:mounted",Mu="arrows:updated",Eu="pagination:mounted",Ru="pagination:updated",Sl="navigation:mounted",wl="autoplay:play",ku="autoplay:playing",$l="autoplay:pause",Cl="lazyload:loaded",Au="sk",Fu="sh",ba="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=bu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,pl(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(bl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function Aa(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Mi((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return S();c=oc(p)}}function y(F){F||h(),r=o()-(F?l*e:0),d=!1,c=oc(p)}function S(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(F){e=F}function w(){return d}return{start:y,rewind:m,pause:S,cancel:h,set:x,isPaused:w}}function lg(e){var t=e;function n(o){t=o}function i(o){return gl(Ir(o),t)}return{set:n,is:i}}function cg(e,t){var n=Aa(0,e,null,1);return function(){n.isPaused()&&n.start()}}function dg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=bu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(x,w){return h?+x-+w:+w-+x}).forEach(function(x){p(o[x],"("+(h?"min":"max")+"-width:"+x+"px)")}),p(r,ic),y()}function u(h){h&&l.destroy()}function p(h,x){var w=matchMedia(x);l.bind(w,"change",y),c.push([h,w])}function y(){var h=i.is(ya),x=n.direction,w=c.reduce(function(F,v){return Ci(F,v[1].matches?v[0]:{})},{});rc(n),m(w),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function S(h){matchMedia(ic).matches&&(h?Ci(n,r):rc(n,pr(r)))}function m(h,x,w){Ci(n,h),x&&Ci(Object.getPrototypeOf(n),h),(w||!i.is(go))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:S,set:m}}var Fa="Arrow",Na=Fa+"Left",_a=Fa+"Right",Nu=Fa+"Up",_u=Fa+"Down",lc="rtl",Ha="ttb",Ka={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Nu,_a],ArrowRight:[_u,Na]};function ug(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===lc&&!l?1:c===Ha?0:-1;return Ka[r]&&Ka[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Ka[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===lc?1:-1)}return{resolve:i,orient:o}}var ai="role",bo="tabindex",pg="disabled",Wn="aria-",Er=Wn+"controls",Hu=Wn+"current",cc=Wn+"selected",En=Wn+"label",Tl=Wn+"labelledby",Wu=Wn+"hidden",Il=Wn+"orientation",fr=Wn+"roledescription",dc=Wn+"live",uc=Wn+"busy",pc=Wn+"atomic",Ll=[ai,bo,pg,Er,Hu,En,Tl,Wu,Il,fr],Kn=Mr+"__",Ni="is-",Ya=Mr,mc=Kn+"track",mg=Kn+"list",Wa=Kn+"slide",Ou=Wa+"--clone",gg=Wa+"__container",Pl=Kn+"arrows",Oa=Kn+"arrow",Du=Oa+"--prev",zu=Oa+"--next",Da=Kn+"pagination",Bu=Da+"__page",hg=Kn+"progress",fg=hg+"__bar",yg=Kn+"toggle",vg=Kn+"spinner",xg=Kn+"sr",bg=Ni+"initialized",Qi=Ni+"active",ju=Ni+"prev",Vu=Ni+"next",zs=Ni+"visible",Bs=Ni+"loading",Gu=Ni+"focus-in",Xu=Ni+"overflow",Sg=[Qi,zs,ju,Vu,Bs,Gu,Xu],wg={slide:Wa,clone:Ou,arrows:Pl,arrow:Oa,prev:Du,next:zu,pagination:Da,page:Bu,spinner:vg};function $g(e,t){if(mu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var Cg=5,gc=200,Uu="touchstart mousedown",Qa="touchmove mousemove",Za="touchend touchcancel mouseup click";function Tg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],S,m,h;function x(){P(),M(),v()}function w(){o(ln,F),o(ln,x),o(hn,v),r(document,Uu+" keydown",function(j){h=j.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Gu,!!h)})}function F(j){var N=Ll.concat("style");ci(u),ri(l,p),ri(S,y),Xn([S,m],N),Xn(l,j?N:["style",fr])}function v(){ri(l,p),ri(S,y),p=X(Ya),y=X(mc),Gn(l,p),Gn(S,y),jt(l,En,n.label),jt(l,Tl,n.labelledby)}function P(){S=K("."+mc),m=Pr(S,"."+mg),ar(S&&m,"A track/list element is missing."),ca(u,hu(m,"."+Wa+":not(."+Ou+")")),qi({arrows:Pl,pagination:Da,prev:Du,next:zu,bar:fg,toggle:yg},function(j,N){d[N]=K("."+j)}),mr(d,{root:l,track:S,list:m,slides:u})}function M(){var j=l.id||ag(Mr),N=n.role;l.id=j,S.id=S.id||j+"-track",m.id=m.id||j+"-list",!Hn(l,ai)&&l.tagName!=="SECTION"&&N&&jt(l,ai,N),jt(l,fr,c.carousel),jt(m,ai,"presentation")}function K(j){var N=vu(l,j);return N&&$g(N,"."+Ya)===l?N:void 0}function X(j){return[j+"--"+n.type,j+"--"+n.direction,n.drag&&j+"--draggable",n.isNavigation&&j+"--nav",j===Ya&&Qi]}return mr(d,{setup:x,mount:w,destroy:F})}var Io="slide",Do="loop",Rr="fade";function Ig(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,S=p.updateOnMove,m=p.i18n,h=p.pagination,x=p.slideFocus,w=d.Direction.resolve,F=Hn(i,"style"),v=Hn(i,En),P=n>-1,M=Pr(i,"."+gg),K;function X(){P||(i.id=u.id+"-slide"+vl(t+1),jt(i,ai,h?"tabpanel":"group"),jt(i,fr,m.slide),jt(i,En,v||Os(m.slideLabel,[t+1,e.length]))),j()}function j(){c(i,"click",tn(l,xl,U)),c(i,"keydown",tn(l,Au,U)),r([Oo,Fu,Ji],L),r(Sl,_),S&&r(di,T)}function N(){K=!0,o.destroy(),ri(i,Sg),Xn(i,Ll),jt(i,"style",F),jt(i,En,v||"")}function _(){var E=e.splides.map(function(f){var Q=f.splide.Components.Slides.getAt(t);return Q?Q.slide.id:""}).join(" ");jt(i,En,Os(m.slideX,(P?n:t)+1)),jt(i,Er,E),jt(i,ai,x?"button":""),x&&Xn(i,fr)}function T(){K||L()}function L(){if(!K){var E=e.index;Y(),R(),oi(i,ju,t===E-1),oi(i,Vu,t===E+1)}}function Y(){var E=$();E!==ac(i,Qi)&&(oi(i,Qi,E),jt(i,Hu,y&&E||""),l(E?Su:wu,U))}function R(){var E=G(),f=!E&&(!$()||P);if(e.state.is([Wo,Cr])||jt(i,Wu,f||""),jt(fl(i,p.focusableNodes||""),bo,f?-1:""),x&&jt(i,bo,f?-1:0),E!==ac(i,zs)&&(oi(i,zs,E),l(E?$u:Cu,U)),!E&&document.activeElement===i){var Q=d.Slides.getAt(e.index);Q&&fu(Q.slide)}}function I(E,f,Q){_n(Q&&M||i,E,f)}function $(){var E=e.index;return E===t||p.cloneStatus&&E===n}function G(){if(e.is(Rr))return $();var E=Pn(d.Elements.track),f=Pn(i),Q=w("left",!0),q=w("right",!0);return xa(E[Q])<=hr(f[Q])&&xa(f[q])<=hr(E[q])}function O(E,f){var Q=xn(E-t);return!P&&(p.rewind||e.is(Do))&&(Q=Mi(Q,e.length-Q)),Q<=f}var U={index:t,slideIndex:n,slide:i,container:M,isClone:P,mount:X,destroy:N,update:L,style:I,isWithin:O};return U}function Lg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){S(),o(ln,m),o(ln,S)}function S(){d.forEach(function(L,Y){x(L,Y,-1)})}function m(){K(function(L){L.destroy()}),ci(p)}function h(){K(function(L){L.update()})}function x(L,Y,R){var I=Ig(e,Y,R,L);I.mount(),p.push(I),p.sort(function($,G){return $.index-G.index})}function w(L){return L?X(function(Y){return!Y.isClone}):p}function F(L){var Y=t.Controller,R=Y.toIndex(L),I=Y.hasFocus()?1:n.perPage;return X(function($){return da($.index,R,R+I-1)})}function v(L){return X(L)[0]}function P(L,Y){kn(L,function(R){if(Pi(R)&&(R=yu(R)),gu(R)){var I=d[Y];I?hl(R,I):Lr(u,R),Gn(R,n.classes.slide),N(R,tn(r,To))}}),r(ln)}function M(L){Yi(X(L).map(function(Y){return Y.slide})),r(ln)}function K(L,Y){w(Y).forEach(L)}function X(L){return p.filter(mu(L)?L:function(Y){return Pi(L)?ur(Y.slide,L):gl(Ir(L),Y.index)})}function j(L,Y,R){K(function(I){I.style(L,Y,R)})}function N(L,Y){var R=fl(L,"img"),I=R.length;I?R.forEach(function($){l($,"load error",function(){--I||Y()})}):Y()}function _(L){return L?d.length:p.length}function T(){return p.length>n.perPage}return{mount:y,destroy:m,update:h,register:x,get:w,getIn:F,getAt:v,add:P,remove:M,forEach:K,filter:X,style:j,getLength:_,isEnough:T}}function Pg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,S=u.list,m=c.getAt,h=c.style,x,w,F;function v(){P(),r(window,"resize load",cg(tn(l,To))),o([hn,ln],P),o(To,M)}function P(){x=n.direction===Ha,_n(p,"maxWidth",_i(n.width)),_n(y,d("paddingLeft"),K(!1)),_n(y,d("paddingRight"),K(!0)),M(!0)}function M(U){var E=Pn(p);(U||w.width!==E.width||w.height!==E.height)&&(_n(y,"height",X()),h(d("marginRight"),_i(n.gap)),h("width",N()),h("height",_(),!0),w=E,l(Ra),F!==(F=O())&&(oi(p,Xu,F),l(sg,F)))}function K(U){var E=n.padding,f=d(U?"right":"left");return E&&_i(E[f]||(dr(E)?0:E))||"0px"}function X(){var U="";return x&&(U=j(),ar(U,"height or heightRatio is missing."),U="calc("+U+" - "+K(!1)+" - "+K(!0)+")"),U}function j(){return _i(n.height||Pn(S).width*n.heightRatio)}function N(){return n.autoWidth?null:_i(n.fixedWidth)||(x?"":T())}function _(){return _i(n.fixedHeight)||(x?n.autoHeight?null:T():j())}function T(){var U=_i(n.gap);return"calc((100%"+(U&&" + "+U)+")/"+(n.perPage||1)+(U&&" - "+U)+")"}function L(){return Pn(S)[d("width")]}function Y(U,E){var f=m(U||0);return f?Pn(f.slide)[d("width")]+(E?0:$()):0}function R(U,E){var f=m(U);if(f){var Q=Pn(f.slide)[d("right")],q=Pn(S)[d("left")];return xn(Q-q)+(E?0:$())}return 0}function I(U){return R(e.length-1)-R(0)+Y(0,U)}function $(){var U=m(0);return U&&parseFloat(_n(U.slide,d("marginRight")))||0}function G(U){return parseFloat(_n(y,d("padding"+(U?"Right":"Left"))))||0}function O(){return e.is(Rr)||I(!0)>L()}return{mount:v,resize:M,listSize:L,slideSize:Y,sliderSize:I,totalSize:R,getPadding:G,isOverflow:O}}var Mg=2;function Eg(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,y),o([hn,To],m),(u=w())&&(h(u),t.Layout.resize(!0))}function y(){S(),p()}function S(){Yi(d),ci(d),i.destroy()}function m(){var F=w();u!==F&&(u<F||!F)&&i.emit(ln)}function h(F){var v=l.get().slice(),P=v.length;if(P){for(;v.length<F;)ca(v,v);ca(v.slice(-F),v.slice(0,F)).forEach(function(M,K){var X=K<F,j=x(M.slide,K);X?hl(j,v[0].slide):Lr(r.list,j),ca(d,j),l.register(j,K-F+(X?0:P),M.index)})}}function x(F,v){var P=F.cloneNode(!0);return Gn(P,n.classes.clone),P.id=e.root.id+"-clone"+vl(v+1),P}function w(){var F=n.clones;if(!e.is(Do))F=0;else if(Tr(F)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),P=v&&hr(Pn(r.track)[c("width")]/v);F=P||n[c("autoWidth")]&&e.length||n.perPage*Mg}return F}return{mount:p,destroy:S}}function Rg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,S=c.sliderSize,m=t.Direction,h=m.resolve,x=m.orient,w=t.Elements,F=w.list,v=w.track,P;function M(){P=t.Transition,o([Fi,Ra,hn,ln],K)}function K(){t.Controller.isBusy()||(t.Scroll.cancel(),j(e.index),t.Slides.update())}function X(f,Q,q,pe){f!==Q&&U(f>q)&&(L(),N(T(I(),f>q),!0)),l(Wo),r(di,Q,q,f),P.start(Q,function(){l(Co),r(Oo,Q,q,f),pe&&pe()})}function j(f){N(R(f,!0))}function N(f,Q){if(!e.is(Rr)){var q=Q?f:_(f);_n(F,"transform","translate"+h("X")+"("+q+"px)"),f!==q&&r(Fu)}}function _(f){if(e.is(Do)){var Q=Y(f),q=Q>t.Controller.getEnd(),pe=Q<0;(pe||q)&&(f=T(f,q))}return f}function T(f,Q){var q=f-O(Q),pe=S();return f-=x(pe*(hr(xn(q)/pe)||1))*(Q?1:-1),f}function L(){N(I(),!0),P.cancel()}function Y(f){for(var Q=t.Slides.get(),q=0,pe=1/0,k=0;k<Q.length;k++){var me=Q[k].index,C=xn(R(me,!0)-f);if(C<=pe)pe=C,q=me;else break}return q}function R(f,Q){var q=x(p(f-1)-G(f));return Q?$(q):q}function I(){var f=h("left");return Pn(F)[f]-Pn(v)[f]+x(u(!1))}function $(f){return n.trimSpace&&e.is(Io)&&(f=co(f,0,x(S(!0)-y()))),f}function G(f){var Q=n.focus;return Q==="center"?(y()-d(f,!0))/2:+Q*d(f)||0}function O(f){return R(f?t.Controller.getEnd():0,!!n.trimSpace)}function U(f){var Q=x(T(I(),f));return f?Q>=0:Q<=F[h("scrollWidth")]-Pn(v)[h("width")]}function E(f,Q){Q=Tr(Q)?I():Q;var q=f!==!0&&x(Q)<x(O(!1)),pe=f!==!1&&x(Q)>x(O(!0));return q||pe}return{mount:M,move:X,jump:j,translate:N,shift:T,cancel:L,toIndex:Y,toPosition:R,getPosition:I,getLimit:O,exceededLimit:E,reposition:K}}function kg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,S=p.getLength,m=n.omitEnd,h=e.is(Do),x=e.is(Io),w=tn(I,!1),F=tn(I,!0),v=n.start||0,P,M=v,K,X,j;function N(){_(),o([hn,ln,ba],_),o(Ra,T)}function _(){K=S(!0),X=n.perMove,j=n.perPage,P=U();var C=co(v,0,m?P:K-1);C!==v&&(v=C,l.reposition())}function T(){P!==U()&&r(ba)}function L(C,ue,te){if(!me()){var fe=R(C),Pe=O(fe);Pe>-1&&(ue||Pe!==v)&&(q(Pe),l.move(fe,Pe,M,te))}}function Y(C,ue,te,fe){t.Scroll.scroll(C,ue,te,function(){var Pe=O(l.toIndex(c()));q(m?Mi(Pe,P):Pe),fe&&fe()})}function R(C){var ue=v;if(Pi(C)){var te=C.match(/([+\-<>])(\d+)?/)||[],fe=te[1],Pe=te[2];fe==="+"||fe==="-"?ue=$(v+ +(""+fe+(+Pe||1)),v):fe===">"?ue=Pe?E(+Pe):w(!0):fe==="<"&&(ue=F(!0))}else ue=h?C:co(C,0,P);return ue}function I(C,ue){var te=X||(k()?1:j),fe=$(v+te*(C?-1:1),v,!(X||k()));return fe===-1&&x&&!xu(c(),d(!C),1)?C?0:P:ue?fe:O(fe)}function $(C,ue,te){if(y()||k()){var fe=G(C);fe!==C&&(ue=C,C=fe,te=!1),C<0||C>P?!X&&(da(0,C,ue,!0)||da(P,ue,C,!0))?C=E(f(C)):h?C=te?C<0?-(K%j||j):K:C:n.rewind?C=C<0?P:0:C=-1:te&&C!==ue&&(C=E(f(ue)+(C<ue?-1:1)))}else C=-1;return C}function G(C){if(x&&n.trimSpace==="move"&&C!==v)for(var ue=c();ue===u(C,!0)&&da(C,0,e.length-1,!n.rewind);)C<v?--C:++C;return C}function O(C){return h?(C+K)%K||0:C}function U(){for(var C=K-(k()||h&&X?1:j);m&&C-- >0;)if(u(K-1,!0)!==u(C,!0)){C++;break}return co(C,0,K-1)}function E(C){return co(k()?C:j*C,0,P)}function f(C){return k()?Mi(C,P):xa((C>=P?K-1:C)/j)}function Q(C){var ue=l.toIndex(C);return x?co(ue,0,P):ue}function q(C){C!==v&&(M=v,v=C)}function pe(C){return C?M:v}function k(){return!Tr(n.focus)||n.isNavigation}function me(){return e.state.is([Wo,Cr])&&!!n.waitForTransition}return{mount:N,go:L,scroll:Y,getNext:w,getPrev:F,getAdjacent:I,getEnd:U,setIndex:q,getIndex:pe,toIndex:E,toPage:f,toDest:Q,hasFocus:k,isBusy:me}}var Ag="http://www.w3.org/2000/svg",Fg="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",Hr=40;function Ng(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,S=u.track,m=y,h=u.prev,x=u.next,w,F,v={};function P(){K(),o(hn,M)}function M(){X(),P()}function K(){var Y=n.arrows;Y&&!(h&&x)&&_(),h&&x&&(mr(v,{prev:h,next:x}),gr(m,Y?"":"none"),Gn(m,F=Pl+"--"+n.direction),Y&&(j(),L(),jt([h,x],Er,S.id),l(Pu,h,x)))}function X(){i.destroy(),ri(m,F),w?(Yi(y?[h,x]:m),h=x=null):Xn([h,x],Ll)}function j(){o([Fi,Oo,ln,Ji,ba],L),r(x,"click",tn(N,">")),r(h,"click",tn(N,"<"))}function N(Y){p.go(Y,!0)}function _(){m=y||xo("div",c.arrows),h=T(!0),x=T(!1),w=!0,Lr(m,[h,x]),!y&&hl(m,S)}function T(Y){var R='<button class="'+c.arrow+" "+(Y?c.prev:c.next)+'" type="button"><svg xmlns="'+Ag+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Fg)+'" />';return yu(R)}function L(){if(h&&x){var Y=e.index,R=p.getPrev(),I=p.getNext(),$=R>-1&&Y<R?d.last:d.prev,G=I>-1&&Y>I?d.first:d.next;h.disabled=R<0,x.disabled=I<0,jt(h,En,$),jt(x,En,G),l(Mu,h,x,R,I)}}return{arrows:v,mount:P,destroy:X,update:L}}var _g=yl+"-interval";function Hg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=Aa(n.interval,e.go.bind(e,">"),j),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,S=p.toggle,m=n.autoplay,h,x,w=m==="pause";function F(){m&&(v(),S&&jt(S,Er,u.track.id),w||P(),X())}function v(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(_){h=_.type==="mouseenter",K()}),n.pauseOnFocus&&r(y,"focusin focusout",function(_){x=_.type==="focusin",K()}),S&&r(S,"click",function(){w?P():M(!0)}),o([di,ka,ln],c.rewind),o(di,N)}function P(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=h=w=!1,X(),l(wl))}function M(_){_===void 0&&(_=!0),w=!!_,X(),d()||(c.pause(),l($l))}function K(){w||(h||x?M(!1):P())}function X(){S&&(oi(S,Qi,!w),jt(S,En,n.i18n[w?"play":"pause"]))}function j(_){var T=u.bar;T&&_n(T,"width",_*100+"%"),l(ku,_)}function N(_){var T=t.Slides.getAt(_);c.set(T&&+Hn(T.slide,_g)||n.interval)}return{mount:F,destroy:c.cancel,play:P,pause:M,isPaused:d}}function Wg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o(Cl,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Og=10,Dg=600,zg=.6,Bg=1.5,jg=800;function Vg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,S=e.is(Io),m,h,x=1;function w(){o(di,M),o([hn,ln],K)}function F(j,N,_,T,L){var Y=d();if(M(),_&&(!S||!p())){var R=t.Layout.sliderSize(),I=Ws(j)*R*xa(xn(j)/R)||0;j=c.toPosition(t.Controller.toDest(j%R))+I}var $=xu(Y,j,1);x=1,N=$?0:N||va(xn(j-Y)/Bg,jg),h=T,m=Aa(N,v,tn(P,Y,j,L),1),l(Cr),r(ka),m.start()}function v(){l(Co),h&&h(),r(Ji)}function P(j,N,_,T){var L=d(),Y=j+(N-j)*X(T),R=(Y-L)*x;y(L+R),S&&!_&&p()&&(x*=zg,xn(R)<Og&&F(u(p(!0)),Dg,!1,h,!0))}function M(){m&&m.cancel()}function K(){m&&!m.isPaused()&&(M(),v())}function X(j){var N=n.easingFunc;return N?N(j):1-Math.pow(1-j,4)}return{mount:w,destroy:M,scroll:F,cancel:K}}var uo={passive:!1,capture:!0};function Gg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,S=t.Elements.track,m=t.Media.reduce,h=t.Direction,x=h.resolve,w=h.orient,F=u.getPosition,v=u.exceededLimit,P,M,K,X,j,N=!1,_,T,L;function Y(){l(S,Qa,_s,uo),l(S,Za,_s,uo),l(S,Uu,I,uo),l(S,"click",O,{capture:!0}),l(S,"dragstart",ni),o([Fi,hn],R)}function R(){var V=n.drag;we(!V),X=V==="free"}function I(V){if(_=!1,!T){var ie=Pe(V);fe(V.target)&&(ie||!V.button)&&(y.isBusy()?ni(V,!0):(L=ie?S:window,j=d.is([Wo,Cr]),K=null,l(L,Qa,$,uo),l(L,Za,G,uo),u.cancel(),p.cancel(),U(V)))}}function $(V){if(d.is(la)||(d.set(la),r(Tu)),V.cancelable)if(j){u.translate(P+te(k(V)));var ie=me(V)>gc,oe=N!==(N=v());(ie||oe)&&U(V),_=!0,r(Iu),ni(V)}else Q(V)&&(j=f(V),ni(V))}function G(V){d.is(la)&&(d.set(Co),r(Lu)),j&&(E(V),ni(V)),c(L,Qa,$),c(L,Za,G),j=!1}function O(V){!T&&_&&ni(V,!0)}function U(V){K=M,M=V,P=F()}function E(V){var ie=q(V),oe=pe(ie),le=n.rewind&&n.rewindByDrag;m(!1),X?y.scroll(oe,0,n.snap):e.is(Rr)?y.go(w(Ws(ie))<0?le?"<":"-":le?">":"+"):e.is(Io)&&N&&le?y.go(v(!0)?">":"<"):y.go(y.toDest(oe),!0),m(!0)}function f(V){var ie=n.dragMinThreshold,oe=dr(ie),le=oe&&ie.mouse||0,ve=(oe?ie.touch:+ie)||10;return xn(k(V))>(Pe(V)?ve:le)}function Q(V){return xn(k(V))>xn(k(V,!0))}function q(V){if(e.is(Do)||!N){var ie=me(V);if(ie&&ie<gc)return k(V)/ie}return 0}function pe(V){return F()+Ws(V)*Mi(xn(V)*(n.flickPower||600),X?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(V,ie){return ue(V,ie)-ue(C(V),ie)}function me(V){return Hs(V)-Hs(C(V))}function C(V){return M===V&&K||M}function ue(V,ie){return(Pe(V)?V.changedTouches[0]:V)["page"+x(ie?"Y":"X")]}function te(V){return V/(N&&e.is(Io)?Cg:1)}function fe(V){var ie=n.noDrag;return!ur(V,"."+Bu+", ."+Oa)&&(!ie||!ur(V,ie))}function Pe(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function de(){return j}function we(V){T=V}return{mount:Y,disable:we,isDragging:de}}var Xg={Spacebar:" ",Right:_a,Left:Na,Up:Nu,Down:_u};function Ml(e){return e=Pi(e)?e:e.key,Xg[e]||e}var hc="keydown";function Ug(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){S(),o(hn,m),o(hn,S),o(di,x)}function S(){var F=n.keyboard;F&&(u=F==="global"?window:c,r(u,hc,w))}function m(){l(u,hc)}function h(F){p=F}function x(){var F=p;p=!0,pu(function(){p=F})}function w(F){if(!p){var v=Ml(F);v===d(Na)?e.go("<"):v===d(_a)&&e.go(">")}}return{mount:y,destroy:m,disable:h}}var sr=yl+"-lazy",ua=sr+"-srcset",qg="["+sr+"], ["+ua+"]";function Kg(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Oo,Ji],p=[];function y(){n.lazyLoad&&(S(),o(ln,S))}function S(){ci(p),m(),d?F():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(v){fl(v.slide,qg).forEach(function(P){var M=Hn(P,sr),K=Hn(P,ua);if(M!==P.src||K!==P.srcset){var X=n.classes.spinner,j=P.parentElement,N=Pr(j,"."+X)||xo("span",X,j);p.push([P,v,N]),P.src||gr(P,"none")}})})}function h(){p=p.filter(function(v){var P=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,P)?x(v):!0}),p.length||r(u)}function x(v){var P=v[0];Gn(v[1].slide,Bs),l(P,"load error",tn(w,v)),jt(P,"src",Hn(P,sr)),jt(P,"srcset",Hn(P,ua)),Xn(P,sr),Xn(P,ua)}function w(v,P){var M=v[0],K=v[1];ri(K.slide,Bs),P.type!=="error"&&(Yi(v[2]),gr(M,""),c(Cl,M,K),c(To)),d&&F()}function F(){p.length&&x(p.shift())}return{mount:y,destroy:tn(ci,p),check:h}}function Yg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,S=u.go,m=t.Direction.resolve,h=d.pagination,x=[],w,F;function v(){P(),o([hn,ln,ba],v);var T=n.pagination;h&&gr(h,T?"":"none"),T&&(o([di,ka,Ji],_),M(),_(),r(Eu,{list:w,items:x},N(e.index)))}function P(){w&&(Yi(h?Ai(w.children):w),ri(w,F),ci(x),w=null),i.destroy()}function M(){var T=e.length,L=n.classes,Y=n.i18n,R=n.perPage,I=p()?u.getEnd()+1:hr(T/R);w=h||xo("ul",L.pagination,d.track.parentElement),Gn(w,F=Da+"--"+j()),jt(w,ai,"tablist"),jt(w,En,Y.select),jt(w,Il,j()===Ha?"vertical":"");for(var $=0;$<I;$++){var G=xo("li",null,w),O=xo("button",{class:L.page,type:"button"},G),U=c.getIn($).map(function(f){return f.slide.id}),E=!p()&&R>1?Y.pageX:Y.slideX;l(O,"click",tn(K,$)),n.paginationKeyboard&&l(O,"keydown",tn(X,$)),jt(G,ai,"presentation"),jt(O,ai,"tab"),jt(O,Er,U.join(" ")),jt(O,En,Os(E,$+1)),jt(O,bo,-1),x.push({li:G,button:O,page:$})}}function K(T){S(">"+T,!0)}function X(T,L){var Y=x.length,R=Ml(L),I=j(),$=-1;R===m(_a,!1,I)?$=++T%Y:R===m(Na,!1,I)?$=(--T+Y)%Y:R==="Home"?$=0:R==="End"&&($=Y-1);var G=x[$];G&&(fu(G.button),S(">"+$),ni(L,!0))}function j(){return n.paginationDirection||n.direction}function N(T){return x[u.toPage(T)]}function _(){var T=N(y(!0)),L=N(y());if(T){var Y=T.button;ri(Y,Qi),Xn(Y,cc),jt(Y,bo,-1)}if(L){var R=L.button;Gn(R,Qi),jt(R,cc,!0),jt(R,bo,"")}r(Ru,{list:w,items:x},T,L)}return{items:x,mount:v,destroy:P,getAt:N,update:_}}var Qg=[" ","Enter"];function Zg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function c(){r.forEach(function(h){h.destroy()}),ci(r)}function d(){c(),l()}function u(h,x){var w=an(h);w.on(di,function(F,v,P){x.go(x.is(Do)?P:F)}),r.push(w)}function p(){var h=an(e),x=h.on;x(xl,S),x(Au,m),x([Fi,hn],y),r.push(h),h.emit(Sl,e.splides)}function y(){jt(t.Elements.list,Il,n.direction===Ha?"vertical":"")}function S(h){e.go(h.index)}function m(h,x){gl(Qg,Ml(x))&&(S(h),ni(x))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Jg(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,uo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,S=Hs(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;xn(p)>m&&S-r>h&&(e.go(y?"<":">"),r=S),d(y)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var eh=90;function th(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",xg),d=Aa(eh,tn(p,!1));function u(){l&&(S(!t.Autoplay.isPaused()),jt(r,pc,!0),c.textContent="…",o(wl,tn(S,!0)),o($l,tn(S,!1)),o([Oo,Ji],tn(p,!0)))}function p(m){jt(r,uc,m),m?(Lr(r,c),d.start()):(Yi(c),d.cancel())}function y(){Xn(r,[dc,pc,uc]),Yi(c)}function S(m){l&&jt(r,dc,m?"off":"polite")}return{mount:u,disable:S,destroy:y}}var nh=Object.freeze({__proto__:null,Media:dg,Direction:ug,Elements:Tg,Slides:Lg,Layout:Pg,Clones:Eg,Move:Rg,Controller:kg,Arrows:Ng,Autoplay:Hg,Cover:Wg,Scroll:Vg,Drag:Gg,Keyboard:Ug,LazyLoad:Kg,Pagination:Yg,Sync:Zg,Wheel:Jg,Live:th}),ih={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"},oh={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:wg,i18n:ih,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function rh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),pu(d)}return{mount:o,start:l,cancel:_s}}function ah(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(_n,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,h){var x=i.toPosition(m,!0),w=i.getPosition(),F=S(m);xn(x-w)>=1&&F>=1?n.useScroll?r.scroll(x,F,!1,h):(c("transform "+F+"ms "+n.easing),i.translate(x,!0),d=h):(i.jump(m),h())}function y(){c(""),r.cancel()}function S(m){var h=n.rewindSpeed;if(e.is(Io)&&h){var x=o.getIndex(!0),w=o.getEnd();if(x===0&&m>=w||x>=w&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:y}}var sh=(function(){function e(n,i){this.event=an(),this.Components={},this.state=lg(go),this.splides=[],this._o={},this._E={};var o=Pi(n)?vu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:Hn(o,En)||"",labelledby:Hn(o,Tl)||""},oh,e.defaults,i||{});try{Ci(i,JSON.parse(Hn(o,yl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([go,ya]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Rr)?rh:ah),this._E=i||this._E;var d=mr({},nh,this._E,{Transition:this._T});return qi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),qi(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,bg),l.set(Co),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(Co)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Ai(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(go)?an(this).on(Ds,this.destroy.bind(this,i)):(qi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(bl),o.destroy(),i&&ci(this.splides),r.set(ya)),this},ig(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),El=sh;El.defaults={};El.STATES=rg;var fc=[[Fi,"onMounted"],[Ds,"onReady"],[di,"onMove"],[Oo,"onMoved"],[xl,"onClick"],[Su,"onActive"],[wu,"onInactive"],[$u,"onVisible"],[Cu,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[To,"onResize"],[Ra,"onResized"],[Tu,"onDrag"],[Iu,"onDragging"],[Lu,"onDragged"],[ka,"onScroll"],[Ji,"onScrolled"],[bl,"onDestroy"],[Pu,"onArrowsMounted"],[Mu,"onArrowsUpdated"],[Eu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[Sl,"onNavigationMounted"],[wl,"onAutoplayPlay"],[ku,"onAutoplayPlaying"],[$l,"onAutoplayPause"],[Cl,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function Sa(e){return e!==null&&typeof e=="object"}function js(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!js(n,t[i]));if(Sa(e)&&Sa(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!js(e[o],t[o]))}return e===t}function lh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function ch(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Vs(e,t){const n=e;return ch(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Sa(i)?n[o]=Vs(Sa(n[o])?n[o]:{},i):n[o]=i}),n}var dh=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),kl=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new El(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Vs({},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&&!js(this.options,e)&&(this.splide.options=e,this.options=Vs({},e));const t=this.getSlides();lh(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){fc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Rl("splide",e),ref:this.splideRef,...this.omit(o,["options",...fc.map(r=>r[1])])},n?s.createElement(dh,null,i):i)}},Al=({children:e,className:t,...n})=>s.createElement("li",{className:Rl("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 uh="RichTextRenderer-module__link___BWeZ2",ph={link:uh},mh=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>mh(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:b.scalingValue(e.letterSpacing,t),wordSpacing:b.scalingValue(e.wordSpacing,t),fontSize:b.scalingValue(n,t),lineHeight:i!==void 0?b.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function qu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?qu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx(b.LinkWrapper,{className:ph.link,link:i,children:t(i.children)},o):a.jsx("span",{style:gh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:qu(o)?t(o):" "},i)})})};function gh(e){return{...e.fontFamily&&{fontFamily:zo(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 hh="SvgImage-module__svg___q3xE-",fh="SvgImage-module__img___VsTm-",yc={svg:hh,img:fh},Ja=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Ku(e){if(yr(e))return Promise.resolve(e);const t=Ja.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Ja.delete(e),i});return Ja.set(e,n),n}const yh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},vh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!yh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Ku(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Et(yc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Et(yc.svg,i),style:{"--svg":vh(c),"--fill":t,"--hover-fill":n,...o??{}}})},xh={"top-left":Pt.topLeftAlignment,"top-center":Pt.topCenterAlignment,"top-right":Pt.topRightAlignment,"middle-left":Pt.middleLeftAlignment,"middle-center":Pt.middleCenterAlignment,"middle-right":Pt.middleRightAlignment,"bottom-left":Pt.bottomLeftAlignment,"bottom-center":Pt.bottomCenterAlignment,"bottom-right":Pt.bottomRightAlignment};function bh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:m}=n.imageCaption??{},[f,S]=s.useState(void 0),[w,N]=s.useState(null),[v,M]=s.useState(0),[E,U]=s.useState(0),{direction:X,transition:D,controls:_,pagination:W,imageCaption:T,triggers:C}=e,q=s.useRef(D.type),{x:R,y:$}=e.controls.offset,I=j=>{o&&o.go(j)};return s.useEffect(()=>{if(!w)return;const j=new ResizeObserver(F=>{if(!o)return;const[K]=F;S({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return j.observe(w),()=>j.unobserve(w)},[w]),s.useEffect(()=>{!o||q.current===D.type||(U(j=>j+1),q.current=D.type)},[D.type]),a.jsx("div",{className:Et(Pt.wrapper,{[Pt.editor]:i}),ref:N,children:a.jsxs("div",{className:Pt.sliderInner,style:{width:f?f.width:"100%",height:f?f.height:"100%",backgroundColor:D.backgroundColor&&D.type==="fade in"?D.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Et(Pt.captionBlock),children:a.jsx("div",{className:Pt.captionTextWrapper,children:t.map((j,F)=>a.jsx("div",{className:Et(Pt.captionText,xh[T.alignment],{[Pt.withPointerEvents]:F===v&&i,[Pt.active]:F===v}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":b.scalingValue(l.width,i),letterSpacing:b.scalingValue(d,i),wordSpacing:b.scalingValue(p,i),textAlign:u,fontSize:b.scalingValue(y.fontSize,i),lineHeight:b.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:D.duration?`${Math.round(parseInt(D.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Pt.captionTextInner,style:{"--link-hover-color":T.linkHoverColor,"--link-color":T.linkColor,position:"relative",top:b.scalingValue(T.offset.y,i),left:b.scalingValue(T.offset.x,i)},children:a.jsx(Zi,{content:j.imageCaption})})},F))})}),a.jsx(kl,{onMove:j=>{M(j.index)},ref:r,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,autoplay:C.autoPlay!==null,...C.autoPlay!==null&&{interval:parseInt(C.autoPlay)*1e3},direction:X==="horiz"||D.type==="fade in"?"ltr":"ttb",pagination:!1,drag:C.triggersList.drag,perPage:1,width:f?f.width:"100%",height:f?f.height:"100%",type:D.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,F)=>a.jsx(Al,{children:a.jsx("div",{className:Pt.sliderItem,children:a.jsx("div",{className:Pt.imgWrapper,children:a.jsx("img",{className:Et(Pt.sliderImage,{[Pt.contain]:j.image.objectFit==="contain",[Pt.cover]:j.image.objectFit==="cover"}),src:j.image.assetId,alt:j.image.name??""})})})},F))},E),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(Pt.arrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{I("-1")},className:Pt.arrowInner,style:{transform:`translate(${b.scalingValue(R,i)}, ${b.scalingValue($*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Et(Pt.arrowImg,Pt.mirror)}),!_.arrowsImgUrl&&a.jsx(vc,{color:_.color,className:Et(Pt.arrowIcon,Pt.arrowImg,Pt.mirror)})]})}),a.jsx("div",{className:Et(Pt.arrow,Pt.nextArrow,{[Pt.arrowVertical]:X==="vert",[Pt.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:Pt.arrowInner,onClick:()=>I("+1"),style:{transform:`translate(${b.scalingValue(R*(X==="horiz"?-1:1),i)}, ${b.scalingValue($,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Pt.arrowImg}),!_.arrowsImgUrl&&a.jsx(vc,{color:_.color,className:Et(Pt.arrowIcon,Pt.arrowImg)})]})})]}),C.triggersList.click&&a.jsx("div",{className:Pt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),W.isActive&&a.jsx("div",{className:Et(Pt.pagination,{[Pt.paginationInsideBottom]:W.position==="inside-1"&&X==="horiz",[Pt.paginationInsideTop]:W.position==="inside-2"&&X==="horiz",[Pt.paginationOutsideBottom]:W.position==="outside-1"&&X==="horiz",[Pt.paginationOutsideTop]:W.position==="outside-2"&&X==="horiz",[Pt.paginationInsideLeft]:W.position==="inside-1"&&X==="vert",[Pt.paginationInsideRight]:W.position==="inside-2"&&X==="vert",[Pt.paginationOutsideLeft]:W.position==="outside-1"&&X==="vert",[Pt.paginationOutsideRight]:W.position==="outside-2"&&X==="vert",[Pt.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:Pt.paginationInner,style:{backgroundColor:W.colors[2],transform:`scale(${W.scale/100}) translate(${b.scalingValue(W.offset.x,i)}, ${b.scalingValue(W.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((j,F)=>a.jsx("button",{onClick:()=>{o&&o.go(F)},className:Et(Pt.paginationItem),children:a.jsx("div",{className:Et(Pt.dot,{[Pt.activeDot]:F===v}),style:{backgroundColor:F===v?W.colors[0]:W.colors[1],"--pagination-hover-color":W.hover}})},F))})})]})})}function vc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Sh={element:bh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},wh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",$h="ImageRevealSlider-module__image___Qjt-e",Ch="ImageRevealSlider-module__link___N-iLG",Th="ImageRevealSlider-module__cursor___2U03d",Uo={imageRevealSlider:wh,image:$h,link:Ch,cursor:Th};function xc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function es(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ih(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await es(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await es(e);r=l.height/l.width*o}else{const l=await es(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Lh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[f,S]=s.useState("none"),w=s.useRef({x:0,y:0}),[N,v]=s.useState(!1),{sizeType:M,imageWidth:E,randomRangeImageWidth:U}=e.imageSize,{revealPosition:X,visible:D}=e.position,{cursorType:_,target:W,defaultCursorScale:T,defaultCursor:C,hoverCursorScale:q,hoverCursor:R}=e.cursor;s.useEffect(()=>{if(!i)return;const j=(P,h)=>{const J=i.getBoundingClientRect(),V=P-J.left,he=h-J.top;if(y({x:V,y:he}),_==="system"){S("none"),m(1);return}const k=V,ce=he,L=document.elementFromPoint(J.left+k,J.top+ce);if(L&&L.closest("a")){S("none"),m(1);return}const me=xc(k,ce,r)||W==="area"?{img:R??"none",scale:q}:{img:C??"none",scale:T};S(me.img),m(me.scale)},F=P=>{P.stopPropagation(),w.current={x:P.clientX,y:P.clientY},j(P.clientX,P.clientY)},K=()=>{N&&j(w.current.x,w.current.y)};return i.addEventListener("mousemove",F),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",F),window.removeEventListener("scroll",K,!0)}},[i,N,p,_,W,R,C,q,T,r]),s.useEffect(()=>{N||(S("none"),m(0))},[N]);const $=async(j,F,K,P={})=>{const{width:h,height:J,finalWidth:V}=await Ih(j.image.assetId,M,E,U);let he=0,k=0;X==="same"?(he=F/2,k=K/2):(he=P.x??Math.random()*F,k=P.y??Math.random()*K);const ce=Math.min(Math.max(he,h/2),F-h/2),L=Math.min(Math.max(k,J/2),K-J/2);return{id:u.current++,assetId:j.image.assetId,link:j.link,name:j.image.name,x:ce,y:L,width:V}};s.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),F=j.width,K=j.height,P=[];(async()=>{const J=t[0],V=await $(J,F,K);P.push(V),l(P),d(1)})()},[M,E,U,X,i]),s.useEffect(()=>{D==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[D]);const I=async j=>{if(!i)return;const F=i.getBoundingClientRect(),K=j.clientX-F.left,P=j.clientY-F.top;if(W==="image"&&!xc(K,P,r))return;let h=0,J=0;X==="on Click"?(h=K,J=P):X==="same"?(h=F.width/2,J=F.height/2):(h=Math.random()*F.width,J=Math.random()*F.height);const V=t[c],he=await $(V,F.width,F.height,{x:h,y:J});l(k=>D==="all"?[...k,he]:[he]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:I,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:Uo.imageRevealSlider,style:{cursor:f==="none"?"default":"none"},children:[r.map(j=>a.jsx("div",{className:Uo.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:f==="none"?"default":"none"},children:a.jsx(b.LinkWrapper,{link:W==="area"?j.link:void 0,className:Uo.link,children:a.jsx("img",{src:j.assetId,alt:j.name,className:Uo.image},j.id)})},j.id)),N&&a.jsx("div",{className:Uo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${f}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Mh={element:Lh,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},Ph="LightBox-module__hidden___9s-9x",Eh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",kh="LightBox-module__editor___4ACaY",Ah="LightBox-module__contentStyle___Bgnsq",Fh="LightBox-module__imageStyle___tLIlB",Nh="LightBox-module__imgWrapper___LuFUp",_h="LightBox-module__contain___8-yaS",Hh="LightBox-module__cover___hNvOG",Wh="LightBox-module__caption___b6L2I",Oh="LightBox-module__captionTextInner___rCGNH",Dh="LightBox-module__lightboxSplide___XFuWC",zh="LightBox-module__arrow___iz38X",Bh="LightBox-module__arrowVertical___Zfz81",jh="LightBox-module__nextArrow___zkAQN",Vh="LightBox-module__arrowInner___p48sW",Gh="LightBox-module__arrowIcon___3VaFf",Xh="LightBox-module__arrowImg___pNV88",Uh="LightBox-module__mirror___pjeXc",qh="LightBox-module__thumbsWrapper___GB-nU",Kh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Qh="LightBox-module__thumbsAlignStart___MO6tY",Zh="LightBox-module__thumbsAlignCenter___Q4sUx",Jh="LightBox-module__thumbsAlignEnd___p4y9R",ef="LightBox-module__thumbItem___HvnF3",tf="LightBox-module__closeButton___g2khP",nf="LightBox-module__fadeIn___0m5GW",of="LightBox-module__slideInLeft___gPYwC",rf="LightBox-module__slideInRight___S-pPp",af="LightBox-module__slideInTop___DFdAj",sf="LightBox-module__slideInBottom___m27kZ",lf="LightBox-module__fadeOut___55qBR",cf="LightBox-module__slideOutLeft___NvU7P",df="LightBox-module__slideOutRight___SK7eC",uf="LightBox-module__slideOutTop___Vgg0z",pf="LightBox-module__slideOutBottom___nJ0Ef",mf="LightBox-module__scaleSlide___vZriG",st={hidden:Ph,heroImage:Eh,background:Rh,editor:kh,contentStyle:Ah,imageStyle:Fh,imgWrapper:Nh,contain:_h,cover:Hh,caption:Wh,captionTextInner:Oh,lightboxSplide:Dh,arrow:zh,arrowVertical:Bh,nextArrow:jh,arrowInner:Vh,arrowIcon:Gh,arrowImg:Xh,mirror:Uh,thumbsWrapper:qh,thumbsContainerVertical:Kh,thumbsContainer:Yh,thumbsAlignStart:Qh,thumbsAlignCenter:Zh,thumbsAlignEnd:Jh,thumbItem:ef,closeButton:tf,fadeIn:nf,slideInLeft:of,slideInRight:rf,slideInTop:af,slideInBottom:sf,fadeOut:lf,slideOutLeft:cf,slideOutRight:df,slideOutTop:uf,slideOutBottom:pf,scaleSlide:mf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), calc(-50% + ${b.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${b.scalingValue(t.x,n)}, calc(-50% + ${b.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), ${b.scalingValue(t.y,n)})`:i.transform=`translate(${b.scalingValue(t.x,n)}, ${b.scalingValue(t.y,n)})`,i};function Yu(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 gf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Qu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function hf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Zu(e,t,n,i,o){const{x:r,y:l}=gf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function ff(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?hf:Qu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Zu(n,i,u,p,c),m=(y+u/2)/n*100,f=(x+p/2)/i*100;return`${m}% ${f}%`}function yf(e){return ff(e)}function wa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Qu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Zu(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:y+m,width:c,height:d}}function bc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function vf(e,t){const n=(()=>{if(e==="fade in")return st.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return st.fadeIn;if(e==="slide in")switch(t){case"left":return st.slideInLeft;case"right":return st.slideInRight;case"top":return st.slideInTop;case"bottom":return st.slideInBottom;default:return st.slideInRight}return st.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return st.fadeOut;if(e==="slide in")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})(),r=(()=>{if(e==="fade in")return st.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return st.slideOutLeft;case"right":return st.slideOutRight;case"top":return st.slideOutTop;case"bottom":return st.slideOutBottom;default:return st.slideOutRight}return st.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const xf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:st.heroImage,onClick:()=>d(!0)}),a.jsx(bf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},bf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Ce;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:m,textAppearance:f,color:S}=i.imageCaption??{},[w,N]=s.useState(0),[v,M]=s.useState(0),[E,U]=s.useState(!1),[X,D]=s.useState(!1),[_,W]=s.useState({}),T=s.useRef(null),C=s.useRef(null),q=s.useRef(null),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(null),K=s.useRef(!1),P=s.useRef(null),[h,J]=s.useState(!1),{appear:V,triggers:he,slider:k,thumbnail:ce,controls:L,area:me,caption:te,layout:ve}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:de,backdropDisappearClass:ue,disappearClass:Z}=vf(V.type,V.direction),le=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var ee,ae;(ae=(ee=T.current)==null?void 0:ee.splide)==null||ae.refresh()},16)},Y=()=>{M(ee=>ee+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",Y),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",Y)}},[]),s.useEffect(()=>{if(!e||!ce.isActive){J(!1);return}const g=P.current;if(!g)return;const Y=()=>{k.direction==="horiz"?J(g.scrollWidth>g.clientWidth):J(g.scrollHeight>g.clientHeight)};Y();const ee=new ResizeObserver(Y);return ee.observe(g),()=>ee.disconnect()},[e,ce.isActive,n.length,_,k.direction]);const oe=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,Y=b.getColorAlpha(me.color);g&&!l&&Y>.9&&(document.body.style.backgroundColor=""),U(!0),R.current=!0;const ee=ae=>{ae.target===$.current&&ae.animationName&&($.current&&I.current&&$.current.removeEventListener("animationend",I.current),I.current=null,R.current&&(R.current=!1,t()),U(!1))};$.current&&(I.current=ee,$.current.addEventListener("animationend",ee))},[t,me.color,l]),ge=(g,Y,ee)=>{var ae,ye;if(g){if(he.type==="click"&&he.switch==="image")he.repeat==="close"&&w===n.length-1?oe():(ae=T.current)==null||ae.go("+1");else if(he.type==="click"&&he.switch==="50/50"){const ne=g.getBoundingClientRect(),B=Y-ne.left,G=ee-ne.top,z=ne.width,ie=ne.height;let H;k.direction==="horiz"?H=B<z/2?"-1":"+1":H=G<ie/2?"-1":"+1",(ye=T.current)==null||ye.go(H)}}},Se=g=>{if(K.current){K.current=!1;return}const Y=n[w],ee=(Y==null?void 0:Y.image.objectFit)==="cover";let ae,ye;if("changedTouches"in g&&g.changedTouches.length>0)ae=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ae=g.clientX,ye=g.clientY;else return;let ne;if(ee&&q.current){const B=bc(q.current);ne=ae>=B.left&&ae<=B.right&&ye>=B.top&&ye<=B.bottom}else{const B=q.current?wa(q.current):null;if(!B){g.target===g.currentTarget&&oe();return}ne=ae>=B.x&&ae<=B.x+B.width&&ye>=B.y&&ye<=B.y+B.height}ne?ge(q.current,ae,ye):oe()},Re=g=>{const Y=g.target;(Y.classList.contains(st.thumbsWrapper)||Y.classList.contains(st.thumbsContainer))&&Se(g)};s.useEffect(()=>{if(!e)return;const g=Y=>{var ee,ae;if(Y.key==="Escape"){oe();return}if(Y.key==="ArrowRight"){N(ye=>(ye+1)%Math.max(n.length,1)),(ee=T.current)==null||ee.go("+1");return}Y.key==="ArrowLeft"&&(N(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ae=T.current)==null||ae.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(N(0),M(Y=>Y+1),R.current=!1,U(!1),D(!1),W({}),!le)return;const g=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(g)}return()=>{$.current&&I.current&&($.current.removeEventListener("animationend",I.current),I.current=null),D(!1)}},[e,le]),s.useEffect(()=>{C.current!==null&&C.current!==k.type&&M(g=>g+1),C.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,ee=b.getColorAlpha(me.color);document.body.style.overflow="hidden",D(!1);const ae=ne=>{ne.target===$.current&&!R.current&&ne.animationName&&(Y&&!l&&ee>.9&&(document.body.style.backgroundColor=me.color),D(!0),$.current&&j.current&&$.current.removeEventListener("animationend",j.current),j.current=null)};$.current&&(j.current=ae,$.current.addEventListener("animationend",ae));const ye=ne=>{const B=ne.target;B&&(B.closest(`.${st.thumbsWrapper}`)||B.closest(`.${st.thumbsContainer}`))||k.type!=="slide"&&ne.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),$.current&&j.current&&($.current.removeEventListener("animationend",j.current),j.current=null),D(!1)}},[e,l,me.color,k.type]),s.useEffect(()=>{if(!e)return;const g=Y=>{var ae,ye;if(R.current){Y.stopPropagation();return}if(K.current){K.current=!1;return}const ee=Y.target;if(!(ee&&(ee.closest(`.${st.thumbsContainer}`)||ee.closest(`.${st.thumbItem}`)||ee.closest(`.${st.arrow}`)||ee.closest(`.${st.closeButton}`)||ee.closest(`.${st.caption}`)))){if(k.type==="slide"&&he.type==="drag"&&((ye=(ae=T.current)==null?void 0:ae.splide)!=null&&ye.root)){const ne=T.current.splide.root;if(ee&&(ne.contains(ee)||ne===ee))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const ne=n[w],B=(ne==null?void 0:ne.image.objectFit)==="cover",G=Y.changedTouches[0];let z;if(B&&q.current){const ie=bc(q.current);z=G.clientX>=ie.left&&G.clientX<=ie.right&&G.clientY>=ie.top&&G.clientY<=ie.bottom}else{const ie=q.current?wa(q.current):null;if(!ie)return;z=G.clientX>=ie.x&&G.clientX<=ie.x+ie.width&&G.clientY>=ie.y&&G.clientY<=ie.y+ie.height}if(!z){Y.stopPropagation(),R.current=!0;const ie=H=>{H.stopPropagation(),H.preventDefault(),document.removeEventListener("click",ie,!0)};document.addEventListener("click",ie,!0),oe()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,oe,w,n]);const Ne=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&he.type==="drag";s.useEffect(()=>{var H,be;if(!e||!Ne||!((be=(H=T.current)==null?void 0:H.splide)!=null&&be.root))return;const g=T.current.splide.root,Y=30,ee=(re,Q)=>{if(F.current){const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);(Pe>0||Ae>0)&&(K.current=!0)}},ae=re=>{F.current&&(re.preventDefault(),ee(re.clientX,re.clientY))},ye=re=>{F.current&&re.touches.length>0&&(re.preventDefault(),ee(re.touches[0].clientX,re.touches[0].clientY))},ne=(re,Q)=>{if(!F.current||!T.current){F.current=null;return}const Pe=Math.abs(re-F.current.x),Ae=Math.abs(Q-F.current.y);Ae>Y&&Ae>Pe&&T.current.go(Q<F.current.y?"+1":"-1"),F.current=null},B=re=>{F.current&&ne(re.clientX,re.clientY),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("pointermove",ae)},G=re=>{if(F.current){if(re.changedTouches.length>0){const Q=re.changedTouches[0];ne(Q.clientX,Q.clientY)}document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),document.removeEventListener("touchmove",ye)}},z=re=>{F.current={x:re.clientX,y:re.clientY},K.current=!1,document.addEventListener("pointermove",ae,{passive:!1}),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},ie=re=>{re.touches.length>0&&(F.current={x:re.touches[0].clientX,y:re.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",G),document.addEventListener("touchcancel",G))};return g.addEventListener("pointerdown",z),g.addEventListener("touchstart",ie),()=>{g.removeEventListener("pointerdown",z),g.removeEventListener("touchstart",ie),document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",G),document.removeEventListener("touchcancel",G),F.current=null,K.current=!1}},[e,Ne,v]);const Te={backgroundColor:me.color,backdropFilter:`blur(${me.blur}px)`,animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:$,className:Et(st.background,E?ue:de,{[st.editor]:l},{[st.hidden]:!e}),style:{...Te,...X&&!l&&!E?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?$:null,className:Et(st.contentStyle,E?Z:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(kl,{onMove:g=>N(g.index),ref:T,className:st.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:he.type==="drag"&&!Ne,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:he.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((g,Y)=>{const ee=Wr(ve.position,ve.offset,l),ae=`${b.scalingValue(ve.padding.top,l)} ${b.scalingValue(ve.padding.right,l)} ${b.scalingValue(ve.padding.bottom,l)} ${b.scalingValue(ve.padding.left,l)}`,ye=k.type==="scale"?(()=>{const{transform:ne,...B}=ee;return{...B,position:"absolute",padding:ae,boxSizing:"border-box","--position-transform":ne||"none"}})():{...ee,position:"absolute",padding:ae,boxSizing:"border-box"};return a.jsx(Al,{children:a.jsx("div",{className:st.imgWrapper,onClick:Se,children:a.jsx("img",{ref:Y===w?q:null,className:Et(st.imageStyle,{[st.contain]:g.image.objectFit==="contain",[st.cover]:g.image.objectFit==="cover",[st.scaleSlide]:k.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},Y)})},v),L.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(st.arrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x,l)}, ${b.scalingValue(L.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Et(st.arrowImg,st.mirror)}),!L.arrowsImgUrl&&a.jsx(Sc,{color:L.color,className:Et(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Et(st.arrow,st.nextArrow,{[st.arrowVertical]:k.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${b.scalingValue(L.offset.x*(k.direction==="horiz"?-1:1),l)}, ${b.scalingValue(L.offset.y,l)}) scale(${L.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[L.arrowsImgUrl&&a.jsx(mn,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:st.arrowImg}),!L.arrowsImgUrl&&a.jsx(Sc,{color:L.color,className:Et(st.arrowIcon,st.arrowImg)})]})})]}),me.closeIconUrl&&(()=>{const g=Wr(me.closeIconAlign,me.closeIconOffset,l),Y=`scale(${me.closeIconScale})`,ee=g.transform?`${g.transform} ${Y}`:Y;return a.jsx("button",{className:st.closeButton,style:{...g,transform:ee},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:me.closeIconUrl,fill:me.closeIconColor??"#000000",hoverFill:me.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((Ce=n[w])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(te.alignment,te.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":b.scalingValue(d.width,l),letterSpacing:b.scalingValue(p,l),wordSpacing:b.scalingValue(x,l),textAlign:y,fontSize:b.scalingValue(m.fontSize,l),lineHeight:b.scalingValue(m.lineHeight,l),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:S},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Zi,{content:n[w].imageCaption})})}),ce.isActive&&(()=>{const[g,Y]=ce.position.split("-"),ee=k.direction==="horiz"?`${g}-left`:ce.position,ae=Wr(ee,ce.offset,l),ye=()=>{if(k.direction==="horiz"){if(Y==="left")return"flex-start";if(Y==="center")return"center";if(Y==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:st.thumbsWrapper,onClick:ne=>Re(ne),style:{position:l?"absolute":"fixed",...ae,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Et(st.thumbsContainer,{[st.thumbsContainerVertical]:k.direction==="vert",[st.thumbsAlignStart]:ce.align==="start",[st.thumbsAlignCenter]:ce.align==="center",[st.thumbsAlignEnd]:ce.align==="end"}),style:{gap:b.scalingValue(ce.grid.gap,l),justifyContent:h?"flex-start":ye()},children:n.map((ne,B)=>{const G=B===w,z=_[B],H=ce.grid.size*(G?ce.activeState.scale:1),be=()=>{if(ce.fit!=="fit")return{};if(!z)return k.direction==="horiz"?{height:b.scalingValue(H,l)}:{width:b.scalingValue(H,l)};const re=z.width/z.height;if(k.direction==="horiz"){const Q=H,Pe=Q*re;return{width:b.scalingValue(Pe,l),height:b.scalingValue(Q,l)}}else{const Q=H,Pe=Q/re;return{width:b.scalingValue(Q,l),height:b.scalingValue(Pe,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...k.direction==="horiz"&&ce.fit!=="fit"?{height:b.scalingValue(H,l)}:{},...k.direction==="vert"&&ce.fit!=="fit"?{width:b.scalingValue(H,l)}:{},...ce.fit==="cover"?{width:b.scalingValue(H,l),height:b.scalingValue(H,l)}:{},...be(),transition:G?"all 0.25s ease-out":"none",opacity:G?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:re=>{var Q;re.stopPropagation(),N(B),(Q=T.current)==null||Q.go(B)},onMouseEnter:()=>{var re;ce.triggers==="hov"&&((re=T.current)==null||re.go(B))},children:a.jsx("img",{src:ne.image.assetId,alt:ne.image.name??"",onLoad:re=>{const Q=re.currentTarget;Q.naturalWidth&&Q.naturalHeight&&W(Pe=>({...Pe,[B]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:ce.fit==="cover"?"cover":"contain",...ce.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ce.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ne.image.name}-${B}`)})})})})()]})]}),document.getElementById(r))};function Sc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Sf={element:xf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wf(e){return`
|
|
6
|
+
*/const uh="RichTextRenderer-module__link___BWeZ2",ph={link:uh},mh=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>mh(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:b.scalingValue(e.letterSpacing,t),wordSpacing:b.scalingValue(e.wordSpacing,t),fontSize:b.scalingValue(n,t),lineHeight:i!==void 0?b.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function qu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?qu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx(b.LinkWrapper,{className:ph.link,link:i,children:t(i.children)},o):a.jsx("span",{style:gh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:qu(o)?t(o):" "},i)})})};function gh(e){return{...e.fontFamily&&{fontFamily:zo(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 hh="SvgImage-module__svg___q3xE-",fh="SvgImage-module__img___VsTm-",yc={svg:hh,img:fh},Ja=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Ku(e){if(yr(e))return Promise.resolve(e);const t=Ja.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Ja.delete(e),i});return Ja.set(e,n),n}const yh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},vh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!yh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Ku(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Et(yc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Et(yc.svg,i),style:{"--svg":vh(c),"--fill":t,"--hover-fill":n,...o??{}}})},xh={"top-left":Mt.topLeftAlignment,"top-center":Mt.topCenterAlignment,"top-right":Mt.topRightAlignment,"middle-left":Mt.middleLeftAlignment,"middle-center":Mt.middleCenterAlignment,"middle-right":Mt.middleRightAlignment,"bottom-left":Mt.bottomLeftAlignment,"bottom-center":Mt.bottomCenterAlignment,"bottom-right":Mt.bottomRightAlignment};function bh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:S,color:m}=n.imageCaption??{},[h,x]=s.useState(void 0),[w,F]=s.useState(null),[v,P]=s.useState(0),[M,K]=s.useState(0),{direction:X,transition:j,controls:N,pagination:_,imageCaption:T,triggers:L}=e,Y=s.useRef(j.type),{x:R,y:I}=e.controls.offset,$=G=>{o&&o.go(G)};return s.useEffect(()=>{if(!w)return;const G=new ResizeObserver(O=>{if(!o)return;const[U]=O;x({width:Math.round(U.contentRect.width),height:Math.round(U.contentRect.height)})});return G.observe(w),()=>G.unobserve(w)},[w]),s.useEffect(()=>{!o||Y.current===j.type||(K(G=>G+1),Y.current=j.type)},[j.type]),a.jsx("div",{className:Et(Mt.wrapper,{[Mt.editor]:i}),ref:F,children:a.jsxs("div",{className:Mt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:j.backgroundColor&&j.type==="fade in"?j.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Et(Mt.captionBlock),children:a.jsx("div",{className:Mt.captionTextWrapper,children:t.map((G,O)=>a.jsx("div",{className:Et(Mt.captionText,xh[T.alignment],{[Mt.withPointerEvents]:O===v&&i,[Mt.active]:O===v}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":b.scalingValue(l.width,i),letterSpacing:b.scalingValue(d,i),wordSpacing:b.scalingValue(p,i),textAlign:u,fontSize:b.scalingValue(y.fontSize,i),lineHeight:b.scalingValue(y.lineHeight,i),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:m,transitionDuration:j.duration?`${Math.round(parseInt(j.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Mt.captionTextInner,style:{"--link-hover-color":T.linkHoverColor,"--link-color":T.linkColor,position:"relative",top:b.scalingValue(T.offset.y,i),left:b.scalingValue(T.offset.x,i)},children:a.jsx(Zi,{content:G.imageCaption})})},O))})}),a.jsx(kl,{onMove:G=>{P(G.index)},ref:r,options:{arrows:!1,speed:j.duration?parseInt(j.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:X==="horiz"||j.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:j.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((G,O)=>a.jsx(Al,{children:a.jsx("div",{className:Mt.sliderItem,children:a.jsx("div",{className:Mt.imgWrapper,children:a.jsx("img",{className:Et(Mt.sliderImage,{[Mt.contain]:G.image.objectFit==="contain",[Mt.cover]:G.image.objectFit==="cover"}),src:G.image.assetId,alt:G.image.name??""})})})},O))},M),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(Mt.arrow,{[Mt.arrowVertical]:X==="vert",[Mt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{onClick:()=>{$("-1")},className:Mt.arrowInner,style:{transform:`translate(${b.scalingValue(R,i)}, ${b.scalingValue(I*(X==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(mn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Et(Mt.arrowImg,Mt.mirror)}),!N.arrowsImgUrl&&a.jsx(vc,{color:N.color,className:Et(Mt.arrowIcon,Mt.arrowImg,Mt.mirror)})]})}),a.jsx("div",{className:Et(Mt.arrow,Mt.nextArrow,{[Mt.arrowVertical]:X==="vert",[Mt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:Mt.arrowInner,onClick:()=>$("+1"),style:{transform:`translate(${b.scalingValue(R*(X==="horiz"?-1:1),i)}, ${b.scalingValue(I,i)}) scale(${e.controls.scale/100}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(mn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Mt.arrowImg}),!N.arrowsImgUrl&&a.jsx(vc,{color:N.color,className:Et(Mt.arrowIcon,Mt.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:Mt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),_.isActive&&a.jsx("div",{className:Et(Mt.pagination,{[Mt.paginationInsideBottom]:_.position==="inside-1"&&X==="horiz",[Mt.paginationInsideTop]:_.position==="inside-2"&&X==="horiz",[Mt.paginationOutsideBottom]:_.position==="outside-1"&&X==="horiz",[Mt.paginationOutsideTop]:_.position==="outside-2"&&X==="horiz",[Mt.paginationInsideLeft]:_.position==="inside-1"&&X==="vert",[Mt.paginationInsideRight]:_.position==="inside-2"&&X==="vert",[Mt.paginationOutsideLeft]:_.position==="outside-1"&&X==="vert",[Mt.paginationOutsideRight]:_.position==="outside-2"&&X==="vert",[Mt.paginationVertical]:X==="vert"}),children:a.jsx("div",{className:Mt.paginationInner,style:{backgroundColor:_.colors[2],transform:`scale(${_.scale/100}) translate(${b.scalingValue(_.offset.x,i)}, ${b.scalingValue(_.offset.y,i)}) rotate(${X==="horiz"?"0deg":"90deg"})`},children:t.map((G,O)=>a.jsx("button",{onClick:()=>{o&&o.go(O)},className:Et(Mt.paginationItem),children:a.jsx("div",{className:Et(Mt.dot,{[Mt.activeDot]:O===v}),style:{backgroundColor:O===v?_.colors[0]:_.colors[1],"--pagination-hover-color":_.hover}})},O))})})]})})}function vc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Sh={element:bh,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},wh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",$h="ImageRevealSlider-module__image___Qjt-e",Ch="ImageRevealSlider-module__link___N-iLG",Th="ImageRevealSlider-module__cursor___2U03d",Uo={imageRevealSlider:wh,image:$h,link:Ch,cursor:Th};function xc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function es(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ih(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await es(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await es(e);r=l.height/l.width*o}else{const l=await es(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Lh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[S,m]=s.useState(1),[h,x]=s.useState("none"),w=s.useRef({x:0,y:0}),[F,v]=s.useState(!1),{sizeType:P,imageWidth:M,randomRangeImageWidth:K}=e.imageSize,{revealPosition:X,visible:j}=e.position,{cursorType:N,target:_,defaultCursorScale:T,defaultCursor:L,hoverCursorScale:Y,hoverCursor:R}=e.cursor;s.useEffect(()=>{if(!i)return;const G=(E,f)=>{const Q=i.getBoundingClientRect(),q=E-Q.left,pe=f-Q.top;if(y({x:q,y:pe}),N==="system"){x("none"),m(1);return}const k=q,me=pe,C=document.elementFromPoint(Q.left+k,Q.top+me);if(C&&C.closest("a")){x("none"),m(1);return}const ue=xc(k,me,r)||_==="area"?{img:R??"none",scale:Y}:{img:L??"none",scale:T};x(ue.img),m(ue.scale)},O=E=>{E.stopPropagation(),w.current={x:E.clientX,y:E.clientY},G(E.clientX,E.clientY)},U=()=>{F&&G(w.current.x,w.current.y)};return i.addEventListener("mousemove",O),window.addEventListener("scroll",U,!0),()=>{i.removeEventListener("mousemove",O),window.removeEventListener("scroll",U,!0)}},[i,F,p,N,_,R,L,Y,T,r]),s.useEffect(()=>{F||(x("none"),m(0))},[F]);const I=async(G,O,U,E={})=>{const{width:f,height:Q,finalWidth:q}=await Ih(G.image.assetId,P,M,K);let pe=0,k=0;X==="same"?(pe=O/2,k=U/2):(pe=E.x??Math.random()*O,k=E.y??Math.random()*U);const me=Math.min(Math.max(pe,f/2),O-f/2),C=Math.min(Math.max(k,Q/2),U-Q/2);return{id:u.current++,assetId:G.image.assetId,link:G.link,name:G.image.name,x:me,y:C,width:q}};s.useEffect(()=>{if(!i||t.length===0)return;const G=i.getBoundingClientRect(),O=G.width,U=G.height,E=[];(async()=>{const Q=t[0],q=await I(Q,O,U);E.push(q),l(E),d(1)})()},[P,M,K,X,i]),s.useEffect(()=>{j==="last One"&&l(G=>G.length>0?[G[G.length-1]]:[])},[j]);const $=async G=>{if(!i)return;const O=i.getBoundingClientRect(),U=G.clientX-O.left,E=G.clientY-O.top;if(_==="image"&&!xc(U,E,r))return;let f=0,Q=0;X==="on Click"?(f=U,Q=E):X==="same"?(f=O.width/2,Q=O.height/2):(f=Math.random()*O.width,Q=Math.random()*O.height);const q=t[c],pe=await I(q,O.width,O.height,{x:f,y:Q});l(k=>j==="all"?[...k,pe]:[pe]),d(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:o,onClick:$,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:Uo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(G=>a.jsx("div",{className:Uo.wrapper,style:{top:`${G.y}px`,left:`${G.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:G.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:a.jsx(b.LinkWrapper,{link:_==="area"?G.link:void 0,className:Uo.link,children:a.jsx("img",{src:G.assetId,alt:G.name,className:Uo.image},G.id)})},G.id)),F&&a.jsx("div",{className:Uo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ph={element:Lh,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},Mh="LightBox-module__hidden___9s-9x",Eh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",kh="LightBox-module__editor___4ACaY",Ah="LightBox-module__contentStyle___Bgnsq",Fh="LightBox-module__imageStyle___tLIlB",Nh="LightBox-module__imgWrapper___LuFUp",_h="LightBox-module__contain___8-yaS",Hh="LightBox-module__cover___hNvOG",Wh="LightBox-module__caption___b6L2I",Oh="LightBox-module__captionTextInner___rCGNH",Dh="LightBox-module__lightboxSplide___XFuWC",zh="LightBox-module__arrow___iz38X",Bh="LightBox-module__arrowVertical___Zfz81",jh="LightBox-module__nextArrow___zkAQN",Vh="LightBox-module__arrowInner___p48sW",Gh="LightBox-module__arrowIcon___3VaFf",Xh="LightBox-module__arrowImg___pNV88",Uh="LightBox-module__mirror___pjeXc",qh="LightBox-module__thumbsWrapper___GB-nU",Kh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Qh="LightBox-module__thumbsAlignStart___MO6tY",Zh="LightBox-module__thumbsAlignCenter___Q4sUx",Jh="LightBox-module__thumbsAlignEnd___p4y9R",ef="LightBox-module__thumbItem___HvnF3",tf="LightBox-module__closeButton___g2khP",nf="LightBox-module__fadeIn___0m5GW",of="LightBox-module__slideInLeft___gPYwC",rf="LightBox-module__slideInRight___S-pPp",af="LightBox-module__slideInTop___DFdAj",sf="LightBox-module__slideInBottom___m27kZ",lf="LightBox-module__fadeOut___55qBR",cf="LightBox-module__slideOutLeft___NvU7P",df="LightBox-module__slideOutRight___SK7eC",uf="LightBox-module__slideOutTop___Vgg0z",pf="LightBox-module__slideOutBottom___nJ0Ef",mf="LightBox-module__scaleSlide___vZriG",lt={hidden:Mh,heroImage:Eh,background:Rh,editor:kh,contentStyle:Ah,imageStyle:Fh,imgWrapper:Nh,contain:_h,cover:Hh,caption:Wh,captionTextInner:Oh,lightboxSplide:Dh,arrow:zh,arrowVertical:Bh,nextArrow:jh,arrowInner:Vh,arrowIcon:Gh,arrowImg:Xh,mirror:Uh,thumbsWrapper:qh,thumbsContainerVertical:Kh,thumbsContainer:Yh,thumbsAlignStart:Qh,thumbsAlignCenter:Zh,thumbsAlignEnd:Jh,thumbItem:ef,closeButton:tf,fadeIn:nf,slideInLeft:of,slideInRight:rf,slideInTop:af,slideInBottom:sf,fadeOut:lf,slideOutLeft:cf,slideOutRight:df,slideOutTop:uf,slideOutBottom:pf,scaleSlide:mf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), calc(-50% + ${b.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${b.scalingValue(t.x,n)}, calc(-50% + ${b.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${b.scalingValue(t.x,n)}), ${b.scalingValue(t.y,n)})`:i.transform=`translate(${b.scalingValue(t.x,n)}, ${b.scalingValue(t.y,n)})`,i};function Yu(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 gf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Qu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function hf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Zu(e,t,n,i,o){const{x:r,y:l}=gf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function ff(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?hf:Qu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:S}=Zu(n,i,u,p,c),m=(y+u/2)/n*100,h=(S+p/2)/i*100;return`${m}% ${h}%`}function yf(e){return ff(e)}function wa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Qu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Zu(i,o,c,d,u),S=t.left+n.left,m=t.top+n.top;return{x:p+S,y:y+m,width:c,height:d}}function bc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function vf(e,t){const n=(()=>{if(e==="fade in")return lt.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return lt.slideInLeft;case"right":return lt.slideInRight;case"top":return lt.slideInTop;case"bottom":return lt.slideInBottom;default:return lt.slideInRight}return lt.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return lt.fadeIn;if(e==="slide in")switch(t){case"left":return lt.slideInLeft;case"right":return lt.slideInRight;case"top":return lt.slideInTop;case"bottom":return lt.slideInBottom;default:return lt.slideInRight}return lt.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return lt.fadeOut;if(e==="slide in")switch(t){case"left":return lt.slideOutLeft;case"right":return lt.slideOutRight;case"top":return lt.slideOutTop;case"bottom":return lt.slideOutBottom;default:return lt.slideOutRight}return lt.fadeOut})(),r=(()=>{if(e==="fade in")return lt.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return lt.slideOutLeft;case"right":return lt.slideOutRight;case"top":return lt.slideOutTop;case"bottom":return lt.slideOutBottom;default:return lt.slideOutRight}return lt.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const xf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:lt.heroImage,onClick:()=>d(!0)}),a.jsx(bf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},bf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Se;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:S,fontSizeLineHeight:m,textAppearance:h,color:x}=i.imageCaption??{},[w,F]=s.useState(0),[v,P]=s.useState(0),[M,K]=s.useState(!1),[X,j]=s.useState(!1),[N,_]=s.useState({}),T=s.useRef(null),L=s.useRef(null),Y=s.useRef(null),R=s.useRef(!1),I=s.useRef(null),$=s.useRef(null),G=s.useRef(null),O=s.useRef(null),U=s.useRef(!1),E=s.useRef(null),[f,Q]=s.useState(!1),{appear:q,triggers:pe,slider:k,thumbnail:me,controls:C,area:ue,caption:te,layout:fe}=o.lightboxBlock,{appearClass:Pe,backdropAppearClass:de,backdropDisappearClass:we,disappearClass:V}=vf(q.type,q.direction),ie=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var J,re;(re=(J=T.current)==null?void 0:J.splide)==null||re.refresh()},16)},Z=()=>{P(J=>J+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",Z),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",Z)}},[]),s.useEffect(()=>{if(!e||!me.isActive){Q(!1);return}const g=E.current;if(!g)return;const Z=()=>{k.direction==="horiz"?Q(g.scrollWidth>g.clientWidth):Q(g.scrollHeight>g.clientHeight)};Z();const J=new ResizeObserver(Z);return J.observe(g),()=>J.disconnect()},[e,me.isActive,n.length,N,k.direction]);const oe=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,Z=b.getColorAlpha(ue.color);g&&!l&&Z>.9&&(document.body.style.backgroundColor=""),K(!0),R.current=!0;const J=re=>{re.target===I.current&&re.animationName&&(I.current&&$.current&&I.current.removeEventListener("animationend",$.current),$.current=null,R.current&&(R.current=!1,t()),K(!1))};I.current&&($.current=J,I.current.addEventListener("animationend",J))},[t,ue.color,l]),le=(g,Z,J)=>{var re,he;if(g){if(pe.type==="click"&&pe.switch==="image")pe.repeat==="close"&&w===n.length-1?oe():(re=T.current)==null||re.go("+1");else if(pe.type==="click"&&pe.switch==="50/50"){const z=g.getBoundingClientRect(),B=Z-z.left,ne=J-z.top,ce=z.width,ee=z.height;let H;k.direction==="horiz"?H=B<ce/2?"-1":"+1":H=ne<ee/2?"-1":"+1",(he=T.current)==null||he.go(H)}}},ve=g=>{if(U.current){U.current=!1;return}const Z=n[w],J=(Z==null?void 0:Z.image.objectFit)==="cover";let re,he;if("changedTouches"in g&&g.changedTouches.length>0)re=g.changedTouches[0].clientX,he=g.changedTouches[0].clientY;else if("clientX"in g)re=g.clientX,he=g.clientY;else return;let z;if(J&&Y.current){const B=bc(Y.current);z=re>=B.left&&re<=B.right&&he>=B.top&&he<=B.bottom}else{const B=Y.current?wa(Y.current):null;if(!B){g.target===g.currentTarget&&oe();return}z=re>=B.x&&re<=B.x+B.width&&he>=B.y&&he<=B.y+B.height}z?le(Y.current,re,he):oe()},Fe=g=>{const Z=g.target;(Z.classList.contains(lt.thumbsWrapper)||Z.classList.contains(lt.thumbsContainer))&&ve(g)};s.useEffect(()=>{if(!e)return;const g=Z=>{var J,re;if(Z.key==="Escape"){oe();return}if(Z.key==="ArrowRight"){F(he=>(he+1)%Math.max(n.length,1)),(J=T.current)==null||J.go("+1");return}Z.key==="ArrowLeft"&&(F(he=>(he-1+Math.max(n.length,1))%Math.max(n.length,1)),(re=T.current)==null||re.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,oe,n.length]),s.useEffect(()=>{if(e){if(F(0),P(Z=>Z+1),R.current=!1,K(!1),j(!1),_({}),!ie)return;const g=new CustomEvent("page-overlay",{detail:{itemId:ie}});window.dispatchEvent(g)}return()=>{I.current&&$.current&&(I.current.removeEventListener("animationend",$.current),$.current=null),j(!1)}},[e,ie]),s.useEffect(()=>{L.current!==null&&L.current!==k.type&&P(g=>g+1),L.current=k.type},[k.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,Z=window.matchMedia("(max-width: 768px)").matches,J=b.getColorAlpha(ue.color);document.body.style.overflow="hidden",j(!1);const re=z=>{z.target===I.current&&!R.current&&z.animationName&&(Z&&!l&&J>.9&&(document.body.style.backgroundColor=ue.color),j(!0),I.current&&G.current&&I.current.removeEventListener("animationend",G.current),G.current=null)};I.current&&(G.current=re,I.current.addEventListener("animationend",re));const he=z=>{const B=z.target;B&&(B.closest(`.${lt.thumbsWrapper}`)||B.closest(`.${lt.thumbsContainer}`))||k.type!=="slide"&&z.preventDefault()};return document.addEventListener("touchmove",he,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",he),I.current&&G.current&&(I.current.removeEventListener("animationend",G.current),G.current=null),j(!1)}},[e,l,ue.color,k.type]),s.useEffect(()=>{if(!e)return;const g=Z=>{var re,he;if(R.current){Z.stopPropagation();return}if(U.current){U.current=!1;return}const J=Z.target;if(!(J&&(J.closest(`.${lt.thumbsContainer}`)||J.closest(`.${lt.thumbItem}`)||J.closest(`.${lt.arrow}`)||J.closest(`.${lt.closeButton}`)||J.closest(`.${lt.caption}`)))){if(k.type==="slide"&&pe.type==="drag"&&((he=(re=T.current)==null?void 0:re.splide)!=null&&he.root)){const z=T.current.splide.root;if(J&&(z.contains(J)||z===J))return}if(Z.touches.length===0&&Z.changedTouches.length>0){const z=n[w],B=(z==null?void 0:z.image.objectFit)==="cover",ne=Z.changedTouches[0];let ce;if(B&&Y.current){const ee=bc(Y.current);ce=ne.clientX>=ee.left&&ne.clientX<=ee.right&&ne.clientY>=ee.top&&ne.clientY<=ee.bottom}else{const ee=Y.current?wa(Y.current):null;if(!ee)return;ce=ne.clientX>=ee.x&&ne.clientX<=ee.x+ee.width&&ne.clientY>=ee.y&&ne.clientY<=ee.y+ee.height}if(!ce){Z.stopPropagation(),R.current=!0;const ee=H=>{H.stopPropagation(),H.preventDefault(),document.removeEventListener("click",ee,!0)};document.addEventListener("click",ee,!0),oe()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,oe,w,n]);const Ee=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&pe.type==="drag";s.useEffect(()=>{var H,be;if(!e||!Ee||!((be=(H=T.current)==null?void 0:H.splide)!=null&&be.root))return;const g=T.current.splide.root,Z=30,J=(ae,W)=>{if(O.current){const ke=Math.abs(ae-O.current.x),ze=Math.abs(W-O.current.y);(ke>0||ze>0)&&(U.current=!0)}},re=ae=>{O.current&&(ae.preventDefault(),J(ae.clientX,ae.clientY))},he=ae=>{O.current&&ae.touches.length>0&&(ae.preventDefault(),J(ae.touches[0].clientX,ae.touches[0].clientY))},z=(ae,W)=>{if(!O.current||!T.current){O.current=null;return}const ke=Math.abs(ae-O.current.x),ze=Math.abs(W-O.current.y);ze>Z&&ze>ke&&T.current.go(W<O.current.y?"+1":"-1"),O.current=null},B=ae=>{O.current&&z(ae.clientX,ae.clientY),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("pointermove",re)},ne=ae=>{if(O.current){if(ae.changedTouches.length>0){const W=ae.changedTouches[0];z(W.clientX,W.clientY)}document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),document.removeEventListener("touchmove",he)}},ce=ae=>{O.current={x:ae.clientX,y:ae.clientY},U.current=!1,document.addEventListener("pointermove",re,{passive:!1}),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},ee=ae=>{ae.touches.length>0&&(O.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},U.current=!1,document.addEventListener("touchmove",he,{passive:!1}),document.addEventListener("touchend",ne),document.addEventListener("touchcancel",ne))};return g.addEventListener("pointerdown",ce),g.addEventListener("touchstart",ee),()=>{g.removeEventListener("pointerdown",ce),g.removeEventListener("touchstart",ee),document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("touchmove",he),document.removeEventListener("touchend",ne),document.removeEventListener("touchcancel",ne),O.current=null,U.current=!1}},[e,Ee,v]);const Ce={backgroundColor:ue.color,backdropFilter:`blur(${ue.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:qn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:I,className:Et(lt.background,M?we:de,{[lt.editor]:l},{[lt.hidden]:!e}),style:{...Ce,...X&&!l&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?I:null,className:Et(lt.contentStyle,M?V:Pe,{[lt.editor]:l},{[lt.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(kl,{onMove:g=>F(g.index),ref:T,className:lt.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:pe.type==="drag"&&!Ee,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:pe.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((g,Z)=>{const J=Wr(fe.position,fe.offset,l),re=`${b.scalingValue(fe.padding.top,l)} ${b.scalingValue(fe.padding.right,l)} ${b.scalingValue(fe.padding.bottom,l)} ${b.scalingValue(fe.padding.left,l)}`,he=k.type==="scale"?(()=>{const{transform:z,...B}=J;return{...B,position:"absolute",padding:re,boxSizing:"border-box","--position-transform":z||"none"}})():{...J,position:"absolute",padding:re,boxSizing:"border-box"};return a.jsx(Al,{children:a.jsx("div",{className:lt.imgWrapper,onClick:ve,children:a.jsx("img",{ref:Z===w?Y:null,className:Et(lt.imageStyle,{[lt.contain]:g.image.objectFit==="contain",[lt.cover]:g.image.objectFit==="cover",[lt.scaleSlide]:k.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...he,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},Z)})},v),C.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(lt.arrow,{[lt.arrowVertical]:k.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{className:lt.arrowInner,style:{transform:`translate(${b.scalingValue(C.offset.x,l)}, ${b.scalingValue(C.offset.y*(k.direction==="horiz"?1:-1),l)}) scale(${C.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[C.arrowsImgUrl&&a.jsx(mn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Et(lt.arrowImg,lt.mirror)}),!C.arrowsImgUrl&&a.jsx(Sc,{color:C.color,className:Et(lt.arrowIcon,lt.arrowImg,lt.mirror)})]})}),a.jsx("div",{className:Et(lt.arrow,lt.nextArrow,{[lt.arrowVertical]:k.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{className:lt.arrowInner,style:{transform:`translate(${b.scalingValue(C.offset.x*(k.direction==="horiz"?-1:1),l)}, ${b.scalingValue(C.offset.y,l)}) scale(${C.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=T.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[C.arrowsImgUrl&&a.jsx(mn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:lt.arrowImg}),!C.arrowsImgUrl&&a.jsx(Sc,{color:C.color,className:Et(lt.arrowIcon,lt.arrowImg)})]})})]}),ue.closeIconUrl&&(()=>{const g=Wr(ue.closeIconAlign,ue.closeIconOffset,l),Z=`scale(${ue.closeIconScale})`,J=g.transform?`${g.transform} ${Z}`:Z;return a.jsx("button",{className:lt.closeButton,style:{...g,transform:J},onClick:oe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:ue.closeIconUrl,fill:ue.closeIconColor??"#000000",hoverFill:ue.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((Se=n[w])==null?void 0:Se.imageCaption)&&a.jsx("div",{className:lt.caption,style:{...Wr(te.alignment,te.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":b.scalingValue(d.width,l),letterSpacing:b.scalingValue(p,l),wordSpacing:b.scalingValue(S,l),textAlign:y,fontSize:b.scalingValue(m.fontSize,l),lineHeight:b.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:x},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:lt.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Zi,{content:n[w].imageCaption})})}),me.isActive&&(()=>{const[g,Z]=me.position.split("-"),J=k.direction==="horiz"?`${g}-left`:me.position,re=Wr(J,me.offset,l),he=()=>{if(k.direction==="horiz"){if(Z==="left")return"flex-start";if(Z==="center")return"center";if(Z==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:E,className:lt.thumbsWrapper,onClick:z=>Fe(z),style:{position:l?"absolute":"fixed",...re,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Et(lt.thumbsContainer,{[lt.thumbsContainerVertical]:k.direction==="vert",[lt.thumbsAlignStart]:me.align==="start",[lt.thumbsAlignCenter]:me.align==="center",[lt.thumbsAlignEnd]:me.align==="end"}),style:{gap:b.scalingValue(me.grid.gap,l),justifyContent:f?"flex-start":he()},children:n.map((z,B)=>{const ne=B===w,ce=N[B],H=me.grid.size*(ne?me.activeState.scale:1),be=()=>{if(me.fit!=="fit")return{};if(!ce)return k.direction==="horiz"?{height:b.scalingValue(H,l)}:{width:b.scalingValue(H,l)};const ae=ce.width/ce.height;if(k.direction==="horiz"){const W=H,ke=W*ae;return{width:b.scalingValue(ke,l),height:b.scalingValue(W,l)}}else{const W=H,ke=W/ae;return{width:b.scalingValue(W,l),height:b.scalingValue(ke,l)}}};return a.jsx("button",{className:lt.thumbItem,style:{...k.direction==="horiz"&&me.fit!=="fit"?{height:b.scalingValue(H,l)}:{},...k.direction==="vert"&&me.fit!=="fit"?{width:b.scalingValue(H,l)}:{},...me.fit==="cover"?{width:b.scalingValue(H,l),height:b.scalingValue(H,l)}:{},...be(),transition:ne?"all 0.25s ease-out":"none",opacity:ne?me.activeState.opacity/100:me.opacity/100,"--thumb-hover":me.activeState.opacity/100},onClick:ae=>{var W;ae.stopPropagation(),F(B),(W=T.current)==null||W.go(B)},onMouseEnter:()=>{var ae;me.triggers==="hov"&&((ae=T.current)==null||ae.go(B))},children:a.jsx("img",{src:z.image.assetId,alt:z.image.name??"",onLoad:ae=>{const W=ae.currentTarget;W.naturalWidth&&W.naturalHeight&&_(ke=>({...ke,[B]:{width:W.naturalWidth,height:W.naturalHeight}}))},style:{objectFit:me.fit==="cover"?"cover":"contain",...me.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...me.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${z.image.name}-${B}`)})})})})()]})]}),document.getElementById(r))};function Sc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Sf={element:xf,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function wf(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
pointer-events: auto;
|
|
156
156
|
z-index: 10;
|
|
157
157
|
}
|
|
158
|
-
`}function $f({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=b.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:
|
|
158
|
+
`}function $f({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=b.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:S=[],buttonLabel:m,gap:h,fieldsGap:x,buttonCorners:w,buttonStroke:F,buttonPadding:v,isButtonFullWidth:P,inputCorners:M,inputStroke:K,inputPadding:X,inputColor:j,inputTextColor:N,inputBorderColor:_,placeholderColor:T,buttonColor:L,buttonTextColor:Y,buttonBorderColor:R,labelTextColor:I,successColor:$,errorColor:G,fontFamily:O,inputFontSettings:U,inputFontSize:E,inputLineHeight:f,inputLetterSpacing:Q,inputWordSpacing:q,inputTextAppearance:pe,buttonFontSettings:k,buttonFontSize:me,buttonLineHeight:C,buttonLetterSpacing:ue,buttonWordSpacing:te,buttonTextAppearance:fe,labelFontSettings:Pe,labelFontSize:de,labelLineHeight:we,labelLetterSpacing:V,labelWordSpacing:ie,labelTextAppearance:oe,statusFontSettings:le,statusFontSize:ve,statusLineHeight:Fe,statusLetterSpacing:Ee,statusWordSpacing:Ce,statusTextAppearance:Se,successMessage:g,errorMessage:Z,stateOverrides:J}=e,re=u==="B",he=S.slice(0,Math.min(p,S.length)),z={fontSettings:{fontFamily:O,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:E??.01,lineHeight:f,letterSpacing:Q??0,wordSpacing:q??0,textAppearance:pe,color:N},B=pn(nn(z,t)),ne=b.scalingValue(K??0,t),ce=Ie=>b.scalingValue((f??E??.01)*Ie+((X==null?void 0:X.top)??0)+((X==null?void 0:X.bottom)??0)+(u==="C"?K??0:(K??0)*2),t),ee=ce(1),H=ce(Math.max(1,y)),be={...B,borderStyle:"solid",borderRadius:u==="C"?0:b.scalingValue(M??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ne,borderLeftWidth:0}:{borderWidth:ne},paddingTop:b.scalingValue((X==null?void 0:X.top)??0,t),paddingRight:b.scalingValue((X==null?void 0:X.right)??0,t),paddingBottom:b.scalingValue((X==null?void 0:X.bottom)??0,t),paddingLeft:b.scalingValue((X==null?void 0:X.left)??0,t),height:ee,minHeight:ee},ae={fontSettings:{fontFamily:O,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:me??.01,lineHeight:C,letterSpacing:ue??0,wordSpacing:te??0,textAppearance:fe,color:Y},W=pn(nn(ae,t)),ke=b.scalingValue(F??0,t),ze={fontSettings:{fontFamily:O,fontWeight:(Pe==null?void 0:Pe.fontWeight)??400,fontStyle:(Pe==null?void 0:Pe.fontStyle)??"normal"},fontSize:de??.01,lineHeight:we,letterSpacing:V??0,wordSpacing:ie??0,textAppearance:oe,color:I},Xe=nn(ze,t),Ue={fontSettings:{fontFamily:O,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:ve??.01,lineHeight:Fe,letterSpacing:Ee??0,wordSpacing:Ce??0,textAppearance:Se,color:$},Qe=pn(nn(Ue,t)),We=b.buildColorVars(d,{inputColor:j,inputTextColor:N,inputBorderColor:_,placeholderColor:T!=null&&T.trim()?T:"#cccccc",buttonColor:L,buttonTextColor:Y,buttonBorderColor:R,labelTextColor:I,successColor:$,errorColor:G},Cf,Tf,J),[it,ye]=s.useState(()=>Object.fromEntries(he.map(Ie=>[Ie.name,""]))),[Te,Ve]=s.useState("idle"),[Ze,et]=s.useState(null),at=r==="success"?"success":r==="error"?"error":Te,tt=r==="error"?Z:Ze,Ye=r==="filled",xt=s.useMemo(()=>{if(!Ye)return it;let Ie=null;for(const mt of he)(it[mt.name]??"").trim().length>0||(Ie=Ie??{...it},Ie[mt.name]="Filled");return Ie??it},[it,Ye,he]),pt=at==="error"?b.getFormFieldValidationError(he,xt):null,_e=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),He=o==null?void 0:o.submitUrl,Ae=(Ie,mt)=>{ye(ot=>({...ot,[Ie]:mt}))},Be=async Ie=>{if(Ie.preventDefault(),!c)return;const mt=Object.fromEntries(he.map(Ct=>{var rt;return[Ct.name,((rt=it[Ct.name])==null?void 0:rt.trim())??""]}).filter(([,Ct])=>Ct));if(!He){Ve("error"),et("No integrations were found for this form.");return}if(Object.keys(mt).length===0)return;const ot=b.getFormFieldValidationError(he,it);if(ot){Ve("error"),et(ot);return}Ve("submitting"),et(null);try{const Ct=await fetch(He,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(mt)});if(!Ct.ok){const rt=await Ct.text();throw new Error(rt||`Request failed: ${Ct.status}`)}Ve("success"),ye(Object.fromEntries(he.map(rt=>[rt.name,""])))}catch(Ct){Ve("error"),et(Ct instanceof Error?Ct.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${_e}`.trim(),style:We,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:wf(d)}}),a.jsxs("form",{onSubmit:Be,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:he.map((Ie,mt)=>a.jsxs(s.Fragment,{children:[mt>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(x??0,t)}}),a.jsxs("div",{className:`${d}-field-group${re?` ${d}-labeled`:""}`,children:[re&&a.jsx("span",{className:`${d}-field-label`,style:Xe?{...Xe,lineHeight:Xe.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?a.jsx("textarea",{name:Ie.name,autoComplete:"off",value:xt[Ie.name]??"",onChange:ot=>Ae(Ie.name,ot.target.value),placeholder:Ie.placeholder,className:`${d}-input`,style:{...be,height:H,minHeight:H},rows:y,"data-filled":Ye||(xt[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:xt[Ie.name]??"",onChange:ot=>Ae(Ie.name,ot.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${d}-input`,style:be,"data-filled":Ye||(xt[Ie.name]??"").trim().length>0})]})]},mt))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:b.scalingValue(h??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:b.scalingValue(w??0,t),borderWidth:ke,paddingTop:b.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:b.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:b.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:b.scalingValue((v==null?void 0:v.left)??0,t),pointerEvents:c?"auto":void 0,...W,...P?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:P?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Te==="submitting"?"...":m})})})]}),at==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Qe},children:g}),at==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Qe},role:"alert",children:pt??tt??Z})]})}const Cf={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"},Tf=["hover","focus","filled","success","error"],If=`import React, { useMemo, useState } from 'react';
|
|
159
159
|
import { CommonComponentProps } from '../props';
|
|
160
160
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
161
161
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -793,7 +793,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
793
793
|
};
|
|
794
794
|
|
|
795
795
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
796
|
-
`,Lf=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Mf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:Lf,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Mf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ef={element:$f,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Pf,sourceCode:If,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function zr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rf(e){return`
|
|
796
|
+
`,Lf=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Mf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:Lf,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Pf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ef={element:$f,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Mf,sourceCode:If,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function zr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rf(e){return`
|
|
797
797
|
.${e}-wrapper {
|
|
798
798
|
display: flex;
|
|
799
799
|
flex-direction: column;
|
|
@@ -986,7 +986,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
986
986
|
font-size: ${zr(14)};
|
|
987
987
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
988
988
|
}
|
|
989
|
-
`}const kf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=b.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:
|
|
989
|
+
`}const kf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=b.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:S,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:x,inputWordSpacing:w,inputTextAppearance:F,buttonFontSettings:v,buttonFontSize:P,buttonLineHeight:M,buttonLetterSpacing:K,buttonWordSpacing:X,buttonTextAppearance:j,statusFontSettings:N,statusFontSize:_,statusLineHeight:T,statusLetterSpacing:L,statusWordSpacing:Y,statusTextAppearance:R,iconMaxWidth:I,minHeight:$,corners:G,stroke:O,stateOverrides:U,inputPadding:E,buttonPadding:f,successMessage:Q="Thanks for subscribing!",errorMessage:q="Please, fill all required fields."}=e,pe=c.slice(0,Math.min(p,c.length)),[k,me]=s.useState(()=>Object.fromEntries(pe.map(ae=>[ae.name,""]))),[C,ue]=s.useState("idle"),[te,fe]=s.useState(null),Pe=o==="success"?"success":o==="error"?"error":C,de=o==="error"?q:te,we=o==="filled",V=s.useMemo(()=>{if(!we)return k;let ae=null;for(const W of pe)(k[W.name]??"").trim().length>0||(ae=ae??{...k},ae[W.name]="Filled");return ae??k},[we,k,pe]),ie=Pe==="error"?b.getFormFieldValidationError(pe,V):null,oe=o&&o!=="default"?`${r}-state-${o}`:"",le=pe.some(ae=>(V[ae.name]??"").trim().length>0),ve=oe!==`${r}-state-filled`&&le?`${r}-state-filled`:"",Fe=`${oe} ${ve}`.trim(),Ee=i==null?void 0:i.submitUrl,Ce=u??"",Se=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",Z=Ce||"Submit",J={fontSettings:{fontFamily:y,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:x??0,wordSpacing:w??0,textAppearance:F,color:e.inputTextColor??"#111111"},re={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:P??.01,lineHeight:M,letterSpacing:K??0,wordSpacing:X??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},he={fontSettings:{fontFamily:y,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:_??.01,lineHeight:T,letterSpacing:L??0,wordSpacing:Y??0,textAppearance:R,color:e.successColor??"#22c55e"},z=pn(nn(J,t)),B=pn(nn(re,t)),ne=pn(nn(he,t)),ce=b.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(J==null?void 0:J.color)??"#111111",buttonTextColor:e.buttonTextColor??(re==null?void 0:re.color)??"#ffffff"},Af,Ff,U),ee={borderRadius:b.scalingValue(G,t),borderWidth:b.scalingValue(O,t),borderStyle:"solid"},H={borderLeftWidth:b.scalingValue(O,t)},be=async ae=>{if(ae.preventDefault(),!l)return;const W=Object.fromEntries(pe.map(ze=>{var Xe;return[ze.name,((Xe=k[ze.name])==null?void 0:Xe.trim())??""]}).filter(([,ze])=>ze));if(!Ee){ue("error"),fe("No integrations were found for this form.");return}if(Object.keys(W).length===0)return;const ke=b.getFormFieldValidationError(pe,k);if(ke){ue("error"),fe(ke);return}ue("submitting"),fe(null);try{const ze=await fetch(Ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});if(!ze.ok){const Xe=await ze.text();throw new Error(Xe||`Request failed: ${ze.status}`)}ue("success"),me(Object.fromEntries(pe.map(Xe=>[Xe.name,""])))}catch(ze){ue("error"),fe(ze instanceof Error?ze.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Fe}`.trim(),style:ce,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:be,className:`${r}-form`,style:{...ee,height:b.scalingValue($,t),minHeight:b.scalingValue($,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:pe.map(ae=>a.jsx("input",{type:ae.type==="email"?"email":ae.type==="phone"?"tel":"text",name:ae.name,autoComplete:"off",value:V[ae.name]??"",onChange:W=>me(ke=>({...ke,[ae.name]:W.target.value})),placeholder:ae.placeholder,required:ae.isRequired??ae.type==="email",className:`${r}-input`,style:{...z,paddingRight:b.scalingValue(E.right,t),paddingLeft:b.scalingValue(E.left,t),paddingTop:b.scalingValue(E.top,t),paddingBottom:b.scalingValue(E.bottom,t)}},ae.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Z,style:{...B,...H,paddingRight:b.scalingValue(f.right,t),paddingLeft:b.scalingValue(f.left,t),paddingTop:b.scalingValue(f.top,t),paddingBottom:b.scalingValue(f.bottom,t),pointerEvents:l?"auto":void 0},children:C==="submitting"?"...":g?Se&&a.jsx(mn,{url:Se,className:`${r}-submitBtnIcon`,style:{maxWidth:b.scalingValue(I??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):Ce})})]}),Pe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ne},children:Q}),Pe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ne},role:"alert",children:ie??de??q})]})},Af={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"},Ff=["hover","focus","filled","success","error"],Nf=`import React, { useMemo, useState } from 'react';
|
|
990
990
|
import { CommonComponentProps } from '../props';
|
|
991
991
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
992
992
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1697,7 +1697,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1697
1697
|
.${e}-image-hover-grayscale:hover video {
|
|
1698
1698
|
filter: grayscale(100%);
|
|
1699
1699
|
}
|
|
1700
|
-
`}const Bf=30,jf=20,ns=3,Vf=12,Gf=32,Xf=3,Uf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},qf=(e,t)=>Array.from({length:t},()=>e).flat(),Kf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Ju=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),wc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Ju(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Ju(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Qf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Zf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Qf(i,e))},Jf=e=>{if(b.isEmbedMedia(e))return!1;if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},ey=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ty=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var
|
|
1700
|
+
`}const Bf=30,jf=20,ns=3,Vf=12,Gf=32,Xf=3,Uf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},qf=(e,t)=>Array.from({length:t},()=>e).flat(),Kf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Ju=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),wc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Ju(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Ju(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Qf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Zf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Qf(i,e))},Jf=e=>{if(b.isEmbedMedia(e))return!1;if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")},ey=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ty=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var $,G,O,U,E;const p=s.useRef(null),y=!!(($=e.image)!=null&&$.assetId&&Jf(e.image)),S=!!((G=e.image)!=null&&G.assetId&&b.isEmbedMedia(e.image));s.useLayoutEffect(()=>{c&&(S||ey(p.current))&&(u==null||u())},[c,S,(O=e.image)==null?void 0:O.assetId,u]);const m=n.display==="cover",h=n.ratioValue??"1:1",x=n.reversed??!1,[w,F]=h.split(":").map(Number),M=(x?F:w)/(x?w:F),K=i/M,X=K>o?o:K,j=K>o?o*M:i,N=d(j),_=d(X),T={borderRadius:d(r)},L=m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...T}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...T},Y=S&&e.image?b.getEmbedAspect(e.image):null,R=Y===null?void 0:m?L:{...L,width:d(i/Y>o?o*Y:i),height:d(i/Y>o?o:i/Y)},I=((U=e.image)==null?void 0:U.assetId)&&(S?a.jsx(b.EmbedMediaFrame,{media:e.image,fit:m?"cover":"contain",style:R}):y?a.jsx("video",{ref:f=>{p.current=f},src:e.image.assetId,style:L,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:f=>{p.current=f},src:e.image.assetId,alt:((E=e.image)==null?void 0:E.name)??"",style:L,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...m?{width:N}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...m?{width:N,height:_,overflow:"hidden",...T}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:I&&a.jsx(b.LinkWrapper,{link:e.link,className:Et(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:I})})})},ny=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>zf(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:S,gap:m,imageMaxWidth:h,imageMaxHeight:x,hoverEffect:w,cornerRadius:F=0}=e,v=s.useMemo(()=>Kf(e.imageFit),[e.imageFit]),P=(t==null?void 0:t.length)??0,M=!!o,K=!n||!!i,X=K&&w!=="off"&&w!=="randomize"?`${r}-image-hover-${w}`:void 0,j=n?!!i:!0,_=((t==null?void 0:t.length)??0)>0&&(j||!!n),T=Math.max(0,p)*Bf,L=ve=>b.scalingValue(ve,n??!1),Y=s.useRef(null),R=s.useRef(null),I=s.useRef(null),[$,G]=s.useState(0),O=j&&S==="on",[U,E]=s.useState(!1),[f,Q]=s.useState({}),q=s.useRef(f);q.current=f;const pe=s.useRef(null),k=s.useRef(0),me=s.useRef(null),C=s.useMemo(()=>(t??[]).map(ve=>{var Fe;return((Fe=ve.image)==null?void 0:Fe.assetId)??""}).join("\0"),[t]),[ue,te]=s.useState(ns),fe=s.useMemo(()=>{const ve=t??[];return ve.length===0||!(j||!!n)?ve:qf(ve,ue)},[t,j,ue,n]),Pe=s.useMemo(()=>(t??[]).filter(ve=>{var Fe;return!!((Fe=ve.image)!=null&&Fe.assetId)}).length,[t]),de=_?Xf:1;s.useLayoutEffect(()=>{k.current=0,Q({}),pe.current=null,te(ns),c(0)},[C]),s.useEffect(()=>{if(!K||w!=="randomize")return;const ve=Y.current;if(!ve)return;const Fe=g=>{Q(Z=>{const J=Array.from(g).filter(he=>he in Z&&!Zf(ve,he));if(J.length===0)return Z;const re={...Z};return J.forEach(he=>{delete re[he]}),re})},Ee=new IntersectionObserver(g=>{const Z=new Set;for(const J of g){const re=J.target.dataset.marqueeItemIndex,he=re!==void 0?Number(re):NaN;Number.isNaN(he)||Z.add(he)}Z.size>0&&Fe(Z)},{root:ve,threshold:0});Object.keys(f).forEach(g=>{const Z=Number(g);ve.querySelectorAll(`[data-marquee-item-index="${Z}"]`).forEach(J=>Ee.observe(J))});const Ce={current:0},Se=()=>{const g=Object.keys(q.current);g.length!==0&&(Fe(g.map(Number)),Ce.current=requestAnimationFrame(Se))};return Object.keys(q.current).length>0&&(Ce.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(Ce.current),Ee.disconnect()}},[w,f,K]),s.useEffect(()=>{const ve=Y.current;if(!ve||typeof IntersectionObserver>"u")return;const Fe=ve.querySelectorAll("video");if(Fe.length===0)return;const Ee=new IntersectionObserver(Ce=>{for(const Se of Ce){const g=Se.target;Se.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Fe.forEach(Ce=>Ee.observe(Ce)),()=>Ee.disconnect()},[_,fe,de,f]),s.useLayoutEffect(()=>{if(!_)return;const ve=Y.current,Fe=I.current;if(!ve||!Fe)return;const Ee={current:0},Ce=()=>{const Z=ve.getBoundingClientRect().width||ve.offsetWidth,J=Yf(Fe),re=pe.current,he=typeof re=="number"&&Math.abs(re-J)<=.25;pe.current=J;let z=ue,B=0;if((j||n)&&P>0&&Z>0){const ee=wc(Fe,P);if(ee>=Gf){B=ee;const H=Math.min(Vf,Math.max(ns,Math.ceil(Z/ee)+1));z=H,H!==ue&&te(H)}}const ce=z!==ue&&B>0?B*z:J>0?J:B>0?B*z:(()=>{const ee=wc(Fe,P);return ee>0?ee*z:0})();ce>0?c(ee=>ee<=0?ce:!he||Math.round(ee)===Math.round(ce)?ee:ce):!he&&l<=0&&(cancelAnimationFrame(Ee.current),Ee.current=requestAnimationFrame(Ce))},Se=()=>{cancelAnimationFrame(Ee.current),Ee.current=requestAnimationFrame(Ce)};me.current=Se,Se();const g=new ResizeObserver(Se);return g.observe(ve),g.observe(Fe),()=>{me.current=null,cancelAnimationFrame(Ee.current),g.disconnect()}},[j,_,l,C,ue,P,n]),s.useLayoutEffect(()=>{if(!_||d<=0)return;const ve=R.current;ve&&Uf(ve)},[_,d,y,T]),s.useLayoutEffect(()=>{if(!_||l<=0){G(0);return}const ve=R.current,Fe=I.current;if(!ve||!Fe)return;const Ee=()=>{const Se=ve.offsetHeight||ve.getBoundingClientRect().height,g=Array.from(Fe.children).reduce((J,re)=>Math.max(J,re.offsetHeight||re.getBoundingClientRect().height),0),Z=Se>0?Se:g;G(Z>0?Z:0)};Ee();const Ce=new ResizeObserver(Ee);return Ce.observe(ve),Ce.observe(Fe),()=>Ce.disconnect()},[_,de,fe,n,m,h,x,l,v,f]),s.useLayoutEffect(()=>{if(!n||!M||!_||typeof window>"u")return;const ve=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(ve)},[n,M,_,y,l,$,m,fe]);const we=()=>{O&&E(!0)},V=()=>{O&&E(!1)},ie=s.useCallback(()=>{var ve;k.current=Math.min(Pe,k.current+1),(ve=me.current)==null||ve.call(me)},[Pe]),oe=s.useCallback((ve,Fe)=>{Q(Ee=>{const Ce=Ee[ve]??Fe,Se=(t??[]).filter(Z=>Z!==Ce);if(Se.length===0)return Ee;const g=Se[Math.floor(Math.random()*Se.length)];return{...Ee,[ve]:g}})},[t]),le=(ve,Fe,Ee,Ce)=>{const Se=K&&w==="randomize"&&v.display==="cover"?f[Ee]??ve:ve,g=`max(${L(m)}, ${jf}px)`,Z=`calc(-0.5 * (${g} + ${L(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Ee,onMouseEnter:K&&w==="randomize"&&v.display==="cover"?()=>oe(Ee,ve):void 0,children:[a.jsx(ty,{item:Se,prefix:r,imageFit:v,imageMaxWidth:h,imageMaxHeight:x,cornerRadius:F,imageHoverClass:X,isEditor:n,isFirstSet:Ce,scaled:L,onFirstSetImageDone:ie}),M&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Z,width:g,height:"100%"}})]},`${Fe}-${Ee}`)};if(_){const ve=j?O&&U?"paused":"running":"paused",Fe=d>0&&T>0?d/T*1e3:0,Ee=`${Math.max(0,Fe)/1e3}s`;return a.jsxs("div",{ref:Y,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:$>0?{height:$}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:R,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:we,onMouseLeave:V,style:{WebkitAnimationDuration:Ee,animationDuration:Ee,WebkitAnimationPlayState:ve,animationPlayState:ve},children:Array.from({length:de},(Ce,Se)=>a.jsx("div",{ref:Se===0?I:void 0,className:Et(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(m),paddingRight:L(m)},"aria-hidden":Se>0,children:fe.map((g,Z)=>le(g,Se,Z,Se===0&&Z<P))},`set-${Se}`))})]})}return a.jsxs("div",{ref:Y,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Et(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((ve,Fe)=>le(ve,0,Fe))},"marquee-static")]})},iy=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
1701
1701
|
import cn from 'classnames';
|
|
1702
1702
|
import { CommonComponentProps } from '../props';
|
|
1703
1703
|
import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
|
|
@@ -2029,7 +2029,6 @@ const MarqueeItemCard = ({
|
|
|
2029
2029
|
(isEmbed ? (
|
|
2030
2030
|
<EmbedMediaFrame
|
|
2031
2031
|
media={item.image}
|
|
2032
|
-
mode="background"
|
|
2033
2032
|
fit={isCover ? 'cover' : 'contain'}
|
|
2034
2033
|
style={embedStyle}
|
|
2035
2034
|
/>
|
|
@@ -2653,7 +2652,7 @@ ${o}
|
|
|
2653
2652
|
left: -9999px;
|
|
2654
2653
|
top: 0;
|
|
2655
2654
|
}
|
|
2656
|
-
`}const sy=30,is=3,ly=12,cy=96,$c=3,pa=.72,dy=100,uy=10,py=e=>e/dy,my=e=>Math.max(0,e)/uy,gy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},hy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},fy=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),yy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Cc=e=>{e.style.transform=""},vy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},xy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},ep=96,tp=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},by=(e,t)=>{const n=tp(e,t,ep);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Sy=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,f)=>{if(f-m<=1)return[m,f];const S=m+f>>1;return l[S]<=r?d(S,f):d(m,S)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},wy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=f=>i+t*Math.sin(l*f),d=f=>t*l*Math.cos(l*f),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:x},(f,S)=>{const w=u+S/x*y,N=u+(S+1)/x*y,v=N-w,M=c(w),E=c(N),U=w+v/3,X=M+d(w)*v/3,D=N-v/3,_=E-d(N)*v/3;return`C${U.toFixed(2)} ${X.toFixed(2)} ${D.toFixed(2)} ${_.toFixed(2)} ${N.toFixed(2)} ${E.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},$y=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${pa}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((f,S)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:f===" "?" ":f})},S))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(b.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},Cy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=b.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:m,curveFrequency:f,textFontFamily:S,textFontSettings:w,textFontSize:N,textLetterSpacing:v,textWordSpacing:M,textTextAppearance:E,textColor:U,backgroundColor:X,ribbonWidth:D}=e,_=D??N,W=x==="curve",T=py(m),C=my(f),q=s.useMemo(()=>ay(o,c,W),[o,c,W]),R=s.useMemo(()=>nn({fontSettings:{fontFamily:S,fontWeight:w.fontWeight,fontStyle:w.fontStyle},letterSpacing:v,wordSpacing:M,fontSize:N,lineHeight:N,textAppearance:E,color:U},n),[S,w,v,M,N,E,U,n]),$=_e=>b.scalingValue(_e,n??!1),I=((t==null?void 0:t.length)??0)>0,j=n?!!i:!0,F=I&&(j||!!n),K=Math.max(0,d)*sy,P=j&&p==="on",[h,J]=s.useState(!1),V=j?P&&h?"paused":"running":"paused",he=V==="running"&&K>0&&c>0,k=c>0&&K>0?c/K*1e3:0,ce=s.useRef(null),L=s.useRef(null),me=s.useRef(null),te=s.useRef(null),ve=s.useRef(null),Le=s.useRef(null),de=s.useRef(he),ue=s.useRef(null),Z=s.useRef(null),le=s.useRef(T),oe=s.useRef(C);de.current=he,le.current=T,oe.current=C;const[ge,Se]=s.useState(0),[Re,Ne]=s.useState(0),[Te,Ce]=s.useState(0),[g,Y]=s.useState(0),[ee,ae]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(_e=>{var We,vt;return`${_e.text}\0${((We=_e.image)==null?void 0:We.assetId)??""}\0${((vt=_e.link)==null?void 0:vt.value)??""}`}).join("\0"),[t]),[ne,B]=s.useState(is),G=s.useMemo(()=>{const _e=t??[];return _e.length===0||!(j||n)?_e:hy(_e,ne)},[t,j,ne,n]),z=F?$c:1;s.useLayoutEffect(()=>{B(is),l(0)},[ye]),s.useLayoutEffect(()=>{var Ke;const _e=Le.current;if(!_e)return;const We=()=>{const pe=getComputedStyle(_e),De=parseFloat(pe.fontSize)||0;if(De<=0)return;const qe=fy();if(!qe){Se(De*pa),Ne(0);return}qe.font=`${pe.fontStyle} ${pe.fontWeight} ${De}px ${pe.fontFamily}`;const bt=qe.measureText("H"),yt=bt.actualBoundingBoxAscent>0?bt.actualBoundingBoxAscent:De*pa,Rt=Math.max(0,bt.actualBoundingBoxDescent||0),ct=bt.fontBoundingBoxAscent||0,wt=bt.fontBoundingBoxDescent||0;Se(Nt=>Math.abs(Nt-yt)>.5?yt:Nt);const nt=ct>0||wt>0?(wt-Rt-(ct-yt))/2:0;Ne(Nt=>Math.abs(Nt-nt)>.25?nt:Nt)};We();const vt=typeof document<"u"?document.fonts:void 0;(Ke=vt==null?void 0:vt.ready)==null||Ke.then(We).catch(()=>{});const Ve=new ResizeObserver(We);return Ve.observe(_e),()=>Ve.disconnect()},[R.fontFamily,R.fontWeight,R.fontStyle,R.fontSize,R.lineHeight]),s.useLayoutEffect(()=>{if(!F)return;const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const qe=_e.offsetWidth||_e.getBoundingClientRect().width,bt=We.offsetWidth||We.getBoundingClientRect().width;if(I&&qe>0&&bt>0){const yt=bt/ne;if(yt>0){let Rt=qe,ct=ly;if(W){const nt=qe*le.current,Nt=oe.current,jt=Nt>0?2*Math.PI*Nt/qe:0,$e=by(nt,jt);Rt=Math.max(qe,$e*qe/($c-1)),ct=cy}const wt=Math.min(ct,Math.max(is,Math.ceil(Rt/yt)+1));if(wt!==ne){B(wt);return}}}bt>0&&l(bt)},Ke=()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)};Ke();const pe=new ResizeObserver(Ke);pe.observe(_e),pe.observe(We);const De=()=>{document.hidden||Ke()};return document.addEventListener("visibilitychange",De),window.addEventListener("pageshow",De),window.addEventListener("focus",De),()=>{cancelAnimationFrame(vt.id),pe.disconnect(),document.removeEventListener("visibilitychange",De),window.removeEventListener("pageshow",De),window.removeEventListener("focus",De)}},[F,ye,ne,I,ge,W,T,C]),s.useLayoutEffect(()=>{const _e=ve.current;if(!_e)return;const We={id:0},vt=()=>{const Ke=_e.offsetHeight;Ke>0&&ae(pe=>Math.abs(pe-Ke)>.5?Ke:pe)};We.id=requestAnimationFrame(vt);const Ve=new ResizeObserver(()=>{cancelAnimationFrame(We.id),We.id=requestAnimationFrame(vt)});return Ve.observe(_e),()=>{cancelAnimationFrame(We.id),Ve.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!W){Ce(0),Y(0);return}const _e=ce.current,We=te.current;if(!_e||!We)return;const vt={id:0},Ve=()=>{const pe=_e.offsetWidth,De=We.offsetHeight;pe>0&&Y(qe=>Math.abs(qe-pe)>.5?pe:qe),De>0&&Ce(qe=>Math.abs(qe-De)>.5?De:qe)};vt.id=requestAnimationFrame(Ve);const Ke=new ResizeObserver(()=>{cancelAnimationFrame(vt.id),vt.id=requestAnimationFrame(Ve)});return Ke.observe(_e),Ke.observe(We),()=>{cancelAnimationFrame(vt.id),Ke.disconnect()}},[W,ye,ge,N,F]),s.useLayoutEffect(()=>{if(!F||c<=0)return;const _e=me.current;_e&&gy(_e)},[F,c,u,K]),s.useLayoutEffect(()=>{if(!W||!I)return;const _e=ce.current;if(!_e)return;const We={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},vt=()=>{for(const yt of We.itemsCache)for(const Rt of yt.glyphs)Cc(Rt.inner)},Ve=()=>{const yt=L.current??_e;We.itemsCache=Array.from(_e.querySelectorAll("[data-marquee-text-item]"),Rt=>{const ct=[];return Rt.querySelectorAll("[data-marquee-wave-node]").forEach(wt=>{const nt=wt.firstElementChild;nt&&ct.push({inner:nt,layoutLocalX:xy(wt,yt)})}),{item:Rt,glyphs:ct}}),We.cacheDirty=!1},Ke=()=>{We.cacheDirty&&Ve();const Rt=(L.current??_e).offsetWidth||1,ct=Rt*le.current,wt=oe.current,nt=2*Math.PI*wt/Rt,Nt=`${Rt}|${ct}|${nt}`;if(Nt!==We.lutKey&&(We.lutKey=Nt,We.lut=tp(ct,nt,ep)),Math.abs(ct)<=0||nt<=0){vt();return}const jt=me.current,$e=jt?vy(getComputedStyle(jt).transform):0,Ge=_e.getBoundingClientRect(),ht=Ge.left,Lt=Ge.right,$t=We.lut&&We.lut.wavelength>0?Math.max(0,(We.lut.periodArc/We.lut.wavelength-1)*Rt):0;for(const{item:mt,glyphs:_t}of We.itemsCache){const Ot=mt.getBoundingClientRect();if(Ot.right<ht||Ot.left>Lt+$t){for(const zt of _t)Cc(zt.inner);continue}for(const zt of _t){const Ee=zt.layoutLocalX+$e,dt=We.lut?Sy(We.lut,Ee):Ee,ut=nt*dt,kt=ct*Math.sin(ut),Qe=ct*nt*Math.cos(ut),at=Math.atan(Qe)*(180/Math.PI);yy(zt.inner,dt-Ee,kt,at)}}},pe=()=>{We.cancelled||(We.raf=0,Ke(),de.current&&!document.hidden&&(We.raf=requestAnimationFrame(pe)))},De=()=>{We.cancelled||We.raf||(We.raf=requestAnimationFrame(pe))},qe=()=>{We.cacheDirty=!0,Ke(),De()};ue.current=De,Z.current=qe,Ke(),De();const bt=()=>{if(document.hidden){cancelAnimationFrame(We.raf),We.raf=0;return}cancelAnimationFrame(We.raf),We.raf=0,qe()};return document.addEventListener("visibilitychange",bt),window.addEventListener("pageshow",bt),window.addEventListener("focus",bt),()=>{We.cancelled=!0,ue.current=null,Z.current=null,cancelAnimationFrame(We.raf),document.removeEventListener("visibilitychange",bt),window.removeEventListener("pageshow",bt),window.removeEventListener("focus",bt),vt()}},[W,I]),s.useLayoutEffect(()=>{var _e;!W||!I||(_e=Z.current)==null||_e.call(Z)},[W,I,r,ye,ne,ge,T,C,g]),s.useLayoutEffect(()=>{var _e;(_e=ue.current)==null||_e.call(ue)},[he,u]);const ie=_e=>{P&&_e.pointerType==="mouse"&&J(!0)},H=()=>{P&&J(!1)},be=W?Math.abs(T)*100:0,re=$(_),Q={minHeight:re,...W?{paddingTop:`${be}%`,paddingBottom:`${be}%`}:{}},Pe={height:re,...W?{visibility:"hidden"}:{backgroundColor:X}},Ae={gap:$(y),minHeight:re},He=g*T,Xe=Math.abs(He),Ue=ee>0?ee:Te,Je=Math.max(Te,Ue),je=Xe+Je/2,xe=Math.max(Ue,1),Ie=W&&g>0&&Je>0?wy(g,He,C,je,xe):"",ze=Xe*2+Je,Ze=Ie?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${ze}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Ie,fill:"none",stroke:X,strokeWidth:Ue,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,tt=a.jsx("div",{ref:ve,className:`${o}-ribbon`,style:Pe,"aria-hidden":!0}),ot={...R,lineHeight:ge>0?`${ge}px`:`${pa}em`},lt=(_e,We,vt)=>a.jsx($y,{item:_e,prefix:o,textCss:ot,capHeightPx:ge,opticalOffsetY:Re,imageGapPx:$(y),isCurve:W},`${We}-${vt}`),it=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:R,children:"H"}),xt=`${Math.max(0,k)/1e3}s`,rt=F?a.jsx("div",{ref:me,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ie,onPointerLeave:H,style:{WebkitAnimationDuration:xt,animationDuration:xt,WebkitAnimationPlayState:V,animationPlayState:V},children:Array.from({length:z},(_e,We)=>a.jsx("div",{ref:We===0?te:void 0,className:`${o}-marquee-set`,style:{...Ae,paddingRight:$(y)},"aria-hidden":We>0,children:G.map((vt,Ve)=>lt(vt,We,Ve))},`set-${We}`))}):a.jsx("div",{ref:te,className:Et(`${o}-marquee-set`,`${o}-marquee-static`),style:Ae,children:t==null?void 0:t.map((_e,We)=>lt(_e,0,We))});return a.jsxs("div",{ref:ce,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:q}}),it,a.jsxs("div",{ref:L,className:`${o}-marquee-wrapper`,style:Q,children:[tt,Ze,rt]})]})},Ty=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
|
|
2655
|
+
`}const sy=30,is=3,ly=12,cy=96,$c=3,pa=.72,dy=100,uy=10,py=e=>e/dy,my=e=>Math.max(0,e)/uy,gy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},hy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},fy=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),yy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},Cc=e=>{e.style.transform=""},vy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},xy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},ep=96,tp=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,S=y+d;o[p+1]=S,r[p+1]=r[p]+(c(y)+c(S))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},by=(e,t)=>{const n=tp(e,t,ep);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},Sy=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,h)=>{if(h-m<=1)return[m,h];const x=m+h>>1;return l[x]<=r?d(x,h):d(m,x)},[u,p]=d(0,l.length-1),y=l[p]-l[u],S=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*S)},wy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=h=>i+t*Math.sin(l*h),d=h=>t*l*Math.cos(l*h),u=-o,y=e+o-u,S=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:S},(h,x)=>{const w=u+x/S*y,F=u+(x+1)/S*y,v=F-w,P=c(w),M=c(F),K=w+v/3,X=P+d(w)*v/3,j=F-v/3,N=M-d(F)*v/3;return`C${K.toFixed(2)} ${X.toFixed(2)} ${j.toFixed(2)} ${N.toFixed(2)} ${F.toFixed(2)} ${M.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},$y=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${pa}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),S=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(b.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:S})})},Cy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=b.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:S,curveAmplitude:m,curveFrequency:h,textFontFamily:x,textFontSettings:w,textFontSize:F,textLetterSpacing:v,textWordSpacing:P,textTextAppearance:M,textColor:K,backgroundColor:X,ribbonWidth:j}=e,N=j??F,_=S==="curve",T=py(m),L=my(h),Y=s.useMemo(()=>ay(o,c,_),[o,c,_]),R=s.useMemo(()=>nn({fontSettings:{fontFamily:x,fontWeight:w.fontWeight,fontStyle:w.fontStyle},letterSpacing:v,wordSpacing:P,fontSize:F,lineHeight:F,textAppearance:M,color:K},n),[x,w,v,P,F,M,K,n]),I=De=>b.scalingValue(De,n??!1),$=((t==null?void 0:t.length)??0)>0,G=n?!!i:!0,O=$&&(G||!!n),U=Math.max(0,d)*sy,E=G&&p==="on",[f,Q]=s.useState(!1),q=G?E&&f?"paused":"running":"paused",pe=q==="running"&&U>0&&c>0,k=c>0&&U>0?c/U*1e3:0,me=s.useRef(null),C=s.useRef(null),ue=s.useRef(null),te=s.useRef(null),fe=s.useRef(null),Pe=s.useRef(null),de=s.useRef(pe),we=s.useRef(null),V=s.useRef(null),ie=s.useRef(T),oe=s.useRef(L);de.current=pe,ie.current=T,oe.current=L;const[le,ve]=s.useState(0),[Fe,Ee]=s.useState(0),[Ce,Se]=s.useState(0),[g,Z]=s.useState(0),[J,re]=s.useState(0),he=s.useMemo(()=>(t??[]).map(De=>{var _e,He;return`${De.text}\0${((_e=De.image)==null?void 0:_e.assetId)??""}\0${((He=De.link)==null?void 0:He.value)??""}`}).join("\0"),[t]),[z,B]=s.useState(is),ne=s.useMemo(()=>{const De=t??[];return De.length===0||!(G||n)?De:hy(De,z)},[t,G,z,n]),ce=O?$c:1;s.useLayoutEffect(()=>{B(is),l(0)},[he]),s.useLayoutEffect(()=>{var Be;const De=Pe.current;if(!De)return;const _e=()=>{const Ie=getComputedStyle(De),mt=parseFloat(Ie.fontSize)||0;if(mt<=0)return;const ot=fy();if(!ot){ve(mt*pa),Ee(0);return}ot.font=`${Ie.fontStyle} ${Ie.fontWeight} ${mt}px ${Ie.fontFamily}`;const Ct=ot.measureText("H"),rt=Ct.actualBoundingBoxAscent>0?Ct.actualBoundingBoxAscent:mt*pa,St=Math.max(0,Ct.actualBoundingBoxDescent||0),nt=Ct.fontBoundingBoxAscent||0,Rt=Ct.fontBoundingBoxDescent||0;ve(Vt=>Math.abs(Vt-rt)>.5?rt:Vt);const ht=nt>0||Rt>0?(Rt-St-(nt-rt))/2:0;Ee(Vt=>Math.abs(Vt-ht)>.25?ht:Vt)};_e();const He=typeof document<"u"?document.fonts:void 0;(Be=He==null?void 0:He.ready)==null||Be.then(_e).catch(()=>{});const Ae=new ResizeObserver(_e);return Ae.observe(De),()=>Ae.disconnect()},[R.fontFamily,R.fontWeight,R.fontStyle,R.fontSize,R.lineHeight]),s.useLayoutEffect(()=>{if(!O)return;const De=me.current,_e=te.current;if(!De||!_e)return;const He={id:0},Ae=()=>{const ot=De.offsetWidth||De.getBoundingClientRect().width,Ct=_e.offsetWidth||_e.getBoundingClientRect().width;if($&&ot>0&&Ct>0){const rt=Ct/z;if(rt>0){let St=ot,nt=ly;if(_){const ht=ot*ie.current,Vt=oe.current,Zt=Vt>0?2*Math.PI*Vt/ot:0,$e=by(ht,Zt);St=Math.max(ot,$e*ot/($c-1)),nt=cy}const Rt=Math.min(nt,Math.max(is,Math.ceil(St/rt)+1));if(Rt!==z){B(Rt);return}}}Ct>0&&l(Ct)},Be=()=>{cancelAnimationFrame(He.id),He.id=requestAnimationFrame(Ae)};Be();const Ie=new ResizeObserver(Be);Ie.observe(De),Ie.observe(_e);const mt=()=>{document.hidden||Be()};return document.addEventListener("visibilitychange",mt),window.addEventListener("pageshow",mt),window.addEventListener("focus",mt),()=>{cancelAnimationFrame(He.id),Ie.disconnect(),document.removeEventListener("visibilitychange",mt),window.removeEventListener("pageshow",mt),window.removeEventListener("focus",mt)}},[O,he,z,$,le,_,T,L]),s.useLayoutEffect(()=>{const De=fe.current;if(!De)return;const _e={id:0},He=()=>{const Be=De.offsetHeight;Be>0&&re(Ie=>Math.abs(Ie-Be)>.5?Be:Ie)};_e.id=requestAnimationFrame(He);const Ae=new ResizeObserver(()=>{cancelAnimationFrame(_e.id),_e.id=requestAnimationFrame(He)});return Ae.observe(De),()=>{cancelAnimationFrame(_e.id),Ae.disconnect()}},[N,n]),s.useLayoutEffect(()=>{if(!_){Se(0),Z(0);return}const De=me.current,_e=te.current;if(!De||!_e)return;const He={id:0},Ae=()=>{const Ie=De.offsetWidth,mt=_e.offsetHeight;Ie>0&&Z(ot=>Math.abs(ot-Ie)>.5?Ie:ot),mt>0&&Se(ot=>Math.abs(ot-mt)>.5?mt:ot)};He.id=requestAnimationFrame(Ae);const Be=new ResizeObserver(()=>{cancelAnimationFrame(He.id),He.id=requestAnimationFrame(Ae)});return Be.observe(De),Be.observe(_e),()=>{cancelAnimationFrame(He.id),Be.disconnect()}},[_,he,le,F,O]),s.useLayoutEffect(()=>{if(!O||c<=0)return;const De=ue.current;De&&gy(De)},[O,c,u,U]),s.useLayoutEffect(()=>{if(!_||!$)return;const De=me.current;if(!De)return;const _e={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},He=()=>{for(const rt of _e.itemsCache)for(const St of rt.glyphs)Cc(St.inner)},Ae=()=>{const rt=C.current??De;_e.itemsCache=Array.from(De.querySelectorAll("[data-marquee-text-item]"),St=>{const nt=[];return St.querySelectorAll("[data-marquee-wave-node]").forEach(Rt=>{const ht=Rt.firstElementChild;ht&&nt.push({inner:ht,layoutLocalX:xy(Rt,rt)})}),{item:St,glyphs:nt}}),_e.cacheDirty=!1},Be=()=>{_e.cacheDirty&&Ae();const St=(C.current??De).offsetWidth||1,nt=St*ie.current,Rt=oe.current,ht=2*Math.PI*Rt/St,Vt=`${St}|${nt}|${ht}`;if(Vt!==_e.lutKey&&(_e.lutKey=Vt,_e.lut=tp(nt,ht,ep)),Math.abs(nt)<=0||ht<=0){He();return}const Zt=ue.current,$e=Zt?vy(getComputedStyle(Zt).transform):0,Ge=De.getBoundingClientRect(),ft=Ge.left,Lt=Ge.right,wt=_e.lut&&_e.lut.wavelength>0?Math.max(0,(_e.lut.periodArc/_e.lut.wavelength-1)*St):0;for(const{item:vt,glyphs:Nt}of _e.itemsCache){const Wt=vt.getBoundingClientRect();if(Wt.right<ft||Wt.left>Lt+wt){for(const Dt of Nt)Cc(Dt.inner);continue}for(const Dt of Nt){const Me=Dt.layoutLocalX+$e,ct=_e.lut?Sy(_e.lut,Me):Me,dt=ht*ct,kt=nt*Math.sin(dt),Ke=nt*ht*Math.cos(dt),st=Math.atan(Ke)*(180/Math.PI);yy(Dt.inner,ct-Me,kt,st)}}},Ie=()=>{_e.cancelled||(_e.raf=0,Be(),de.current&&!document.hidden&&(_e.raf=requestAnimationFrame(Ie)))},mt=()=>{_e.cancelled||_e.raf||(_e.raf=requestAnimationFrame(Ie))},ot=()=>{_e.cacheDirty=!0,Be(),mt()};we.current=mt,V.current=ot,Be(),mt();const Ct=()=>{if(document.hidden){cancelAnimationFrame(_e.raf),_e.raf=0;return}cancelAnimationFrame(_e.raf),_e.raf=0,ot()};return document.addEventListener("visibilitychange",Ct),window.addEventListener("pageshow",Ct),window.addEventListener("focus",Ct),()=>{_e.cancelled=!0,we.current=null,V.current=null,cancelAnimationFrame(_e.raf),document.removeEventListener("visibilitychange",Ct),window.removeEventListener("pageshow",Ct),window.removeEventListener("focus",Ct),He()}},[_,$]),s.useLayoutEffect(()=>{var De;!_||!$||(De=V.current)==null||De.call(V)},[_,$,r,he,z,le,T,L,g]),s.useLayoutEffect(()=>{var De;(De=we.current)==null||De.call(we)},[pe,u]);const ee=De=>{E&&De.pointerType==="mouse"&&Q(!0)},H=()=>{E&&Q(!1)},be=_?Math.abs(T)*100:0,ae=I(N),W={minHeight:ae,..._?{paddingTop:`${be}%`,paddingBottom:`${be}%`}:{}},ke={height:ae,..._?{visibility:"hidden"}:{backgroundColor:X}},ze={gap:I(y),minHeight:ae},Xe=g*T,Ue=Math.abs(Xe),Qe=J>0?J:Ce,We=Math.max(Ce,Qe),it=Ue+We/2,ye=Math.max(Qe,1),Te=_&&g>0&&We>0?wy(g,Xe,L,it,ye):"",Ve=Ue*2+We,Ze=Te?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${Ve}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Te,fill:"none",stroke:X,strokeWidth:Qe,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,et=a.jsx("div",{ref:fe,className:`${o}-ribbon`,style:ke,"aria-hidden":!0}),at={...R,lineHeight:le>0?`${le}px`:`${pa}em`},tt=(De,_e,He)=>a.jsx($y,{item:De,prefix:o,textCss:at,capHeightPx:le,opticalOffsetY:Fe,imageGapPx:I(y),isCurve:_},`${_e}-${He}`),Ye=a.jsx("span",{ref:Pe,"aria-hidden":!0,className:`${o}-cap-ref`,style:R,children:"H"}),xt=`${Math.max(0,k)/1e3}s`,pt=O?a.jsx("div",{ref:ue,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ee,onPointerLeave:H,style:{WebkitAnimationDuration:xt,animationDuration:xt,WebkitAnimationPlayState:q,animationPlayState:q},children:Array.from({length:ce},(De,_e)=>a.jsx("div",{ref:_e===0?te:void 0,className:`${o}-marquee-set`,style:{...ze,paddingRight:I(y)},"aria-hidden":_e>0,children:ne.map((He,Ae)=>tt(He,_e,Ae))},`set-${_e}`))}):a.jsx("div",{ref:te,className:Et(`${o}-marquee-set`,`${o}-marquee-static`),style:ze,children:t==null?void 0:t.map((De,_e)=>tt(De,0,_e))});return a.jsxs("div",{ref:me,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),Ye,a.jsxs("div",{ref:C,className:`${o}-marquee-wrapper`,style:W,children:[et,Ze,pt]})]})},Ty=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
|
|
2657
2656
|
import cn from 'classnames';
|
|
2658
2657
|
import { CommonComponentProps } from '../props';
|
|
2659
2658
|
import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
|
|
@@ -3585,7 +3584,7 @@ type MarqueeTextProps = {
|
|
|
3585
3584
|
isPreviewMode?: boolean;
|
|
3586
3585
|
isEditMode?: boolean;
|
|
3587
3586
|
} & CommonComponentProps;
|
|
3588
|
-
`,Iy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ly={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Iy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",contentKey:"title",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}}},default:[{text:"NEW WORK",image:{assetId:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:{type:"url",value:"",target:"self"}}]}},
|
|
3587
|
+
`,Iy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ly={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Iy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",contentKey:"title",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}}},default:[{text:"NEW WORK",image:{assetId:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:{type:"url",value:"",target:"self"}}]}},Py={element:Cy,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Ly,sourceCode:Ty,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function My(e,t){const n=t>0?`${t}px`:"0px";return`
|
|
3589
3588
|
.${e}-marquee-wrapper {
|
|
3590
3589
|
overflow: hidden;
|
|
3591
3590
|
width: 100%;
|
|
@@ -3674,7 +3673,7 @@ type MarqueeTextProps = {
|
|
|
3674
3673
|
pointer-events: auto;
|
|
3675
3674
|
z-index: 10;
|
|
3676
3675
|
}
|
|
3677
|
-
`}const Ey=30,Tc=2,Ry=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},ky=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:
|
|
3676
|
+
`}const Ey=30,Tc=2,Ry=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},ky=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:S,stroke:m,strokeColor:h,bgColor:x,padding:w,logoMarginTop:F,logoWidth:v,logoHeight:P,captionMarginTop:M}=e,K=!!o,X=((t==null?void 0:t.length)??0)>0,j=c>0&&(!n||i),N=X&&(j||n),_=Math.max(0,c)*Ey,T=B=>b.scalingValue(B,n??!1),L=s.useRef(null),Y=s.useRef(null),R=s.useRef(null),[I,$]=s.useState(0),[G,O]=s.useState(0),U=G>0?G:0,E=s.useMemo(()=>My(r,U),[r,U]),[f,Q]=s.useState(0),q=j&&u==="on",[pe,k]=s.useState(!1),me=s.useRef(null),[C,ue]=s.useState(0),[te,fe]=s.useState(0),Pe=s.useRef(null),de=B=>{var ce,ee,H,be,ae;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((ce=e==null?void 0:e[`${B}FontSettings`])==null?void 0:ce.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${B}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((H=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:H.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((ae=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:ae.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${B}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${B}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${B}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${B}LineHeight`])??.01,color:(e==null?void 0:e[`${B}Color`])??"#000000"}},we=de("text"),V=de("caption"),ie=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var ne,ce;return(((ne=B.text)==null?void 0:ne.length)??0)>0||(((ce=B.caption)==null?void 0:ce.length)??0)>0}),[t]),oe=s.useMemo(()=>!N||(t==null?void 0:t.length)===0?1:G<=0||I<=0?Tc:Math.max(Tc,Math.ceil(I/G)+1),[N,t==null?void 0:t.length,G,I]);s.useLayoutEffect(()=>{if(!N)return;const B=L.current,ne=R.current;if(!B||!ne)return;let ce=0;const ee=()=>{const ae=B.getBoundingClientRect().width,W=ne.getBoundingClientRect().width,ke=Pe.current,ze=typeof ke=="number"&&Math.abs(ke-W)<=.25;if(Pe.current=W,$(ae),typeof W=="number"&&W>0&&G<=0){O(W);return}ze&&W!==G?O(W):!ze&&G<=0&&(cancelAnimationFrame(ce),ce=requestAnimationFrame(ee))},H=()=>{cancelAnimationFrame(ce),ce=requestAnimationFrame(ee)};H();const be=new ResizeObserver(H);return be.observe(B),be.observe(ne),()=>{cancelAnimationFrame(ce),be.disconnect()}},[j,N,G]);const le=U>0&&_>0?U/_*1e3:0,ve=`${Math.max(0,le)/1e3}s`;s.useLayoutEffect(()=>{if(!N||U<=0)return;const B=Y.current;B&&Ry(B)},[N,U,d]),s.useLayoutEffect(()=>{if(!N){Q(0);return}const B=R.current,ne=Y.current;if(!B||!ne)return;const ce=()=>{let H=0;for(let be=0;be<B.children.length;be++){const W=B.children[be].firstElementChild;W&&(H=Math.max(H,W.offsetHeight))}H<=0&&(H=ne.offsetHeight),Q(H>0?H:0)};ce();const ee=new ResizeObserver(ce);return ee.observe(B),ee.observe(ne),()=>{ee.disconnect()}},[N,oe,t,n,p,y,w,m,S,v,P,C,te]);const Fe=()=>{q&&k(!0)},Ee=()=>{q&&k(!1)},Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Se=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((B,ne,ce,ee)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Ce,width:"100%"},children:[a.jsx("div",{"data-controls":K?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":K?"y":void 0,className:K?`${r}-control`:void 0,style:{height:T((ee==null?void 0:ee.marginTop)??0)}}),a.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...nn(B,n),textAlign:Se,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:a.jsx(Zi,{content:ne})})]},ce),[Ce,Se,n,K,r,T]),Z=s.useCallback((B,ne,ce)=>{var ee,H,be;return a.jsxs("div",{style:{padding:`${T(w.top)} ${T(w.right)} ${T(w.bottom)} ${T(w.left)}`,width:T(y+m*2),height:"100%",borderRadius:T(S),border:`${T(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:x}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:Ce,textAlign:Se},children:[B.text&&g(we,B.text,"text",ce!=null&&ce.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ce==null?void 0:ce.textMinHeightPx)=="number"&&ce.textMinHeightPx>0?{minHeightPx:ce.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Ce,width:"100%"},children:[a.jsx("div",{"data-controls":K&&!(ce!=null&&ce.dataMeasureAttrs)?"logoMarginTop":void 0,className:K&&!(ce!=null&&ce.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:T(F)}}),a.jsx("div",{style:{width:T(v),height:T(P)},children:((ee=B.logo)==null?void 0:ee.assetId)&&a.jsx("img",{src:B.logo.assetId,alt:((H=B.logo)==null?void 0:H.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=B.logo)==null?void 0:be.objectFit)||"contain"}})})]}),B.caption&&g(V,B.caption,"caption",{...ce!=null&&ce.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...ce!=null&&ce.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ce==null?void 0:ce.captionMinHeightPx)=="number"&&ce.captionMinHeightPx>0?{minHeightPx:ce.captionMinHeightPx}:{}})]})]},ne)},[x,M,V,y,S,P,F,v,Ce,Se,w.bottom,w.left,w.right,w.top,g,m,h,we,n,K,r]),J=s.useCallback(B=>{ue(B.maxTextPx),fe(B.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!ie){J({maxTextPx:0,maxCaptionPx:0});return}const B=me.current;if(!B)return;const ne=()=>{b.readTestimonialTextMeasure(B,J)};ne();const ce=new ResizeObserver(ne);return ce.observe(B),()=>{ce.disconnect()}},[ie,J,t,Z]);const re=ie?{textMinHeightPx:C,captionMinHeightPx:te}:void 0,he=ie?a.jsx("div",{ref:me,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,ne)=>Z(B,`measure-${ne}`,{dataMeasureAttrs:!0}))}):null,z=(B,ne)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Z(B,`card-${ne}`,re),K&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(p)})`,width:T(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ne);if(N){const B=j?q&&pe?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Et(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),he,a.jsx("div",{ref:Y,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Fe,onMouseLeave:Ee,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:ve,WebkitAnimationDuration:ve,animationPlayState:B,WebkitAnimationPlayState:B},children:Array.from({length:oe},(ne,ce)=>a.jsx("div",{ref:ce===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:T(p),paddingRight:T(p)},"aria-hidden":ce>0,children:t==null?void 0:t.map((ee,H)=>z(ee,`${ce}-${H}`))},`set-${ce}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),he,a.jsx("div",{style:{gap:T(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,ne)=>z(B,ne))})]})},Ay=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3678
3677
|
import cn from 'classnames';
|
|
3679
3678
|
import { CommonComponentProps } from '../props';
|
|
3680
3679
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -4429,7 +4428,7 @@ type TestimonialsSettings = {
|
|
|
4429
4428
|
width: 100%;
|
|
4430
4429
|
height: 100%;
|
|
4431
4430
|
}
|
|
4432
|
-
`}const Hy=3e3,Wy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:
|
|
4431
|
+
`}const Hy=3e3,Wy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=b.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:S,imageWidth:m,imageHeight:h,controlsWidth:x,controlsColor:w,controlsHoverColor:F}=e,v=c>0&&(!n||!!i),[P,M]=s.useState(0),[K,X]=s.useState(null),[j,N]=s.useState(!1),_=s.useRef(null),T=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),L=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{M(0),X(null),N(!1)},[l.length]);const Y=l[P],R=K===null?null:l[K],I=de=>{var V,ie,oe,le,ve;return{fontSettings:{fontFamily:(e==null?void 0:e[`${de}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${de}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((ie=e==null?void 0:e[`${de}FontSettings`])==null?void 0:ie.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((le=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:le.textDecoration)??"none",fontVariant:((ve=e==null?void 0:e[`${de}TextAppearance`])==null?void 0:ve.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${de}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${de}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${de}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${de}WordSpacing`])??0,color:(e==null?void 0:e[`${de}Color`])??"#000000"}},$=I("text"),G=I("caption"),O=l.length>1&&l.some(de=>{var we,V;return(((we=de.text)==null?void 0:we.length)??0)>0||(((V=de.caption)==null?void 0:V.length)??0)>0}),U=s.useRef(null),[E,f]=s.useState(0),[Q,q]=s.useState(0),pe=e.controls??{mode:"Off",icon:null},k=l.length>1,me=s.useCallback((de,we)=>!k||we===de?de:(_.current&&window.clearTimeout(_.current),X(de),N(!0),_.current=window.setTimeout(()=>{X(null),N(!1),_.current=null},300),we),[k]),C=s.useCallback(()=>{k&&M(de=>me(de,(de-1+l.length)%l.length))},[k,me,l.length]),ue=s.useCallback(()=>{k&&M(de=>me(de,(de+1)%l.length))},[k,me,l.length]);s.useEffect(()=>{if(!v||!k)return;const de=Math.max(300,Hy/c),we=window.setInterval(()=>{M(V=>me(V,(V+1)%l.length))},de);return()=>{window.clearInterval(we)}},[v,k,me,l.length,c]),s.useEffect(()=>()=>{_.current&&window.clearTimeout(_.current)},[]);const te=(de,we)=>{var ve,Fe,Ee,Ce;const V=we==null?void 0:we.textMinHeightPx,ie=we==null?void 0:we.captionMinHeightPx,oe=we==null?void 0:we.dataMeasureAttrs,le=o&&!(we!=null&&we.dataMeasureAttrs)&&!(we!=null&&we.hideControls);return a.jsxs(a.Fragment,{children:[de.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":le?"textMarginTop":void 0,className:le?`${r}-control`:void 0,style:{height:b.scalingValue(y??0,n??!1)}}),a.jsx("div",{...oe&&{"data-testimonial-measure":"text"},style:{...nn($,n),...V&&V>0?{minHeight:V}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":le?"imageMarginTop":void 0,className:le?`${r}-control`:void 0,style:{height:b.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:b.scalingValue(m??0,n??!1),height:b.scalingValue(h??0,n??!1)},children:((ve=de.image)==null?void 0:ve.assetId)&&a.jsx("img",{src:(Fe=de.image)==null?void 0:Fe.assetId,alt:((Ee=de.image)==null?void 0:Ee.name)??"",className:`${r}-icon`,style:{objectFit:((Ce=de.image)==null?void 0:Ce.objectFit)||"contain"}})})]}),de.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":le?"captionMarginTop":void 0,className:le?`${r}-control`:void 0,style:{height:b.scalingValue(S??0,n??!1)}}),a.jsx("div",{...oe?{"data-testimonial-measure":"caption"}:{},style:{...nn(G,n),...ie&&ie>0?{minHeight:ie}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Zi,{content:de.caption})})]})]})},fe=s.useCallback(de=>{f(de.maxTextPx),q(de.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!O){fe({maxTextPx:0,maxCaptionPx:0});return}const de=U.current;if(!de)return;const we=()=>{b.readTestimonialTextMeasure(de,fe)};we();const V=new ResizeObserver(we);return V.observe(de),()=>{V.disconnect()}},[O,fe,t]),!Y)return a.jsx(a.Fragment,{});const Pe=O?{textMinHeightPx:E,captionMinHeightPx:Q}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_y(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:b.scalingValue(u??0,n??!1),alignItems:T},children:[O&&a.jsx("div",{ref:U,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((de,we)=>a.jsx("div",{style:{width:"100%"},children:te(de,{dataMeasureAttrs:!0})},we))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[R&&j&&a.jsx("div",{className:Et(`${r}-fade-item-prev`,`${r}-fade-out`),children:te(R,{...Pe,hideControls:!0})}),a.jsx("div",{className:Et(`${r}-fade-item-current`,j?`${r}-fade-in`:void 0),children:te(Y,Pe)})]})]}),pe.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:b.scalingValue(x??.02,n??!1),height:b.scalingValue(x??.02,n??!1),"--arrow-hover-color":F},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:C,disabled:!k,"aria-label":"Previous testimonial",children:pe.icon&&a.jsx(mn,{url:pe.icon,fill:w,hoverFill:F,className:Et(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Et(`${r}-arrow`,`${r}-next-arrow`),style:{width:b.scalingValue(x??.02,n??!1),height:b.scalingValue(x??.02,n??!1),"--arrow-hover-color":F},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ue,disabled:!k,"aria-label":"Next testimonial",children:pe.icon&&a.jsx(mn,{url:pe.icon,fill:w,hoverFill:F,className:`${r}-arrow-img`})})})]})]})})},Oy=`import cn from 'classnames';
|
|
4433
4432
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4434
4433
|
import { CommonComponentProps } from '../props';
|
|
4435
4434
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -4925,7 +4924,7 @@ type TestimonialsSettings = {
|
|
|
4925
4924
|
icon?: string | null;
|
|
4926
4925
|
};
|
|
4927
4926
|
};
|
|
4928
|
-
`,Dy="01M46GNEM3GEJ4HQSNJYYTA45T",Lc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},zy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Dy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},By={element:Wy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:zy,sourceCode:Oy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jy(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function
|
|
4927
|
+
`,Dy="01M46GNEM3GEJ4HQSNJYYTA45T",Lc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},zy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Lc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Dy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XGNPA7232QGZAYFNSS",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},By={element:Wy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:zy,sourceCode:Oy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function jy(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pc(e){return((e==null?void 0:e.trim().length)??0)>0}function os(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function rs(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((o-t)/2,i)}}function Vy(e){return`
|
|
4929
4928
|
.${e}-wrapper {
|
|
4930
4929
|
display: grid;
|
|
4931
4930
|
align-items: start;
|
|
@@ -5302,10 +5301,10 @@ type TestimonialsSettings = {
|
|
|
5302
5301
|
left: 50%;
|
|
5303
5302
|
transform: translate(-50%, -50%);
|
|
5304
5303
|
}
|
|
5305
|
-
`}function Gy(){return Math.random()<.5?"ltr":"ttb"}function Xy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Uy(e){const t=Gy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Xy(e)})})}const Nn=500,qy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",Ky=72,Yy=50;function Qy(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Zy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Jy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function np(e){return!Array.isArray(e)||e.length===0?[]:Qy(e)?e.flatMap(t=>{const n=Zy(t);if(!n)return[];const i=Jy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ki(e){return!b.isEmbedMedia(e)&&e.type==="video"}function ev(e){const t=new Set,n=[];for(const i of e){const o=np(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function tv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ki(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function nv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i}):Ki(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Ec(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function iv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function ov({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{nv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}const rv="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",av=.004;function sv({prefix:e,closeIcon:t=rv,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,av),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function lv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N}){const v=i==="cover",M=s.useRef(null),E=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(null),R=s.useRef(0),$=s.useRef(null),I=s.useRef(!1),j=s.useRef(null),F=s.useRef(null),K=s.useRef(null),P=s.useRef(()=>{}),[h,J]=s.useState(null),[V,he]=s.useState(null),[k,ce]=s.useState("opening"),[L,me]=s.useState(0),[te,ve]=s.useState(0),[Le,de]=s.useState(null),[ue,Z]=s.useState(!1),[le,oe]=s.useState(!1),[ge,Se]=s.useState(!1),[Re,Ne]=s.useState(null),Te=s.useRef(n),Ce=s.useRef(void 0),g=t[n],Y=g?Ki(g):!1,ee=g?b.isEmbedMedia(g):!1,ae=te!==0||ue,ye=Le!==null,ne=s.useCallback(pe=>{const De=pe.currentTarget,qe=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!qe.width||!qe.height||Ne(qe)},[]);s.useEffect(()=>{q.current=V},[V]),s.useEffect(()=>{const pe=M.current;if(!pe)return;const De=()=>he(Ec(pe));De();const qe=new ResizeObserver(De);return qe.observe(pe),()=>qe.disconnect()},[]);const B=s.useCallback(()=>{j.current!==null&&(window.clearTimeout(j.current),j.current=null)},[]),G=s.useCallback(()=>{const pe=F.current;F.current=null,B(),$.current=null,I.current=!1,de(null),Z(!1),ve(0),R.current=0,oe(!1),T.current=!1,_.current=0,W.current="none",pe===1?u():pe===-1&&d()},[B,u,d]),z=s.useCallback(()=>{B(),F.current=null,$.current=null,I.current=!1,de(null),Z(!1),ve(0),R.current=0},[B]),ie=s.useCallback(()=>{B(),j.current=window.setTimeout(()=>{F.current!==null&&G()},Nn+32)},[B,G]),H=s.useCallback((pe,De)=>{var bt;const qe=((bt=q.current)==null?void 0:bt.width)??0;if(B(),$.current=pe,de(pe),I.current=!0,Z(!0),De){F.current=pe;const yt=-pe*qe;R.current=yt,ve(yt),ie();return}R.current=0,ve(0),j.current=window.setTimeout(()=>{j.current=null,z()},Nn+32)},[B,z,ie]),be=s.useCallback(pe=>{if(!(t.length<=1)){if(I.current){if(F.current===pe){K.current=pe,G();return}z()}B(),$.current=pe,de(pe),I.current=!1,Z(!1),R.current=0,ve(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{H(pe,!0)})})}},[t.length,H,G,z,B]);P.current=be;const re=s.useCallback(pe=>{pe.propertyName!=="transform"||!I.current||F.current!==null&&G()},[G]),Q=s.useCallback(()=>{const pe=E.current;if(!pe)return;const De=Ec(pe);!De.width||!De.height||J(De)},[]);s.useEffect(()=>{Q();const pe=E.current;if(!pe)return;const De=new ResizeObserver(()=>Q());return De.observe(pe),()=>De.disconnect()},[Q]),s.useEffect(()=>{k==="opening"&&h&&ce("open")},[k,h]),s.useEffect(()=>{if(k!=="closing")return;const pe=setTimeout(()=>c(),Nn);return()=>clearTimeout(pe)},[k,c]),s.useEffect(()=>()=>{B()},[B]),s.useLayoutEffect(()=>{Te.current===n&&Ce.current===(g==null?void 0:g.assetId)||(B(),F.current=null,de(null),me(0),ve(0),Z(!1),Se(!1),oe(!1),Ne(null),D.current=0,_.current=0,W.current="none",T.current=!1,I.current=!1,R.current=0,$.current=null,X.current=null,C.current=!1,Te.current=n,Ce.current=g==null?void 0:g.assetId)},[n,g==null?void 0:g.assetId,B]),s.useLayoutEffect(()=>{const pe=K.current;pe!==null&&(K.current=null,requestAnimationFrame(()=>{P.current(pe)}))},[n,g==null?void 0:g.assetId]),s.useEffect(()=>{if(k!=="open")return;let pe=null;const De=()=>{pe&&(document.removeEventListener("click",pe,!0),pe=null)},qe=()=>{De(),pe=wt=>{wt.stopPropagation(),wt.preventDefault(),De()},document.addEventListener("click",pe,!0)},bt=wt=>{const nt=wt<0?1:-1;if(Math.abs(wt)>Yy&&t.length>1){H(nt,!0);return}H(nt,!1)},yt=wt=>{if(wt.touches.length!==1||I.current)return;const nt=wt.touches[0];C.current=!0,X.current={x:nt.clientX,y:nt.clientY},W.current="none",_.current=0,T.current=!1},Rt=wt=>{if(!X.current||wt.touches.length!==1||I.current)return;const nt=wt.touches[0],Nt=nt.clientX-X.current.x,jt=nt.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Nt)<10&&Math.abs(jt)<10)return;if(Math.abs(Nt)>Math.abs(jt)){if(t.length<=1)return;W.current="horizontal"}else if(jt>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,oe(!0),_.current=Nt;const $e=Nt<0?1:-1;$.current!==$e&&($.current=$e,de($e)),R.current=Nt,ve(Nt),wt.preventDefault();return}W.current==="vertical"&&(T.current=!0,oe(!0),D.current=jt,me(jt),wt.preventDefault())},ct=()=>{if(!X.current)return;const wt=W.current,nt=T.current;if(nt&&wt==="horizontal")bt(_.current),qe();else if(nt&&wt==="vertical")if(D.current>Ky){const jt=window.innerHeight;D.current=jt,Se(!0),me(jt),ce("closing")}else D.current=0,me(0),qe();else wt==="horizontal"&&Math.abs(_.current)>0&&(bt(_.current),qe());X.current=null,W.current="none",_.current=0,T.current=!1,oe(!1)};return document.addEventListener("touchstart",yt,{passive:!0}),document.addEventListener("touchmove",Rt,{passive:!1}),document.addEventListener("touchend",ct),document.addEventListener("touchcancel",ct),()=>{document.removeEventListener("touchstart",yt),document.removeEventListener("touchmove",Rt),document.removeEventListener("touchend",ct),document.removeEventListener("touchcancel",ct),De()}},[k,t.length,H]),s.useEffect(()=>{const pe=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),k!=="closing"&&ce("closing"))};return window.addEventListener("keydown",pe,!0),()=>window.removeEventListener("keydown",pe,!0)},[k]);const Pe=()=>{k!=="closing"&&ce("closing")},Ae=k==="open",He=k==="closing",Xe=L>0?Math.max(0,1-L/500):1,Ue=L>0?Math.max(.35,1-L/500):1,Je=ee&&g?{width:b.getEmbedAspect(g),height:1}:Re,je=h?v?h:iv(h,Je):null,xe=pe=>{if(pe.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientY-De.top,bt=Math.min(52,De.height*.2);if(!(qe>De.height-bt)){if(pe.clientX-De.left<De.width/2){be(-1);return}be(1)}},Ie=pe=>{if(t.length<=1)return;const De=je??pe.currentTarget.getBoundingClientRect(),qe=pe.clientX-De.left,bt=pe.clientY-De.top,yt=Math.min(52,De.height*.2);if(bt>De.height-yt){pe.currentTarget.style.cursor="default";return}pe.currentTarget.style.cursor=qe<De.width/2?"w-resize":"e-resize"},ze={position:"fixed",top:V==null?void 0:V.top,left:V==null?void 0:V.left,width:V==null?void 0:V.width,height:V==null?void 0:V.height,zIndex:9998},Ze=v?"cover":"contain",tt=te!==0||L>0?`translate(${te}px, ${L}px)`:void 0,ot=le&&!ue?"none":ue?`transform ${Nn}ms ${hi}`:ge?`transform ${Nn}ms ${hi}, opacity ${Nn}ms ${hi}`:k==="opening"||He?`opacity ${Nn}ms ${hi}`:"none",lt={...ze,transform:tt,opacity:L>0?Ue:k==="opening"||He?0:1,transition:ot,pointerEvents:"none"},it={position:"absolute",top:((je==null?void 0:je.top)??0)-((V==null?void 0:V.top)??0),left:((je==null?void 0:je.left)??0)-((V==null?void 0:V.left)??0),width:je==null?void 0:je.width,height:je==null?void 0:je.height,objectFit:Ze,pointerEvents:(Y||ee)&&Ae&&!ae?"auto":"none",touchAction:(Y||ee)&&Ae?"none":void 0},xt=(V==null?void 0:V.width)??0,rt=ye?(n+Le+t.length)%t.length:null,_e=rt!==null?t[rt]:null,We={...ze,transform:ye?`translateX(${Le*xt+te}px)`:void 0,opacity:1,transition:ue?`transform ${Nn}ms ${hi}`:"none",pointerEvents:"none"},vt={position:"absolute",top:((h==null?void 0:h.top)??0)-((V==null?void 0:V.top)??0),left:((h==null?void 0:h.left)??0)-((V==null?void 0:V.left)??0),width:h==null?void 0:h.width,height:h==null?void 0:h.height,objectFit:Ze,pointerEvents:"none"},Ve=ee&&je?Math.min(52,je.height*.2):0,Ke=je?{position:"fixed",top:je.top,height:je.height-Ve,width:je.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:Pe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Ae?Xe:0,transition:le?"none":`opacity ${Nn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:E,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ae?1:0,transition:`opacity ${Nn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),h&&V&&_e&&a.jsx("div",{style:We,onTransitionEnd:re,children:b.isEmbedMedia(_e)?a.jsx("img",{src:_e.thumbnail,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`):Ki(_e)?a.jsx("video",{src:_e.assetId,muted:!0,playsInline:!0,preload:"auto",style:vt},`neighbor-${rt}-${_e.assetId}`):a.jsx("img",{src:_e.assetId,alt:_e.name,style:vt},`neighbor-${rt}-${_e.assetId}`)}),h&&V&&g&&a.jsx("div",{style:lt,onTransitionEnd:re,children:ee?a.jsx(b.EmbedMediaFrame,{media:g,mode:"player",fit:v?"cover":"contain",lazy:!1,interactive:Ae&&!ae,style:it},`${n}-${g.assetId}`):Y?a.jsx(ov,{src:g.assetId,phase:k,mediaRef:U,mediaStyle:it,onLoadedMetadata:ne,onClick:xe,onMouseMove:Ie},`${n}-${g.assetId}`):a.jsx("img",{ref:U,src:g.assetId,alt:g.name,onLoad:ne,style:it},`${n}-${g.assetId}`)}),Ae&&Ke&&t.length>1&&!Y&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ke,left:je.left,cursor:"w-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(-1)}}),a.jsx("div",{style:{...Ke,left:je.left+je.width/2,cursor:"e-resize",pointerEvents:le?"none":"auto"},onClick:pe=>{if(C.current){C.current=!1;return}pe.stopPropagation(),be(1)}})]}),a.jsx(sv,{prefix:e,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,iconMarginRight:w,contentMarginTop:N,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Ae,onClose:Pe})]})}function cv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function dv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=b.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:m,entriesCount:f,lightbox:S,imageDisplay:w,imageCorners:N,lightboxImageDisplay:v,slider:M,sliderTiming:E,direction:U,transition:X,titleMarginTop:D,subtitleMarginTop:_,titleColor:W,subtitleColor:T,lightboxCounterColor:C,titleFontFamily:q,titleFontSettings:R,titleFontSize:$,titleLineHeight:I,titleLetterSpacing:j,titleWordSpacing:F,titleTextAppearance:K,subtitleFontFamily:P,subtitleFontSettings:h,subtitleFontSize:J,subtitleLineHeight:V,subtitleLetterSpacing:he,subtitleWordSpacing:k,subtitleTextAppearance:ce,lightboxCounterFontFamily:L,lightboxCounterFontSettings:me,lightboxCounterFontSize:te,lightboxCounterLineHeight:ve,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:ue,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Re,showText:Ne="always",alignEntries:Te="off",align:Ce="top"}=e,g={fontSettings:{fontFamily:q,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:$??.01,lineHeight:I,letterSpacing:j??0,wordSpacing:F??0,textAppearance:K,color:W},ee={...pn(nn(g,n))},ae={fontSettings:{fontFamily:P,fontWeight:(h==null?void 0:h.fontWeight)??400,fontStyle:(h==null?void 0:h.fontStyle)??"normal"},fontSize:J??.01,lineHeight:V,letterSpacing:he??0,wordSpacing:k??0,textAppearance:ce,color:T},ne={...pn(nn(ae,n))},B={fontSettings:{fontFamily:L,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:te??.01,lineHeight:ve,letterSpacing:Le??0,wordSpacing:de??0,textAppearance:ue,color:C},z={...pn(nn(B,n)),...rs(te,ve,u,n)},ie=os($,I,`${u}-item-title`,`${u}-text-tight-leading`),H=os(J,V,`${u}-item-subtitle`,`${u}-text-tight-leading`),be=rs($,I,u,n),re=rs(J,V,u,n),Q=os(te,ve,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Pe=b.buildColorVars(u,{titleColor:W,subtitleColor:T,lightboxCounterColor:C},uv,pv),Xe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Ne==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Ue=f===0?1/0:f,Je=(t??[]).slice(0,Ue),je=s.useMemo(()=>S==="on"?ev(Je):[],[Je,S]),xe=y.entryWidth??.2,Ie=(w==null?void 0:w.display)==="cover",ze=(w==null?void 0:w.ratioValue)??"1:1",Ze=(w==null?void 0:w.reversed)??!1,[tt,ot]=ze.split(":").map(Number),xt=`${Ze?ot:tt} / ${Ze?tt:ot}`,rt=y.columnsCount,_e=b.scalingValue(xe??0,n),We=_e,vt=!Ie&&M!=="off",Ve=Je.length%rt||rt,Ke=Ve<rt&&Je.length>0,pe=Je.length-Ve,De=Ke?Math.floor((rt-Ve)/2)+1:1,qe=N?b.scalingValue(N,n):void 0,bt={width:We,...Ie?{aspectRatio:xt,height:"auto",overflow:"hidden"}:{height:"auto"},...qe?{borderRadius:qe,overflow:"hidden"}:{}},yt=`${u}-item-image-wrapper${vt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Rt=p==="d"||p==="e"||p==="f",ct=Te==="on",wt=`calc(${b.scalingValue(xe??0,n)} * (${x} / 100))`,nt=b.scalingValue(xe*x/100,n),Nt=Ie?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...qe?{borderRadius:qe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...qe?{borderRadius:qe}:{}},[jt,$e]=s.useState(0),Ge=s.useRef(null),ht=X==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const Qe=Ge.current;if(!Qe)return;const at=new ResizeObserver(It=>{$e(Math.round(It[0].contentRect.width))});return at.observe(Qe),()=>at.disconnect()},[]);const Lt=(()=>{const Qe={...Pe},at=Ge.current?getComputedStyle(Ge.current).getPropertyValue("--cntrl-article-width").trim():"";return at&&(Qe["--cntrl-article-width"]=at),Qe})(),[$t,mt]=s.useState(!1),[_t,Ot]=s.useState([]),[zt,Ee]=s.useState(0),dt=S==="on"&&(!n||i),ut=(Qe,at)=>{n&&!i||S!=="off"&&(Ot(Qe),Ee(at),mt(!0))};s.useEffect(()=>{if(!$t||S!=="on"||typeof document>"u")return;const Qe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Qe}},[$t,S]),s.useEffect(()=>{!n||i||mt(!1)},[n,i]);const kt=s.useMemo(()=>Vy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),S==="on"&&a.jsx(tv,{mediaList:je}),a.jsx("div",{style:Pe,children:a.jsx("div",{ref:Ge,className:`${u}-wrapper ${u}-type-${p}${ct?` ${u}-align-entries`:""} ${u}-image-align-${Ce} ${Xe}`.trim(),style:{gridTemplateColumns:`repeat(${rt}, ${_e})`,rowGap:ct?0:b.scalingValue(m??0,n),columnGap:b.scalingValue(y.horizontalGap??0,n),width:b.scalingValue(y.wrapperWidth??0,n),...ct?{[`--${u}-align-entries-row-gap`]:b.scalingValue(m??0,n)}:{}},children:Je.map((Qe,at)=>{var ft;const It=Mc(Qe.title),At=Mc(Qe.subtitle),pt=S==="off"&&((ft=Qe.link)!=null&&ft.value)?Qe.link:void 0,Ut=Math.floor(at/rt)===Math.ceil(Je.length/rt)-1,qt=Ke&&at>=pe?`${De+(at-pe)}`:void 0,Dt=Rt?a.jsxs("div",{className:`${u}-item-text-block`,children:[It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Vt=ct?a.jsxs("div",{className:`${u}-item-title-row`,children:[!Rt&&a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),It&&a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),Rt&&It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(D??0,n),width:nt}})]}):null,Gt=ct?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Rt&&a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),At&&a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle}),Rt&&At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(_??0,n),width:nt}})]}):null,Bt=a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:[Vt,Gt]}),Yt=np(Qe.gallery),O=Yt.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),Me=a.jsx("div",{className:yt,style:bt,children:Yt.length===0?null:M==="off"?(()=>{const{displayMedia:Tt,lightboxMedia:et}=Yt[0],Mt=et?O.findIndex(Ct=>Ct.assetId===et.assetId):-1;return a.jsx(Pc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Mt>=0?()=>ut(O,Mt):void 0})})():a.jsxs(a.Fragment,{children:[vt&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Yt.map(({displayMedia:Tt})=>b.isEmbedMedia(Tt)?a.jsx("div",{style:{aspectRatio:`${b.getEmbedAspect(Tt)}`}},`sizer-${Tt.assetId}`):Ki(Tt)?a.jsx("video",{src:Tt.assetId,muted:!0,playsInline:!0},`sizer-${Tt.assetId}`):a.jsx("img",{src:Tt.assetId,alt:""},`sizer-${Tt.assetId}`))}),a.jsx(kl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:E*1e3,width:"100%",height:"100%",speed:qy,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ht},onMoved:Tt=>{U!=="random"||X==="fade"||Uy(Tt)},children:Yt.map(({displayMedia:Tt,lightboxMedia:et},Mt)=>{const Ct=et?O.findIndex(Ht=>Ht.assetId===et.assetId):-1;return a.jsx(Al,{children:a.jsx(Pc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Nt,onMediaClick:dt&&Ct>=0?()=>ut(O,Ct):void 0})},Mt)})},`${X}-${xe}-${U}-${E}-${jt}-${c}`)]})}),Fe=Rt?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(D??0,n):0,width:nt}}),a.jsx("p",{className:ie,style:{width:wt,...ee,...be},children:Qe.title}),a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(_??0,n):0,width:nt}}),a.jsx("p",{className:H,style:{width:wt,...ne,...re},children:Qe.subtitle})]}),Oe=pt?a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:Me}):a.jsx("a",{className:`${u}-item-image-link`,children:Me});return a.jsx("div",{className:`${u}-item`.trim(),style:qt&&!ct?{gridColumn:qt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${ct&&Ut?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${_e} * (${x} / 100))`:_e,...qt&&ct?{gridColumn:qt}:{}},children:ct?a.jsx(a.Fragment,{children:Rt?a.jsxs(a.Fragment,{children:[Bt,Oe]}):a.jsxs(a.Fragment,{children:[Oe,Bt]})}):pt?a.jsxs(a.Fragment,{children:[a.jsxs(b.LinkWrapper,{link:pt,className:`${u}-item-image-link`,children:[Dt,Me]}),!Rt&&a.jsx(b.LinkWrapper,{link:pt,className:`${u}-item-text-link`,children:Fe})]}):a.jsxs(a.Fragment,{children:[Dt,Me,Fe]})})},at)})})}),(!n||i)&&$t&&typeof document<"u"&&S==="on"&&(()=>{const Qe=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Lt,"data-selection":"none",children:a.jsx(lv,{prefix:u,items:_t,index:zt,imageDisplay:cv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:Z,closeIconMaxWidth:le,closeIconColor:oe,closeIconHoverColor:ge,iconMarginRight:Se,contentMarginTop:Re,onClose:()=>mt(!1),onPrev:()=>Ee(at=>(at-1+_t.length)%_t.length),onNext:()=>Ee(at=>(at+1)%_t.length),counterClassName:Q,counterStyle:z})}),Qe)})()]})}const uv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},pv=["hover","focus","filled","success","error"],mv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
5304
|
+
`}function Gy(){return Math.random()<.5?"ltr":"ttb"}function Xy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Uy(e){const t=Gy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Xy(e)})})}const Nn=500,qy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",Ky=72,Yy=50;function Qy(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Zy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Jy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function np(e){return!Array.isArray(e)||e.length===0?[]:Qy(e)?e.flatMap(t=>{const n=Zy(t);if(!n)return[];const i=Jy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ki(e){return!b.isEmbedMedia(e)&&e.type==="video"}function ev(e){const t=new Set,n=[];for(const i of e){const o=np(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function tv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ki(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function nv(e){e.pause(),e.removeAttribute("src"),e.load()}function Mc({media:e,className:t,style:n,hasLightbox:i,onMediaClick:o}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,fit:n.objectFit==="contain"?"contain":"cover",silentLoop:i,className:t,style:{...n,cursor:o?"pointer":"default"},onClick:o}):Ki(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Ec(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function iv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function ov({src:e,mediaRef:t,mediaStyle:n,onLoadedMetadata:i}){return s.useEffect(()=>{const o=t.current;if(o)return()=>{nv(o)}},[e,t]),a.jsx("video",{ref:t,src:e,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedMetadata:i,style:n})}const rv="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",av=.004;function sv({prefix:e,closeIcon:t=rv,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const S=b.scalingValue(n,c),m=b.scalingValue(r,c),h=b.scalingValue(l,c),x=b.scalingValue(Math.max(l,av),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:h,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:x,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:S,height:S,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function lv({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,closeIcon:S,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:x,iconMarginRight:w,contentMarginTop:F}){const v=i==="cover",P=s.useRef(null),M=s.useRef(null),K=s.useRef(null),X=s.useRef(null),j=s.useRef(0),N=s.useRef(0),_=s.useRef("none"),T=s.useRef(!1),L=s.useRef(!1),Y=s.useRef(null),R=s.useRef(0),I=s.useRef(null),$=s.useRef(!1),G=s.useRef(null),O=s.useRef(null),U=s.useRef(null),E=s.useRef(()=>{}),[f,Q]=s.useState(null),[q,pe]=s.useState(null),[k,me]=s.useState("opening"),[C,ue]=s.useState(0),[te,fe]=s.useState(0),[Pe,de]=s.useState(null),[we,V]=s.useState(!1),[ie,oe]=s.useState(!1),[le,ve]=s.useState(!1),[Fe,Ee]=s.useState(null),Ce=s.useRef(n),Se=s.useRef(void 0),g=t[n],Z=g?Ki(g):!1,J=g?b.isEmbedMedia(g):!1,re=Pe!==null,he=s.useCallback(He=>{const Ae=He.currentTarget,Be=Ae instanceof HTMLVideoElement?{width:Ae.videoWidth,height:Ae.videoHeight}:{width:Ae.naturalWidth,height:Ae.naturalHeight};!Be.width||!Be.height||Ee(Be)},[]);s.useEffect(()=>{Y.current=q},[q]),s.useEffect(()=>{const He=P.current;if(!He)return;const Ae=()=>pe(Ec(He));Ae();const Be=new ResizeObserver(Ae);return Be.observe(He),()=>Be.disconnect()},[]);const z=s.useCallback(()=>{G.current!==null&&(window.clearTimeout(G.current),G.current=null)},[]),B=s.useCallback(()=>{const He=O.current;O.current=null,z(),I.current=null,$.current=!1,de(null),V(!1),fe(0),R.current=0,oe(!1),T.current=!1,N.current=0,_.current="none",He===1?u():He===-1&&d()},[z,u,d]),ne=s.useCallback(()=>{z(),O.current=null,I.current=null,$.current=!1,de(null),V(!1),fe(0),R.current=0},[z]),ce=s.useCallback(()=>{z(),G.current=window.setTimeout(()=>{O.current!==null&&B()},Nn+32)},[z,B]),ee=s.useCallback((He,Ae)=>{var Ie;const Be=((Ie=Y.current)==null?void 0:Ie.width)??0;if(z(),I.current=He,de(He),$.current=!0,V(!0),Ae){O.current=He;const mt=-He*Be;R.current=mt,fe(mt),ce();return}R.current=0,fe(0),G.current=window.setTimeout(()=>{G.current=null,ne()},Nn+32)},[z,ne,ce]),H=s.useCallback(He=>{if(!(t.length<=1)){if($.current){if(O.current===He){U.current=He,B();return}ne()}z(),I.current=He,de(He),$.current=!1,V(!1),R.current=0,fe(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ee(He,!0)})})}},[t.length,ee,B,ne,z]);E.current=H;const be=s.useCallback(He=>{He.propertyName!=="transform"||!$.current||O.current!==null&&B()},[B]),ae=s.useCallback(()=>{const He=M.current;if(!He)return;const Ae=Ec(He);!Ae.width||!Ae.height||Q(Ae)},[]);s.useEffect(()=>{ae();const He=M.current;if(!He)return;const Ae=new ResizeObserver(()=>ae());return Ae.observe(He),()=>Ae.disconnect()},[ae]),s.useEffect(()=>{k==="opening"&&f&&me("open")},[k,f]),s.useEffect(()=>{if(k!=="closing")return;const He=setTimeout(()=>c(),Nn);return()=>clearTimeout(He)},[k,c]),s.useEffect(()=>()=>{z()},[z]),s.useLayoutEffect(()=>{Ce.current===n&&Se.current===(g==null?void 0:g.assetId)||(z(),O.current=null,de(null),ue(0),fe(0),V(!1),ve(!1),oe(!1),Ee(null),j.current=0,N.current=0,_.current="none",T.current=!1,$.current=!1,R.current=0,I.current=null,X.current=null,L.current=!1,Ce.current=n,Se.current=g==null?void 0:g.assetId)},[n,g==null?void 0:g.assetId,z]),s.useLayoutEffect(()=>{const He=U.current;He!==null&&(U.current=null,requestAnimationFrame(()=>{E.current(He)}))},[n,g==null?void 0:g.assetId]),s.useEffect(()=>{if(k!=="open")return;let He=null;const Ae=()=>{He&&(document.removeEventListener("click",He,!0),He=null)},Be=()=>{Ae(),He=rt=>{rt.stopPropagation(),rt.preventDefault(),Ae()},document.addEventListener("click",He,!0)},Ie=rt=>{const St=rt<0?1:-1;if(Math.abs(rt)>Yy&&t.length>1){ee(St,!0);return}ee(St,!1)},mt=rt=>{if(rt.touches.length!==1||$.current)return;const St=rt.touches[0];L.current=!0,X.current={x:St.clientX,y:St.clientY},_.current="none",N.current=0,T.current=!1},ot=rt=>{if(!X.current||rt.touches.length!==1||$.current)return;const St=rt.touches[0],nt=St.clientX-X.current.x,Rt=St.clientY-X.current.y;if(_.current==="none"){if(Math.abs(nt)<10&&Math.abs(Rt)<10)return;if(Math.abs(nt)>Math.abs(Rt)){if(t.length<=1)return;_.current="horizontal"}else if(Rt>0)_.current="vertical";else return}if(_.current==="horizontal"){T.current=!0,oe(!0),N.current=nt;const ht=nt<0?1:-1;I.current!==ht&&(I.current=ht,de(ht)),R.current=nt,fe(nt),rt.preventDefault();return}_.current==="vertical"&&(T.current=!0,oe(!0),j.current=Rt,ue(Rt),rt.preventDefault())},Ct=()=>{if(!X.current)return;const rt=_.current,St=T.current;if(St&&rt==="horizontal")Ie(N.current),Be();else if(St&&rt==="vertical")if(j.current>Ky){const Rt=window.innerHeight;j.current=Rt,ve(!0),ue(Rt),me("closing")}else j.current=0,ue(0),Be();else rt==="horizontal"&&Math.abs(N.current)>0&&(Ie(N.current),Be());X.current=null,_.current="none",N.current=0,T.current=!1,oe(!1)};return document.addEventListener("touchstart",mt,{passive:!0}),document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",Ct),document.addEventListener("touchcancel",Ct),()=>{document.removeEventListener("touchstart",mt),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",Ct),document.removeEventListener("touchcancel",Ct),Ae()}},[k,t.length,ee]),s.useEffect(()=>{const He=Ae=>{Ae.key==="Escape"&&(Ae.preventDefault(),Ae.stopPropagation(),k!=="closing"&&me("closing"))};return window.addEventListener("keydown",He,!0),()=>window.removeEventListener("keydown",He,!0)},[k]);const W=()=>{k!=="closing"&&me("closing")},ke=k==="open",ze=k==="closing",Xe=C>0?Math.max(0,1-C/500):1,Ue=C>0?Math.max(.35,1-C/500):1,Qe=J&&g?{width:b.getEmbedAspect(g),height:1}:Fe,We=f?v?f:iv(f,Qe):null,it={position:"fixed",top:q==null?void 0:q.top,left:q==null?void 0:q.left,width:q==null?void 0:q.width,height:q==null?void 0:q.height,zIndex:9998},ye=v?"cover":"contain",Te=te!==0||C>0?`translate(${te}px, ${C}px)`:void 0,Ve=ie&&!we?"none":we?`transform ${Nn}ms ${hi}`:le?`transform ${Nn}ms ${hi}, opacity ${Nn}ms ${hi}`:k==="opening"||ze?`opacity ${Nn}ms ${hi}`:"none",Ze={...it,transform:Te,opacity:C>0?Ue:k==="opening"||ze?0:1,transition:Ve,pointerEvents:"none"},et={position:"absolute",top:((We==null?void 0:We.top)??0)-((q==null?void 0:q.top)??0),left:((We==null?void 0:We.left)??0)-((q==null?void 0:q.left)??0),width:We==null?void 0:We.width,height:We==null?void 0:We.height,objectFit:ye,pointerEvents:"none"},at=(q==null?void 0:q.width)??0,tt=re?(n+Pe+t.length)%t.length:null,Ye=tt!==null?t[tt]:null,xt={...it,transform:re?`translateX(${Pe*at+te}px)`:void 0,opacity:1,transition:we?`transform ${Nn}ms ${hi}`:"none",pointerEvents:"none"},pt={position:"absolute",top:((f==null?void 0:f.top)??0)-((q==null?void 0:q.top)??0),left:((f==null?void 0:f.left)??0)-((q==null?void 0:q.left)??0),width:f==null?void 0:f.width,height:f==null?void 0:f.height,objectFit:ye,pointerEvents:"none"},De=J&&g&&b.getEmbedPlayback(g).controls&&We?Math.min(52,We.height*.2):0,_e=We?{position:"fixed",top:We.top,height:We.height-De,width:We.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:P,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:k==="open"?"none":void 0},onClick:W,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:ke?Xe:0,transition:ie?"none":`opacity ${Nn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:M,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ke?1:0,transition:`opacity ${Nn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:M,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:ke?1:0,transition:`opacity ${Nn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),f&&q&&Ye&&a.jsx("div",{style:xt,onTransitionEnd:be,children:b.isEmbedMedia(Ye)?a.jsx("img",{src:Ye.thumbnail,alt:Ye.name,style:pt},`neighbor-${tt}-${Ye.assetId}`):Ki(Ye)?a.jsx("video",{src:Ye.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",style:pt},`neighbor-${tt}-${Ye.assetId}`):a.jsx("img",{src:Ye.assetId,alt:Ye.name,style:pt},`neighbor-${tt}-${Ye.assetId}`)}),f&&q&&g&&a.jsx("div",{style:Ze,onTransitionEnd:be,children:J?a.jsx(b.EmbedMediaFrame,{media:g,fit:v?"cover":"contain",lazy:!1,startsAtOnce:!0,style:et},`${n}-${g.assetId}`):Z?a.jsx(ov,{src:g.assetId,mediaRef:K,mediaStyle:et,onLoadedMetadata:he},`${n}-${g.assetId}`):a.jsx("img",{ref:K,src:g.assetId,alt:g.name,onLoad:he,style:et},`${n}-${g.assetId}`)}),ke&&_e&&t.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{..._e,left:We.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:He=>{if(L.current){L.current=!1;return}He.stopPropagation(),H(-1)}}),a.jsx("div",{style:{..._e,left:We.left+We.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:He=>{if(L.current){L.current=!1;return}He.stopPropagation(),H(1)}})]}),a.jsx(sv,{prefix:e,closeIcon:S,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:x,iconMarginRight:w,contentMarginTop:F,isEditor:o,isPreviewMode:r,isEditMode:l,visible:ke,onClose:W})]})}function cv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function dv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=b.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:S=100,verticalGap:m,entriesCount:h,lightbox:x,imageDisplay:w,imageCorners:F,lightboxImageDisplay:v,slider:P,sliderTiming:M,direction:K,transition:X,titleMarginTop:j,subtitleMarginTop:N,titleColor:_,subtitleColor:T,lightboxCounterColor:L,titleFontFamily:Y,titleFontSettings:R,titleFontSize:I,titleLineHeight:$,titleLetterSpacing:G,titleWordSpacing:O,titleTextAppearance:U,subtitleFontFamily:E,subtitleFontSettings:f,subtitleFontSize:Q,subtitleLineHeight:q,subtitleLetterSpacing:pe,subtitleWordSpacing:k,subtitleTextAppearance:me,lightboxCounterFontFamily:C,lightboxCounterFontSettings:ue,lightboxCounterFontSize:te,lightboxCounterLineHeight:fe,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:de,lightboxCounterTextAppearance:we,closeIcon:V,closeIconMaxWidth:ie,closeIconColor:oe,closeIconHoverColor:le,iconMarginRight:ve,contentMarginTop:Fe,showText:Ee="always",alignEntries:Ce="off",align:Se="top"}=e,g={fontSettings:{fontFamily:Y,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:I??.01,lineHeight:$,letterSpacing:G??0,wordSpacing:O??0,textAppearance:U,color:_},J={...pn(nn(g,n))},re={fontSettings:{fontFamily:E,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:q,letterSpacing:pe??0,wordSpacing:k??0,textAppearance:me,color:T},z={...pn(nn(re,n))},B={fontSettings:{fontFamily:C,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:te??.01,lineHeight:fe,letterSpacing:Pe??0,wordSpacing:de??0,textAppearance:we,color:L},ce={...pn(nn(B,n)),...rs(te,fe,u,n)},ee=os(I,$,`${u}-item-title`,`${u}-text-tight-leading`),H=os(Q,q,`${u}-item-subtitle`,`${u}-text-tight-leading`),be=rs(I,$,u,n),ae=rs(Q,q,u,n),W=os(te,fe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ke=b.buildColorVars(u,{titleColor:_,subtitleColor:T,lightboxCounterColor:L},uv,pv),Ue=`${l&&l!=="default"?`${u}-state-${l}`:""}${Ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Qe=h===0?1/0:h,We=(t??[]).slice(0,Qe),it=s.useMemo(()=>x==="on"?ev(We):[],[We,x]),ye=y.entryWidth??.2,Te=(w==null?void 0:w.display)==="cover",Ve=(w==null?void 0:w.ratioValue)??"1:1",Ze=(w==null?void 0:w.reversed)??!1,[et,at]=Ve.split(":").map(Number),xt=`${Ze?at:et} / ${Ze?et:at}`,pt=y.columnsCount,De=b.scalingValue(ye??0,n),_e=De,He=!Te&&P!=="off",Ae=We.length%pt||pt,Be=Ae<pt&&We.length>0,Ie=We.length-Ae,mt=Be?Math.floor((pt-Ae)/2)+1:1,ot=F?b.scalingValue(F,n):void 0,Ct={width:_e,...Te?{aspectRatio:xt,height:"auto",overflow:"hidden"}:{height:"auto"},...ot?{borderRadius:ot,overflow:"hidden"}:{}},rt=`${u}-item-image-wrapper${He?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),St=p==="d"||p==="e"||p==="f",nt=Ce==="on",Rt=`calc(${b.scalingValue(ye??0,n)} * (${S} / 100))`,ht=b.scalingValue(ye*S/100,n),Vt=Te?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ot?{borderRadius:ot}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ot?{borderRadius:ot}:{}},[Zt,$e]=s.useState(0),Ge=s.useRef(null),ft=X==="fade"||K==="horizontal"?"ltr":K==="vertical"?"ttb":"ltr";s.useEffect(()=>{const Ke=Ge.current;if(!Ke)return;const st=new ResizeObserver(It=>{$e(Math.round(It[0].contentRect.width))});return st.observe(Ke),()=>st.disconnect()},[]);const Lt=(()=>{const Ke={...ke},st=Ge.current?getComputedStyle(Ge.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Ke["--cntrl-article-width"]=st),Ke})(),[wt,vt]=s.useState(!1),[Nt,Wt]=s.useState([]),[Dt,Me]=s.useState(0),ct=x==="on"&&(!n||i),dt=(Ke,st)=>{n&&!i||x!=="off"&&(Wt(Ke),Me(st),vt(!0))};s.useEffect(()=>{if(!wt||x!=="on"||typeof document>"u")return;const Ke=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ke}},[wt,x]),s.useEffect(()=>{!n||i||vt(!1)},[n,i]);const kt=s.useMemo(()=>Vy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kt}}),x==="on"&&a.jsx(tv,{mediaList:it}),a.jsx("div",{style:ke,children:a.jsx("div",{ref:Ge,className:`${u}-wrapper ${u}-type-${p}${nt?` ${u}-align-entries`:""} ${u}-image-align-${Se} ${Ue}`.trim(),style:{gridTemplateColumns:`repeat(${pt}, ${De})`,rowGap:nt?0:b.scalingValue(m??0,n),columnGap:b.scalingValue(y.horizontalGap??0,n),width:b.scalingValue(y.wrapperWidth??0,n),...nt?{[`--${u}-align-entries-row-gap`]:b.scalingValue(m??0,n)}:{}},children:We.map((Ke,st)=>{var yt;const It=Pc(Ke.title),At=Pc(Ke.subtitle),ut=x==="off"&&((yt=Ke.link)!=null&&yt.value)?Ke.link:void 0,Gt=Math.floor(st/pt)===Math.ceil(We.length/pt)-1,Ut=Be&&st>=Ie?`${mt+(st-Ie)}`:void 0,Ot=St?a.jsxs("div",{className:`${u}-item-text-block`,children:[It&&a.jsx("p",{className:ee,style:{width:Rt,...J,...be},children:Ke.title}),It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(j??0,n),width:ht}}),At&&a.jsx("p",{className:H,style:{width:Rt,...z,...ae},children:Ke.subtitle}),At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(N??0,n),width:ht}})]}):null,Bt=nt?a.jsxs("div",{className:`${u}-item-title-row`,children:[!St&&a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(j??0,n):0,width:ht}}),It&&a.jsx("p",{className:ee,style:{width:Rt,...J,...be},children:Ke.title}),St&&It&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(j??0,n),width:ht}})]}):null,Xt=nt?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!St&&a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(N??0,n):0,width:ht}}),At&&a.jsx("p",{className:H,style:{width:Rt,...z,...ae},children:Ke.subtitle}),St&&At&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:b.scalingValue(N??0,n),width:ht}})]}):null,zt=a.jsxs(b.LinkWrapper,{link:ut,className:`${u}-item-text-link`,children:[Bt,Xt]}),Kt=np(Ke.gallery),D=Kt.filter(Tt=>Tt.lightboxMedia).map(Tt=>Tt.lightboxMedia),Le=a.jsx("div",{className:rt,style:Ct,children:Kt.length===0?null:P==="off"?(()=>{const{displayMedia:Tt,lightboxMedia:Je}=Kt[0],Pt=Je?D.findIndex($t=>$t.assetId===Je.assetId):-1;return a.jsx(Mc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Vt,hasLightbox:x==="on",onMediaClick:ct&&Pt>=0?()=>dt(D,Pt):void 0})})():a.jsxs(a.Fragment,{children:[He&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Kt.map(({displayMedia:Tt})=>b.isEmbedMedia(Tt)?a.jsx("div",{style:{aspectRatio:`${b.getEmbedAspect(Tt)}`}},`sizer-${Tt.assetId}`):Ki(Tt)?a.jsx("video",{src:Tt.assetId,muted:!0,playsInline:!0},`sizer-${Tt.assetId}`):a.jsx("img",{src:Tt.assetId,alt:""},`sizer-${Tt.assetId}`))}),a.jsx(kl,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:M*1e3,width:"100%",height:"100%",speed:qy,type:X==="fade"?"fade":"loop",rewind:X==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:ft},onMoved:Tt=>{K!=="random"||X==="fade"||Uy(Tt)},children:Kt.map(({displayMedia:Tt,lightboxMedia:Je},Pt)=>{const $t=Je?D.findIndex(_t=>_t.assetId===Je.assetId):-1;return a.jsx(Al,{children:a.jsx(Mc,{media:Tt,className:`${u}-item-${Ki(Tt)?"video":"image"}`.trim(),style:Vt,hasLightbox:x==="on",onMediaClick:ct&&$t>=0?()=>dt(D,$t):void 0})},Pt)})},`${X}-${ye}-${K}-${M}-${Zt}-${c}`)]})}),Ne=St?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&It?"titleMarginTop":void 0,className:o&&It?`${u}-control`:void 0,style:{height:It?b.scalingValue(j??0,n):0,width:ht}}),a.jsx("p",{className:ee,style:{width:Rt,...J,...be},children:Ke.title}),a.jsx("div",{"data-controls":o&&At?"subtitleMarginTop":void 0,className:o&&At?`${u}-control`:void 0,style:{height:At?b.scalingValue(N??0,n):0,width:ht}}),a.jsx("p",{className:H,style:{width:Rt,...z,...ae},children:Ke.subtitle})]}),Oe=ut?a.jsx(b.LinkWrapper,{link:ut,className:`${u}-item-image-link`,children:Le}):a.jsx("a",{className:`${u}-item-image-link`,children:Le});return a.jsx("div",{className:`${u}-item`.trim(),style:Ut&&!nt?{gridColumn:Ut}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${nt&&Gt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(S??0)>100?`calc(${De} * (${S} / 100))`:De,...Ut&&nt?{gridColumn:Ut}:{}},children:nt?a.jsx(a.Fragment,{children:St?a.jsxs(a.Fragment,{children:[zt,Oe]}):a.jsxs(a.Fragment,{children:[Oe,zt]})}):ut?a.jsxs(a.Fragment,{children:[a.jsxs(b.LinkWrapper,{link:ut,className:`${u}-item-image-link`,children:[Ot,Le]}),!St&&a.jsx(b.LinkWrapper,{link:ut,className:`${u}-item-text-link`,children:Ne})]}):a.jsxs(a.Fragment,{children:[Ot,Le,Ne]})})},st)})})}),(!n||i)&&wt&&typeof document<"u"&&x==="on"&&(()=>{const Ke=(d?document.getElementById(d):null)??document.body;return qn.createPortal(a.jsx("div",{style:Lt,"data-selection":"none",children:a.jsx(lv,{prefix:u,items:Nt,index:Dt,imageDisplay:cv(v),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:V,closeIconMaxWidth:ie,closeIconColor:oe,closeIconHoverColor:le,iconMarginRight:ve,contentMarginTop:Fe,onClose:()=>vt(!1),onPrev:()=>Me(st=>(st-1+Nt.length)%Nt.length),onNext:()=>Me(st=>(st+1)%Nt.length),counterClassName:W,counterStyle:ce})}),Ke)})()]})}const uv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},pv=["hover","focus","filled","success","error"],mv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
5306
5305
|
import '@splidejs/react-splide/css/core';
|
|
5307
5306
|
import { CommonComponentProps } from '../props';
|
|
5308
|
-
import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia } from '../utils/index';
|
|
5307
|
+
import { EmbedMediaFrame, getEmbedAspect, getEmbedPlayback, isEmbedMedia } from '../utils/index';
|
|
5309
5308
|
import {
|
|
5310
5309
|
buildColorVars,
|
|
5311
5310
|
getFormFieldValidationError,
|
|
@@ -5939,19 +5938,22 @@ function GridMediaItem({
|
|
|
5939
5938
|
media,
|
|
5940
5939
|
className,
|
|
5941
5940
|
style,
|
|
5941
|
+
hasLightbox,
|
|
5942
5942
|
onMediaClick,
|
|
5943
5943
|
}: {
|
|
5944
5944
|
media: GridMedia;
|
|
5945
5945
|
className: string;
|
|
5946
5946
|
style: React.CSSProperties;
|
|
5947
|
+
/** An embed then plays here as a silent loop, and as it was set to in the lightbox. */
|
|
5948
|
+
hasLightbox: boolean;
|
|
5947
5949
|
onMediaClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
5948
5950
|
}) {
|
|
5949
5951
|
if (isEmbedMedia(media)) {
|
|
5950
5952
|
return (
|
|
5951
5953
|
<EmbedMediaFrame
|
|
5952
5954
|
media={media}
|
|
5953
|
-
mode="background"
|
|
5954
5955
|
fit={style.objectFit === 'contain' ? 'contain' : 'cover'}
|
|
5956
|
+
silentLoop={hasLightbox}
|
|
5955
5957
|
className={className}
|
|
5956
5958
|
style={{
|
|
5957
5959
|
...style,
|
|
@@ -6013,20 +6015,14 @@ function getContainRect(box: AnimRect, natural: { width: number; height: number
|
|
|
6013
6015
|
|
|
6014
6016
|
function LightboxVideo({
|
|
6015
6017
|
src,
|
|
6016
|
-
phase,
|
|
6017
6018
|
mediaRef,
|
|
6018
6019
|
mediaStyle,
|
|
6019
6020
|
onLoadedMetadata,
|
|
6020
|
-
onClick,
|
|
6021
|
-
onMouseMove,
|
|
6022
6021
|
}: {
|
|
6023
6022
|
src: string;
|
|
6024
|
-
phase: 'opening' | 'open' | 'closing';
|
|
6025
6023
|
mediaRef: React.RefObject<HTMLVideoElement>;
|
|
6026
6024
|
mediaStyle: React.CSSProperties;
|
|
6027
6025
|
onLoadedMetadata: (e: React.SyntheticEvent<HTMLVideoElement>) => void;
|
|
6028
|
-
onClick: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
6029
|
-
onMouseMove: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
6030
6026
|
}) {
|
|
6031
6027
|
useEffect(() => {
|
|
6032
6028
|
const video = mediaRef.current;
|
|
@@ -6041,12 +6037,12 @@ function LightboxVideo({
|
|
|
6041
6037
|
<video
|
|
6042
6038
|
ref={mediaRef}
|
|
6043
6039
|
src={src}
|
|
6044
|
-
|
|
6040
|
+
muted
|
|
6041
|
+
autoPlay
|
|
6042
|
+
loop
|
|
6045
6043
|
playsInline
|
|
6046
6044
|
preload='auto'
|
|
6047
6045
|
onLoadedMetadata={onLoadedMetadata}
|
|
6048
|
-
onClick={onClick}
|
|
6049
|
-
onMouseMove={onMouseMove}
|
|
6050
6046
|
style={mediaStyle}
|
|
6051
6047
|
/>
|
|
6052
6048
|
);
|
|
@@ -6232,7 +6228,6 @@ function Lightbox({
|
|
|
6232
6228
|
const currentItem = items[index];
|
|
6233
6229
|
const isCurrentVideo = currentItem ? isVideoMedia(currentItem) : false;
|
|
6234
6230
|
const isCurrentEmbed = currentItem ? isEmbedMedia(currentItem) : false;
|
|
6235
|
-
const isHorizontalNavActive = slideOffset !== 0 || slideAnimating;
|
|
6236
6231
|
const isSliding = slideDir !== null;
|
|
6237
6232
|
|
|
6238
6233
|
const handleMediaLoad = useCallback((e: React.SyntheticEvent<HTMLImageElement | HTMLVideoElement>) => {
|
|
@@ -6594,46 +6589,6 @@ function Lightbox({
|
|
|
6594
6589
|
? (isCover ? finalRect : getContainRect(finalRect, naturalSize))
|
|
6595
6590
|
: null;
|
|
6596
6591
|
|
|
6597
|
-
const handleVideoClick = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
6598
|
-
e.stopPropagation();
|
|
6599
|
-
if (touchInteractionRef.current) {
|
|
6600
|
-
touchInteractionRef.current = false;
|
|
6601
|
-
return;
|
|
6602
|
-
}
|
|
6603
|
-
if (items.length <= 1) return;
|
|
6604
|
-
|
|
6605
|
-
const rect = contentRect ?? e.currentTarget.getBoundingClientRect();
|
|
6606
|
-
const y = e.clientY - rect.top;
|
|
6607
|
-
const controlsZoneHeight = Math.min(52, rect.height * 0.2);
|
|
6608
|
-
|
|
6609
|
-
if (y > rect.height - controlsZoneHeight) {
|
|
6610
|
-
return;
|
|
6611
|
-
}
|
|
6612
|
-
|
|
6613
|
-
if (e.clientX - rect.left < rect.width / 2) {
|
|
6614
|
-
startProgrammaticSlide(-1);
|
|
6615
|
-
return;
|
|
6616
|
-
}
|
|
6617
|
-
|
|
6618
|
-
startProgrammaticSlide(1);
|
|
6619
|
-
};
|
|
6620
|
-
|
|
6621
|
-
const handleVideoMouseMove = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
6622
|
-
if (items.length <= 1) return;
|
|
6623
|
-
|
|
6624
|
-
const rect = contentRect ?? e.currentTarget.getBoundingClientRect();
|
|
6625
|
-
const x = e.clientX - rect.left;
|
|
6626
|
-
const y = e.clientY - rect.top;
|
|
6627
|
-
const controlsZoneHeight = Math.min(52, rect.height * 0.2);
|
|
6628
|
-
|
|
6629
|
-
if (y > rect.height - controlsZoneHeight) {
|
|
6630
|
-
e.currentTarget.style.cursor = 'default';
|
|
6631
|
-
return;
|
|
6632
|
-
}
|
|
6633
|
-
|
|
6634
|
-
e.currentTarget.style.cursor = x < rect.width / 2 ? 'w-resize' : 'e-resize';
|
|
6635
|
-
};
|
|
6636
|
-
|
|
6637
6592
|
const backingBaseStyle: React.CSSProperties = {
|
|
6638
6593
|
position: 'fixed',
|
|
6639
6594
|
top: viewportRect?.top,
|
|
@@ -6678,8 +6633,7 @@ function Lightbox({
|
|
|
6678
6633
|
width: contentRect?.width,
|
|
6679
6634
|
height: contentRect?.height,
|
|
6680
6635
|
objectFit: objectFitStyle,
|
|
6681
|
-
pointerEvents:
|
|
6682
|
-
touchAction: (isCurrentVideo || isCurrentEmbed) && isOpen ? 'none' : undefined,
|
|
6636
|
+
pointerEvents: 'none',
|
|
6683
6637
|
};
|
|
6684
6638
|
|
|
6685
6639
|
const slideWidth = viewportRect?.width ?? 0;
|
|
@@ -6702,8 +6656,10 @@ function Lightbox({
|
|
|
6702
6656
|
pointerEvents: 'none',
|
|
6703
6657
|
};
|
|
6704
6658
|
|
|
6705
|
-
// over an embed the overlays stop short of the player's own control bar
|
|
6706
|
-
const navOverlayInset = isCurrentEmbed &&
|
|
6659
|
+
// over an embed with controls the overlays stop short of the player's own control bar
|
|
6660
|
+
const navOverlayInset = isCurrentEmbed && currentItem && getEmbedPlayback(currentItem).controls && contentRect
|
|
6661
|
+
? Math.min(52, contentRect.height * 0.2)
|
|
6662
|
+
: 0;
|
|
6707
6663
|
const navOverlayBaseStyle = contentRect ? {
|
|
6708
6664
|
position: 'fixed' as const,
|
|
6709
6665
|
top: contentRect.top,
|
|
@@ -6820,6 +6776,8 @@ function Lightbox({
|
|
|
6820
6776
|
key={\`neighbor-\${neighborIndex}-\${neighborItem.assetId}\`}
|
|
6821
6777
|
src={neighborItem.assetId}
|
|
6822
6778
|
muted
|
|
6779
|
+
autoPlay
|
|
6780
|
+
loop
|
|
6823
6781
|
playsInline
|
|
6824
6782
|
preload='auto'
|
|
6825
6783
|
style={neighborMediaStyle}
|
|
@@ -6841,22 +6799,18 @@ function Lightbox({
|
|
|
6841
6799
|
<EmbedMediaFrame
|
|
6842
6800
|
key={\`\${index}-\${currentItem.assetId}\`}
|
|
6843
6801
|
media={currentItem}
|
|
6844
|
-
mode="player"
|
|
6845
6802
|
fit={isCover ? 'cover' : 'contain'}
|
|
6846
6803
|
lazy={false}
|
|
6847
|
-
|
|
6804
|
+
startsAtOnce
|
|
6848
6805
|
style={currentMediaStyle}
|
|
6849
6806
|
/>
|
|
6850
6807
|
) : isCurrentVideo ? (
|
|
6851
6808
|
<LightboxVideo
|
|
6852
6809
|
key={\`\${index}-\${currentItem.assetId}\`}
|
|
6853
6810
|
src={currentItem.assetId}
|
|
6854
|
-
phase={phase}
|
|
6855
6811
|
mediaRef={mediaRef as React.RefObject<HTMLVideoElement>}
|
|
6856
6812
|
mediaStyle={currentMediaStyle}
|
|
6857
6813
|
onLoadedMetadata={handleMediaLoad}
|
|
6858
|
-
onClick={handleVideoClick}
|
|
6859
|
-
onMouseMove={handleVideoMouseMove}
|
|
6860
6814
|
/>
|
|
6861
6815
|
) : (
|
|
6862
6816
|
<img
|
|
@@ -6871,7 +6825,7 @@ function Lightbox({
|
|
|
6871
6825
|
</div>
|
|
6872
6826
|
)}
|
|
6873
6827
|
|
|
6874
|
-
{isOpen && navOverlayBaseStyle && items.length > 1 &&
|
|
6828
|
+
{isOpen && navOverlayBaseStyle && items.length > 1 && (
|
|
6875
6829
|
<>
|
|
6876
6830
|
<div
|
|
6877
6831
|
style={{
|
|
@@ -7349,6 +7303,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
7349
7303
|
media={displayMedia}
|
|
7350
7304
|
className={\`\${P}-item-\${isVideoMedia(displayMedia) ? 'video' : 'image'}\`.trim()}
|
|
7351
7305
|
style={imageStyle}
|
|
7306
|
+
hasLightbox={lightbox === 'on'}
|
|
7352
7307
|
onMediaClick={canOpenLightboxMedia && lightboxIndex >= 0
|
|
7353
7308
|
? () => openLightbox(lightboxItemsForEntry, lightboxIndex)
|
|
7354
7309
|
: undefined}
|
|
@@ -7404,6 +7359,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
7404
7359
|
media={displayMedia}
|
|
7405
7360
|
className={\`\${P}-item-\${isVideoMedia(displayMedia) ? 'video' : 'image'}\`.trim()}
|
|
7406
7361
|
style={imageStyle}
|
|
7362
|
+
hasLightbox={lightbox === 'on'}
|
|
7407
7363
|
onMediaClick={canOpenLightboxMedia && lightboxIndex >= 0
|
|
7408
7364
|
? () => openLightbox(lightboxItemsForEntry, lightboxIndex)
|
|
7409
7365
|
: undefined}
|
|
@@ -7622,7 +7578,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
7622
7578
|
};
|
|
7623
7579
|
|
|
7624
7580
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
7625
|
-
`,gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",as={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},hv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],fv={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",contentKey:"title",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",contentKey:"gallery",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",closeIcon:gv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...hv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},yv={element:dv,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:fv,sourceCode:mv},vv=50,Rc=10,Fl="cntrl-lightbox-journal",za=Fl,Gs=`${Fl}-`,Ba=e=>`${Fl}-${e}`,Nl=e=>e===za||e.startsWith(Gs),kc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ac=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=kc(t.get(Ba(e)));if(i)return i}const n=kc(t.get(za));if(n)return n;for(const[i]of t){if(!i.startsWith(Gs))continue;const o=i.slice(Gs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Fc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},ip=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Nl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ba(t),String(e)):i.searchParams.set(za,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},xv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(e)||i===za:Nl(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},op=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Nl(n))},bv=(e,t)=>{if(op(t)){if(e){window.history.back();return}xv(t)}},Sv=20,wv=2,ss=e=>`max(${e}, ${Sv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,wv),rp=e=>e.reduce((t,n)=>t+Lo(n).length,0),$v=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Lo(r).length,1),i=Lo(e[t]).length;return{start:n,end:n+i-1}},Cv=(e,t)=>{const n=rp(e),{start:i,end:o}=$v(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ma=(e,t)=>t==="B"?e.flatMap((n,i)=>Lo(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Lo(n)})),Tv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Cv(i,o)},Nc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Iv=(e,t,n)=>e==="B"?t.length>1:rp(n)>1,Pn=.004,ii=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Mo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Mo(e,t),vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Mo(e.length,n),effective:vr(e.length,n)}},ap=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),sp=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ei=["title1","title2","title3","count"],St=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_l={title1:"1",title2:"2",title3:"3",count:"Count"},Hl=e=>[St(e,"fontFamily"),St(e,"fontSettings"),{type:"row",items:[St(e,"fontSize"),St(e,"lineHeight"),St(e,"letterSpacing"),St(e,"wordSpacing")]},St(e,"textAlign"),St(e,"textAppearance")],Lv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ei.map(e=>[_l[e],Hl(e)]))}),Mv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=St(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Mv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Pv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function lp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:f="desktop",contentMarginTop:S=0,iconMarginRight:w=0,closeIcon:N=null,closeIconMaxWidth:v=0,closeIconColor:M="#000000",closeIconHoverColor:E="#cccccc"}=n,U=b.scalingValue(S,i),X=b.scalingValue(Math.max(S,ii),i),D=b.scalingValue(w,i),_=b.scalingValue(m,i),W=f==="mobile",T=Gi("title1",Vi(n,"title1"),i),C=Gi("title2",Vi(n,"title2"),i),q=Gi("title3",Vi(n,"title3"),i),R=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),$=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),I=s.useMemo(()=>Ti(e,t,T,C,q),[e,t,T,C,q]),j=s.useMemo(()=>I.map(H=>R[H.widthKey]),[I,R]),F=s.useMemo(()=>Mo(I.length,j),[I.length,j]),K=s.useMemo(()=>vr(I.length,j),[I.length,j]),P=s.useMemo(()=>I.filter(H=>H.prefix==="title1"),[I]),h=s.useMemo(()=>I.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[I]),J=s.useMemo(()=>Ii(P,R),[P,R]),V=s.useMemo(()=>Ii(h,R),[h,R]),he=!!(t.title1||t.title2||t.title3),k=N!==null;if(!(he||k))return null;const L=(p??0)>0||o,me=(H,be)=>{const re=I.findIndex(Pe=>Pe.prefix===H.prefix);if(!W||be==="single-row")return{effectiveWidth:K[re]??0,resolvedWidth:F[re]??0,maxWidth:vn(re,F)};if(be==="two-row-top"){const Pe=P.findIndex(Ae=>Ae.prefix===H.prefix);return{effectiveWidth:J.effective[Pe]??0,resolvedWidth:J.resolved[Pe]??0,maxWidth:vn(Pe,J.resolved)}}const Q=h.findIndex(Pe=>Pe.prefix===H.prefix);return{effectiveWidth:V.effective[Q]??0,resolvedWidth:V.resolved[Q]??0,maxWidth:vn(Q,V.resolved)}},te=(H,be,re)=>{if(!W||re==="single-row"){const Xe=H.findIndex(xe=>xe.prefix===be.prefix),Ue=H.map(xe=>R[xe.widthKey]),Je=Mo(H.length,Ue);return{effectiveWidth:vr(H.length,Ue)[Xe]??0,resolvedWidth:Je[Xe]??0,maxWidth:vn(Xe,Je)}}if(re==="two-row-top"){const Xe=H.filter(xe=>xe.prefix==="title1"),Ue=Xe.findIndex(xe=>xe.prefix===be.prefix),{resolved:Je,effective:je}=Ii(Xe,R);return{effectiveWidth:je[Ue]??0,resolvedWidth:Je[Ue]??0,maxWidth:vn(Ue,Je)}}const Q=H.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),Pe=Q.findIndex(Xe=>Xe.prefix===be.prefix),{resolved:Ae,effective:He}=Ii(Q,R);return{effectiveWidth:He[Pe]??0,resolvedWidth:Ae[Pe]??0,maxWidth:vn(Pe,Ae)}},ve=H=>sp(I,F,$,H)+(W?0:p??0),Le=()=>W?0:p??0,de=H=>h.slice(0,H).reduce((be,re,Q)=>be+(re.marginLeftKey?$[re.marginLeftKey]??0:0)+(V.resolved[Q]??0),0),ue=H=>{const be=h[H];return de(H)+(be.marginLeftKey?$[be.marginLeftKey]??0:0)+(V.resolved[H]??0)},Z=(H,be,re)=>{const Q=H.marginLeftKey?$[H.marginLeftKey]??0:0,{effectiveWidth:Pe,resolvedWidth:Ae,maxWidth:He}=re??me(H,be),Xe=Math.max(Q,ii),Ue=o&&be==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:b.scalingValue(Pe,i),...Q>0?{marginLeft:b.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:H.className,style:H.style,children:H.text}),Ue&&H.marginLeftKey?a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(-Q,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}}):null,Ue?a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(He),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:b.scalingValue(-Pn/2,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},le=(H="two-row")=>{const be=I.findIndex(Pe=>Pe.prefix==="title1"),re=be>=0?F[be]:R.title1Width,Q=H==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re)}:{},style:{width:b.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},oe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:T,"aria-hidden":"true",children:" "}),ge=H=>{const be=Ti(e,H,T,C,q);return a.jsx(a.Fragment,{children:be.map(re=>Z(re,"single-row",te(be,re,"single-row")))})},Se=H=>{const be=Ti(e,H,T,C,q),re=be.find(Q=>Q.prefix==="title1");return re?Z(re,"two-row-top",te(be,re,"two-row-top")):null},Re=(H,be=!1)=>{const re=Ti(e,H,T,C,q),Q=re.filter(He=>He.prefix==="title2"||He.prefix==="title3"),Pe=o&&be;return Q.length>0||Pe||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Q.map(He=>Z(He,"two-row-bottom",te(re,He,"two-row-bottom")))}),be&&o?a.jsxs(a.Fragment,{children:[ye(),ne()]}):null]}):null,(m??0)>0||Pe?a.jsx("div",{"data-controls":Pe?"titleRowMarginBottom":void 0,"data-controls-axis":Pe?"y":void 0,"data-controls-reverse":Pe?"":void 0,className:Pe?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:Pe?"auto":"none"}}):null]}):null},Ne=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(v??0,i),height:b.scalingValue(v??0,i),marginRight:D,"--close-icon-hover-color":E},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:N??"",fill:M,hoverFill:i&&!r?M:E,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:D,height:"100%",pointerEvents:"auto"}})]}),Te=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ne()}):null,Ce=H=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:H})}),g=H=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||he?oe():null,L?le("two-row"):null,Ce(H),Te()]}),Y=(H,be=!1)=>a.jsxs(a.Fragment,{children:[g(Se(H)),Re(H,be)]}),ee=()=>{const H=W?-1:I.findIndex(Q=>Q.prefix==="title1"),be=!W&&(o||(p??0)>0)?(()=>{const Q=p??0,Pe=H>=0?F[H]:R.title1Width,Ae=Math.max(Q,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Pe),style:{position:"absolute",top:0,left:0,width:b.scalingValue(Ae,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,re=I.flatMap((Q,Pe)=>{if(!Q.marginLeftKey)return[];const Ae=$[Q.marginLeftKey]??0,He=ap(I,F,$,Pe)+Le(),Xe=Math.max(Ae,ii);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F[Pe]),style:{position:"absolute",top:0,left:b.scalingValue(He,i),width:b.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return be?[be,...re]:re},ae=()=>I.map((H,be)=>{const re=vn(be,F),Pe=ve(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ye=()=>h.flatMap((H,be)=>{if(!H.marginLeftKey)return[];const re=$[H.marginLeftKey]??0,Q=de(be),Pe=Math.max(re,ii),{resolvedWidth:Ae}=me(H,"two-row-bottom");return a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae),style:{position:"absolute",top:0,left:b.scalingValue(Q,i),width:b.scalingValue(Pe,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),ne=()=>h.map((H,be)=>{const{maxWidth:re}=me(H,"two-row-bottom"),Pe=ue(be)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(Pe,i),width:b.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),B=()=>!o||W?null:a.jsxs(a.Fragment,{children:[ee(),ae()]}),G=!!(t.title2||t.title3||(m??0)>0||o),z=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||he?oe():null,L?le("single-row"):null,he?Ce(ge(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Te(),B()]}),ie=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...G?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:G?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),B()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:X,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...W?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${W?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${W?` ${e}-text-bar-cell-stacked`:""}`,style:W?void 0:{flex:1,minWidth:0,width:"100%"},children:W?ie():z()})})})]})}function Ev(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
|
|
7581
|
+
`,gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",as={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},hv=["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"],fv={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",contentKey:"title",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",contentKey:"gallery",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...as.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",closeIcon:gv,closeIconColor:"#FFFFFF",closeIconHoverColor:"#999999",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIcon.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconMaxWidth.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconColor.display.visible",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.closeIconHoverColor.display.visible",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","contentMarginTop","closeIconMaxWidth","iconMarginRight","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...hv],panelIds:["general","imageSettings","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor","closeIconColor","closeIconHoverColor"]}}},yv={element:dv,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:fv,sourceCode:mv},vv=50,Rc=10,Fl="cntrl-lightbox-journal",za=Fl,Gs=`${Fl}-`,Ba=e=>`${Fl}-${e}`,Nl=e=>e===za||e.startsWith(Gs),kc=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ac=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=kc(t.get(Ba(e)));if(i)return i}const n=kc(t.get(za));if(n)return n;for(const[i]of t){if(!i.startsWith(Gs))continue;const o=i.slice(Gs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Fc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},ip=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Nl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ba(t),String(e)):i.searchParams.set(za,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},xv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(e)||i===za:Nl(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},op=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Nl(n))},bv=(e,t)=>{if(op(t)){if(e){window.history.back();return}xv(t)}},Sv=20,wv=2,ss=e=>`max(${e}, ${Sv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,wv),rp=e=>e.reduce((t,n)=>t+Lo(n).length,0),$v=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Lo(r).length,1),i=Lo(e[t]).length;return{start:n,end:n+i-1}},Cv=(e,t)=>{const n=rp(e),{start:i,end:o}=$v(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ma=(e,t)=>t==="B"?e.flatMap((n,i)=>Lo(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Lo(n)})),Tv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return Cv(i,o)},Nc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Iv=(e,t,n)=>e==="B"?t.length>1:rp(n)>1,Mn=.004,ii=.004,So={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Po=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Po(e,t),vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:vr(e.length,n)}},ap=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),sp=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Ei=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_l={title1:"1",title2:"2",title3:"3",count:"Count"},Hl=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],Lv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ei.map(e=>[_l[e],Hl(e)]))}),Pv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Mv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=bt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Pv[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Mv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function lp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:S=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:x=0,iconMarginRight:w=0,closeIcon:F=null,closeIconMaxWidth:v=0,closeIconColor:P="#000000",closeIconHoverColor:M="#cccccc"}=n,K=b.scalingValue(x,i),X=b.scalingValue(Math.max(x,ii),i),j=b.scalingValue(w,i),N=b.scalingValue(m,i),_=h==="mobile",T=Gi("title1",Vi(n,"title1"),i),L=Gi("title2",Vi(n,"title2"),i),Y=Gi("title3",Vi(n,"title3"),i),R=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),I=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:S}),[y,S]),$=s.useMemo(()=>Ti(e,t,T,L,Y),[e,t,T,L,Y]),G=s.useMemo(()=>$.map(H=>R[H.widthKey]),[$,R]),O=s.useMemo(()=>Po($.length,G),[$.length,G]),U=s.useMemo(()=>vr($.length,G),[$.length,G]),E=s.useMemo(()=>$.filter(H=>H.prefix==="title1"),[$]),f=s.useMemo(()=>$.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[$]),Q=s.useMemo(()=>Ii(E,R),[E,R]),q=s.useMemo(()=>Ii(f,R),[f,R]),pe=!!(t.title1||t.title2||t.title3),k=F!==null;if(!(pe||k))return null;const C=(p??0)>0||o,ue=(H,be)=>{const ae=$.findIndex(ke=>ke.prefix===H.prefix);if(!_||be==="single-row")return{effectiveWidth:U[ae]??0,resolvedWidth:O[ae]??0,maxWidth:vn(ae,O)};if(be==="two-row-top"){const ke=E.findIndex(ze=>ze.prefix===H.prefix);return{effectiveWidth:Q.effective[ke]??0,resolvedWidth:Q.resolved[ke]??0,maxWidth:vn(ke,Q.resolved)}}const W=f.findIndex(ke=>ke.prefix===H.prefix);return{effectiveWidth:q.effective[W]??0,resolvedWidth:q.resolved[W]??0,maxWidth:vn(W,q.resolved)}},te=(H,be,ae)=>{if(!_||ae==="single-row"){const Ue=H.findIndex(ye=>ye.prefix===be.prefix),Qe=H.map(ye=>R[ye.widthKey]),We=Po(H.length,Qe);return{effectiveWidth:vr(H.length,Qe)[Ue]??0,resolvedWidth:We[Ue]??0,maxWidth:vn(Ue,We)}}if(ae==="two-row-top"){const Ue=H.filter(ye=>ye.prefix==="title1"),Qe=Ue.findIndex(ye=>ye.prefix===be.prefix),{resolved:We,effective:it}=Ii(Ue,R);return{effectiveWidth:it[Qe]??0,resolvedWidth:We[Qe]??0,maxWidth:vn(Qe,We)}}const W=H.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),ke=W.findIndex(Ue=>Ue.prefix===be.prefix),{resolved:ze,effective:Xe}=Ii(W,R);return{effectiveWidth:Xe[ke]??0,resolvedWidth:ze[ke]??0,maxWidth:vn(ke,ze)}},fe=H=>sp($,O,I,H)+(_?0:p??0),Pe=()=>_?0:p??0,de=H=>f.slice(0,H).reduce((be,ae,W)=>be+(ae.marginLeftKey?I[ae.marginLeftKey]??0:0)+(q.resolved[W]??0),0),we=H=>{const be=f[H];return de(H)+(be.marginLeftKey?I[be.marginLeftKey]??0:0)+(q.resolved[H]??0)},V=(H,be,ae)=>{const W=H.marginLeftKey?I[H.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:ze,maxWidth:Xe}=ae??ue(H,be),Ue=Math.max(W,ii),Qe=o&&be==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:b.scalingValue(ke,i),...W>0?{marginLeft:b.scalingValue(W,i)}:{}},children:[a.jsx("p",{className:H.className,style:H.style,children:H.text}),Qe&&H.marginLeftKey?a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:b.scalingValue(-W,i),width:b.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}}):null,Qe?a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Xe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:b.scalingValue(-Mn/2,i),width:b.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},ie=(H="two-row")=>{const be=$.findIndex(ke=>ke.prefix==="title1"),ae=be>=0?O[be]:R.title1Width,W=H==="two-row"&&o;return a.jsx("div",{...W?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae)}:{},style:{width:b.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...W?{pointerEvents:"auto"}:{}}})},oe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:T,"aria-hidden":"true",children:" "}),le=H=>{const be=Ti(e,H,T,L,Y);return a.jsx(a.Fragment,{children:be.map(ae=>V(ae,"single-row",te(be,ae,"single-row")))})},ve=H=>{const be=Ti(e,H,T,L,Y),ae=be.find(W=>W.prefix==="title1");return ae?V(ae,"two-row-top",te(be,ae,"two-row-top")):null},Fe=(H,be=!1)=>{const ae=Ti(e,H,T,L,Y),W=ae.filter(Xe=>Xe.prefix==="title2"||Xe.prefix==="title3"),ke=o&&be;return W.length>0||ke||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[W.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:W.map(Xe=>V(Xe,"two-row-bottom",te(ae,Xe,"two-row-bottom")))}),be&&o?a.jsxs(a.Fragment,{children:[he(),z()]}):null]}):null,(m??0)>0||ke?a.jsx("div",{"data-controls":ke?"titleRowMarginBottom":void 0,"data-controls-axis":ke?"y":void 0,"data-controls-reverse":ke?"":void 0,className:ke?`${e}-control`:void 0,style:{height:N,width:"100%",flexShrink:0,pointerEvents:ke?"auto":"none"}}):null]}):null},Ee=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(v??0,i),height:b.scalingValue(v??0,i),marginRight:j,"--close-icon-hover-color":M},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:F??"",fill:P,hoverFill:i&&!r?P:M,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:j,height:"100%",pointerEvents:"auto"}})]}),Ce=()=>k?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ee()}):null,Se=H=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:H})}),g=H=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[k||pe?oe():null,C?ie("two-row"):null,Se(H),Ce()]}),Z=(H,be=!1)=>a.jsxs(a.Fragment,{children:[g(ve(H)),Fe(H,be)]}),J=()=>{const H=_?-1:$.findIndex(W=>W.prefix==="title1"),be=!_&&(o||(p??0)>0)?(()=>{const W=p??0,ke=H>=0?O[H]:R.title1Width,ze=Math.max(W,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:0,width:b.scalingValue(ze,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ae=$.flatMap((W,ke)=>{if(!W.marginLeftKey)return[];const ze=I[W.marginLeftKey]??0,Xe=ap($,O,I,ke)+Pe(),Ue=Math.max(ze,ii);return a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(O[ke]),style:{position:"absolute",top:0,left:b.scalingValue(Xe,i),width:b.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}},W.marginLeftKey)});return be?[be,...ae]:ae},re=()=>$.map((H,be)=>{const ae=vn(be,O),ke=fe(be)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(ke,i),width:b.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),he=()=>f.flatMap((H,be)=>{if(!H.marginLeftKey)return[];const ae=I[H.marginLeftKey]??0,W=de(be),ke=Math.max(ae,ii),{resolvedWidth:ze}=ue(H,"two-row-bottom");return a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ze),style:{position:"absolute",top:0,left:b.scalingValue(W,i),width:b.scalingValue(ke,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),z=()=>f.map((H,be)=>{const{maxWidth:ae}=ue(H,"two-row-bottom"),ke=we(be)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:b.scalingValue(ke,i),width:b.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),B=()=>!o||_?null:a.jsxs(a.Fragment,{children:[J(),re()]}),ne=!!(t.title2||t.title3||(m??0)>0||o),ce=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[k||pe?oe():null,C?ie("single-row"):null,pe?Se(le(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),Ce(),B()]}),ee=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ne?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ne?void 0:{flex:"0 0 auto",height:"auto"},children:Z(t,!0)}),B()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:K,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:X,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",..._?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${_?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${_?` ${e}-text-bar-cell-stacked`:""}`,style:_?void 0:{flex:1,minWidth:0,width:"100%"},children:_?ee():ce()})})})]})}function Ev(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rv(e){return`
|
|
7626
7582
|
.${e}-wrapper {
|
|
7627
7583
|
display: grid;
|
|
7628
7584
|
align-items: start;
|
|
@@ -7942,7 +7898,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
7942
7898
|
pointer-events: auto;
|
|
7943
7899
|
flex-shrink: 0;
|
|
7944
7900
|
}
|
|
7945
|
-
`}const _c={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",kv=72,Av=50,Fv=1e4,Nv=650,_v=500;function Hv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Wv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?cp(i,n):null}function Ov(e){return e.reduce((t,n,i)=>{const o=Wl(n.gallery),l=Ol(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Hc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Dv=.03;function dp(e){return e.width*Dv}const ls={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Wc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Bv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function jv(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Vv(e){const t=new Set,n=[];for(const i of e){const o=Wl(i.gallery),r=Ol(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Gv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Bo(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function Po(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=dp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function $a(e,t,n){const i=Po(e,t,n);return{...i,left:2*i.left-e.left}}function Xv(e,t,n){const{left:i,width:o}=n,r=dp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function up(e,t,n,i){const o=Po(e,"left",i),r=Po(e,"right",i),l=$a(e,"left",i),c=$a(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Uv(e,t,n,i){const{start:o,end:r}=up(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function qv(e,t,n){const i=Po(e,t,n),o=$a(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function pp(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Wl(e){if(!e)return;if(pp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??_c,i??o??_c]}]}function Kv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Yv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Ol(e){if(!Array.isArray(e)||e.length===0)return[];if(pp(e)){const t=[];for(const n of e){const i=Kv(n);if(!i)continue;const o=Yv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Qv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o}):Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Zv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Bo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Jv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),E=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(ls),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Bo(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?ir(u,p,-1):je(n,-1),Ie=Je?ir(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Re!==null?ir(u,Re,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Re!==null?ir(u,Re,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?Hc(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?Hc(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=E.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=E.current.get(O.assetId);return Bv(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(Wc(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{R.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:ls.width,height:typeof window<"u"?window.innerHeight:ls.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=Uv(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Rt=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(R.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Rt()}},[Ue,V,yt,ct,pe,Ve,Ke,Rt]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?_v:Nv;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},Fv))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?E.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(Xs(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=zv(Oe);if(Tt&&et){_e(Me,Tt,et),he(Xs(O,Tt,et));return}}const ft=Wc(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{E.current.has(Oe.assetId)||jv(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),On);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Rt()},Fe=et=>{if(Math.abs(et)>Av&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||R.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||R.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>kv){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Rt,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!R.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?Hv(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Br(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${qo}ms ${Cn}`:ie?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:It?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?up(Oe,ft,ge,k):{start:Fe==="far"?$a(Oe,Me,k):Po(Oe,Me,k)},et=Br(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?qv(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${qo}ms ${Cn}`:`transform ${qo}ms ${Cn}, opacity ${On}ms ${Cn}`:fn?`transform ${On}ms ${Cn}`:te==="opening"||_t?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?Xv(Po(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Br(Vt,k):null,Yt=Gt?Br(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(jr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Ee},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Ee},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Ee},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(jr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Ee},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Ee,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(Zv,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ee},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ee,style:At},`${n}-${Q.assetId}`))]})}function e0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",f=(y==null?void 0:y.reversed)??!1,[S,w]=m.split(":").map(Number),M=`${f?w:S} / ${f?S:w}`,E=d.entryWidth??.2,U=d.columnsCount,X=b.scalingValue(E,n),D=b.scalingValue(d.horizontalGap??0,n),_=X,W=X,T={width:_,...x?{aspectRatio:M,height:"auto",overflow:"hidden"}:{height:"auto"}},C=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},q=s.useRef(null),[R,$]=s.useState(!1),[I,j]=s.useState([]),[F,K]=s.useState(0),[P,h]=s.useState(0),[J,V]=s.useState(null),[he,k]=s.useState({title1:"",title2:"",title3:""}),ce=(()=>{const Te={},Ce=q.current?getComputedStyle(q.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(Te["--cntrl-article-width"]=Ce),Te})(),L=!n||i||o,me=s.useMemo(()=>Rv(c),[c]),te=t??[],ve=te.length%U||U,Le=ve<U&&te.length>0,de=te.length-ve,ue=Le?Math.floor((U-ve)/2)+1:1,Z=s.useMemo(()=>Ov(te),[te]),le=s.useMemo(()=>Vv(te),[te]),oe=(Te,Ce,g)=>{if(n&&!o&&!i)return;const Y=Z.findIndex(ae=>ae.gridIndex===Te);if(Y<0)return;const ee=Z[Y];h(Y),j(ee.items),K(Ce),k(ee.entry),V(g??null),$(!0)},ge=s.useCallback(()=>{$(!1),V(null)},[]),Se=s.useCallback(()=>{const Te=Z[P];return!Te||!q.current?J:Wv(q.current,Te.gridIndex,x?"cover":"contain")??J},[Z,P,J,x]),Re=s.useCallback(Te=>{if(Z.length>1){const Ce=Z.length,g=(P+Te+Ce)%Ce,Y=Z[g],ee=Math.min(F,Y.items.length-1);h(g),j(Y.items),K(ee),k(Y.entry);return}K(Ce=>(Ce+Te+I.length)%I.length)},[Z,P,F,I.length]),Ne=Z.length>1||I.length>1;return s.useEffect(()=>{if(!R||typeof document>"u")return;const Te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Te}},[R]),s.useEffect(()=>{!n||o||i||$(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:me}}),a.jsx(Gv,{mediaList:le}),a.jsx("div",{ref:q,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${X})`,rowGap:0,columnGap:D,width:b.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:b.scalingValue(u??0,n)},children:te.map((Te,Ce)=>{const g=Wl(Te.gallery),Y=Ol(g),ee=Y.filter(z=>z.lightboxMedia).map(z=>z.lightboxMedia),ae=Math.floor(Ce/U)===Math.ceil(te.length/U)-1,ye=Le&&Ce>=de?`${ue+(Ce-de)}`:void 0,ne=Y[0],B=ne!=null&&ne.lightboxMedia?ee.findIndex(z=>z.assetId===ne.lightboxMedia.assetId):-1,G=a.jsx("div",{className:`${c}-item-image-wrapper`,style:T,children:Y.length>0&&a.jsx(Qv,{media:ne.displayMedia,gridIndex:Ce,className:`${c}-item-${Bo(ne.displayMedia)?"video":"image"}`.trim(),style:C,onMediaClick:L&&B>=0?z=>oe(Ce,B,cp(z.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ae?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:W}})}),a.jsx("a",{className:`${c}-item-image-link`,children:G}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:W}})})]})},Ce)})}),R&&typeof document<"u"&&(()=>{const Te=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(Jv,{prefix:c,items:I,index:F,entry:he,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ne,lightboxEntries:Z,entryIdx:P,layoutId:r,sourceRect:J,resolveCloseSourceRect:Se,onClose:ge,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),Te)})()]})}const t0=`import { CommonComponentProps } from '../props';
|
|
7901
|
+
`}const _c={assetId:"",name:"",objectFit:"cover"},On=500,qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",kv=72,Av=50,Fv=1e4,Nv=650,_v=500;function Hv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Wv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?cp(i,n):null}function Ov(e){return e.reduce((t,n,i)=>{const o=Wl(n.gallery),l=Ol(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Hc(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Dv=.03;function dp(e){return e.width*Dv}const ls={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Br(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Wc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Bv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function jv(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Vv(e){const t=new Set,n=[];for(const i of e){const o=Wl(i.gallery),r=Ol(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Gv({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Bo(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function Mo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=dp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function $a(e,t,n){const i=Mo(e,t,n);return{...i,left:2*i.left-e.left}}function Xv(e,t,n){const{left:i,width:o}=n,r=dp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function up(e,t,n,i){const o=Mo(e,"left",i),r=Mo(e,"right",i),l=$a(e,"left",i),c=$a(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Uv(e,t,n,i){const{start:o,end:r}=up(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function qv(e,t,n){const i=Mo(e,t,n),o=$a(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function pp(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Wl(e){if(!e)return;if(pp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??_c,i??o??_c]}]}function Kv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Yv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Ol(e){if(!Array.isArray(e)||e.length===0)return[];if(pp(e)){const t=[];for(const n of e){const i=Kv(n);if(!i)continue;const o=Yv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Qv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return b.isEmbedMedia(e)?a.jsx(b.EmbedMediaFrame,{media:e,fit:n.objectFit==="contain"?"contain":"cover",silentLoop:!0,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o}):Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Zv({src:e,onMediaElement:t,wrapperStyle:n,videoStyle:i,onLoadedMetadata:o,onTransitionEnd:r}){const l=s.useRef(null);return s.useEffect(()=>{const c=l.current;return t==null||t(c??null),()=>{c==null||c.pause(),t==null||t(null)}},[e,t]),a.jsx("div",{style:n,onTransitionEnd:r,children:a.jsx("video",{ref:l,src:e,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedMetadata:o,style:i},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Bo(e)?a.jsx("video",{src:e.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Jv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:S,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:w}){const F=s.useRef(null),v=s.useRef(null),P=s.useRef(null),M=s.useRef(new Map),[K,X]=s.useState(0),j=s.useRef(null),N=s.useRef(0),_=s.useRef(0),T=s.useRef("none"),L=s.useRef(!1),Y=s.useRef(!1),R=s.useRef(!1),I=s.useRef(null),$=s.useRef(null),G=s.useRef(null),O=s.useRef(()=>{}),U=s.useRef(null),E=s.useRef(null),f=s.useRef(null),Q=s.useRef(!1),[q,pe]=s.useState(null),[k,me]=s.useState(ls),[C,ue]=s.useState(0),[te,fe]=s.useState("opening"),[Pe,de]=s.useState(0),[we,V]=s.useState(0),[ie,oe]=s.useState(!1),[le,ve]=s.useState(null),[Fe,Ee]=s.useState(null),[Ce,Se]=s.useState(null),[g,Z]=s.useState(!1),[J,re]=s.useState(null),[he,z]=s.useState(!1),B=s.useRef(!1),[ne,ce]=s.useState(!1),[ee,H]=s.useState(!1),be=s.useRef(n),ae=s.useRef(void 0),W=t[n],ke=W?Bo(W):!1,ze=W?b.isEmbedMedia(W):!1,Xe=we!==0||ie,Ue=!l&&(!r||!!c),Qe=d&&!l,We=u.length>1,it=s.useCallback((D,Le)=>t.length<=1?null:t[(D+Le+t.length)%t.length]??null,[t]),ye=We?ir(u,p,-1):it(n,-1),Te=We?ir(u,p,1):it(n,1),Ve=le===-1&&Xe?We&&Fe!==null?ir(u,Fe,-1):Ce!==null?it(Ce,-1):null:null,Ze=le===1&&Xe?We&&Fe!==null?ir(u,Fe,1):Ce!==null?it(Ce,1):null:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,at=Ze&&Ze.assetId!==(Te==null?void 0:Te.assetId)?Ze:null,tt=ye&&Qe?(()=>{const D=We?Hc(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ye=Te&&Qe?(()=>{const D=We?Hc(u,p,1):t.length>2?it((n+1)%t.length,1):null;return D&&D.assetId!==Te.assetId?D:null})():null,xt=et??tt,pt=at??Ye,De=s.useCallback((D,Le,Ne)=>{if(!D||!Le||!Ne)return;const Oe=M.current,yt=Oe.get(D);(yt==null?void 0:yt.width)===Le&&(yt==null?void 0:yt.height)===Ne||(Oe.set(D,{width:Le,height:Ne}),X(Tt=>Tt+1))},[]),_e=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Le=M.current.get(D.assetId);return Bv(v.current,Le)},[K,C]),He=s.useCallback(()=>{if(!W)return;const D=_e(W);if(D){pe(D);return}const Le=v.current;Le&&pe(Wc(Le))},[W,_e]),Ae=s.useCallback(D=>{if(We){const Le=u.length;Ee((p+D+Le)%Le),Se(null);return}t.length>1&&(Se((n+D+t.length)%t.length),Ee(null))},[We,u.length,p,t.length,n]),Be=s.useCallback(D=>{R.current=D,oe(D)},[]),Ie=s.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),mt=s.useCallback(()=>{Ie(),I.current=window.setTimeout(()=>{Ie(),Be(!1)},qo+32)},[Ie,Be]),ot=s.useCallback(()=>{const D=F.current;if(!D){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:ls.width,height:typeof window<"u"?window.innerHeight:ls.height});return}const Le=D.getBoundingClientRect();me({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),Ct=s.useCallback((D,Le)=>{if(Xe){if(ne&&!ie)return`translate(${we}px, 0px)`;if(ie&&le!==null){const Ne=_e(D);if(!Ne)return;const{x:Oe,y:yt}=Uv(Ne,Le,le,k);return`translate(${Oe}px, ${yt}px)`}if(ie)return"translate(0px, 0px)"}},[Xe,ne,ie,we,le,k,_e]),rt=s.useCallback(()=>{const D=$.current;$.current=null,Ie(),Be(!1),ve(null),Ee(null),Se(null),V(0),ce(!1),L.current=!1,_.current=0,T.current="none",D===-1?x():D===1&&w()},[Ie,Be,x,w]),St=s.useCallback(()=>{Ie(),I.current=window.setTimeout(()=>{$.current!==null&&rt()},qo+32)},[Ie,rt]),nt=s.useCallback(()=>{Ie(),$.current=null,Be(!1),ve(null),Ee(null),Se(null),V(0),ce(!1),L.current=!1,_.current=0,T.current="none"},[Ie,Be]),Rt=s.useCallback(D=>{if(!(!Qe||!q)){if(R.current){if($.current===D){G.current=D,rt();return}nt()}Ie(),Ae(D),$.current=D,ve(D),Be(!0),St()}},[Qe,q,rt,nt,Ie,Ae,Be,St]);O.current=Rt;const ht=s.useCallback(()=>{U.current=null,Q.current=!1,E.current!==null&&(window.clearInterval(E.current),E.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Vt=s.useCallback(D=>{E.current!==null&&window.clearInterval(E.current);const Le=Q.current?_v:Nv;E.current=window.setInterval(()=>{O.current(D)},Le)},[]),Zt=s.useCallback(D=>{U.current!==D&&(ht(),U.current=D,Q.current=!1,O.current(D),Vt(D),f.current=window.setTimeout(()=>{f.current=null,U.current===D&&(Q.current=!0,Vt(D))},Fv))},[ht,Vt]),$e=s.useCallback(()=>{const D=v.current;if(!D)return;const Le=W==null?void 0:W.assetId,Ne=Le?M.current.get(Le):void 0;if(Ne!=null&&Ne.width&&(Ne!=null&&Ne.height)){pe(Xs(D,Ne.width,Ne.height));return}const Oe=P.current;if(Oe&&Le&&(Oe.src===Le||Oe.currentSrc===Le)){const{width:Tt,height:Je}=zv(Oe);if(Tt&&Je){De(Le,Tt,Je),pe(Xs(D,Tt,Je));return}}const yt=Wc(D);!yt.width||!yt.height||pe(yt)},[W==null?void 0:W.assetId,De]),Ge=s.useCallback(D=>{if(P.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&$e();return}D.complete&&D.naturalWidth>0&&$e()}},[$e]),ft=s.useCallback(()=>{ot(),$e(),ue(D=>D+1)},[ot,$e]);s.useEffect(()=>{ft();const D=v.current,Le=F.current,Ne=new ResizeObserver(()=>ft());return D&&Ne.observe(D),Le&&Ne.observe(Le),window.addEventListener("resize",ft),()=>{Ne.disconnect(),window.removeEventListener("resize",ft)}},[ft,n,y]),s.useLayoutEffect(()=>{if(!W)return;const D=P.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){$e();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&$e()}},[W==null?void 0:W.assetId,n,$e]),s.useEffect(()=>{He()},[He,K]),s.useEffect(()=>{const D=new Set,Le=[],Ne=Oe=>{!(Oe!=null&&Oe.assetId)||D.has(Oe.assetId)||(D.add(Oe.assetId),Le.push(Oe))};t.forEach(Ne),u.forEach(Oe=>Oe.items.forEach(Ne)),Le.forEach(Oe=>{M.current.has(Oe.assetId)||jv(Oe,De)})},[t,u,De]),s.useEffect(()=>{if(te!=="opening"||!q)return;if(!S){fe("open");return}Z(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(!0),fe("open")})});return()=>cancelAnimationFrame(D)},[te,q,S]),s.useEffect(()=>{if(te!=="closing")return;const D=setTimeout(()=>h(),On);return()=>clearTimeout(D)},[te,h]),s.useEffect(()=>()=>{Ie()},[Ie]),s.useLayoutEffect(()=>{be.current===n&&ae.current===(W==null?void 0:W.assetId)||(Ie(),$.current=null,ve(null),Ee(null),Se(null),de(0),V(0),Be(!1),H(!1),ce(!1),N.current=0,_.current=0,T.current="none",L.current=!1,j.current=null,Y.current=!1,P.current=null,He(),be.current=n,ae.current=W==null?void 0:W.assetId)},[n,W==null?void 0:W.assetId,Be,Ie,He]),s.useLayoutEffect(()=>{const D=G.current;D!==null&&(G.current=null,requestAnimationFrame(()=>{O.current(D)}))},[n,p,W==null?void 0:W.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,z(!1);return}if(te!=="open"||B.current)return;if(!ye&&!Te){B.current=!0;return}z(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),B.current=!0})});return()=>cancelAnimationFrame(D)},[te,ye==null?void 0:ye.assetId,Te==null?void 0:Te.assetId]),s.useEffect(()=>{if(te!=="open")return;const D=()=>{const Je=Pt=>{Pt.stopPropagation(),Pt.preventDefault(),document.removeEventListener("click",Je,!0)};document.addEventListener("click",Je,!0)},Le=Je=>{const Pt=Je<0?1:-1;Ie(),Ae(Pt),$.current=Pt,ve(Pt),Be(!0),St()},Ne=Je=>{if(Math.abs(Je)>Av&&Qe){Le(Je);return}$.current=null,ve(null),Ee(null),Se(null),Be(!0),V(0),mt()},Oe=Je=>{if(Je.touches.length!==1||R.current)return;const Pt=Je.touches[0];Y.current=!0,j.current={x:Pt.clientX,y:Pt.clientY},T.current="none",_.current=0,L.current=!1},yt=Je=>{if(!j.current||Je.touches.length!==1||R.current)return;const Pt=Je.touches[0],$t=Pt.clientX-j.current.x,_t=Pt.clientY-j.current.y;if(T.current==="none"){if(Math.abs($t)<10&&Math.abs(_t)<10)return;if(Math.abs($t)>Math.abs(_t)){if(!Qe)return;T.current="horizontal"}else if(_t>0){if(!Ue)return;T.current="vertical"}else return}if(T.current==="horizontal"){L.current=!0,ce(!0),_.current=$t,V($t),Je.preventDefault();return}T.current==="vertical"&&(L.current=!0,ce(!0),N.current=_t,de(_t),Je.preventDefault())},Tt=()=>{if(!j.current)return;const Je=T.current,Pt=L.current;if(Pt&&Je==="horizontal")Ne(_.current),D();else if(Pt&&Je==="vertical"){const $t=N.current;if(Ue&&$t>kv){const _t=window.innerHeight;N.current=_t,H(!0),de(_t),fe("closing")}else N.current=0,de(0);D()}else Je==="horizontal"&&Math.abs(_.current)>0&&(Ne(_.current),D());j.current=null,T.current="none",_.current=0,L.current=!1,ce(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",yt,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",yt),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Qe,Be,mt,Ie,Ue,St,Ae]);const Lt=s.useCallback(()=>{const D=(m==null?void 0:m())??S??null;D&&q&&(re(D),Z(!0)),fe("closing")},[m,S,q]);s.useEffect(()=>{const D=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;ht(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Qe)return;Oe.preventDefault();const yt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&U.current===yt||Zt(yt)},Le=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const yt=Oe.key==="ArrowLeft"?-1:1;U.current===yt&&ht()},Ne=()=>{ht()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Le),window.addEventListener("blur",Ne),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Ne),ht()}},[te,r,c,Lt,Qe,Zt,ht]),s.useEffect(()=>{te!=="open"&&ht()},[te,ht]);const wt=()=>{te==="closing"||l||Lt()},vt=te==="open",Nt=te==="closing",Wt=Pe>0?Math.max(0,1-Pe/500):1,Dt=Pe>0?Math.max(.35,1-Pe/500):1,Me=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if($.current!==null){rt();return}Ie(),Be(!1)}},[Ie,Be,rt]),ct=te==="closing"?J??S:S,dt=ct&&q&&(te==="opening"||Nt)?Hv(ct,q):void 0,kt=Xe&&W?Ct(W,"center"):Pe>0?`translateY(${Pe}px)`:dt,Ke=q?Br(q,k):null,st=!!(ct&&q),It=st&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Ke==null?void 0:Ke.top,left:Ke==null?void 0:Ke.left,width:Ke==null?void 0:Ke.width,height:Ke==null?void 0:Ke.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Pe>0?Dt:st?1:te==="opening"||Nt?0:1,transition:ne&&!ie?"none":ie?`transform ${qo}ms ${Cn}`:ee?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:It?`transform ${On}ms ${Cn}`:te==="opening"||Nt?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1,overflow:ke||ze?"hidden":void 0},ut={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:"none"},Gt=(D,Le,Ne="adjacent")=>{const Oe=_e(D);if(!Oe)return{display:"none"};const yt=Ne==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Tt}=le!==null?up(Oe,yt,le,k):{start:Ne==="far"?$a(Oe,Le,k):Mo(Oe,Le,k)},Je=Br(Tt,k),Pt=Ct(D,yt),$t=!Xe&&Ne==="adjacent"&&vt&&!he?qv(Oe,Le,k):null,_t=Ne==="far"&&Xe&&le===(Le==="left"?-1:1),on=ne&&!ie?!1:ie,fn=Ne==="adjacent"&&vt&&he&&!Xe;return{position:"absolute",top:Je.top,left:Je.left,width:Je.width,height:Je.height,objectFit:"contain",transform:Pt??($t?`translate(${$t.x}px, ${$t.y}px)`:void 0),opacity:Ne==="far"?vt&&_t?1:0:vt?1:0,transition:on?Ne==="far"?`transform ${qo}ms ${Cn}`:`transform ${qo}ms ${Cn}, opacity ${On}ms ${Cn}`:fn?`transform ${On}ms ${Cn}`:te==="opening"||Nt?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},Ut=(D,Le)=>{const Ne=_e(D);return Ne?Xv(Mo(Ne,Le,k),Le,k):null},Ot=D=>Le=>{if(!l){if(Y.current){Y.current=!1;return}Le.stopPropagation(),Rt(D)}},Bt=ye?Ut(ye,"left"):null,Xt=Te?Ut(Te,"right"):null,zt=Bt?Br(Bt,k):null,Kt=Xt?Br(Xt,k):null;return a.jsxs("div",{ref:F,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:wt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:vt?Wt:0,transition:ne?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:vt?1:0,transition:ne?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:wt})})]}),vt&&xt&&a.jsx(jr,{media:xt,style:Gt(xt,"left","far"),onMeasure:De,onTransitionEnd:Me},`far-prev-${xt.assetId}`),vt&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ye,style:Gt(ye,"left"),onMeasure:De,onTransitionEnd:Me},`prev-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Ot(-1)})]}),vt&&Te&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Te,style:Gt(Te,"right"),onMeasure:De,onTransitionEnd:Me},`next-${Te.assetId}`),Kt&&a.jsx("div",{style:{position:"absolute",top:Kt.top,left:Kt.left,width:Kt.width,height:Kt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Ot(1)})]}),vt&&pt&&a.jsx(jr,{media:pt,style:Gt(pt,"right","far"),onMeasure:De,onTransitionEnd:Me},`far-next-${pt.assetId}`),q&&W&&(ze?a.jsx("div",{style:At,onTransitionEnd:Me,children:a.jsx(b.EmbedMediaFrame,{media:W,fit:"contain",lazy:!1,startsAtOnce:!0,style:ut})},`${n}-${W.assetId}`):ke?a.jsx(Zv,{src:W.assetId,onMediaElement:Ge,wrapperStyle:At,videoStyle:ut,onLoadedMetadata:$e,onTransitionEnd:Me},`${n}-${W.assetId}`):a.jsx("img",{ref:Ge,src:W.assetId,alt:W.name,onLoad:$e,onTransitionEnd:Me,style:At},`${n}-${W.assetId}`))]})}function e0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,S=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",h=(y==null?void 0:y.reversed)??!1,[x,w]=m.split(":").map(Number),P=`${h?w:x} / ${h?x:w}`,M=d.entryWidth??.2,K=d.columnsCount,X=b.scalingValue(M,n),j=b.scalingValue(d.horizontalGap??0,n),N=X,_=X,T={width:N,...S?{aspectRatio:P,height:"auto",overflow:"hidden"}:{height:"auto"}},L=S?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},Y=s.useRef(null),[R,I]=s.useState(!1),[$,G]=s.useState([]),[O,U]=s.useState(0),[E,f]=s.useState(0),[Q,q]=s.useState(null),[pe,k]=s.useState({title1:"",title2:"",title3:""}),me=(()=>{const Ce={},Se=Y.current?getComputedStyle(Y.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(Ce["--cntrl-article-width"]=Se),Ce})(),C=!n||i||o,ue=s.useMemo(()=>Rv(c),[c]),te=t??[],fe=te.length%K||K,Pe=fe<K&&te.length>0,de=te.length-fe,we=Pe?Math.floor((K-fe)/2)+1:1,V=s.useMemo(()=>Ov(te),[te]),ie=s.useMemo(()=>Vv(te),[te]),oe=(Ce,Se,g)=>{if(n&&!o&&!i)return;const Z=V.findIndex(re=>re.gridIndex===Ce);if(Z<0)return;const J=V[Z];f(Z),G(J.items),U(Se),k(J.entry),q(g??null),I(!0)},le=s.useCallback(()=>{I(!1),q(null)},[]),ve=s.useCallback(()=>{const Ce=V[E];return!Ce||!Y.current?Q:Wv(Y.current,Ce.gridIndex,S?"cover":"contain")??Q},[V,E,Q,S]),Fe=s.useCallback(Ce=>{if(V.length>1){const Se=V.length,g=(E+Ce+Se)%Se,Z=V[g],J=Math.min(O,Z.items.length-1);f(g),G(Z.items),U(J),k(Z.entry);return}U(Se=>(Se+Ce+$.length)%$.length)},[V,E,O,$.length]),Ee=V.length>1||$.length>1;return s.useEffect(()=>{if(!R||typeof document>"u")return;const Ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ce}},[R]),s.useEffect(()=>{!n||o||i||I(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ue}}),a.jsx(Gv,{mediaList:ie}),a.jsx("div",{ref:Y,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${K}, ${X})`,rowGap:0,columnGap:j,width:b.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:b.scalingValue(u??0,n)},children:te.map((Ce,Se)=>{const g=Wl(Ce.gallery),Z=Ol(g),J=Z.filter(ce=>ce.lightboxMedia).map(ce=>ce.lightboxMedia),re=Math.floor(Se/K)===Math.ceil(te.length/K)-1,he=Pe&&Se>=de?`${we+(Se-de)}`:void 0,z=Z[0],B=z!=null&&z.lightboxMedia?J.findIndex(ce=>ce.assetId===z.lightboxMedia.assetId):-1,ne=a.jsx("div",{className:`${c}-item-image-wrapper`,style:T,children:Z.length>0&&a.jsx(Qv,{media:z.displayMedia,gridIndex:Se,className:`${c}-item-${Bo(z.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:C&&B>=0?ce=>oe(Se,B,cp(ce.currentTarget,S?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,re?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:X,...he?{gridColumn:he}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:_}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ne}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:_}})})]})},Se)})}),R&&typeof document<"u"&&(()=>{const Ce=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:me,"data-selection":"none",children:a.jsx(Jv,{prefix:c,items:$,index:O,entry:pe,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ee,lightboxEntries:V,entryIdx:E,layoutId:r,sourceRect:Q,resolveCloseSourceRect:ve,onClose:le,onPrev:()=>Fe(-1),onNext:()=>Fe(1)})}),Ce)})()]})}const t0=`import { CommonComponentProps } from '../props';
|
|
7946
7902
|
import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, scalingValue, useScopedStyles } from '../utils/index';
|
|
7947
7903
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
7948
7904
|
import { createPortal } from 'react-dom';
|
|
@@ -8798,8 +8754,9 @@ function MediaItem({
|
|
|
8798
8754
|
return (
|
|
8799
8755
|
<EmbedMediaFrame
|
|
8800
8756
|
media={media}
|
|
8801
|
-
mode="background"
|
|
8802
8757
|
fit={style.objectFit === 'contain' ? 'contain' : 'cover'}
|
|
8758
|
+
// a cell opens the lightbox, where the video plays as it was set to
|
|
8759
|
+
silentLoop
|
|
8803
8760
|
className={className}
|
|
8804
8761
|
data-hive-grid-index={gridIndex}
|
|
8805
8762
|
style={{
|
|
@@ -8848,7 +8805,6 @@ function MediaItem({
|
|
|
8848
8805
|
|
|
8849
8806
|
function LightboxVideo({
|
|
8850
8807
|
src,
|
|
8851
|
-
phase,
|
|
8852
8808
|
onMediaElement,
|
|
8853
8809
|
wrapperStyle,
|
|
8854
8810
|
videoStyle,
|
|
@@ -8856,7 +8812,6 @@ function LightboxVideo({
|
|
|
8856
8812
|
onTransitionEnd,
|
|
8857
8813
|
}: {
|
|
8858
8814
|
src: string;
|
|
8859
|
-
phase: 'opening' | 'open' | 'closing';
|
|
8860
8815
|
onMediaElement?: (element: HTMLVideoElement | null) => void;
|
|
8861
8816
|
wrapperStyle: React.CSSProperties;
|
|
8862
8817
|
videoStyle: React.CSSProperties;
|
|
@@ -8881,11 +8836,12 @@ function LightboxVideo({
|
|
|
8881
8836
|
key={src}
|
|
8882
8837
|
ref={videoRef}
|
|
8883
8838
|
src={src}
|
|
8884
|
-
|
|
8839
|
+
muted
|
|
8840
|
+
autoPlay
|
|
8841
|
+
loop
|
|
8885
8842
|
playsInline
|
|
8886
8843
|
preload='auto'
|
|
8887
8844
|
onLoadedMetadata={onLoadedMetadata}
|
|
8888
|
-
onClick={(e) => e.stopPropagation()}
|
|
8889
8845
|
style={videoStyle}
|
|
8890
8846
|
/>
|
|
8891
8847
|
</div>
|
|
@@ -8912,6 +8868,8 @@ function LightboxSideMedia({
|
|
|
8912
8868
|
<video
|
|
8913
8869
|
src={media.assetId}
|
|
8914
8870
|
muted
|
|
8871
|
+
autoPlay
|
|
8872
|
+
loop
|
|
8915
8873
|
playsInline
|
|
8916
8874
|
preload='auto'
|
|
8917
8875
|
style={style}
|
|
@@ -9784,8 +9742,7 @@ function Lightbox({
|
|
|
9784
9742
|
: phase === 'opening' || isClosing
|
|
9785
9743
|
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
9786
9744
|
: 'none',
|
|
9787
|
-
pointerEvents:
|
|
9788
|
-
touchAction: (isCurrentVideo || isCurrentEmbed) && isOpen ? 'none' : undefined,
|
|
9745
|
+
pointerEvents: 'none',
|
|
9789
9746
|
zIndex: 1,
|
|
9790
9747
|
overflow: isCurrentVideo || isCurrentEmbed ? 'hidden' : undefined,
|
|
9791
9748
|
};
|
|
@@ -9795,7 +9752,7 @@ function Lightbox({
|
|
|
9795
9752
|
height: '100%',
|
|
9796
9753
|
display: 'block',
|
|
9797
9754
|
objectFit: 'contain',
|
|
9798
|
-
pointerEvents:
|
|
9755
|
+
pointerEvents: 'none',
|
|
9799
9756
|
};
|
|
9800
9757
|
|
|
9801
9758
|
const getSideMediaStyle = (
|
|
@@ -10037,10 +9994,9 @@ function Lightbox({
|
|
|
10037
9994
|
<div key={\`\${index}-\${currentItem.assetId}\`} style={mediaStyle} onTransitionEnd={handleNavSwipeTransitionEnd}>
|
|
10038
9995
|
<EmbedMediaFrame
|
|
10039
9996
|
media={currentItem}
|
|
10040
|
-
mode="player"
|
|
10041
9997
|
fit="contain"
|
|
10042
9998
|
lazy={false}
|
|
10043
|
-
|
|
9999
|
+
startsAtOnce
|
|
10044
10000
|
style={lightboxVideoStyle}
|
|
10045
10001
|
/>
|
|
10046
10002
|
</div>
|
|
@@ -10048,7 +10004,6 @@ function Lightbox({
|
|
|
10048
10004
|
<LightboxVideo
|
|
10049
10005
|
key={\`\${index}-\${currentItem.assetId}\`}
|
|
10050
10006
|
src={currentItem.assetId}
|
|
10051
|
-
phase={phase}
|
|
10052
10007
|
onMediaElement={setCenterMediaElement}
|
|
10053
10008
|
wrapperStyle={mediaStyle}
|
|
10054
10009
|
videoStyle={lightboxVideoStyle}
|
|
@@ -10329,7 +10284,7 @@ export function Hive({
|
|
|
10329
10284
|
</>
|
|
10330
10285
|
);
|
|
10331
10286
|
}
|
|
10332
|
-
`,n0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function i0(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Ei.filter(e=>e!=="count"),o0=Eo.reduce((e,t)=>({...e,...i0(t)}),{}),r0=Eo.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function cs(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const a0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[_l[e],Hl(e)]))},s0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},l0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],c0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...s0,gallery:[{media:[{assetId:l0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),d0={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:c0},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...o0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:n0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...r0},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...cs({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...cs({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...cs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[a0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},u0={element:e0,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:d0,sourceCode:t0};function p0(e){if(b.isEmbedMedia(e))return!1;if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId)}function m0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.embed?a.jsx(b.EmbedMediaFrame,{media:e.embed,mode:"background",fit:"contain",className:t,style:n}):e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function ds(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function g0(e){return String(e??"").trim().length>0}function Oc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Dc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function zc(e,t,n,i,o,r,l){const c=b.scalingValue(r,l),d=b.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function h0(e,t,n){const i=b.scalingValue(t,n),o=b.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,jc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function f0(e,t,n){return Math.max(t,Math.min(n,e))}function us(e,t,n){return e+(t-e)*n}function y0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Bc,y:n.clientY+Bc};switch(e){case"left":return{x:o.left+jc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-jc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function v0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,f=i.current;m&&(m.style.transform=`translate3d(${f.x}px, ${f.y}px, 0) translate(-50%, -50%) rotate(${f.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=us(m.x,m.targetX,Ko.positionEase),m.y=us(m.y,m.targetY,Ko.positionEase),m.rotation=us(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const f=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,S=Math.abs(m.rotation-m.targetRotation)<.08;!f||!S?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,f)=>{const S=i.current;S.targetX=m,S.targetY=f,S.targetRotation=0,S.x=m,S.y=f,S.rotation=0,S.lastX=m,S.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,f)=>{if(!e)return;const S=i.current;if(t&&S.hasLastX){const w=m-S.lastX;S.targetRotation=f0(w*Ko.rotationFactor,-20,Ko.maxRotation)}else S.targetRotation=0;if(S.lastX=m,S.hasLastX=!0,S.targetX=m,S.targetY=f,t){d();return}S.x=m,S.y=f,S.rotation=S.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function x0(e){return`
|
|
10287
|
+
`,n0="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function i0(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Ei.filter(e=>e!=="count"),o0=Eo.reduce((e,t)=>({...e,...i0(t)}),{}),r0=Eo.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function cs(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const a0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[_l[e],Hl(e)]))},s0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},l0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],c0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...s0,gallery:[{media:[{assetId:l0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),d0={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:c0},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...o0},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:n0,closeIconColor:"#000000",closeIconHoverColor:"#999999",...r0},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...cs({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...cs({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...cs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[a0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},u0={element:e0,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:d0,sourceCode:t0};function p0(e){if(b.isEmbedMedia(e))return!1;if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId)}function m0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.embed?a.jsx(b.EmbedMediaFrame,{media:e.embed,startsAtOnce:!0,fit:"contain",className:t,style:n}):e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function ds(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function g0(e){return String(e??"").trim().length>0}function Oc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Dc(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function zc(e,t,n,i,o,r,l){const c=b.scalingValue(r,l),d=b.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function h0(e,t,n){const i=b.scalingValue(t,n),o=b.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,jc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function f0(e,t,n){return Math.max(t,Math.min(n,e))}function us(e,t,n){return e+(t-e)*n}function y0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Bc,y:n.clientY+Bc};switch(e){case"left":return{x:o.left+jc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-jc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function v0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=us(m.x,m.targetX,Ko.positionEase),m.y=us(m.y,m.targetY,Ko.positionEase),m.rotation=us(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,x=Math.abs(m.rotation-m.targetRotation)<.08;!h||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,h)=>{const x=i.current;x.targetX=m,x.targetY=h,x.targetRotation=0,x.x=m,x.y=h,x.rotation=0,x.lastX=m,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const w=m-x.lastX;x.targetRotation=f0(w*Ko.rotationFactor,-20,Ko.maxRotation)}else x.targetRotation=0;if(x.lastX=m,x.hasLastX=!0,x.targetX=m,x.targetY=h,t){d();return}x.x=m,x.y=h,x.rotation=x.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),S=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||S(),l),[e,S,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:S}}function x0(e){return`
|
|
10333
10288
|
.${e}-wrapper {
|
|
10334
10289
|
display: grid;
|
|
10335
10290
|
align-items: start;
|
|
@@ -10705,7 +10660,7 @@ a.${e}-list-item {
|
|
|
10705
10660
|
overflow-wrap: anywhere;
|
|
10706
10661
|
word-break: break-word;
|
|
10707
10662
|
}
|
|
10708
|
-
`}const Ri=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Dl=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Dl,si],ja=["A","B","C","D","E"];function mp(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function zl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return ja.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function b0(e){const t=zl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function S0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ja.includes(n)?n:null}function gp(e,t,n){const i=S0(e);return i?i===t?!1:b0(n[mp(i)]):!0}function br(e){const t=zl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ja.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function w0(e,t,n){if(hp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function $0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function hp(e,t,n){return gp(e,n,t)?br(e).kind==="baseline":!1}function C0(e){const t={};let n=!1;for(const i of ja){const o=mp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}gp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function T0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function I0(e){const t=br(e).kind;return t==="baseline"?"center":t}function L0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Vc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function M0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function ps(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=M0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function P0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function E0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Zt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const k0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function A0(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),{type:"row",items:[Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing")]},Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function F0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[k0[e],A0(e)]))}}function Ca(e,t){const n=i=>{const o=Zt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Gc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Xc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Uc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],N0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},_0=["hover","focus","filled","success","error"],qc=.004,po=.004,ms=po,Bl=50,Sr=1440,wr=Bl/Sr;function fp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function H0(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Sr}const yp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function W0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function O0(){return Object.fromEntries([...Ro.map(e=>[e,0]),...ko.map(e=>[e,0])])}function D0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function vp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ga(e,t,n){const i=jl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function z0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ro[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=vp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function jl(e,t,n){if(e<=0)return[];const i=Rn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function B0(e,t,n){if(e<=1)return{};const i=jl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Kc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ri]}function j0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function V0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=Ro[d],y=ko[d],x=Ao[d],m=Rn[l],f=Ro[l],S=ko[l],w=Ao[l],N=n[u],v=n[p],M=n[y],E=n[x];typeof N=="number"&&(r[m]=N),typeof v=="number"&&(r[f]=v),typeof M=="number"&&(r[S]=M),typeof E=="number"&&(r[w]=E)}return r}function xp(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function G0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...W0(n,o),...O0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,D0());return xp(e,l)?l:e}function X0(e,t,n){const i=C0(e);i&&(e={...e,...i});const o=fp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ri.length,y=M=>{if(u)return M;const E=Vr({...t,...M}),U=lr(M),X=ga(p,U,E),D=z0(p,X,{...t,...M});return Object.keys(D).length===0?M:{...M,...D}};if(typeof r=="number"&&r!==l)return e;const x=Kc(e),m=Kc(t);if(!j0(x,m))return y({...e,...V0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const M=Vr({...t,...e});return y({...e,...B0(p,c,M)})}if(u){const M=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,E=Math.max(0,(c-o)/2);return M>E?{...e,textPaddingLR:E}:e}const f=Vr({...t,...e}),S=ga(p,d,Vr(t)),N=ga(p,c,f).some((M,E)=>M<(S[E]??M)),v=Rn.some(M=>{const E=e[M],U=t[M];return typeof E=="number"&&typeof U=="number"&&E!==U});return N||v?y(e):e}function U0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function q0(e,t){return Math.random()*(t-e)+e}function K0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Y0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Ro[c],u=ko[c],p=Ao[c];return{key:l,textPrefix:R0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function Q0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=b.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:m,entriesCount:f,cellMinHeight:S,dividerWidth:w,showVisibility:N,cut:v,showCut:M,cutCellMinHeight:E,cutLabel:U,imageSize:X,imageOnHover:D,imagePosition:_="cursor",imageInterpolation:W="on",entryHoverEffect:T,entryHoverShowOption:C,rowPaddingTop:q,rowPaddingBottom:R,rowPaddingTopB:$,columnsOrder:I,textPaddingLR:j,textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V}=e,[he,k]=s.useState(void 0),[ce,L]=s.useState(null),me=s.useRef(null),te=D==="on"&&(!n||i),ve=_==="cursor",Le=ve&&W==="on",{anchorRef:de,onShow:ue,onCursorMove:Z,exit:le}=v0(!!(te&&ce!==null),Le),oe=(v??0)>0,ge=x==="b",Se=s.useRef(null),Re=s.useRef(null),[Ne,Te]=s.useState(null),[Ce,g]=s.useState(Sr),Y=fp(Ce),ee=Math.max(0,((m??0)-Y)/2),ae=Math.min(j??0,ee),ye=Math.max(ae,po),ne=((m??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Ee=()=>{g(H0(Se.current))};Ee();const dt=Se.current;if(!dt)return;const ut=new ResizeObserver(Ee);ut.observe(dt);let kt=dt;for(;kt&&!kt.style.getPropertyValue("--cntrl-article-width");)kt=kt.parentElement;return kt&&ut.observe(kt),()=>ut.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,M,t,f]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const B=b.buildColorVars(u,{textColor:F,backgroundColor:K,dividerColor:P,textHoverColor:h,backgroundHoverColor:J,dividerHoverColor:V},N0,_0),G=r&&r!=="default"?`${u}-state-${r}`:"",ie=`${!n||i?T==="default"?`${u}-entry-hover-default`:T==="blinds"?`${u}-entry-hover-blinds`:T==="reveal"?`${u}-entry-hover-reveal`:"":""} ${G}`.trim(),H=T==="reveal"&&(!n||i),be=(N==null?void 0:N[0])??!1,re=(N==null?void 0:N[1])??!1,Q=s.useRef(e),Pe=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,Pe.current=l;return}if(Pe.current!==l){Q.current=e,Pe.current=l;return}const Ee=Q.current;if(!(Ee!==e))return;if(typeof Ee.columns=="number"&&typeof e.columns=="number"&&Ee.columns!==e.columns){Q.current=e;return}const ut=X0(e,Ee,{designWidth:Ce});Q.current=e,xp(e,ut)&&d(ut)},[e,d,n,l,Ce]);const Ae=s.useMemo(()=>K0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),He=s.useMemo(()=>gs(e,Ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Xe=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ue=s.useMemo(()=>gs(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Je=s.useMemo(()=>Array.isArray(I)&&I.length>0?I:[...Ri],[I]),je=s.useMemo(()=>Y0(Je,y,Ae,He,Xe,Ue),[Je,y,Ae,He,Xe,Ue]),xe=lr(e),Ie=s.useMemo(()=>Rn.slice(0,y).map(Ee=>Ae[Ee]),[y,Ae]),ze=s.useMemo(()=>jl(y,xe,Ae),[y,xe,Ae]),Ze=s.useMemo(()=>ga(y,xe,Ae),[y,xe,Ae]),tt=s.useMemo(()=>je.map((Ee,dt)=>vp(Ze[dt]??0,Ee.paddingLeft,Ee.paddingRight)),[je,Ze]),ot=s.useMemo(()=>{const Ee=f===0?1/0:f;return(t??[]).slice(0,Ee).map((ut,kt)=>({id:kt,cells:Object.fromEntries(Ri.map(Qe=>[Qe,ut[Qe]??""])),image:ut.image,link:ut.link}))},[t,f]),lt=oe?he??v:ot.length,it=s.useMemo(()=>oe?ot.slice(0,lt):ot,[ot,oe,lt]),xt=oe&<<ot.length,rt=it.length>1||xt,_e=[be?`${u}-divider-top`:"",re||rt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),We=!n||i,vt=()=>{if(!We)return;const Ee=he??v;if(!M){k(ot.length);return}k(Math.min(Ee+M,ot.length))},Ve=Ee=>b.scalingValue(Ee,n??!1),Ke=ge?$??0:q??0,pe=R??0,De=S??0,qe=Math.max(pe,ms),bt=zc(0,it.length,be,re,xt,w??0,n??!1).borderTopWidth,yt=ge?"rowPaddingTopB":"rowPaddingTop",Rt=je[0],ct=je[je.length-1],wt=tt[0],nt=tt[tt.length-1],Nt=Rt&&wt?Math.max(wt.paddingLeft,po):0,jt=ct&&nt?Math.max(nt.paddingRight,po):0,$e=xe,Ge=(Ee,dt)=>y0(_,Se.current,ve?Ee:null,dt),ht=(Ee,dt)=>{if(!te)return;const ut=Ee.image;if(!(ut!=null&&ut.assetId)){le(()=>L(null));return}const kt=(X==null?void 0:X.min)??80,Qe=(X==null?void 0:X.max)??320,at=(ce==null?void 0:ce.rowId)===Ee.id,It=at?ce.widthPx:q0(kt,Qe),{x:At,y:pt}=Ge(dt,It);if(at&&ve){Z(At,pt);return}L({rowId:Ee.id,assetId:ut.assetId,objectFit:"contain",isVideo:p0(ut),embed:b.isEmbedMedia(ut)?ut:void 0,widthPx:It}),me.current={x:At,y:pt}},Lt=Ee=>{if(!te||!ce||!ve)return;const{x:dt,y:ut}=Ge(Ee,ce.widthPx);Z(dt,ut)},$t=()=>{ce&&le(()=>L(null))},mt=Ee=>{H&&Oc(Ee,u),!(!te||!ce)&&le(()=>L(null))},_t=Ee=>{H&&Dc(Ee,u)};s.useLayoutEffect(()=>{if(!ce||!me.current)return;const{x:Ee,y:dt}=me.current;me.current=null,ue(Ee,dt)},[ce==null?void 0:ce.rowId,ce==null?void 0:ce.assetId,ue]),s.useLayoutEffect(()=>{if(!p||ge){Te(null);return}const Ee=Re.current,dt=Ee==null?void 0:Ee.parentElement;if(!Ee||!dt){Te(null);return}const ut=()=>{const Qe=Ee.querySelector("[data-list-row]");if(!Qe){Te(null);return}const at=dt.getBoundingClientRect(),It=Qe.getBoundingClientRect();Te(It.top-at.top+It.height/2)};ut();const kt=new ResizeObserver(ut);return kt.observe(Ee),kt.observe(dt),()=>kt.disconnect()},[p,ge,it,Ke,pe,De,t,e,je,Ze,Ce,w,be,re,xt]);const Ot=s.useMemo(()=>!ge&&Dl.some(Ee=>{const dt=Ee.charAt(0),ut=e[`${Ee}VerticalAlign`];return hp(ut,e,dt)}),[ge,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var At;const Ee=Se.current;if(!Ee)return;const dt=()=>{Ee.querySelectorAll("[data-list-col]").forEach(pt=>{pt.style.transform="";const Ut=pt.querySelector(`.${u}-list-col`);Ut&&(Ut.style.minHeight="",Ut.style.height="");const qt=pt.querySelector(`.${u}-list-col-title`);qt&&(qt.style.transform="")})};if(ge||!Ot){dt();return}const ut=()=>{const pt=Array.from(Ee.querySelectorAll("[data-list-row]")),Ut=`${u}-list-col`,qt=`${u}-baseline-probe`;pt.forEach(Dt=>{Dt.querySelectorAll("[data-list-col]").forEach(Vt=>{Vt.style.transform="";const Gt=Vt.querySelector(`.${Ut}`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Bt=Vt.querySelector(`.${u}-list-col-title`);Bt&&(Bt.style.transform="")})}),pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]"));P0(Dt,Vt,Ut)}),Ee.offsetHeight,pt.forEach(Dt=>{const Vt=Array.from(Dt.querySelectorAll("[data-list-col]")),Gt=Dt.getBoundingClientRect().top,Bt=new Map,Yt=Vt.map(Fe=>{const Oe=Fe.querySelector(`.${u}-list-col-title`),ft={el:Fe,titleEl:Oe,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return Bt.set(ft.letter,ft),ft}),O=new Map,Me=(Fe,Oe)=>{const ft=O.get(Fe.letter);if(ft!==void 0)return ft;const Tt=Fe.anchor?Bt.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!Tt||Oe.has(Fe.letter)){const on=ps(Fe,Gt,Ut,qt);return O.set(Fe.letter,on),on}Oe.add(Fe.letter);const et=Me(Tt,Oe);Oe.delete(Fe.letter);const Mt=ps(Fe,Gt,Ut,qt),Ct=et-Mt;E0(Fe.titleEl,Ct);const Ht=ps(Fe,Gt,Ut,qt);return O.set(Fe.letter,Ht),Ht};Yt.forEach(Fe=>Me(Fe,new Set))})};let kt=null;const Qe=()=>{kt===null&&(kt=requestAnimationFrame(()=>{kt=null,ut()}))};ut();const at=new ResizeObserver(()=>Qe());at.observe(Ee);let It=!1;return typeof document<"u"&&((At=document.fonts)!=null&&At.ready)&&document.fonts.ready.then(()=>{It||Qe()}),()=>{It=!0,kt!==null&&(cancelAnimationFrame(kt),kt=null),at.disconnect(),dt()}},[Ot,ge,e,t,Ce,it,Ze]);const zt=s.useMemo(()=>x0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:Se,className:`${u}-wrapper ${ie}${_e?` ${_e}`:""}${ge?` ${u}-type-b`:""}`.trim(),style:{width:b.scalingValue(m??0,n)},onMouseMove:te?Lt:void 0,onMouseLeave:te?$t:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[it.map((Ee,dt)=>{var at,It,At;const ut=(((at=Ee.link)==null?void 0:at.value.length)??0)>0,kt=ut&&(!n||i)?"a":"div",Qe=zc(dt,it.length,be,re,xt,w??0,n??!1);return a.jsxs(kt,{ref:dt===0?pt=>{Re.current=pt}:void 0,className:`${u}-list-item${ut||C==="always"?` ${u}-list-item-has-link`:""}${xt&&dt===it.length-1?` ${u}-list-item-before-cut`:""}`,...ut?{href:(It=Ee.link)==null?void 0:It.value,target:((At=Ee.link)==null?void 0:At.target)==="blank"?"_blank":"_self"}:{},style:Qe,onMouseEnter:pt=>{H&&(ut||C==="always")&&Oc(pt,u),te&&ht(Ee,pt)},onMouseLeave:pt=>{H&&(ut||C==="always")&&Dc(pt,u)},children:[Ke>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Ke)}}),a.jsxs("div",{className:`${u}-list-cols-row${ge?"":` ${u}-list-cols-row-h`}${p&&dt===0&&ge?` ${u}-list-cols-row-controls`:""}`,...ge?{}:{"data-list-row":""},style:ge?void 0:{minHeight:Ve(De)},children:[je.map((pt,Ut)=>{const qt=Ut===je.length-1,Dt=tt[Ut],Vt=pt.paddingBottom,Gt=g0(Ee.cells[pt.key]),Bt=ge&&Gt&&Vt>0,Yt=ge?{minHeight:Ve(De)}:{width:Ve(Ze[Ut])},O=ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{paddingLeft:Ve(Dt.paddingLeft),paddingRight:Ve(Dt.paddingRight)},Me=pt.textPrefix.charAt(0),Fe=ge?$0(e[`${pt.textPrefix}VerticalAlign`]):w0(e[`${pt.textPrefix}VerticalAlign`],e,Me),Oe=ge&&Gt&&p&&dt===0;return ge&&!Gt?null:a.jsxs("div",{className:ge?`${u}-list-col-wrap`:void 0,...ge?{}:{"data-list-col":"","data-col-letter":Me,"data-valign":Fe.kind,...Fe.kind==="baseline"?{"data-valign-anchor":Fe.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${qt?` ${u}-list-col-last`:""}`,style:{...O,...Yt,...ge?{justifyContent:Vc(Fe.kind)}:{}},"data-test":pt.width,children:a.jsx("span",{className:Xc(e,pt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Gc(Ca(e,pt.textPrefix),n),...Uc(e,pt.textPrefix,u,n),...ge?{}:T0(Fe.kind)},children:Ee.cells[pt.key]??null})}),Bt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(Vt)}}),Oe&&a.jsx("div",{"data-controls":pt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(Math.max(Vt,ms))}})]},pt.key)}),p&&dt===0&&ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(ye),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Ve(Math.max(ye,xe-ye)),width:Ve(ye),height:"100%"}})]})]}),!ge&&pe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ve(pe)}}),p&&dt===0&&!ge&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ve(qe)}})]},Ee.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":yt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ge?"center":"left-y",className:`${u}-control-anchor`,style:{top:bt,left:0,width:"100%",height:Ve(Math.max(Ke,ms))}})},"row-padding-handles"),p&&!ge&&Rt&&ct&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((wt==null?void 0:wt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Ve(Nt),height:"100%"}}),a.jsx("div",{"data-controls":ct.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[je.length-1]-((nt==null?void 0:nt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve($e-jt),width:Ve(jt),height:"100%"}})]},"column-edge-padding-handles"),p&&!ge&&je.slice(0,-1).map((Ee,dt)=>{const ut=je[dt+1],kt=ze.slice(0,dt+1).reduce((pt,Ut)=>pt+Ut,0),Qe=tt[dt],at=tt[dt+1],It=Math.max(Qe.paddingRight,po),At=Math.max(at.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ee.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt]-Qe.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt-It),width:Ve(It),height:"100%"}}),a.jsx("div",{"data-controls":ut.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[dt+1]-at.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ve(kt),width:Ve(At),height:"100%"}})]},`${Ee.paddingRightKey}-padding`)}),p&&!ge&&je.slice(0,-1).map((Ee,dt)=>{const ut=U0(dt,ze,Ie,xe),Qe=ze.slice(0,dt+1).reduce((at,It)=>at+It,0)-qc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ee.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ve(Qe),width:Ve(qc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ee.widthKey}-junction`)})]}),xt&&(()=>{const Ee=Ca(e,si),dt=I0(e.cutLabelVerticalAlign),ut=Ee.textTextAlign==="justify"||ge;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Ve(E??0),cursor:We?"pointer":"default",...h0(re,w??0,n??!1)},onClick:We?vt:void 0,onMouseEnter:H||te?mt:void 0,onMouseLeave:H?_t:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...ge?{paddingLeft:Ve(ae),paddingRight:Ve(ae)}:{},justifyContent:L0(Ee.textTextAlign),alignItems:Vc(dt)},children:a.jsx("span",{className:Xc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Gc(Ee,n),...Uc(e,si,u,n),...ut?{width:"100%"}:{}},children:U})})})})(),te&&ce&&typeof document<"u"&&(()=>{const Ee=`${ce.widthPx}px`,dt={width:Ee,height:"auto",maxHeight:Ee,objectFit:"contain"},ut=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:de,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(m0,{media:ce,className:ce.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:dt},`${ce.rowId}-${ce.assetId}`)}),ut)})()]})})]})}const Z0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
10663
|
+
`}const Ri=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Dl=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Dl,si],ja=["A","B","C","D","E"];function mp(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function zl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return ja.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function b0(e){const t=zl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function S0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return ja.includes(n)?n:null}function gp(e,t,n){const i=S0(e);return i?i===t?!1:b0(n[mp(i)]):!0}function br(e){const t=zl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return ja.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function w0(e,t,n){if(hp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function $0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function hp(e,t,n){return gp(e,n,t)?br(e).kind==="baseline":!1}function C0(e){const t={};let n=!1;for(const i of ja){const o=mp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}gp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function T0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function I0(e){const t=br(e).kind;return t==="baseline"?"center":t}function L0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Vc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function P0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function ps(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=P0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function M0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function E0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const R0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const k0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function A0(e){return[Qt(e,"textFontFamily"),Qt(e,"textFontSettings"),{type:"row",items:[Qt(e,"textFontSize"),Qt(e,"textLineHeight"),Qt(e,"textLetterSpacing"),Qt(e,"textWordSpacing")]},Qt(e,"textTextAlign"),Qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function F0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[k0[e],A0(e)]))}}function Ca(e,t){const n=i=>{const o=Qt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Gc(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return pn(nn(n,t))}function Xc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Uc(e,t,n,i){const o=Ca(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:b.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],N0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},_0=["hover","focus","filled","success","error"],qc=.004,po=.004,ms=po,Bl=50,Sr=1440,wr=Bl/Sr;function fp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function H0(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Sr}const yp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function W0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function O0(){return Object.fromEntries([...Ro.map(e=>[e,0]),...ko.map(e=>[e,0])])}function D0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function vp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ga(e,t,n){const i=jl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function z0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ro[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=vp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function jl(e,t,n){if(e<=0)return[];const i=Rn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function B0(e,t,n){if(e<=1)return{};const i=jl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Kc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ri]}function j0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function V0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=Ro[d],y=ko[d],S=Ao[d],m=Rn[l],h=Ro[l],x=ko[l],w=Ao[l],F=n[u],v=n[p],P=n[y],M=n[S];typeof F=="number"&&(r[m]=F),typeof v=="number"&&(r[h]=v),typeof P=="number"&&(r[x]=P),typeof M=="number"&&(r[w]=M)}return r}function xp(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function G0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...W0(n,o),...O0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,D0());return xp(e,l)?l:e}function X0(e,t,n){const i=C0(e);i&&(e={...e,...i});const o=fp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ri.length,y=P=>{if(u)return P;const M=Vr({...t,...P}),K=lr(P),X=ga(p,K,M),j=z0(p,X,{...t,...P});return Object.keys(j).length===0?P:{...P,...j}};if(typeof r=="number"&&r!==l)return e;const S=Kc(e),m=Kc(t);if(!j0(S,m))return y({...e,...V0(S,m,t,p)});if(c<d&&typeof p=="number"&&!u){const P=Vr({...t,...e});return y({...e,...B0(p,c,P)})}if(u){const P=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-o)/2);return P>M?{...e,textPaddingLR:M}:e}const h=Vr({...t,...e}),x=ga(p,d,Vr(t)),F=ga(p,c,h).some((P,M)=>P<(x[M]??P)),v=Rn.some(P=>{const M=e[P],K=t[P];return typeof M=="number"&&typeof K=="number"&&M!==K});return F||v?y(e):e}function U0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function q0(e,t){return Math.random()*(t-e)+e}function K0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:yp[t]]))}function gs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Y0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Ro[c],u=ko[c],p=Ao[c];return{key:l,textPrefix:R0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function Q0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=b.useScopedStyles(),p=!!o,{columns:y,type:S,wrapperWidth:m,entriesCount:h,cellMinHeight:x,dividerWidth:w,showVisibility:F,cut:v,showCut:P,cutCellMinHeight:M,cutLabel:K,imageSize:X,imageOnHover:j,imagePosition:N="cursor",imageInterpolation:_="on",entryHoverEffect:T,entryHoverShowOption:L,rowPaddingTop:Y,rowPaddingBottom:R,rowPaddingTopB:I,columnsOrder:$,textPaddingLR:G,textColor:O,backgroundColor:U,dividerColor:E,textHoverColor:f,backgroundHoverColor:Q,dividerHoverColor:q}=e,[pe,k]=s.useState(void 0),[me,C]=s.useState(null),ue=s.useRef(null),te=j==="on"&&(!n||i),fe=N==="cursor",Pe=fe&&_==="on",{anchorRef:de,onShow:we,onCursorMove:V,exit:ie}=v0(!!(te&&me!==null),Pe),oe=(v??0)>0,le=S==="b",ve=s.useRef(null),Fe=s.useRef(null),[Ee,Ce]=s.useState(null),[Se,g]=s.useState(Sr),Z=fp(Se),J=Math.max(0,((m??0)-Z)/2),re=Math.min(G??0,J),he=Math.max(re,po),z=((m??0)+Z)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Me=()=>{g(H0(ve.current))};Me();const ct=ve.current;if(!ct)return;const dt=new ResizeObserver(Me);dt.observe(ct);let kt=ct;for(;kt&&!kt.style.getPropertyValue("--cntrl-article-width");)kt=kt.parentElement;return kt&&dt.observe(kt),()=>dt.disconnect()},[n,l]),s.useEffect(()=>{k(void 0)},[v,P,t,h]),s.useEffect(()=>{n&&!i&&k(void 0)},[n,i]);const B=b.buildColorVars(u,{textColor:O,backgroundColor:U,dividerColor:E,textHoverColor:f,backgroundHoverColor:Q,dividerHoverColor:q},N0,_0),ne=r&&r!=="default"?`${u}-state-${r}`:"",ee=`${!n||i?T==="default"?`${u}-entry-hover-default`:T==="blinds"?`${u}-entry-hover-blinds`:T==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ne}`.trim(),H=T==="reveal"&&(!n||i),be=(F==null?void 0:F[0])??!1,ae=(F==null?void 0:F[1])??!1,W=s.useRef(e),ke=s.useRef(l);s.useEffect(()=>{if(!d||!n){W.current=e,ke.current=l;return}if(ke.current!==l){W.current=e,ke.current=l;return}const Me=W.current;if(!(Me!==e))return;if(typeof Me.columns=="number"&&typeof e.columns=="number"&&Me.columns!==e.columns){W.current=e;return}const dt=X0(e,Me,{designWidth:Se});W.current=e,xp(e,dt)&&d(dt)},[e,d,n,l,Se]);const ze=s.useMemo(()=>K0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Xe=s.useMemo(()=>gs(e,Ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Ue=s.useMemo(()=>gs(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Qe=s.useMemo(()=>gs(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),We=s.useMemo(()=>Array.isArray($)&&$.length>0?$:[...Ri],[$]),it=s.useMemo(()=>Y0(We,y,ze,Xe,Ue,Qe),[We,y,ze,Xe,Ue,Qe]),ye=lr(e),Te=s.useMemo(()=>Rn.slice(0,y).map(Me=>ze[Me]),[y,ze]),Ve=s.useMemo(()=>jl(y,ye,ze),[y,ye,ze]),Ze=s.useMemo(()=>ga(y,ye,ze),[y,ye,ze]),et=s.useMemo(()=>it.map((Me,ct)=>vp(Ze[ct]??0,Me.paddingLeft,Me.paddingRight)),[it,Ze]),at=s.useMemo(()=>{const Me=h===0?1/0:h;return(t??[]).slice(0,Me).map((dt,kt)=>({id:kt,cells:Object.fromEntries(Ri.map(Ke=>[Ke,dt[Ke]??""])),image:dt.image,link:dt.link}))},[t,h]),tt=oe?pe??v:at.length,Ye=s.useMemo(()=>oe?at.slice(0,tt):at,[at,oe,tt]),xt=oe&&tt<at.length,pt=Ye.length>1||xt,De=[be?`${u}-divider-top`:"",ae||pt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),_e=!n||i,He=()=>{if(!_e)return;const Me=pe??v;if(!P){k(at.length);return}k(Math.min(Me+P,at.length))},Ae=Me=>b.scalingValue(Me,n??!1),Be=le?I??0:Y??0,Ie=R??0,mt=x??0,ot=Math.max(Ie,ms),Ct=zc(0,Ye.length,be,ae,xt,w??0,n??!1).borderTopWidth,rt=le?"rowPaddingTopB":"rowPaddingTop",St=it[0],nt=it[it.length-1],Rt=et[0],ht=et[et.length-1],Vt=St&&Rt?Math.max(Rt.paddingLeft,po):0,Zt=nt&&ht?Math.max(ht.paddingRight,po):0,$e=ye,Ge=(Me,ct)=>y0(N,ve.current,fe?Me:null,ct),ft=(Me,ct)=>{if(!te)return;const dt=Me.image;if(!(dt!=null&&dt.assetId)){ie(()=>C(null));return}const kt=(X==null?void 0:X.min)??80,Ke=(X==null?void 0:X.max)??320,st=(me==null?void 0:me.rowId)===Me.id,It=st?me.widthPx:q0(kt,Ke),{x:At,y:ut}=Ge(ct,It);if(st&&fe){V(At,ut);return}C({rowId:Me.id,assetId:dt.assetId,objectFit:"contain",isVideo:p0(dt),embed:b.isEmbedMedia(dt)?dt:void 0,widthPx:It}),ue.current={x:At,y:ut}},Lt=Me=>{if(!te||!me||!fe)return;const{x:ct,y:dt}=Ge(Me,me.widthPx);V(ct,dt)},wt=()=>{me&&ie(()=>C(null))},vt=Me=>{H&&Oc(Me,u),!(!te||!me)&&ie(()=>C(null))},Nt=Me=>{H&&Dc(Me,u)};s.useLayoutEffect(()=>{if(!me||!ue.current)return;const{x:Me,y:ct}=ue.current;ue.current=null,we(Me,ct)},[me==null?void 0:me.rowId,me==null?void 0:me.assetId,we]),s.useLayoutEffect(()=>{if(!p||le){Ce(null);return}const Me=Fe.current,ct=Me==null?void 0:Me.parentElement;if(!Me||!ct){Ce(null);return}const dt=()=>{const Ke=Me.querySelector("[data-list-row]");if(!Ke){Ce(null);return}const st=ct.getBoundingClientRect(),It=Ke.getBoundingClientRect();Ce(It.top-st.top+It.height/2)};dt();const kt=new ResizeObserver(dt);return kt.observe(Me),kt.observe(ct),()=>kt.disconnect()},[p,le,Ye,Be,Ie,mt,t,e,it,Ze,Se,w,be,ae,xt]);const Wt=s.useMemo(()=>!le&&Dl.some(Me=>{const ct=Me.charAt(0),dt=e[`${Me}VerticalAlign`];return hp(dt,e,ct)}),[le,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var At;const Me=ve.current;if(!Me)return;const ct=()=>{Me.querySelectorAll("[data-list-col]").forEach(ut=>{ut.style.transform="";const Gt=ut.querySelector(`.${u}-list-col`);Gt&&(Gt.style.minHeight="",Gt.style.height="");const Ut=ut.querySelector(`.${u}-list-col-title`);Ut&&(Ut.style.transform="")})};if(le||!Wt){ct();return}const dt=()=>{const ut=Array.from(Me.querySelectorAll("[data-list-row]")),Gt=`${u}-list-col`,Ut=`${u}-baseline-probe`;ut.forEach(Ot=>{Ot.querySelectorAll("[data-list-col]").forEach(Bt=>{Bt.style.transform="";const Xt=Bt.querySelector(`.${Gt}`);Xt&&(Xt.style.minHeight="",Xt.style.height="");const zt=Bt.querySelector(`.${u}-list-col-title`);zt&&(zt.style.transform="")})}),ut.forEach(Ot=>{const Bt=Array.from(Ot.querySelectorAll("[data-list-col]"));M0(Ot,Bt,Gt)}),Me.offsetHeight,ut.forEach(Ot=>{const Bt=Array.from(Ot.querySelectorAll("[data-list-col]")),Xt=Ot.getBoundingClientRect().top,zt=new Map,Kt=Bt.map(Ne=>{const Oe=Ne.querySelector(`.${u}-list-col-title`),yt={el:Ne,titleEl:Oe,letter:Ne.getAttribute("data-col-letter")??"",kind:Ne.getAttribute("data-valign")??"top",anchor:Ne.getAttribute("data-valign-anchor")};return zt.set(yt.letter,yt),yt}),D=new Map,Le=(Ne,Oe)=>{const yt=D.get(Ne.letter);if(yt!==void 0)return yt;const Tt=Ne.anchor?zt.get(Ne.anchor):void 0;if(Ne.kind!=="baseline"||!Tt||Oe.has(Ne.letter)){const on=ps(Ne,Xt,Gt,Ut);return D.set(Ne.letter,on),on}Oe.add(Ne.letter);const Je=Le(Tt,Oe);Oe.delete(Ne.letter);const Pt=ps(Ne,Xt,Gt,Ut),$t=Je-Pt;E0(Ne.titleEl,$t);const _t=ps(Ne,Xt,Gt,Ut);return D.set(Ne.letter,_t),_t};Kt.forEach(Ne=>Le(Ne,new Set))})};let kt=null;const Ke=()=>{kt===null&&(kt=requestAnimationFrame(()=>{kt=null,dt()}))};dt();const st=new ResizeObserver(()=>Ke());st.observe(Me);let It=!1;return typeof document<"u"&&((At=document.fonts)!=null&&At.ready)&&document.fonts.ready.then(()=>{It||Ke()}),()=>{It=!0,kt!==null&&(cancelAnimationFrame(kt),kt=null),st.disconnect(),ct()}},[Wt,le,e,t,Se,Ye,Ze]);const Dt=s.useMemo(()=>x0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Dt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:ve,className:`${u}-wrapper ${ee}${De?` ${De}`:""}${le?` ${u}-type-b`:""}`.trim(),style:{width:b.scalingValue(m??0,n)},onMouseMove:te?Lt:void 0,onMouseLeave:te?wt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ye.map((Me,ct)=>{var st,It,At;const dt=(((st=Me.link)==null?void 0:st.value.length)??0)>0,kt=dt&&(!n||i)?"a":"div",Ke=zc(ct,Ye.length,be,ae,xt,w??0,n??!1);return a.jsxs(kt,{ref:ct===0?ut=>{Fe.current=ut}:void 0,className:`${u}-list-item${dt||L==="always"?` ${u}-list-item-has-link`:""}${xt&&ct===Ye.length-1?` ${u}-list-item-before-cut`:""}`,...dt?{href:(It=Me.link)==null?void 0:It.value,target:((At=Me.link)==null?void 0:At.target)==="blank"?"_blank":"_self"}:{},style:Ke,onMouseEnter:ut=>{H&&(dt||L==="always")&&Oc(ut,u),te&&ft(Me,ut)},onMouseLeave:ut=>{H&&(dt||L==="always")&&Dc(ut,u)},children:[Be>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ae(Be)}}),a.jsxs("div",{className:`${u}-list-cols-row${le?"":` ${u}-list-cols-row-h`}${p&&ct===0&&le?` ${u}-list-cols-row-controls`:""}`,...le?{}:{"data-list-row":""},style:le?void 0:{minHeight:Ae(mt)},children:[it.map((ut,Gt)=>{const Ut=Gt===it.length-1,Ot=et[Gt],Bt=ut.paddingBottom,Xt=g0(Me.cells[ut.key]),zt=le&&Bt>0,Kt=le?{minHeight:Ae(mt)}:{width:Ae(Ze[Gt])},D=le?{paddingLeft:Ae(re),paddingRight:Ae(re)}:{paddingLeft:Ae(Ot.paddingLeft),paddingRight:Ae(Ot.paddingRight)},Le=ut.textPrefix.charAt(0),Ne=le?$0(e[`${ut.textPrefix}VerticalAlign`]):w0(e[`${ut.textPrefix}VerticalAlign`],e,Le),Oe=le&&p&&ct===0;return a.jsxs("div",{className:le?`${u}-list-col-wrap`:void 0,...le?{}:{"data-list-col":"","data-col-letter":Le,"data-valign":Ne.kind,...Ne.kind==="baseline"?{"data-valign-anchor":Ne.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Ut?` ${u}-list-col-last`:""}`,style:{...D,...Kt,...le?{justifyContent:Vc(Ne.kind)}:{}},"data-test":ut.width,children:a.jsx("span",{className:Xc(e,ut.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Gc(Ca(e,ut.textPrefix),n),...Uc(e,ut.textPrefix,u,n),...le?{}:T0(Ne.kind)},children:Xt?Me.cells[ut.key]??null:le?" ":null})}),zt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ae(Bt)}}),Oe&&a.jsx("div",{"data-controls":ut.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ae(Math.max(Bt,ms))}})]},ut.key)}),p&&ct===0&&le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Ae(he),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Ae(Math.max(he,ye-he)),width:Ae(he),height:"100%"}})]})]}),!le&&Ie>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Ae(Ie)}}),p&&ct===0&&!le&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ae(ot)}})]},Me.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":rt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":le?"center":"left-y",className:`${u}-control-anchor`,style:{top:Ct,left:0,width:"100%",height:Ae(Math.max(Be,ms))}})},"row-padding-handles"),p&&!le&&St&&nt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":St.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((Rt==null?void 0:Rt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Ae(Vt),height:"100%"}}),a.jsx("div",{"data-controls":nt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[it.length-1]-((ht==null?void 0:ht.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ae($e-Zt),width:Ae(Zt),height:"100%"}})]},"column-edge-padding-handles"),p&&!le&&it.slice(0,-1).map((Me,ct)=>{const dt=it[ct+1],kt=Ve.slice(0,ct+1).reduce((ut,Gt)=>ut+Gt,0),Ke=et[ct],st=et[ct+1],It=Math.max(Ke.paddingRight,po),At=Math.max(st.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Me.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[ct]-Ke.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ae(kt-It),width:Ae(It),height:"100%"}}),a.jsx("div",{"data-controls":dt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[ct+1]-st.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ee??void 0,className:`${u}-control-anchor`,style:{top:0,left:Ae(kt),width:Ae(At),height:"100%"}})]},`${Me.paddingRightKey}-padding`)}),p&&!le&&it.slice(0,-1).map((Me,ct)=>{const dt=U0(ct,Ve,Te,ye),Ke=Ve.slice(0,ct+1).reduce((st,It)=>st+It,0)-qc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Me.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ae(Ke),width:Ae(qc),height:"calc(100%)",pointerEvents:"auto"}})},`${Me.widthKey}-junction`)})]}),xt&&(()=>{const Me=Ca(e,si),ct=I0(e.cutLabelVerticalAlign),dt=Me.textTextAlign==="justify"||le;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Ae(M??0),cursor:_e?"pointer":"default",...h0(ae,w??0,n??!1)},onClick:_e?He:void 0,onMouseEnter:H||te?vt:void 0,onMouseLeave:H?Nt:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...le?{paddingLeft:Ae(re),paddingRight:Ae(re)}:{},justifyContent:L0(Me.textTextAlign),alignItems:Vc(ct)},children:a.jsx("span",{className:Xc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Gc(Me,n),...Uc(e,si,u,n),...dt?{width:"100%"}:{}},children:K})})})})(),te&&me&&typeof document<"u"&&(()=>{const Me=`${me.widthPx}px`,ct={width:Me,height:"auto",maxHeight:Me,objectFit:"contain"},dt=(c?document.getElementById(c):null)??document.body;return qn.createPortal(a.jsx("div",{ref:de,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(m0,{media:me,className:me.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:ct},`${me.rowId}-${me.assetId}`)}),dt)})()]})})]})}const Z0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
10709
10664
|
import { createPortal } from 'react-dom';
|
|
10710
10665
|
import { CommonComponentProps } from '../props';
|
|
10711
10666
|
import { buildColorVars, EmbedMediaFrame, isEmbedMedia, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
|
|
@@ -10906,7 +10861,7 @@ function ListHoverMedia({
|
|
|
10906
10861
|
return (
|
|
10907
10862
|
<EmbedMediaFrame
|
|
10908
10863
|
media={media.embed}
|
|
10909
|
-
|
|
10864
|
+
startsAtOnce
|
|
10910
10865
|
fit="contain"
|
|
10911
10866
|
className={className}
|
|
10912
10867
|
style={style}
|
|
@@ -13412,7 +13367,6 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13412
13367
|
const columnPaddingBottom = col.paddingBottom;
|
|
13413
13368
|
const hasColumnText = hasListColumnText(row.cells[col.key]);
|
|
13414
13369
|
const showColumnPaddingBottom = isVerticalLayout
|
|
13415
|
-
&& hasColumnText
|
|
13416
13370
|
&& columnPaddingBottom > 0;
|
|
13417
13371
|
const columnSizeStyle = isVerticalLayout
|
|
13418
13372
|
? { minHeight: scaled(resolvedCellMinHeight) }
|
|
@@ -13438,14 +13392,9 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13438
13392
|
);
|
|
13439
13393
|
|
|
13440
13394
|
const columnPaddingBottomOverlay = isVerticalLayout
|
|
13441
|
-
&& hasColumnText
|
|
13442
13395
|
&& showControls
|
|
13443
13396
|
&& rowIdx === 0;
|
|
13444
13397
|
|
|
13445
|
-
if (isVerticalLayout && !hasColumnText) {
|
|
13446
|
-
return null;
|
|
13447
|
-
}
|
|
13448
|
-
|
|
13449
13398
|
return (
|
|
13450
13399
|
<div
|
|
13451
13400
|
key={col.key}
|
|
@@ -13485,7 +13434,9 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13485
13434
|
...(!isVerticalLayout ? vAlignToTitleStyle(vAlign.kind) : {}),
|
|
13486
13435
|
}}
|
|
13487
13436
|
>
|
|
13488
|
-
{
|
|
13437
|
+
{hasColumnText
|
|
13438
|
+
? (row.cells[col.key] ?? null)
|
|
13439
|
+
: (isVerticalLayout ? '\\u00a0' : null)}
|
|
13489
13440
|
</span>
|
|
13490
13441
|
</div>
|
|
13491
13442
|
{showColumnPaddingBottom && (
|
|
@@ -13814,7 +13765,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13814
13765
|
</>
|
|
13815
13766
|
);
|
|
13816
13767
|
}
|
|
13817
|
-
`,jo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function J0(e,t){return{type:"string",label:e,placeholder:"Add Title...",...t&&{contentKey:t},display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ex={A:"title",B:"subtitle",C:"date"};function tx(){return Object.fromEntries(jo.map((e,t)=>{const n=Ri[t],i=`${e} column`;return[n,J0(i,ex[e])]}))}function nx(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Qc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ri]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function ix(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Us]},enum:[...Us]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Yc]}}return t[Zt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Zt(e,"textFontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Zt(e,"textFontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"textLineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"textLetterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"textWordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textTextAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textTextAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const ox=xr.reduce((e,t)=>({...e,...ix(t)}),{});function rx(e){return{verticalAlign:e===si?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===si?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function ax(e,t={}){var n;return{...rx(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Zc=new Set(["textFontFamily","textFontSettings"]);function sx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Zc.has(r):!Zc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=zl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Zt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Zt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Zt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Zt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Zt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Zt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Zt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Zt(e,"textTextAppearance")]=t.textTextAppearance),o}function ha(e={},t){return xr.reduce((n,i)=>({...n,...sx(i,ax(i,e),t)}),{})}const lx=ha(),cx=F0();function bp(e){return[Zt(e,"textFontFamily"),Zt(e,"textFontSettings"),Zt(e,"textFontSize"),Zt(e,"textLineHeight"),Zt(e,"textLetterSpacing"),Zt(e,"textWordSpacing"),Zt(e,"textTextAlign"),Zt(e,"textTextAppearance"),`${e}VerticalAlign`]}function dx(){const e=[];return Dl.forEach((t,n)=>{const i=Ri[n],o=bp(t);for(let r=1;r<Ri.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ux=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];bp(si);const px=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Oi=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],mx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Oi[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Oi[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Oi[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Oi[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Oi[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Oi[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Oi[6],link:{type:"url",value:"",target:"blank"}}],gx=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],hx={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...tx(),image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["image"]},default:mx},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...nx(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...ox,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...lx,...ha({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Qc({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...ha({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Qc({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...ha({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...dx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...px.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...gx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",cx]}],paletteBookmark:{items:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},fx={element:Q0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>G0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Zt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Zt(t,"textFontFamily")}`}),{})},schema:hx,sourceCode:Z0},Jc=300,fi=.004,yx={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},vx=["hover","focus","filled","success","error"];function xx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ed(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function td(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}function bx(e){return`
|
|
13768
|
+
`,jo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function J0(e,t){return{type:"string",label:e,placeholder:"Add Title...",...t&&{contentKey:t},display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ex={A:"title",B:"subtitle",C:"date"};function tx(){return Object.fromEntries(jo.map((e,t)=>{const n=Ri[t],i=`${e} column`;return[n,J0(i,ex[e])]}))}function nx(){const e={};for(const t of jo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Qc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ri]};for(const r of jo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function ix(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Us]},enum:[...Us]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Yc]}}return t[Qt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qt(e,"textFontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qt(e,"textFontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qt(e,"textLineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qt(e,"textLetterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qt(e,"textWordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qt(e,"textTextAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qt(e,"textTextAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const ox=xr.reduce((e,t)=>({...e,...ix(t)}),{});function rx(e){return{verticalAlign:e===si?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===si?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function ax(e,t={}){var n;return{...rx(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Zc=new Set(["textFontFamily","textFontSettings"]);function sx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Zc.has(r):!Zc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=zl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qt(e,"textTextAppearance")]=t.textTextAppearance),o}function ha(e={},t){return xr.reduce((n,i)=>({...n,...sx(i,ax(i,e),t)}),{})}const lx=ha(),cx=F0();function bp(e){return[Qt(e,"textFontFamily"),Qt(e,"textFontSettings"),Qt(e,"textFontSize"),Qt(e,"textLineHeight"),Qt(e,"textLetterSpacing"),Qt(e,"textWordSpacing"),Qt(e,"textTextAlign"),Qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function dx(){const e=[];return Dl.forEach((t,n)=>{const i=Ri[n],o=bp(t);for(let r=1;r<Ri.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ux=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];bp(si);const px=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Oi=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],mx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Oi[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Oi[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Oi[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Oi[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Oi[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Oi[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Oi[6],link:{type:"url",value:"",target:"blank"}}],gx=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],hx={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...tx(),image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["image"]},default:mx},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...nx(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...ox,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...lx,...ha({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Qc({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...ha({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Qc({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...ha({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...dx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...px.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...jo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...gx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",cx]}],paletteBookmark:{items:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},fx={element:Q0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>G0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Qt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Qt(t,"textFontFamily")}`}),{})},schema:hx,sourceCode:Z0},Jc=300,fi=.004,yx={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},vx=["hover","focus","filled","success","error"];function xx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ed(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function td(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}function bx(e){return`
|
|
13818
13769
|
.${e}-wrapper {
|
|
13819
13770
|
box-sizing: border-box;
|
|
13820
13771
|
display: flex;
|
|
@@ -13979,7 +13930,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13979
13930
|
pointer-events: none;
|
|
13980
13931
|
z-index: 2;
|
|
13981
13932
|
}
|
|
13982
|
-
`}function nd(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function Sx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=b.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:
|
|
13933
|
+
`}function nd(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function Sx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=b.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:S="default",autoclose:m="off",icon:h,iconMaxWidth:x=.00833,iconPaddingRight:w=0,iconAnimation:F="rotate 45",questionColor:v="#000000",answerColor:P="#000000",dividerColor:M="#0000001F",iconColor:K="#000000",questionHoverColor:X="#666666",iconHoverColor:j="#666666",iconActiveColor:N="#000000",dividerHoverColor:_="#000000",questionFontFamily:T,questionFontSettings:L,questionFontSize:Y,questionLineHeight:R,questionLetterSpacing:I,questionWordSpacing:$,questionTextAppearance:G,answerFontFamily:O,answerFontSettings:U,answerFontSize:E,answerLineHeight:f,answerLetterSpacing:Q,answerWordSpacing:q,answerTextAppearance:pe,questionPaddingLeft:k=0,questionPaddingTop:me=0,questionPaddingBottom:C=0,answerPaddingLeft:ue=0,answerPaddingRight:te=0,answerPaddingTop:fe=0,answerPaddingBottom:Pe=0}=e,de=t??[],[we,V]=s.useState(()=>new Set),ie=!n||i;s.useEffect(()=>{V(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&V(new Set)},[n,o,i]);const oe=Ze=>b.scalingValue(Ze,n??!1),le=Math.max(k,fi),ve=Math.max(me,fi),Fe=Math.max(C,fi),Ee=Math.max(ue,fi),Ce=Math.max(te,fi),Se=Math.max(fe,fi),g=Math.max(Pe,fi),Z=Math.max(0,(d??1)-w-x),J=Math.max(0,(d??1)-te),re=Math.max(0,(d??1)-ue),he=Math.max(w,fi),z=Math.max(0,(d??1)-k-x),B=s.useMemo(()=>we.size===0?0:Math.min(...we),[we]),ne=s.useCallback(Ze=>we.has(Ze),[we]),ce=ie&&S==="default"?`${l}-entry-hover-default`:"",ee=h??"",H=ee!=="",be=F.replace(/^rotate /,""),ae=`${l}-icon-anim-${be}`,W=pn(nn(nd(T,L,Y,R,I,$,G,v),n)),ke=pn(nn(nd(O,U,E,f,Q,q,pe,P),n)),ze=ed(Y,R,`${l}-question`,`${l}-text-tight-leading`),Xe=ed(E,f,`${l}-answer-text`,`${l}-text-tight-leading`),Ue=td(Y,R,l,n),Qe=td(E,f,l,n),We=b.buildColorVars(l,{questionColor:v,answerColor:P,dividerColor:M,iconColor:K,questionHoverColor:X,iconHoverColor:j,iconActiveColor:N,dividerHoverColor:_},yx,vx),it=r&&r!=="default"?`${l}-state-${r}`:"",ye=s.useCallback(Ze=>{ie&&V(et=>{if(et.has(Ze)){const tt=new Set(et);return tt.delete(Ze),tt}if(m==="on")return new Set([Ze]);const at=new Set(et);return at.add(Ze),at})},[ie,m]),Te=s.useMemo(()=>bx(l),[l]),Ve={[`--${l}-divider-width`]:b.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:b.scalingValue(x,n??!1),...u>0?{[`--${l}-question-min-height`]:b.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Te}}),a.jsx("div",{style:We,children:a.jsx("div",{className:Et(`${l}-wrapper`,n&&!i&&`${l}-editor`,ce,it),style:{width:b.scalingValue(d,n??!1),maxWidth:"100%",...Ve},children:de.map((Ze,et)=>{var De;const at=ne(et),tt=((De=Ze.question)==null?void 0:De.trim())??"",Ye=Ze.answer,xt=((Ye==null?void 0:Ye.length)??0)>0,pt=c&&et===B;return a.jsxs("div",{className:Et(`${l}-item`,at&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[pt&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(ve)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(le),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(he),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":at,style:{...W,...Ue,paddingLeft:oe(k),paddingRight:oe(w)},onClick:()=>ye(et),children:[me>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(me)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:ze,children:tt}),xt&&(H?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ae}`,"aria-hidden":"true",children:a.jsx(mn,{url:ee,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${ae}`,"aria-hidden":"true"}))]}),C>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:oe(C)},"aria-hidden":"true"})]}),pt&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(Fe)}})]}),xt&&Ye&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!at,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[pt&&at&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:oe(Se)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(J),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:oe(Ee),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(re),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:oe(Ce),height:"100%"}})]}),fe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(fe)}}),a.jsx("div",{className:`${l}-answer`,style:{...ke,...Qe,paddingLeft:oe(ue),paddingRight:oe(te)},children:a.jsx("div",{className:Xe,children:a.jsx(Zi,{content:Ye})})}),Pe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:oe(Pe)}}),pt&&at&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:oe(g)}})]})})})]},et)})})})]})}const wx=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
13983
13934
|
import cn from 'classnames';
|
|
13984
13935
|
import { CommonComponentProps } from '../props';
|
|
13985
13936
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -14727,7 +14678,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
14727
14678
|
</>
|
|
14728
14679
|
);
|
|
14729
14680
|
}
|
|
14730
|
-
`;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const id={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},$x=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Cx={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:yi("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...id.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...id.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...$x],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Tx={element:Sx,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Cx,sourceCode:wx},li=e=>e.display==="cover",Va=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},od=100,Ix=.2,rd=8,Sp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?od:Math.max(od,window.innerHeight*Ix),[]),y=s.useCallback(T=>Math.max(0,1-T/(p*1.5)),[p]),x=s.useCallback(T=>Math.max(0,1-T/(p*.45)),[p]),m=s.useCallback(T=>{const C=typeof window<"u"?window.innerHeight:800,q=Math.max(.88,1-T/C*.12);return`translateY(${T}px) scale(${q})`},[]),f=s.useCallback(()=>{d.current=null},[]),S=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),f()},[n,f]),w=s.useCallback(()=>{const T=typeof window<"u"?window.innerHeight:800;c(!0),r(T),window.setTimeout(()=>{t(),f(),c(!1)},Math.min(n,200))},[n,t,f]),N=s.useCallback(T=>{!e||l||T.pointerType==="touch"&&(i!=null&&i(T.target)||(d.current={startX:T.clientX,startY:T.clientY,isLocked:null,pointerId:T.pointerId}))},[e,l,i]),v=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=T.clientX-C.startX,R=T.clientY-C.startY;if(C.isLocked===null){if(Math.abs(q)<rd&&Math.abs(R)<rd)return;if(R>0&&R>Math.abs(q))C.isLocked=!0,T.currentTarget.setPointerCapture(T.pointerId);else{C.isLocked=!1,f();return}}if(!C.isLocked)return;T.preventDefault();const $=Math.max(0,R);u.current=$,r($)},[e,f]),M=s.useCallback(T=>{const C=d.current;if(!e||!C||T.pointerType!=="touch"||C.pointerId!==T.pointerId)return;const q=C.isLocked===!0;if(T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),!q){f();return}T.clientY-C.startY>=p?w():S()},[p,w,e,f,S]),E=s.useCallback(T=>{M(T)},[M]),U=s.useCallback(T=>{M(T)},[M]),X=o>0,D=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",W=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:m(o),transition:D,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:W?{opacity:x(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:N,onPointerMove:v,onPointerUp:E,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Lx="[data-lightbox-scrollable]",Vl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Lx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Mx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Px=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ex=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Rx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(f,S)=>{Px(t),e.scrollLeft=f,S&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=f=>{f.target!==t||f.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Ex(t),!1))}},cr=300,kx=900,Ax=1500,Fx="cubic-bezier(0.16, 1, 0.3, 1)",Nx=3e3,_x=2,Hx=16,Wx=.05,Ox=1,Xr=.3,Dx=50,zx=20,ro=.004,Fo=["title1","title2","title3"],Bx={title1:"1",title2:"2",title3:"3"},jx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Vx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${zx}px)`,Gx=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Xx=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=Gx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ux=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],qx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[Bx[e],Ux(e)]))}),Gl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},wp=(e,t)=>Gl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ad=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Gl(e.length,n),effective:wp(e.length,n)}},Kx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},hs=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[jx[t]]}},Yx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),fs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Vx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Qx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:f,closeIconHoverColor:S,thumbnailTrigger:w,thumbnailVisibility:N,thumbnailObjectFit:v,thumbnailActive:M,thumbnailActiveColor:E,title1Width:U,title2Width:X,title3Width:D,title1MarginLeft:_=0,title2MarginLeft:W=0,title3MarginLeft:T=0,titleRowMarginBottom:C=0,titleHeaderLayout:q="desktop",contentMarginTop:R,iconMarginLeft:$}=n,I=A=>b.scalingValue(A,i??!1),j=d??n.thumnailSize??.03,F=I(j),K=I(u),P=I(p??.02),h=I(y??0),J=I(R??0),V=Ur(J),he=I($??0),[k,ce]=s.useState(0),L=s.useRef(k);L.current=k;const me=t[k],{title1:te,title2:ve,title3:Le}=Xx(me),de=fs("title1",hs(n,"title1"),i),ue=fs("title2",hs(n,"title2"),i),Z=fs("title3",hs(n,"title3"),i),le=q==="mobile",oe=!o&&(!i||r),ge=oe,Se=oe,Re=oe,Ne=li(v),Te=Ne?{"--image-aspect-ratio":Va(v)}:void 0,Ce=!!(te||ve||Le),g=s.useMemo(()=>Kx(e,te,ve,Le,de,ue,Z),[e,k,te,ve,Le,de,ue,Z]),Y=s.useMemo(()=>({title1Width:U,title2Width:X,title3Width:D}),[U,X,D]),ee=s.useMemo(()=>g.map(A=>Y[A.widthKey]),[g,Y]),ae=s.useMemo(()=>Gl(g.length,ee),[g.length,ee]),ye=s.useMemo(()=>wp(g.length,ee),[g.length,ee]),ne=s.useMemo(()=>g.filter(A=>A.prefix==="title1"),[g]),B=s.useMemo(()=>g.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[g]),G=s.useMemo(()=>ad(ne,Y),[ne,Y]),z=s.useMemo(()=>ad(B,Y),[B,Y]),ie=s.useCallback((A,se)=>{const fe=g.indexOf(A);if(!le||se==="single-row")return{effectiveWidth:ye[fe]??0,resolvedWidth:ae[fe]??0,maxWidth:qr(fe,ae)};if(se==="two-row-top"){const Be=ne.indexOf(A);return{effectiveWidth:G.effective[Be]??0,resolvedWidth:G.resolved[Be]??0,maxWidth:qr(Be,G.resolved)}}const ke=B.indexOf(A);return{effectiveWidth:z.effective[ke]??0,resolvedWidth:z.resolved[ke]??0,maxWidth:qr(ke,z.resolved)}},[B,z,ye,ae,g,ne,G,le]),H=s.useCallback(A=>b.scalingValue(A,i??!1),[i]),be=H(C??0),re=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:W,title3MarginLeft:T}),[_,W,T]),Q=s.useCallback(A=>g.slice(0,A+1).reduce((se,fe,ke)=>se+(fe!=null&&fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(ae[ke]??0),0)+(le?0:_??0),[g,re,ae,le,_]),Pe=s.useCallback(()=>le?0:_??0,[le,_]),Ae=s.useCallback(A=>B.slice(0,A).reduce((se,fe,ke)=>se+(fe.marginLeftKey?re[fe.marginLeftKey]??0:0)+(z.resolved[ke]??0),0),[B,z.resolved,re]),He=s.useCallback(A=>{const se=B[A];return Ae(A)+(se.marginLeftKey?re[se.marginLeftKey]??0:0)+(z.resolved[A]??0)},[B,z.resolved,Ae,re]),Xe=(A,se)=>{const fe=A.marginLeftKey?re[A.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Be,maxWidth:gt}=ie(A,se),Wt=o&&se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...se==="single-row"?{gridArea:A.prefix}:{},width:H(ke),...fe>0?{marginLeft:H(fe)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Wt&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(-fe),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Wt&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ro/2),width:H(ro),height:"100%",pointerEvents:"auto"}})]},A.className)},Ue=()=>{const A=le?-1:g.findIndex(ke=>ke.prefix==="title1"),se=!le&&(o||(_??0)>0)?(()=>{const ke=_??0,Be=A>=0?ae[A]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:0,width:`max(${H(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,fe=g.flatMap((ke,Be)=>{if(!ke.marginLeftKey)return[];const gt=re[ke.marginLeftKey]??0,Wt=Yx(g,ae,re,Be)+Pe();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae[Be]),style:{position:"absolute",top:0,left:H(Wt),width:`max(${H(gt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return se?[se,...fe]:fe},Je=()=>g.map((A,se)=>{const fe=qr(se,ae),Be=Q(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),je=()=>B.flatMap((A,se)=>{if(!A.marginLeftKey)return[];const fe=re[A.marginLeftKey]??0,ke=Ae(se),{resolvedWidth:Be}=ie(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Be),style:{position:"absolute",top:0,left:H(ke),width:`max(${H(fe)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),xe=()=>B.map((A,se)=>{const{maxWidth:fe}=ie(A,"two-row-bottom"),Be=He(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(fe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(Be),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useRef(null),tt=s.useRef(null),ot=s.useRef([]),lt=s.useRef([]),it=s.useRef(0),xt=s.useRef(null),rt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),_e=s.useRef(null),We=s.useRef(null),vt=s.useRef(0),Ve=s.useRef("forward"),Ke=s.useRef(0),pe=s.useRef(null),De=s.useRef(!1),qe=t.length>1&&(!o||!!r),bt=qe?3:1,yt=s.useMemo(()=>Array.from({length:bt},()=>t).flat(),[t,bt]),[Rt,ct]=s.useState(!1),[wt,nt]=s.useState(!1),[Nt,jt]=s.useState(!0),$e=s.useRef(null),Ge=s.useRef(null),ht=s.useRef(!1),Lt=s.useRef(!1),$t=s.useRef(null),mt=s.useRef(null),_t=ge&&!Nt,Ot=s.useCallback(()=>{ge&&(jt(!0),mt.current&&clearTimeout(mt.current),mt.current=setTimeout(()=>{rt.current.isActive||jt(!1)},Nx))},[ge]),zt=s.useCallback(()=>{o||Lt.current||(Lt.current=!0,nt(!1),$t.current=setTimeout(()=>{l()},cr))},[o,l]),Ee=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":_t?"true":"false",style:{width:b.scalingValue(m??0,i),height:b.scalingValue(m??0,i),marginRight:he,"--close-icon-hover-color":S},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:zt,"aria-label":"Close",children:a.jsx(mn,{url:x,fill:f,hoverFill:i&&!r?f:S,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),dt=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(_??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ut=()=>{const A=g.find(ke=>ke.prefix==="title1"),se=g.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),fe=se.length>0||o||(C??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?dt():null,A&&Xe(A,"two-row-top"),x&&Ee()]}),fe?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[se.map(ke=>Xe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[je(),xe()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:be,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?dt("single-row"):null,g.map(A=>Xe(A,"single-row")),o?a.jsxs(a.Fragment,{children:[Ue(),Je()]}):null,x?Ee():null]}),Qe=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:at,backdropStyle:It,mediaAreaStyle:At,overlayContentStyle:pt,swipeHandlers:Ut,dismissAreaStyle:qt}=Sp({enabled:oe??!1,onClose:zt,animMs:cr,isBlockedTarget:Qe}),Dt=()=>{if(!qe||t.length===0)return it.current=0,0;const A=lt.current[0],se=lt.current[t.length];if(!A||!se)return it.current;const fe=se.offsetLeft-A.offsetLeft;return fe>0&&(it.current=fe),it.current},Vt=(A=!1)=>{if(!qe)return;const se=ze.current,fe=Dt();!se||fe<=0||fe<se.clientWidth*.25||(se.scrollLeft<=0?(se.scrollLeft+=fe,A&&(rt.current.scrollLeft+=fe),De.current&&(Ke.current+=fe)):se.scrollLeft>=fe*2&&(se.scrollLeft-=fe,A&&(rt.current.scrollLeft-=fe),De.current&&(Ke.current-=fe)))},Gt=(A,se=(fe=>(fe=ze.current)==null?void 0:fe.scrollLeft)()??0)=>{if(!qe)return A;let ke=t.length+A,Be=1/0;for(let gt=0;gt<bt;gt++){const Wt=gt*t.length+A,Kt=lt.current[Wt];if(!Kt)continue;const sn=Math.abs(Kt.offsetLeft-se);sn<Be&&(Be=sn,ke=Wt)}return ke},Bt=A=>{const se=ze.current;return!A||!se?!1:A.offsetWidth>se.clientWidth+1},Yt=A=>{const se=ze.current;if(!A||!se||!Bt(A))return!1;const fe=A.offsetLeft,ke=fe+A.offsetWidth;return se.scrollLeft>=fe-1&&se.scrollLeft+se.clientWidth<=ke+1},O=(A=(se=>(se=ze.current)==null?void 0:se.scrollLeft)()??0)=>{for(let ke=0;ke<lt.current.length;ke+=1){const Be=lt.current[ke];if(Be&&Yt(Be))return ke}let fe={flatIndex:0,distance:1/0};return lt.current.forEach((ke,Be)=>{if(!ke)return;const gt=Math.abs(ke.offsetLeft-A);gt<fe.distance&&(fe={flatIndex:Be,distance:gt})}),fe.flatIndex},Me=A=>{ze.current&<.current.forEach(se=>{se&&(se.style.scrollSnapAlign=Bt(se)&&A==="backward"?"end":"start")})},Fe=(A,se,fe)=>{const ke=A-se,Be=O(se),gt=lt.current[Be];if(Yt(gt))return O(A)%t.length;const Wt=lt.current[Be+1],Kt=gt?Wt?Wt.offsetLeft-gt.offsetLeft:gt.offsetWidth:0,sn=Kt>0?ke>Kt*Xr?1:ke<-Kt*Xr?-1:0:0;return sn===0?fe:qe?(fe+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,fe+sn))},Oe=s.useCallback((A=!1)=>{if(N!=="on"||o)return;const se=tt.current,fe=L.current,ke=ot.current[fe];if(!se||!ke||se.scrollWidth<=se.clientWidth)return;const Be=se.scrollLeft,gt=Be+se.clientWidth,Wt=ke.offsetLeft,Kt=Wt+ke.offsetWidth;if(Wt>=Be&&Kt<=gt)return;const sn=se.scrollWidth-se.clientWidth;let en=Be;if(!A&&$e.current===null){const gi=ot.current[fe-1],An=ot.current[fe+1],Zn=gi?ke.offsetLeft-gi.offsetLeft:An?An.offsetLeft-ke.offsetLeft:ke.offsetWidth;Kt>gt?en+=Zn:Wt<Be&&(en-=Zn)}else Kt>gt?en=Kt-se.clientWidth:en=Wt;se.scrollLeft=Math.max(0,Math.min(sn,en))},[o,N]),ft=s.useCallback((A=!1)=>{A&&(ht.current=!0),Ge.current===null&&(Ge.current=requestAnimationFrame(()=>{Ge.current=null;const se=ht.current;ht.current=!1,Oe(se)}))},[Oe]),Tt=s.useCallback(A=>{if(A===L.current)return;const se=L.current;L.current=A;const fe=Math.abs(A-se)>1,ke=qe&&t.length>1&&(se===t.length-1&&A===0||se===0&&A===t.length-1);ce(A),ft(fe||ke)},[t.length,qe,ft]),et=()=>{if(!ze.current||t.length===0||$e.current!==null||rt.current.isActive&&rt.current.hasMoved)return;const A=ze.current.scrollLeft,se=O(A)%t.length;se!==L.current&&Tt(se)},Mt=()=>{$e.current=null},Ct=A=>{const se=ze.current;se&&(se.style.scrollSnapType=A?"":"none")},Ht=()=>{var A;(A=We.current)==null||A.call(We),We.current=null},on=()=>{pe.current!==null&&(cancelAnimationFrame(pe.current),pe.current=null),De.current=!1},fn=()=>{const A=ze.current;if(!A){pe.current=null,De.current=!1;return}const se=Ke.current-A.scrollLeft;if(Math.abs(se)<.5){A.scrollLeft=Ke.current,Vt(),et(),pe.current=null,De.current=!1;return}A.scrollLeft+=se*Wx,Vt(),et(),Ot(),pe.current=requestAnimationFrame(fn)},bn=()=>{const A=Ze.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,se,fe,ke)=>{bn(),A.scrollLeft=se,vt.current=A.scrollLeft,Vt(),fe!==void 0?(L.current=fe,ce(fe)):et(),Ct(!0),ke==null||ke()},dn=(A,{behavior:se="smooth",activeIndex:fe,onComplete:ke}={})=>{const Be=ze.current,gt=Ze.current;if(!Be||!gt)return;if(on(),Ht(),Ct(!1),se==="auto"){ui(Be,A,fe,ke);return}const Wt=Math.abs(A-Be.scrollLeft),Kt=Mx(Wt,kx,Ax,Be.clientWidth*.55);We.current=Rx(Be,gt,A,{duration:Kt,easing:Fx,onComplete:()=>{We.current=null,ui(Be,A,fe,ke)}})},pi=(A="smooth")=>{const se=ze.current;if(!se||t.length===0)return;const fe=O()%t.length,ke=Gt(fe,se.scrollLeft),Be=lt.current[ke];Be&&dn(Be.offsetLeft,{behavior:A,activeIndex:fe})},Yn=(A,se="smooth",fe,ke)=>{const Be=ze.current;if(!Be||t.length===0)return;const gt=(ke??Be.scrollLeft)-A,Wt=O(A),Kt=lt.current[Wt];if(Yt(Kt)){Ct(!0),et();return}const sn=lt.current[Wt+1],en=Kt?sn?sn.offsetLeft-Kt.offsetLeft:Kt.offsetWidth:0;if((en>0?gt>en*Xr?1:gt<-en*Xr?-1:0:0)!==0){const Ql=fe??Wt%t.length,Go=Fe(ke??Be.scrollLeft,A,Ql);Sn(Go,se);return}const An=ke??Be.scrollLeft,Zn=O(An),kr=lt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-An)<1){Ct(!0),et();return}pi("auto")},Sn=(A,se="smooth")=>{const fe=ze.current;if(!fe||t.length===0)return;const ke=Gt(A,fe.scrollLeft),Be=lt.current[ke];Be&&(se==="smooth"?$e.current=A:$e.current=null,L.current=A,ce(A),ft(!0),dn(Be.offsetLeft,{behavior:se,activeIndex:A,onComplete:se==="smooth"?Mt:void 0}))},mi=()=>{_e.current&&(window.removeEventListener("pointerup",_e.current),window.removeEventListener("pointercancel",_e.current),_e.current=null)},eo=(A,se,fe,ke,Be)=>{const gt=fe-A,Wt=ke-se,Kt=Math.abs(gt),sn=Math.abs(Wt);if(Kt<Dx||Kt<=sn)return!1;const en=gt<0?1:-1,gi=qe?(Be+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Be+en));return gi===Be?!1:(Sn(gi),!0)},wn=A=>{if(!rt.current.isActive)return;mi();const se=ze.current;if(!se)return;const{scrollLeft:fe,startActiveIndex:ke,hasMoved:Be}=rt.current,gt=se.scrollLeft;Vt(!0),rt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ct(!1),A!==void 0&&se.hasPointerCapture(A)&&se.releasePointerCapture(A),Be?Yn(fe,"smooth",ke,gt):(Ct(!0),et()),Ot()},Qn=(A,se)=>{const fe=xt.current;xt.current=null,fe&&(eo(fe.startX,fe.startY,A,se,fe.startActiveIndex),Ot())},to=A=>{if(!Se)return;if(A.pointerType==="touch"){if(on(),Ct(!0),Qe(A.target))return;xt.current={startX:A.clientX,startY:A.clientY,startActiveIndex:L.current};return}if(A.pointerType!=="mouse"||A.button!==0||Qe(A.target))return;const se=ze.current;if(!se)return;on(),Ht(),bn(),$e.current=null,rt.current={isActive:!0,startX:A.clientX,scrollLeft:se.scrollLeft,startActiveIndex:L.current,hasMoved:!1},Ct(!1),Ot(),se.setPointerCapture(A.pointerId),mi();const fe=ke=>{ke.pointerType==="mouse"&&wn(ke.pointerId)};_e.current=fe,window.addEventListener("pointerup",fe),window.addEventListener("pointercancel",fe)},no=A=>{if(!Se||A.pointerType!=="mouse")return;const se=ze.current;if(!se||!rt.current.isActive)return;if(A.buttons===0){wn(A.pointerId);return}const fe=A.clientX-rt.current.startX;Math.abs(fe)>Ox&&(rt.current.hasMoved=!0,ct(!0)),rt.current.hasMoved&&(A.preventDefault(),se.scrollLeft=rt.current.scrollLeft-fe,Vt(!0),et(),Ot())},we=A=>{if(Se){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):xt.current=null;return}A.pointerType==="mouse"&&wn(A.pointerId)}},Ye=A=>{!Se||A.pointerType!=="mouse"||wn(A.pointerId)};return Vl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>nt(!0));return()=>{cancelAnimationFrame(A),Ht(),mi(),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),$t.current&&clearTimeout($t.current),mt.current&&clearTimeout(mt.current)}},[]),s.useEffect(()=>{if(!ge){jt(!0);return}Ot();const A=()=>Ot();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),mt.current&&clearTimeout(mt.current)}},[ge,Ot]),s.useEffect(()=>{const A=se=>{se.key==="Escape"&&zt()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[zt]),s.useLayoutEffect(()=>{Dt()},[h,t.length,qe]),s.useLayoutEffect(()=>{o||Sn(L.current,"auto")},[h,o]),s.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,qe]),s.useEffect(()=>{const A=ze.current;if(!A||o||!oe)return;const se=fe=>{if(fe.preventDefault(),Math.abs(fe.deltaY)<=Math.abs(fe.deltaX))return;const ke=fe.deltaMode===1?Hx:fe.deltaMode===2?A.clientHeight:1,Be=fe.deltaY*ke*_x;if(Be!==0){if(Ht(),De.current||(De.current=!0,Ke.current=A.scrollLeft,$e.current=null,Ct(!1)),Ke.current+=Be,!qe){const gt=A.scrollWidth-A.clientWidth;Ke.current=Math.max(0,Math.min(gt,Ke.current))}Ot(),pe.current===null&&(pe.current=requestAnimationFrame(fn))}};return A.addEventListener("wheel",se,{passive:!1}),()=>{A.removeEventListener("wheel",se),on()}},[o,oe,qe]),s.useEffect(()=>{const A=ze.current;if(!A)return;const se=()=>{Vt(rt.current.isActive);const ke=A.scrollLeft,Be=ke-vt.current;vt.current=ke;const gt=it.current>0?it.current*.5:1/0;if(Be!==0&&Math.abs(Be)<gt){const Wt=Be>0?"forward":"backward";Wt!==Ve.current&&(Ve.current=Wt,Me(Wt))}rt.current.isActive&&rt.current.hasMoved||et()};A.addEventListener("scroll",se,{passive:!0});const fe=new ResizeObserver(()=>{Dt(),Vt(rt.current.isActive),Me(Ve.current),et()});return fe.observe(A),()=>{Ht(),A.removeEventListener("scroll",se),fe.disconnect()}},[t.length,qe]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{at||zt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:wt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...It}}),a.jsxs("div",{ref:Ie,className:`${e}-lightbox-dismiss-area`,style:qt,...Ut,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Se&&t.length>0?"true":"false","data-mouse-dragging":Rt?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:we,onPointerCancel:we,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:h},children:yt.map((A,se)=>{const fe=A.image.objectFit??"contain",ke=se%t.length,Be=Math.floor(se/t.length),gt=Ur(h),Wt=`calc(-0.5 * (${gt} + ${h}))`;return a.jsxs("div",{ref:Kt=>lt.current[se]=Kt,className:`${e}-strip-item`,style:{height:q==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:fe}}),o&&ke<t.length-1&&Be===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Wt,width:gt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Be}-${A.image.assetId}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":_t?"true":"false",style:pt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:J,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:V,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||x)&&a.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?ut():Ce||x?kt():null})})})]}),t.length>1&&N==="on"&&(()=>{const A=Ur(P),se=`calc(-0.5 * (${P} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:tt,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:fe=>fe.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":M,style:{gap:K,"--thumbnail-active-color":E},children:[t.map((fe,ke)=>{const Be=Ur(K),gt=`calc(-0.5 * (${Be} + ${K}))`;return a.jsxs("div",{ref:Wt=>{ot.current[ke]=Wt},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===ke?"true":"false",onClick:()=>oe&&w==="click"&&Sn(ke),onMouseEnter:()=>Re&&w==="hover"&&Sn(ke),"aria-label":fe.image.name?`View ${fe.image.name}`:`View image ${ke+1}`,"aria-current":k===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ne?` ${e}-thumb-image-cover`:""}`,src:fe.image.assetId,alt:"",draggable:!1,style:{...Te,maxWidth:F,maxHeight:F,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:gt,width:Be,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${fe.image.assetId}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:se,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Zx(e){return`
|
|
14681
|
+
`;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const id={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},$x=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Cx={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:yi("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...id.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...id.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...$x],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Tx={element:Sx,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:Cx,sourceCode:wx},li=e=>e.display==="cover",Va=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},od=100,Ix=.2,rd=8,Sp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?od:Math.max(od,window.innerHeight*Ix),[]),y=s.useCallback(T=>Math.max(0,1-T/(p*1.5)),[p]),S=s.useCallback(T=>Math.max(0,1-T/(p*.45)),[p]),m=s.useCallback(T=>{const L=typeof window<"u"?window.innerHeight:800,Y=Math.max(.88,1-T/L*.12);return`translateY(${T}px) scale(${Y})`},[]),h=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),w=s.useCallback(()=>{const T=typeof window<"u"?window.innerHeight:800;c(!0),r(T),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),F=s.useCallback(T=>{!e||l||T.pointerType==="touch"&&(i!=null&&i(T.target)||(d.current={startX:T.clientX,startY:T.clientY,isLocked:null,pointerId:T.pointerId}))},[e,l,i]),v=s.useCallback(T=>{const L=d.current;if(!e||!L||T.pointerType!=="touch"||L.pointerId!==T.pointerId)return;const Y=T.clientX-L.startX,R=T.clientY-L.startY;if(L.isLocked===null){if(Math.abs(Y)<rd&&Math.abs(R)<rd)return;if(R>0&&R>Math.abs(Y))L.isLocked=!0,T.currentTarget.setPointerCapture(T.pointerId);else{L.isLocked=!1,h();return}}if(!L.isLocked)return;T.preventDefault();const I=Math.max(0,R);u.current=I,r(I)},[e,h]),P=s.useCallback(T=>{const L=d.current;if(!e||!L||T.pointerType!=="touch"||L.pointerId!==T.pointerId)return;const Y=L.isLocked===!0;if(T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),!Y){h();return}T.clientY-L.startY>=p?w():x()},[p,w,e,h,x]),M=s.useCallback(T=>{P(T)},[P]),K=s.useCallback(T=>{P(T)},[P]),X=o>0,j=l?`transform ${n}ms ease`:"none",N=l?`opacity ${n}ms ease`:"none",_=o>0||l;return{isSwipeDragging:X,backdropStyle:{opacity:y(o),transition:N},mediaAreaStyle:{transform:m(o),transition:j,touchAction:X?"none":void 0,willChange:X?"transform":void 0},overlayContentStyle:_?{opacity:S(o),transition:N}:void 0,swipeHandlers:e?{onPointerDown:F,onPointerMove:v,onPointerUp:M,onPointerCancel:K}:{},dismissAreaStyle:e?{touchAction:X?"none":"pan-x"}:void 0}},Lx="[data-lightbox-scrollable]",Vl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Lx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},Px=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Mx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ex=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Rx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,x)=>{Mx(t),e.scrollLeft=h,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const S=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,S(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,S(),u(n,!0))},i+64),()=>{p||(p=!0,S(),u(l-Ex(t),!1))}},cr=300,kx=900,Ax=1500,Fx="cubic-bezier(0.16, 1, 0.3, 1)",Nx=3e3,_x=2,Hx=16,Wx=.05,Ox=1,Xr=.3,Dx=50,zx=20,ro=.004,Fo=["title1","title2","title3"],Bx={title1:"1",title2:"2",title3:"3"},jx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Vx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${zx}px)`,Gx=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Xx=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=Gx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Ux=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],qx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[Bx[e],Ux(e)]))}),Gl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},wp=(e,t)=>Gl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ad=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Gl(e.length,n),effective:wp(e.length,n)}},Kx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},hs=(e,t)=>{const n=i=>{const o=Jt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[jx[t]]}},Yx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),fs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Vx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Qx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:S,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:x,thumbnailTrigger:w,thumbnailVisibility:F,thumbnailObjectFit:v,thumbnailActive:P,thumbnailActiveColor:M,title1Width:K,title2Width:X,title3Width:j,title1MarginLeft:N=0,title2MarginLeft:_=0,title3MarginLeft:T=0,titleRowMarginBottom:L=0,titleHeaderLayout:Y="desktop",contentMarginTop:R,iconMarginLeft:I}=n,$=A=>b.scalingValue(A,i??!1),G=d??n.thumnailSize??.03,O=$(G),U=$(u),E=$(p??.02),f=$(y??0),Q=$(R??0),q=Ur(Q),pe=$(I??0),[k,me]=s.useState(0),C=s.useRef(k);C.current=k;const ue=t[k],{title1:te,title2:fe,title3:Pe}=Xx(ue),de=fs("title1",hs(n,"title1"),i),we=fs("title2",hs(n,"title2"),i),V=fs("title3",hs(n,"title3"),i),ie=Y==="mobile",oe=!o&&(!i||r),le=oe,ve=oe,Fe=oe,Ee=li(v),Ce=Ee?{"--image-aspect-ratio":Va(v)}:void 0,Se=!!(te||fe||Pe),g=s.useMemo(()=>Kx(e,te,fe,Pe,de,we,V),[e,k,te,fe,Pe,de,we,V]),Z=s.useMemo(()=>({title1Width:K,title2Width:X,title3Width:j}),[K,X,j]),J=s.useMemo(()=>g.map(A=>Z[A.widthKey]),[g,Z]),re=s.useMemo(()=>Gl(g.length,J),[g.length,J]),he=s.useMemo(()=>wp(g.length,J),[g.length,J]),z=s.useMemo(()=>g.filter(A=>A.prefix==="title1"),[g]),B=s.useMemo(()=>g.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[g]),ne=s.useMemo(()=>ad(z,Z),[z,Z]),ce=s.useMemo(()=>ad(B,Z),[B,Z]),ee=s.useCallback((A,se)=>{const ge=g.indexOf(A);if(!ie||se==="single-row")return{effectiveWidth:he[ge]??0,resolvedWidth:re[ge]??0,maxWidth:qr(ge,re)};if(se==="two-row-top"){const je=z.indexOf(A);return{effectiveWidth:ne.effective[je]??0,resolvedWidth:ne.resolved[je]??0,maxWidth:qr(je,ne.resolved)}}const Re=B.indexOf(A);return{effectiveWidth:ce.effective[Re]??0,resolvedWidth:ce.resolved[Re]??0,maxWidth:qr(Re,ce.resolved)}},[B,ce,he,re,g,z,ne,ie]),H=s.useCallback(A=>b.scalingValue(A,i??!1),[i]),be=H(L??0),ae=s.useMemo(()=>({title1MarginLeft:N,title2MarginLeft:_,title3MarginLeft:T}),[N,_,T]),W=s.useCallback(A=>g.slice(0,A+1).reduce((se,ge,Re)=>se+(ge!=null&&ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(re[Re]??0),0)+(ie?0:N??0),[g,ae,re,ie,N]),ke=s.useCallback(()=>ie?0:N??0,[ie,N]),ze=s.useCallback(A=>B.slice(0,A).reduce((se,ge,Re)=>se+(ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(ce.resolved[Re]??0),0),[B,ce.resolved,ae]),Xe=s.useCallback(A=>{const se=B[A];return ze(A)+(se.marginLeftKey?ae[se.marginLeftKey]??0:0)+(ce.resolved[A]??0)},[B,ce.resolved,ze,ae]),Ue=(A,se)=>{const ge=A.marginLeftKey?ae[A.marginLeftKey]??0:0,{effectiveWidth:Re,resolvedWidth:je,maxWidth:gt}=ee(A,se),Ht=o&&se==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...se==="single-row"?{gridArea:A.prefix}:{},width:H(Re),...ge>0?{marginLeft:H(ge)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),Ht&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:H(-ge),width:`max(${H(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ht&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(gt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ro/2),width:H(ro),height:"100%",pointerEvents:"auto"}})]},A.className)},Qe=()=>{const A=ie?-1:g.findIndex(Re=>Re.prefix==="title1"),se=!ie&&(o||(N??0)>0)?(()=>{const Re=N??0,je=A>=0?re[A]:K??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:0,width:`max(${H(Re)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ge=g.flatMap((Re,je)=>{if(!Re.marginLeftKey)return[];const gt=ae[Re.marginLeftKey]??0,Ht=Yx(g,re,ae,je)+ke();return a.jsx("div",{"data-controls":Re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re[je]),style:{position:"absolute",top:0,left:H(Ht),width:`max(${H(gt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Re.marginLeftKey)});return se?[se,...ge]:ge},We=()=>g.map((A,se)=>{const ge=qr(se,re),je=W(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(je),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),it=()=>B.flatMap((A,se)=>{if(!A.marginLeftKey)return[];const ge=ae[A.marginLeftKey]??0,Re=ze(se),{resolvedWidth:je}=ee(A,"two-row-bottom");return a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(je),style:{position:"absolute",top:0,left:H(Re),width:`max(${H(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),ye=()=>B.map((A,se)=>{const{maxWidth:ge}=ee(A,"two-row-bottom"),je=Xe(se)-ro/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(je),width:H(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Te=s.useRef(null),Ve=s.useRef(null),Ze=s.useRef(null),et=s.useRef(null),at=s.useRef([]),tt=s.useRef([]),Ye=s.useRef(0),xt=s.useRef(null),pt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),De=s.useRef(null),_e=s.useRef(null),He=s.useRef(0),Ae=s.useRef("forward"),Be=s.useRef(0),Ie=s.useRef(null),mt=s.useRef(!1),ot=t.length>1&&(!o||!!r),Ct=ot?3:1,rt=s.useMemo(()=>Array.from({length:Ct},()=>t).flat(),[t,Ct]),[St,nt]=s.useState(!1),[Rt,ht]=s.useState(!1),[Vt,Zt]=s.useState(!0),$e=s.useRef(null),Ge=s.useRef(null),ft=s.useRef(!1),Lt=s.useRef(!1),wt=s.useRef(null),vt=s.useRef(null),Nt=le&&!Vt,Wt=s.useCallback(()=>{le&&(Zt(!0),vt.current&&clearTimeout(vt.current),vt.current=setTimeout(()=>{pt.current.isActive||Zt(!1)},Nx))},[le]),Dt=s.useCallback(()=>{o||Lt.current||(Lt.current=!0,ht(!1),wt.current=setTimeout(()=>{l()},cr))},[o,l]),Me=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Nt?"true":"false",style:{width:b.scalingValue(m??0,i),height:b.scalingValue(m??0,i),marginRight:pe,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Dt,"aria-label":"Close",children:a.jsx(mn,{url:S,fill:h,hoverFill:i&&!r?h:x,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:pe,height:"100%",pointerEvents:"auto"}})]}),ct=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(N??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),dt=()=>{const A=g.find(Re=>Re.prefix==="title1"),se=g.filter(Re=>Re.prefix==="title2"||Re.prefix==="title3"),ge=se.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(N??0)>0||o?ct():null,A&&Ue(A,"two-row-top"),S&&Me()]}),ge?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[se.map(Re=>Ue(Re,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[it(),ye()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:be,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>a.jsxs(a.Fragment,{children:[(N??0)>0||o?ct("single-row"):null,g.map(A=>Ue(A,"single-row")),o?a.jsxs(a.Fragment,{children:[Qe(),We()]}):null,S?Me():null]}),Ke=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:It,mediaAreaStyle:At,overlayContentStyle:ut,swipeHandlers:Gt,dismissAreaStyle:Ut}=Sp({enabled:oe??!1,onClose:Dt,animMs:cr,isBlockedTarget:Ke}),Ot=()=>{if(!ot||t.length===0)return Ye.current=0,0;const A=tt.current[0],se=tt.current[t.length];if(!A||!se)return Ye.current;const ge=se.offsetLeft-A.offsetLeft;return ge>0&&(Ye.current=ge),Ye.current},Bt=(A=!1)=>{if(!ot)return;const se=Ve.current,ge=Ot();!se||ge<=0||ge<se.clientWidth*.25||(se.scrollLeft<=0?(se.scrollLeft+=ge,A&&(pt.current.scrollLeft+=ge),mt.current&&(Be.current+=ge)):se.scrollLeft>=ge*2&&(se.scrollLeft-=ge,A&&(pt.current.scrollLeft-=ge),mt.current&&(Be.current-=ge)))},Xt=(A,se=(ge=>(ge=Ve.current)==null?void 0:ge.scrollLeft)()??0)=>{if(!ot)return A;let Re=t.length+A,je=1/0;for(let gt=0;gt<Ct;gt++){const Ht=gt*t.length+A,qt=tt.current[Ht];if(!qt)continue;const sn=Math.abs(qt.offsetLeft-se);sn<je&&(je=sn,Re=Ht)}return Re},zt=A=>{const se=Ve.current;return!A||!se?!1:A.offsetWidth>se.clientWidth+1},Kt=A=>{const se=Ve.current;if(!A||!se||!zt(A))return!1;const ge=A.offsetLeft,Re=ge+A.offsetWidth;return se.scrollLeft>=ge-1&&se.scrollLeft+se.clientWidth<=Re+1},D=(A=(se=>(se=Ve.current)==null?void 0:se.scrollLeft)()??0)=>{for(let Re=0;Re<tt.current.length;Re+=1){const je=tt.current[Re];if(je&&Kt(je))return Re}let ge={flatIndex:0,distance:1/0};return tt.current.forEach((Re,je)=>{if(!Re)return;const gt=Math.abs(Re.offsetLeft-A);gt<ge.distance&&(ge={flatIndex:je,distance:gt})}),ge.flatIndex},Le=A=>{Ve.current&&tt.current.forEach(se=>{se&&(se.style.scrollSnapAlign=zt(se)&&A==="backward"?"end":"start")})},Ne=(A,se,ge)=>{const Re=A-se,je=D(se),gt=tt.current[je];if(Kt(gt))return D(A)%t.length;const Ht=tt.current[je+1],qt=gt?Ht?Ht.offsetLeft-gt.offsetLeft:gt.offsetWidth:0,sn=qt>0?Re>qt*Xr?1:Re<-qt*Xr?-1:0:0;return sn===0?ge:ot?(ge+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ge+sn))},Oe=s.useCallback((A=!1)=>{if(F!=="on"||o)return;const se=et.current,ge=C.current,Re=at.current[ge];if(!se||!Re||se.scrollWidth<=se.clientWidth)return;const je=se.scrollLeft,gt=je+se.clientWidth,Ht=Re.offsetLeft,qt=Ht+Re.offsetWidth;if(Ht>=je&&qt<=gt)return;const sn=se.scrollWidth-se.clientWidth;let en=je;if(!A&&$e.current===null){const gi=at.current[ge-1],An=at.current[ge+1],Zn=gi?Re.offsetLeft-gi.offsetLeft:An?An.offsetLeft-Re.offsetLeft:Re.offsetWidth;qt>gt?en+=Zn:Ht<je&&(en-=Zn)}else qt>gt?en=qt-se.clientWidth:en=Ht;se.scrollLeft=Math.max(0,Math.min(sn,en))},[o,F]),yt=s.useCallback((A=!1)=>{A&&(ft.current=!0),Ge.current===null&&(Ge.current=requestAnimationFrame(()=>{Ge.current=null;const se=ft.current;ft.current=!1,Oe(se)}))},[Oe]),Tt=s.useCallback(A=>{if(A===C.current)return;const se=C.current;C.current=A;const ge=Math.abs(A-se)>1,Re=ot&&t.length>1&&(se===t.length-1&&A===0||se===0&&A===t.length-1);me(A),yt(ge||Re)},[t.length,ot,yt]),Je=()=>{if(!Ve.current||t.length===0||$e.current!==null||pt.current.isActive&&pt.current.hasMoved)return;const A=Ve.current.scrollLeft,se=D(A)%t.length;se!==C.current&&Tt(se)},Pt=()=>{$e.current=null},$t=A=>{const se=Ve.current;se&&(se.style.scrollSnapType=A?"":"none")},_t=()=>{var A;(A=_e.current)==null||A.call(_e),_e.current=null},on=()=>{Ie.current!==null&&(cancelAnimationFrame(Ie.current),Ie.current=null),mt.current=!1},fn=()=>{const A=Ve.current;if(!A){Ie.current=null,mt.current=!1;return}const se=Be.current-A.scrollLeft;if(Math.abs(se)<.5){A.scrollLeft=Be.current,Bt(),Je(),Ie.current=null,mt.current=!1;return}A.scrollLeft+=se*Wx,Bt(),Je(),Wt(),Ie.current=requestAnimationFrame(fn)},bn=()=>{const A=Ze.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,se,ge,Re)=>{bn(),A.scrollLeft=se,He.current=A.scrollLeft,Bt(),ge!==void 0?(C.current=ge,me(ge)):Je(),$t(!0),Re==null||Re()},dn=(A,{behavior:se="smooth",activeIndex:ge,onComplete:Re}={})=>{const je=Ve.current,gt=Ze.current;if(!je||!gt)return;if(on(),_t(),$t(!1),se==="auto"){ui(je,A,ge,Re);return}const Ht=Math.abs(A-je.scrollLeft),qt=Px(Ht,kx,Ax,je.clientWidth*.55);_e.current=Rx(je,gt,A,{duration:qt,easing:Fx,onComplete:()=>{_e.current=null,ui(je,A,ge,Re)}})},pi=(A="smooth")=>{const se=Ve.current;if(!se||t.length===0)return;const ge=D()%t.length,Re=Xt(ge,se.scrollLeft),je=tt.current[Re];je&&dn(je.offsetLeft,{behavior:A,activeIndex:ge})},Yn=(A,se="smooth",ge,Re)=>{const je=Ve.current;if(!je||t.length===0)return;const gt=(Re??je.scrollLeft)-A,Ht=D(A),qt=tt.current[Ht];if(Kt(qt)){$t(!0),Je();return}const sn=tt.current[Ht+1],en=qt?sn?sn.offsetLeft-qt.offsetLeft:qt.offsetWidth:0;if((en>0?gt>en*Xr?1:gt<-en*Xr?-1:0:0)!==0){const Ql=ge??Ht%t.length,Go=Ne(Re??je.scrollLeft,A,Ql);Sn(Go,se);return}const An=Re??je.scrollLeft,Zn=D(An),kr=tt.current[Zn];if(kr&&Math.abs(kr.offsetLeft-An)<1){$t(!0),Je();return}pi("auto")},Sn=(A,se="smooth")=>{const ge=Ve.current;if(!ge||t.length===0)return;const Re=Xt(A,ge.scrollLeft),je=tt.current[Re];je&&(se==="smooth"?$e.current=A:$e.current=null,C.current=A,me(A),yt(!0),dn(je.offsetLeft,{behavior:se,activeIndex:A,onComplete:se==="smooth"?Pt:void 0}))},mi=()=>{De.current&&(window.removeEventListener("pointerup",De.current),window.removeEventListener("pointercancel",De.current),De.current=null)},eo=(A,se,ge,Re,je)=>{const gt=ge-A,Ht=Re-se,qt=Math.abs(gt),sn=Math.abs(Ht);if(qt<Dx||qt<=sn)return!1;const en=gt<0?1:-1,gi=ot?(je+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,je+en));return gi===je?!1:(Sn(gi),!0)},wn=A=>{if(!pt.current.isActive)return;mi();const se=Ve.current;if(!se)return;const{scrollLeft:ge,startActiveIndex:Re,hasMoved:je}=pt.current,gt=se.scrollLeft;Bt(!0),pt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),A!==void 0&&se.hasPointerCapture(A)&&se.releasePointerCapture(A),je?Yn(ge,"smooth",Re,gt):($t(!0),Je()),Wt()},Qn=(A,se)=>{const ge=xt.current;xt.current=null,ge&&(eo(ge.startX,ge.startY,A,se,ge.startActiveIndex),Wt())},to=A=>{if(!ve)return;if(A.pointerType==="touch"){if(on(),$t(!0),Ke(A.target))return;xt.current={startX:A.clientX,startY:A.clientY,startActiveIndex:C.current};return}if(A.pointerType!=="mouse"||A.button!==0||Ke(A.target))return;const se=Ve.current;if(!se)return;on(),_t(),bn(),$e.current=null,pt.current={isActive:!0,startX:A.clientX,scrollLeft:se.scrollLeft,startActiveIndex:C.current,hasMoved:!1},$t(!1),Wt(),se.setPointerCapture(A.pointerId),mi();const ge=Re=>{Re.pointerType==="mouse"&&wn(Re.pointerId)};De.current=ge,window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge)},no=A=>{if(!ve||A.pointerType!=="mouse")return;const se=Ve.current;if(!se||!pt.current.isActive)return;if(A.buttons===0){wn(A.pointerId);return}const ge=A.clientX-pt.current.startX;Math.abs(ge)>Ox&&(pt.current.hasMoved=!0,nt(!0)),pt.current.hasMoved&&(A.preventDefault(),se.scrollLeft=pt.current.scrollLeft-ge,Bt(!0),Je(),Wt())},xe=A=>{if(ve){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):xt.current=null;return}A.pointerType==="mouse"&&wn(A.pointerId)}},qe=A=>{!ve||A.pointerType!=="mouse"||wn(A.pointerId)};return Vl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>ht(!0));return()=>{cancelAnimationFrame(A),_t(),mi(),Ge.current!==null&&(cancelAnimationFrame(Ge.current),Ge.current=null),wt.current&&clearTimeout(wt.current),vt.current&&clearTimeout(vt.current)}},[]),s.useEffect(()=>{if(!le){Zt(!0);return}Wt();const A=()=>Wt();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),vt.current&&clearTimeout(vt.current)}},[le,Wt]),s.useEffect(()=>{const A=se=>{se.key==="Escape"&&Dt()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[Dt]),s.useLayoutEffect(()=>{Ot()},[f,t.length,ot]),s.useLayoutEffect(()=>{o||Sn(C.current,"auto")},[f,o]),s.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,ot]),s.useEffect(()=>{const A=Ve.current;if(!A||o||!oe)return;const se=ge=>{if(ge.preventDefault(),Math.abs(ge.deltaY)<=Math.abs(ge.deltaX))return;const Re=ge.deltaMode===1?Hx:ge.deltaMode===2?A.clientHeight:1,je=ge.deltaY*Re*_x;if(je!==0){if(_t(),mt.current||(mt.current=!0,Be.current=A.scrollLeft,$e.current=null,$t(!1)),Be.current+=je,!ot){const gt=A.scrollWidth-A.clientWidth;Be.current=Math.max(0,Math.min(gt,Be.current))}Wt(),Ie.current===null&&(Ie.current=requestAnimationFrame(fn))}};return A.addEventListener("wheel",se,{passive:!1}),()=>{A.removeEventListener("wheel",se),on()}},[o,oe,ot]),s.useEffect(()=>{const A=Ve.current;if(!A)return;const se=()=>{Bt(pt.current.isActive);const Re=A.scrollLeft,je=Re-He.current;He.current=Re;const gt=Ye.current>0?Ye.current*.5:1/0;if(je!==0&&Math.abs(je)<gt){const Ht=je>0?"forward":"backward";Ht!==Ae.current&&(Ae.current=Ht,Le(Ht))}pt.current.isActive&&pt.current.hasMoved||Je()};A.addEventListener("scroll",se,{passive:!0});const ge=new ResizeObserver(()=>{Ot(),Bt(pt.current.isActive),Le(Ae.current),Je()});return ge.observe(A),()=>{_t(),A.removeEventListener("scroll",se),ge.disconnect()}},[t.length,ot]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Dt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Rt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Rt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...It}}),a.jsxs("div",{ref:Te,className:`${e}-lightbox-dismiss-area`,style:Ut,...Gt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:Ve,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ve&&t.length>0?"true":"false","data-mouse-dragging":St?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:xe,onPointerCancel:xe,onLostPointerCapture:qe,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:f},children:rt.map((A,se)=>{const ge=A.image.objectFit??"contain",Re=se%t.length,je=Math.floor(se/t.length),gt=Ur(f),Ht=`calc(-0.5 * (${gt} + ${f}))`;return a.jsxs("div",{ref:qt=>tt.current[se]=qt,className:`${e}-strip-item`,style:{height:Y==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:A.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ge}}),o&&Re<t.length-1&&je===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ht,width:gt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${je}-${A.image.assetId}-${Re}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Nt?"true":"false",style:ut,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:Q,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:q,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${ie?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||S)&&a.jsx("div",{className:`${e}-header ${ie?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ie?dt():Se||S?kt():null})})})]}),t.length>1&&F==="on"&&(()=>{const A=Ur(E),se=`calc(-0.5 * (${E} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:E},children:a.jsx("div",{ref:et,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ge=>ge.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":P,style:{gap:U,"--thumbnail-active-color":M},children:[t.map((ge,Re)=>{const je=Ur(U),gt=`calc(-0.5 * (${je} + ${U}))`;return a.jsxs("div",{ref:Ht=>{at.current[Re]=Ht},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":k===Re?"true":"false",onClick:()=>oe&&w==="click"&&Sn(Re),onMouseEnter:()=>Fe&&w==="hover"&&Sn(Re),"aria-label":ge.image.name?`View ${ge.image.name}`:`View image ${Re+1}`,"aria-current":k===Re?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ee?` ${e}-thumb-image-cover`:""}`,src:ge.image.assetId,alt:"",draggable:!1,style:{...Ce,maxWidth:O,maxHeight:O,width:v.display==="cover"?"auto":"100%",height:"auto",objectFit:v.display==="cover"?"cover":"contain"}})}),o&&Re<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:gt,width:je,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ge.image.assetId}-${Re}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:se,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Zx(e){return`
|
|
14731
14682
|
.${e}-wrapper {
|
|
14732
14683
|
position: relative;
|
|
14733
14684
|
width: 100%;
|
|
@@ -15112,7 +15063,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
15112
15063
|
pointer-events: auto;
|
|
15113
15064
|
z-index: 10;
|
|
15114
15065
|
}
|
|
15115
|
-
`}const Jx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=b.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),
|
|
15066
|
+
`}const Jx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=b.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),S=t??[],m=p&&S.length>0,h=()=>{S.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Zx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...li(d)?{"--image-aspect-ratio":Va(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const x=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(Qx,{prefix:l,images:S,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),x)})()]})},eb=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
|
|
15116
15067
|
import { createPortal } from 'react-dom';
|
|
15117
15068
|
import { CommonComponentProps } from '../props';
|
|
15118
15069
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -15658,7 +15609,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
15658
15609
|
</>
|
|
15659
15610
|
);
|
|
15660
15611
|
};
|
|
15661
|
-
`,tb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function nb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ib=Fo.reduce((e,t)=>({...e,...nb(t)}),{}),ob=Fo.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const rb=qx(),ab={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...ib,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:tb,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ob},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...ys({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...ys({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...ys({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[rb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},sb={element:Jx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ab,sourceCode:eb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},lb=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:m,imageGap:f,maxWidth:S,maxHeight:w,textTransition:N,title1Width:v,title2Width:M,title3Width:E,title1MarginLeft:U=0,title2MarginLeft:X=0,title3MarginLeft:D=0,titleRowMarginBottom:_=0,titleHeaderLayout:W="single-row",countCloseGap:T=0,closeIcon:C,closeIconMaxWidth:q,closeIconColor:R,closeIconHoverColor:$,contentMarginTop:I=0,iconMarginRight:j=0}=n,F=s.useCallback(we=>b.scalingValue(we,i??!1),[i]),K=F(f??0),P=`${S}%`,h=`${w}%`,J=F(T),V=F(I),he=F(j),k=Gi("title1",Vi(n,"title1"),i),ce=Gi("title2",Vi(n,"title2"),i),L=Gi("title3",Vi(n,"title3"),i),me=Gi("count",Vi(n,"count"),i),te=W==="mobile",ve=!i||!!r,Le=!o&&(!i||!!r),de=s.useMemo(()=>ma(t,y),[t,y]),[ue,Z]=s.useState(l),le=de[ue],oe=le==null?void 0:le.entry,[ge,Se]=s.useState(!1),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(!1),[g,Y]=s.useState(null),[ee,ae]=s.useState(!1),[ye,ne]=s.useState(0),[B,G]=s.useState(),[z,ie]=s.useState(),[H,be]=s.useState(null),re=s.useRef(null),Q=s.useRef(0),Pe=s.useRef(0),Ae=s.useRef(0),He=s.useRef(!1),Xe=s.useRef(null),Ue=s.useRef(null),Je=s.useRef(null),je=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(null),ze=s.useRef(null),Ze=s.useCallback(()=>{const we=Ue.current;if(!we)return;const Ye=we.closest(`.${e}-lightbox-content-area`);if(!Ye)return we.getBoundingClientRect().width;const A=Array.from(Ye.children).reduce((se,fe)=>!(fe instanceof HTMLElement)||fe.contains(we)?se:se+fe.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-A},[e]),tt=s.useCallback(()=>{re.current&&(clearTimeout(re.current),re.current=null)},[]),ot=s.useCallback(we=>{we===Q.current&&(Y(null),ae(!1))},[]),lt=s.useCallback(()=>{o||He.current||(He.current=!0,u==null||u(),Se(!1),Xe.current=setTimeout(()=>{p()},300))},[o,u,p]),it=s.useCallback(we=>!!(we.closest("[data-controls]")||we.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:xt,backdropStyle:rt,mediaAreaStyle:_e,overlayContentStyle:We,swipeHandlers:vt,dismissAreaStyle:Ve}=Sp({enabled:Le,onClose:lt,animMs:300,isBlockedTarget:it}),Ke=s.useCallback(we=>{c&&ip(we+1,d,!0)},[c,d]),pe=s.useCallback(we=>{if(we)return we.getBoundingClientRect().height},[]),De=s.useCallback(we=>{if(de.length===0)return;const Ye=(we%de.length+de.length)%de.length;if(Ye===ue)return;const A=de[ue],se=de[Ye];Q.current+=1;const fe=Q.current,ke=N==="fade"&&Nc(A==null?void 0:A.entry)!==Nc(se==null?void 0:se.entry),Be=pe(Je.current),gt=ke?(()=>{const Kt=Ze();qn.flushSync(()=>{be(se.entry)}),Je.current&&Kt&&(Je.current.style.width=`${Kt}px`);const sn=pe(Je.current);return Je.current&&(Je.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:Kt}})():void 0,Wt=Math.max(Be??0,(gt==null?void 0:gt.measuredIncomingTitlesHeight)??0)||void 0;ne(fe),Y(ue),ae(!0),Z(Ye),Ke(Ye),Ae.current=Ye,ke?(tt(),Wt&&G(Wt),gt!=null&>.incomingTitlesMeasureWidth&&ie(gt.incomingTitlesMeasureWidth),Ne((A==null?void 0:A.entryIndex)??null),Ce(!0),Pe.current=se.entryIndex,re.current=setTimeout(()=>{Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),re.current=null},400)):(tt(),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Pe.current=se.entryIndex)},[ue,tt,Ze,pe,de,Ke,N]),qe=s.useCallback(()=>{ze.current=null},[]),bt=s.useCallback(we=>{!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0||we.target.closest("[data-controls]")||(ze.current={startX:we.clientX,startY:we.clientY,pointerId:we.pointerId})},[ve,de.length]),yt=s.useCallback(we=>{var Kt;if(!ve||de.length<=1||we.pointerType==="mouse"&&we.button!==0)return;if(xt){qe();return}const Ye=ze.current;if(!Ye||Ye.pointerId!==we.pointerId||(qe(),we.target.closest("[data-controls]")))return;const se=we.clientX-Ye.startX,fe=we.clientY-Ye.startY,ke=Math.abs(se),Be=Math.abs(fe);if(ke>=vv&&ke>Be){De(se>0?ue-1:ue+1);return}if(ke>Rc||Be>Rc)return;const gt=(Kt=je.current)==null?void 0:Kt.getBoundingClientRect(),Wt=gt?gt.left+gt.width/2:window.innerWidth/2;De(we.clientX<Wt?ue-1:ue+1)},[ue,ve,De,xt,qe,de.length]),Rt=s.useCallback(we=>{const Ye=ze.current;(Ye==null?void 0:Ye.pointerId)===we.pointerId&&qe()},[qe]);Vl(),s.useEffect(()=>{Ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const we=requestAnimationFrame(()=>{Se(!0),requestAnimationFrame(()=>{xe.current?xe.current.focus():je.current&&je.current.focus()})});return()=>{cancelAnimationFrame(we),Xe.current&&clearTimeout(Xe.current),re.current&&clearTimeout(re.current);const Ye=Ie.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var we;N!=="fade"&&(Pe.current=((we=de[ue])==null?void 0:we.entryIndex)??0,tt(),Ne(null),Ce(!1),G(void 0),ie(void 0))},[ue,tt,de,N]),s.useEffect(()=>{const we=Ye=>{if(Ye.key==="Escape"){lt();return}if(Ye.key==="ArrowLeft"&&de.length>1){De(ue-1);return}if(Ye.key==="ArrowRight"&&de.length>1){De(ue+1);return}if(Ye.key==="Tab"&&je.current){const A=je.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),se=Array.from(A).filter(gt=>!gt.closest('[aria-hidden="true"]'));if(se.length===0)return;const fe=se[0],ke=se[se.length-1],Be=document.activeElement;Ye.shiftKey?(Be===fe||!je.current.contains(Be))&&(Ye.preventDefault(),ke.focus()):(Be===ke||!je.current.contains(Be))&&(Ye.preventDefault(),fe.focus())}};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[De,lt,ue,de.length]),s.useLayoutEffect(()=>{tt(),Q.current=0,ne(0),Y(null),ae(!1),Ne(null),Ce(!1),G(void 0),ie(void 0),be(null),Z(we=>{const Ye=Math.max(0,de.length-1);return Math.min(we,Ye)})},[tt,t.length,y,de.length]),s.useLayoutEffect(()=>{var A;const we=Math.max(0,de.length-1),Ye=Math.min(Math.max(0,l),we);Ae.current=Ye,Pe.current=((A=de[Ye])==null?void 0:A.entryIndex)??0,Z(Ye)},[l]);const ct=Re!==null?t[Re]:null,wt=g!==null?de[g]:null,nt=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(ct==null?void 0:ct.title1)||(ct==null?void 0:ct.title2)||(ct==null?void 0:ct.title3),Nt=Iv(y,de,t),jt=C!==null,$e=nt||Nt||jt,Ge=Nt&&jt?{gap:J}:void 0,ht=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Lt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,mt=(U??0)>0||o,_t=F(_),Ot=s.useMemo(()=>({title1Width:v??So.title1Width,title2Width:M??So.title2Width,title3Width:E??So.title3Width}),[v,M,E]),zt=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:D}),[X,D]),Ee=s.useMemo(()=>oe?Ti(e,oe,k,ce,L):[],[e,oe,k,ce,L]),dt=s.useMemo(()=>Ee.map(we=>Ot[we.widthKey]),[Ee,Ot]),ut=s.useMemo(()=>Mo(Ee.length,dt),[Ee.length,dt]),kt=s.useMemo(()=>vr(Ee.length,dt),[Ee.length,dt]),Qe=s.useMemo(()=>Ee.filter(we=>we.prefix==="title1"),[Ee]),at=s.useMemo(()=>Ee.filter(we=>we.prefix==="title2"||we.prefix==="title3"),[Ee]),It=s.useMemo(()=>Ii(Qe,Ot),[Qe,Ot]),At=s.useMemo(()=>Ii(at,Ot),[at,Ot]),pt=s.useCallback((we,Ye)=>{const A=Ee.findIndex(fe=>fe.prefix===we.prefix);if(!te||Ye==="single-row")return{effectiveWidth:kt[A]??0,resolvedWidth:ut[A]??0,maxWidth:vn(A,ut)};if(Ye==="two-row-top"){const fe=Qe.findIndex(ke=>ke.prefix===we.prefix);return{effectiveWidth:It.effective[fe]??0,resolvedWidth:It.resolved[fe]??0,maxWidth:vn(fe,It.resolved)}}const se=at.findIndex(fe=>fe.prefix===we.prefix);return{effectiveWidth:At.effective[se]??0,resolvedWidth:At.resolved[se]??0,maxWidth:vn(se,At.resolved)}},[Ee,at,At,kt,ut,Qe,It,te]),Ut=s.useCallback(we=>sp(Ee,ut,zt,we)+(te?0:U??0),[Ee,ut,zt,te,U]),qt=s.useCallback(()=>te?0:U??0,[te,U]),Dt=s.useCallback(we=>at.slice(0,we).reduce((Ye,A,se)=>Ye+(A.marginLeftKey?zt[A.marginLeftKey]??0:0)+(At.resolved[se]??0),0),[at,At.resolved,zt]),Vt=s.useCallback(we=>{const Ye=at[we];return Dt(we)+(Ye.marginLeftKey?zt[Ye.marginLeftKey]??0:0)+(At.resolved[we]??0)},[at,At.resolved,Dt,zt]),Gt=s.useCallback((we,Ye,A)=>{if(!te||A==="single-row"){const gt=we.findIndex(en=>en.prefix===Ye.prefix),Wt=we.map(en=>Ot[en.widthKey]),Kt=Mo(we.length,Wt);return{effectiveWidth:vr(we.length,Wt)[gt]??0,resolvedWidth:Kt[gt]??0,maxWidth:vn(gt,Kt)}}if(A==="two-row-top"){const gt=we.filter(en=>en.prefix==="title1"),Wt=gt.findIndex(en=>en.prefix===Ye.prefix),{resolved:Kt,effective:sn}=Ii(gt,Ot);return{effectiveWidth:sn[Wt]??0,resolvedWidth:Kt[Wt]??0,maxWidth:vn(Wt,Kt)}}const se=we.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),fe=se.findIndex(gt=>gt.prefix===Ye.prefix),{resolved:ke,effective:Be}=Ii(se,Ot);return{effectiveWidth:Be[fe]??0,resolvedWidth:ke[fe]??0,maxWidth:vn(fe,ke)}},[Ot,te]),Bt=(we,Ye,A)=>{const se=we.marginLeftKey?zt[we.marginLeftKey]??0:0,{effectiveWidth:fe,resolvedWidth:ke,maxWidth:Be}=A??pt(we,Ye),gt=Math.max(se,ii),Wt=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":we.prefix,style:{width:F(fe),...se>0?{marginLeft:F(se)}:{}},children:[a.jsx("p",{className:we.className,style:we.style,children:we.text}),Wt&&we.marginLeftKey?a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(-se),width:F(gt),height:"100%",pointerEvents:"auto"}}):null,Wt?a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Be),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F(-Pn/2),width:F(Pn),height:"100%",pointerEvents:"auto"}}):null]},we.className)},Yt=(we="two-row")=>{const Ye=Ee.findIndex(fe=>fe.prefix==="title1"),A=Ye>=0?ut[Ye]:Ot.title1Width,se=we==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:F(U??0),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},O=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Me=()=>a.jsx("span",{className:`${e}-entry-counter`,style:me,"aria-live":"polite","aria-atomic":"true",children:Tv(de,ue,y,t)}),Fe=()=>Nt?o&&jt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Me(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ss(J)} + ${J}))`,width:ss(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Me():null,Oe=()=>!Nt&&!jt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ge,children:[Fe(),jt?et():null]}),ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,Ct(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Oe(),Sn()]}),Tt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Nt||nt?O():null,mt?Yt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Te&&B?{minHeight:B}:void 0,children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:bn(H||oe)}),a.jsxs("div",{ref:Ue,className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%",...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:bn(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:bn(oe)})]})]}),Oe(),Sn()]}),et=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(q??0,i),height:b.scalingValue(q??0,i),marginRight:he,"--close-icon-hover-color":$},children:[a.jsx("button",{ref:xe,type:"button",className:`${e}-close-icon-inner`,onClick:lt,"aria-label":"Close",children:a.jsx(mn,{url:C??"",fill:R,hoverFill:i&&!r?R:$,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:he,height:"100%",pointerEvents:"auto"}})]}),Mt=(we,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Nt||nt?O():null,mt?Yt("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:we}):a.jsxs(a.Fragment,{children:[we,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Oe()]}),Ct=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L);return a.jsx(a.Fragment,{children:Ye.map(A=>Bt(A,"single-row",Gt(Ye,A,"single-row")))})},Ht=we=>{if(!we)return null;const Ye=Ti(e,we,k,ce,L),A=Ye.find(se=>se.prefix==="title1");return A?Bt(A,"two-row-top",Gt(Ye,A,"two-row-top")):null},on=(we,Ye=!1)=>{const A=we?Ti(e,we,k,ce,L):[],se=A.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),fe=o&&Ye;return se.length>0||fe||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[se.map(Be=>Bt(Be,"two-row-bottom",Gt(A,Be,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[pi(),Yn()]}):null]}):null,(_??0)>0||fe?a.jsx("div",{"data-controls":fe?"titleRowMarginBottom":void 0,"data-controls-axis":fe?"y":void 0,"data-controls-reverse":fe?"":void 0,className:fe?`${e}-control`:void 0,style:{height:_t,width:"100%",flexShrink:0,pointerEvents:fe?"auto":"none"}}):null]}):null},fn=(we,Ye=!1)=>a.jsxs(a.Fragment,{children:[Mt(Ht(we)),on(we,Ye)]}),bn=we=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:fn(we)}):we?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ct(we)}):null,ui=()=>{const we=te?-1:Ee.findIndex(se=>se.prefix==="title1"),Ye=!te&&(o||(U??0)>0)?(()=>{const se=U??0,fe=we>=0?ut[we]:Ot.title1Width,ke=Math.max(se,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(fe),style:{position:"absolute",top:0,left:0,width:F(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Ee.flatMap((se,fe)=>{if(!se.marginLeftKey)return[];const ke=zt[se.marginLeftKey]??0,Be=ap(Ee,ut,zt,fe)+qt(),gt=Math.max(ke,ii);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ut[fe]),style:{position:"absolute",top:0,left:F(Be),width:F(gt),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return Ye?[Ye,...A]:A},dn=()=>Ee.map((we,Ye)=>{const A=vn(Ye,ut),fe=Ut(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),pi=()=>at.flatMap((we,Ye)=>{if(!we.marginLeftKey)return[];const A=zt[we.marginLeftKey]??0,se=Dt(Ye),fe=Math.max(A,ii),{resolvedWidth:ke}=pt(we,"two-row-bottom");return a.jsx("div",{"data-controls":we.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:F(se),width:F(fe),height:"100%",pointerEvents:"auto"}},we.marginLeftKey)}),Yn=()=>at.map((we,Ye)=>{const{maxWidth:A}=pt(we,"two-row-bottom"),fe=Vt(Ye)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":we.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F(fe),width:F(Pn),height:"100%",pointerEvents:"auto"}})},`${we.widthKey}-junction`)}),Sn=()=>!o||te?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=we=>{const Ye=!we.objectFit&&li(x);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:h,...Ye?{"--image-aspect-ratio":Va(x)}:{}}}},eo=we=>we.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":we.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},wn=we=>{if(we.length===0)return null;const Ye=we.length>1,A=ss(K),se=`calc(-0.5 * (${A} + ${K}))`;if(we.length===1){const fe=we[0];return a.jsx("div",{...mi(fe),children:a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:K}:void 0,children:we.map((fe,ke)=>a.jsxs("div",{...mi(fe),children:[a.jsx("img",{...eo(fe),src:fe.assetId,alt:fe.name??"",draggable:!1}),o&&Ye&&ke<we.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:se,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${fe.assetId}-${ke}`))})},Qn=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||ct!=null&&ct.title2||ct!=null&&ct.title3||(_??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:Je,className:ht,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:fn(H||oe)}),a.jsxs("div",{ref:Ue,className:`${e}-titles-row-two-row`,style:{...Te&&B?{minHeight:B}:void 0,...Te&&z?{width:z,maxWidth:"100%"}:void 0},children:[Mt(a.jsxs("div",{className:ht,style:{position:Te?"absolute":"relative",inset:Te?0:void 0,width:"100%"},children:[ct&&Te?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:Ht(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Ht(oe)})]}),Te&&B?B:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ct&&Te?a.jsx("div",{className:`${Lt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(ct)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:on(oe,!0)})]}):null]})]}),no=()=>{const we=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...we?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:we?void 0:{flex:"0 0 auto",height:"auto"},children:fn(oe,!0)}),Sn()]})};return a.jsxs("div",{ref:je,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{xt||lt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:jt?void 0:-1,style:{opacity:ge?1:0,transition:"opacity 300ms ease",pointerEvents:ge?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...rt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ve,...vt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:_e,onClick:we=>we.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ve&&de.length>1?"true":"false",onPointerDown:ve?bt:void 0,onPointerUp:ve?yt:void 0,onPointerCancel:ve?Rt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ee?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:we=>{we.target===we.currentTarget&&ot(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:wn(wt.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${ee?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:le?wn(le.images):null})},`slide-in-${ye}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:We,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:V,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...te?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${te?` ${e}-lightbox-content-area-stacked`:""}`,children:$e&&a.jsx("div",{className:`${e}-text-bar-cell${te?` ${e}-text-bar-cell-stacked`:""}`,style:te?void 0:{flex:1,minWidth:0,width:"100%"},children:te?N==="fade"?to():no():N==="fade"?Tt():ft()})})})]})]})]})};function cb(e){return`
|
|
15612
|
+
`,tb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function nb(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ib=Fo.reduce((e,t)=>({...e,...nb(t)}),{}),ob=Fo.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const rb=qx(),ab={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...ib,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:tb,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...ob},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...ys({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...ys({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...ys({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[rb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},sb={element:Jx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:ab,sourceCode:eb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Fo.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},lb=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:S,backgroundColor:m,imageGap:h,maxWidth:x,maxHeight:w,textTransition:F,title1Width:v,title2Width:P,title3Width:M,title1MarginLeft:K=0,title2MarginLeft:X=0,title3MarginLeft:j=0,titleRowMarginBottom:N=0,titleHeaderLayout:_="single-row",countCloseGap:T=0,closeIcon:L,closeIconMaxWidth:Y,closeIconColor:R,closeIconHoverColor:I,contentMarginTop:$=0,iconMarginRight:G=0}=n,O=s.useCallback(xe=>b.scalingValue(xe,i??!1),[i]),U=O(h??0),E=`${x}%`,f=`${w}%`,Q=O(T),q=O($),pe=O(G),k=Gi("title1",Vi(n,"title1"),i),me=Gi("title2",Vi(n,"title2"),i),C=Gi("title3",Vi(n,"title3"),i),ue=Gi("count",Vi(n,"count"),i),te=_==="mobile",fe=!i||!!r,Pe=!o&&(!i||!!r),de=s.useMemo(()=>ma(t,y),[t,y]),[we,V]=s.useState(l),ie=de[we],oe=ie==null?void 0:ie.entry,[le,ve]=s.useState(!1),[Fe,Ee]=s.useState(null),[Ce,Se]=s.useState(!1),[g,Z]=s.useState(null),[J,re]=s.useState(!1),[he,z]=s.useState(0),[B,ne]=s.useState(),[ce,ee]=s.useState(),[H,be]=s.useState(null),ae=s.useRef(null),W=s.useRef(0),ke=s.useRef(0),ze=s.useRef(0),Xe=s.useRef(!1),Ue=s.useRef(null),Qe=s.useRef(null),We=s.useRef(null),it=s.useRef(null),ye=s.useRef(null),Te=s.useRef(null),Ve=s.useRef(null),Ze=s.useCallback(()=>{const xe=Qe.current;if(!xe)return;const qe=xe.closest(`.${e}-lightbox-content-area`);if(!qe)return xe.getBoundingClientRect().width;const A=Array.from(qe.children).reduce((se,ge)=>!(ge instanceof HTMLElement)||ge.contains(xe)?se:se+ge.getBoundingClientRect().width,0);return qe.getBoundingClientRect().width-A},[e]),et=s.useCallback(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),at=s.useCallback(xe=>{xe===W.current&&(Z(null),re(!1))},[]),tt=s.useCallback(()=>{o||Xe.current||(Xe.current=!0,u==null||u(),ve(!1),Ue.current=setTimeout(()=>{p()},300))},[o,u,p]),Ye=s.useCallback(xe=>!!(xe.closest("[data-controls]")||xe.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:xt,backdropStyle:pt,mediaAreaStyle:De,overlayContentStyle:_e,swipeHandlers:He,dismissAreaStyle:Ae}=Sp({enabled:Pe,onClose:tt,animMs:300,isBlockedTarget:Ye}),Be=s.useCallback(xe=>{c&&ip(xe+1,d,!0)},[c,d]),Ie=s.useCallback(xe=>{if(xe)return xe.getBoundingClientRect().height},[]),mt=s.useCallback(xe=>{if(de.length===0)return;const qe=(xe%de.length+de.length)%de.length;if(qe===we)return;const A=de[we],se=de[qe];W.current+=1;const ge=W.current,Re=F==="fade"&&Nc(A==null?void 0:A.entry)!==Nc(se==null?void 0:se.entry),je=Ie(We.current),gt=Re?(()=>{const qt=Ze();qn.flushSync(()=>{be(se.entry)}),We.current&&qt&&(We.current.style.width=`${qt}px`);const sn=Ie(We.current);return We.current&&(We.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:qt}})():void 0,Ht=Math.max(je??0,(gt==null?void 0:gt.measuredIncomingTitlesHeight)??0)||void 0;z(ge),Z(we),re(!0),V(qe),Be(qe),ze.current=qe,Re?(et(),Ht&&ne(Ht),gt!=null&>.incomingTitlesMeasureWidth&&ee(gt.incomingTitlesMeasureWidth),Ee((A==null?void 0:A.entryIndex)??null),Se(!0),ke.current=se.entryIndex,ae.current=setTimeout(()=>{Ee(null),Se(!1),ne(void 0),ee(void 0),be(null),ae.current=null},400)):(et(),Ee(null),Se(!1),ne(void 0),ee(void 0),be(null),ke.current=se.entryIndex)},[we,et,Ze,Ie,de,Be,F]),ot=s.useCallback(()=>{Ve.current=null},[]),Ct=s.useCallback(xe=>{!fe||de.length<=1||xe.pointerType==="mouse"&&xe.button!==0||xe.target.closest("[data-controls]")||(Ve.current={startX:xe.clientX,startY:xe.clientY,pointerId:xe.pointerId})},[fe,de.length]),rt=s.useCallback(xe=>{var qt;if(!fe||de.length<=1||xe.pointerType==="mouse"&&xe.button!==0)return;if(xt){ot();return}const qe=Ve.current;if(!qe||qe.pointerId!==xe.pointerId||(ot(),xe.target.closest("[data-controls]")))return;const se=xe.clientX-qe.startX,ge=xe.clientY-qe.startY,Re=Math.abs(se),je=Math.abs(ge);if(Re>=vv&&Re>je){mt(se>0?we-1:we+1);return}if(Re>Rc||je>Rc)return;const gt=(qt=it.current)==null?void 0:qt.getBoundingClientRect(),Ht=gt?gt.left+gt.width/2:window.innerWidth/2;mt(xe.clientX<Ht?we-1:we+1)},[we,fe,mt,xt,ot,de.length]),St=s.useCallback(xe=>{const qe=Ve.current;(qe==null?void 0:qe.pointerId)===xe.pointerId&&ot()},[ot]);Vl(),s.useEffect(()=>{Te.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const xe=requestAnimationFrame(()=>{ve(!0),requestAnimationFrame(()=>{ye.current?ye.current.focus():it.current&&it.current.focus()})});return()=>{cancelAnimationFrame(xe),Ue.current&&clearTimeout(Ue.current),ae.current&&clearTimeout(ae.current);const qe=Te.current;qe&&document.contains(qe)&&qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var xe;F!=="fade"&&(ke.current=((xe=de[we])==null?void 0:xe.entryIndex)??0,et(),Ee(null),Se(!1),ne(void 0),ee(void 0))},[we,et,de,F]),s.useEffect(()=>{const xe=qe=>{if(qe.key==="Escape"){tt();return}if(qe.key==="ArrowLeft"&&de.length>1){mt(we-1);return}if(qe.key==="ArrowRight"&&de.length>1){mt(we+1);return}if(qe.key==="Tab"&&it.current){const A=it.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),se=Array.from(A).filter(gt=>!gt.closest('[aria-hidden="true"]'));if(se.length===0)return;const ge=se[0],Re=se[se.length-1],je=document.activeElement;qe.shiftKey?(je===ge||!it.current.contains(je))&&(qe.preventDefault(),Re.focus()):(je===Re||!it.current.contains(je))&&(qe.preventDefault(),ge.focus())}};return window.addEventListener("keydown",xe),()=>window.removeEventListener("keydown",xe)},[mt,tt,we,de.length]),s.useLayoutEffect(()=>{et(),W.current=0,z(0),Z(null),re(!1),Ee(null),Se(!1),ne(void 0),ee(void 0),be(null),V(xe=>{const qe=Math.max(0,de.length-1);return Math.min(xe,qe)})},[et,t.length,y,de.length]),s.useLayoutEffect(()=>{var A;const xe=Math.max(0,de.length-1),qe=Math.min(Math.max(0,l),xe);ze.current=qe,ke.current=((A=de[qe])==null?void 0:A.entryIndex)??0,V(qe)},[l]);const nt=Fe!==null?t[Fe]:null,Rt=g!==null?de[g]:null,ht=(oe==null?void 0:oe.title1)||(oe==null?void 0:oe.title2)||(oe==null?void 0:oe.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),Vt=Iv(y,de,t),Zt=L!==null,$e=ht||Vt||Zt,Ge=Vt&&Zt?{gap:Q}:void 0,ft=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Lt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,wt=`${e}-titles-layer-out`,vt=(K??0)>0||o,Nt=O(N),Wt=s.useMemo(()=>({title1Width:v??So.title1Width,title2Width:P??So.title2Width,title3Width:M??So.title3Width}),[v,P,M]),Dt=s.useMemo(()=>({title2MarginLeft:X,title3MarginLeft:j}),[X,j]),Me=s.useMemo(()=>oe?Ti(e,oe,k,me,C):[],[e,oe,k,me,C]),ct=s.useMemo(()=>Me.map(xe=>Wt[xe.widthKey]),[Me,Wt]),dt=s.useMemo(()=>Po(Me.length,ct),[Me.length,ct]),kt=s.useMemo(()=>vr(Me.length,ct),[Me.length,ct]),Ke=s.useMemo(()=>Me.filter(xe=>xe.prefix==="title1"),[Me]),st=s.useMemo(()=>Me.filter(xe=>xe.prefix==="title2"||xe.prefix==="title3"),[Me]),It=s.useMemo(()=>Ii(Ke,Wt),[Ke,Wt]),At=s.useMemo(()=>Ii(st,Wt),[st,Wt]),ut=s.useCallback((xe,qe)=>{const A=Me.findIndex(ge=>ge.prefix===xe.prefix);if(!te||qe==="single-row")return{effectiveWidth:kt[A]??0,resolvedWidth:dt[A]??0,maxWidth:vn(A,dt)};if(qe==="two-row-top"){const ge=Ke.findIndex(Re=>Re.prefix===xe.prefix);return{effectiveWidth:It.effective[ge]??0,resolvedWidth:It.resolved[ge]??0,maxWidth:vn(ge,It.resolved)}}const se=st.findIndex(ge=>ge.prefix===xe.prefix);return{effectiveWidth:At.effective[se]??0,resolvedWidth:At.resolved[se]??0,maxWidth:vn(se,At.resolved)}},[Me,st,At,kt,dt,Ke,It,te]),Gt=s.useCallback(xe=>sp(Me,dt,Dt,xe)+(te?0:K??0),[Me,dt,Dt,te,K]),Ut=s.useCallback(()=>te?0:K??0,[te,K]),Ot=s.useCallback(xe=>st.slice(0,xe).reduce((qe,A,se)=>qe+(A.marginLeftKey?Dt[A.marginLeftKey]??0:0)+(At.resolved[se]??0),0),[st,At.resolved,Dt]),Bt=s.useCallback(xe=>{const qe=st[xe];return Ot(xe)+(qe.marginLeftKey?Dt[qe.marginLeftKey]??0:0)+(At.resolved[xe]??0)},[st,At.resolved,Ot,Dt]),Xt=s.useCallback((xe,qe,A)=>{if(!te||A==="single-row"){const gt=xe.findIndex(en=>en.prefix===qe.prefix),Ht=xe.map(en=>Wt[en.widthKey]),qt=Po(xe.length,Ht);return{effectiveWidth:vr(xe.length,Ht)[gt]??0,resolvedWidth:qt[gt]??0,maxWidth:vn(gt,qt)}}if(A==="two-row-top"){const gt=xe.filter(en=>en.prefix==="title1"),Ht=gt.findIndex(en=>en.prefix===qe.prefix),{resolved:qt,effective:sn}=Ii(gt,Wt);return{effectiveWidth:sn[Ht]??0,resolvedWidth:qt[Ht]??0,maxWidth:vn(Ht,qt)}}const se=xe.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),ge=se.findIndex(gt=>gt.prefix===qe.prefix),{resolved:Re,effective:je}=Ii(se,Wt);return{effectiveWidth:je[ge]??0,resolvedWidth:Re[ge]??0,maxWidth:vn(ge,Re)}},[Wt,te]),zt=(xe,qe,A)=>{const se=xe.marginLeftKey?Dt[xe.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:Re,maxWidth:je}=A??ut(xe,qe),gt=Math.max(se,ii),Ht=o&&qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":xe.prefix,style:{width:O(ge),...se>0?{marginLeft:O(se)}:{}},children:[a.jsx("p",{className:xe.className,style:xe.style,children:xe.text}),Ht&&xe.marginLeftKey?a.jsx("div",{"data-controls":xe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:O(-se),width:O(gt),height:"100%",pointerEvents:"auto"}}):null,Ht?a.jsx("div",{"data-controls":xe.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:O(-Mn/2),width:O(Mn),height:"100%",pointerEvents:"auto"}}):null]},xe.className)},Kt=(xe="two-row")=>{const qe=Me.findIndex(ge=>ge.prefix==="title1"),A=qe>=0?dt[qe]:Wt.title1Width,se=xe==="two-row"&&o;return a.jsx("div",{...se?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:O(K??0),flexShrink:0,alignSelf:"stretch",...se?{pointerEvents:"auto"}:{}}})},D=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:k,"aria-hidden":"true",children:" "}),Le=()=>a.jsx("span",{className:`${e}-entry-counter`,style:ue,"aria-live":"polite","aria-atomic":"true",children:Tv(de,we,y,t)}),Ne=()=>Vt?o&&Zt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Le(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ss(Q)} + ${Q}))`,width:ss(Q),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Le():null,Oe=()=>!Vt&&!Zt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Ge,children:[Ne(),Zt?Je():null]}),yt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Vt||ht?D():null,vt?Kt("single-row"):null,$t(oe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Oe(),Sn()]}),Tt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Vt||ht?D():null,vt?Kt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:Ce&&B?{minHeight:B}:void 0,children:[a.jsx("div",{ref:We,className:ft,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:bn(H||oe)}),a.jsxs("div",{ref:Qe,className:ft,style:{position:Ce?"absolute":"relative",inset:Ce?0:void 0,width:"100%",...Ce&&ce?{width:ce,maxWidth:"100%"}:void 0},children:[nt&&Ce?a.jsx("div",{className:`${Lt} ${e}-titles-fade-out`,children:bn(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:bn(oe)})]})]}),Oe(),Sn()]}),Je=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:b.scalingValue(Y??0,i),height:b.scalingValue(Y??0,i),marginRight:pe,"--close-icon-hover-color":I},children:[a.jsx("button",{ref:ye,type:"button",className:`${e}-close-icon-inner`,onClick:tt,"aria-label":"Close",children:a.jsx(mn,{url:L??"",fill:R,hoverFill:i&&!r?R:I,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:pe,height:"100%",pointerEvents:"auto"}})]}),Pt=(xe,qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Vt||ht?D():null,vt?Kt("two-row"):null,qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:qe},children:xe}):a.jsxs(a.Fragment,{children:[xe,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Oe()]}),$t=xe=>{if(!xe)return null;const qe=Ti(e,xe,k,me,C);return a.jsx(a.Fragment,{children:qe.map(A=>zt(A,"single-row",Xt(qe,A,"single-row")))})},_t=xe=>{if(!xe)return null;const qe=Ti(e,xe,k,me,C),A=qe.find(se=>se.prefix==="title1");return A?zt(A,"two-row-top",Xt(qe,A,"two-row-top")):null},on=(xe,qe=!1)=>{const A=xe?Ti(e,xe,k,me,C):[],se=A.filter(je=>je.prefix==="title2"||je.prefix==="title3"),ge=o&&qe;return se.length>0||ge||(N??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[se.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[se.map(je=>zt(je,"two-row-bottom",Xt(A,je,"two-row-bottom"))),qe&&o?a.jsxs(a.Fragment,{children:[pi(),Yn()]}):null]}):null,(N??0)>0||ge?a.jsx("div",{"data-controls":ge?"titleRowMarginBottom":void 0,"data-controls-axis":ge?"y":void 0,"data-controls-reverse":ge?"":void 0,className:ge?`${e}-control`:void 0,style:{height:Nt,width:"100%",flexShrink:0,pointerEvents:ge?"auto":"none"}}):null]}):null},fn=(xe,qe=!1)=>a.jsxs(a.Fragment,{children:[Pt(_t(xe)),on(xe,qe)]}),bn=xe=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:fn(xe)}):xe?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:$t(xe)}):null,ui=()=>{const xe=te?-1:Me.findIndex(se=>se.prefix==="title1"),qe=!te&&(o||(K??0)>0)?(()=>{const se=K??0,ge=xe>=0?dt[xe]:Wt.title1Width,Re=Math.max(se,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:0,width:O(Re),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Me.flatMap((se,ge)=>{if(!se.marginLeftKey)return[];const Re=Dt[se.marginLeftKey]??0,je=ap(Me,dt,Dt,ge)+Ut(),gt=Math.max(Re,ii);return a.jsx("div",{"data-controls":se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt[ge]),style:{position:"absolute",top:0,left:O(je),width:O(gt),height:"100%",pointerEvents:"auto"}},se.marginLeftKey)});return qe?[qe,...A]:A},dn=()=>Me.map((xe,qe)=>{const A=vn(qe,dt),ge=Gt(qe)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":xe.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:O(ge),width:O(Mn),height:"100%",pointerEvents:"auto"}})},`${xe.widthKey}-junction`)}),pi=()=>st.flatMap((xe,qe)=>{if(!xe.marginLeftKey)return[];const A=Dt[xe.marginLeftKey]??0,se=Ot(qe),ge=Math.max(A,ii),{resolvedWidth:Re}=ut(xe,"two-row-bottom");return a.jsx("div",{"data-controls":xe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Re),style:{position:"absolute",top:0,left:O(se),width:O(ge),height:"100%",pointerEvents:"auto"}},xe.marginLeftKey)}),Yn=()=>st.map((xe,qe)=>{const{maxWidth:A}=ut(xe,"two-row-bottom"),ge=Bt(qe)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":xe.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(A),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:O(ge),width:O(Mn),height:"100%",pointerEvents:"auto"}})},`${xe.widthKey}-junction`)}),Sn=()=>!o||te?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=xe=>{const qe=!xe.objectFit&&li(S);return{className:`${e}-slide-image-cell${qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:E,maxHeight:f,...qe?{"--image-aspect-ratio":Va(S)}:{}}}},eo=xe=>xe.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":xe.objectFit}}:li(S)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},wn=xe=>{if(xe.length===0)return null;const qe=xe.length>1,A=ss(U),se=`calc(-0.5 * (${A} + ${U}))`;if(xe.length===1){const ge=xe[0];return a.jsx("div",{...mi(ge),children:a.jsx("img",{...eo(ge),src:ge.assetId,alt:ge.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:qe?{gap:U}:void 0,children:xe.map((ge,Re)=>a.jsxs("div",{...mi(ge),children:[a.jsx("img",{...eo(ge),src:ge.assetId,alt:ge.name??"",draggable:!1}),o&&qe&&Re<xe.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:se,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ge.assetId}-${Re}`))})},Qn=!!(oe!=null&&oe.title2||oe!=null&&oe.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(N??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:We,className:ft,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:fn(H||oe)}),a.jsxs("div",{ref:Qe,className:`${e}-titles-row-two-row`,style:{...Ce&&B?{minHeight:B}:void 0,...Ce&&ce?{width:ce,maxWidth:"100%"}:void 0},children:[Pt(a.jsxs("div",{className:ft,style:{position:Ce?"absolute":"relative",inset:Ce?0:void 0,width:"100%"},children:[nt&&Ce?a.jsx("div",{className:`${wt} ${e}-titles-fade-out`,children:_t(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:_t(oe)})]}),Ce&&B?B:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ce?a.jsx("div",{className:`${Lt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(nt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${Ce?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:on(oe,!0)})]}):null]})]}),no=()=>{const xe=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...xe?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:xe?void 0:{flex:"0 0 auto",height:"auto"},children:fn(oe,!0)}),Sn()]})};return a.jsxs("div",{ref:it,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{xt||tt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Zt?void 0:-1,style:{opacity:le?1:0,transition:"opacity 300ms ease",pointerEvents:le?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...pt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Ae,...He,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:De,onClick:xe=>xe.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&de.length>1?"true":"false",onPointerDown:fe?Ct:void 0,onPointerUp:fe?rt:void 0,onPointerCancel:fe?St:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Rt&&J?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:xe=>{xe.target===xe.currentTarget&&at(he)},children:a.jsx("div",{className:`${e}-slide-area`,children:wn(Rt.images)})},`slide-out-${he}`):null,a.jsx("div",{className:`${e}-slide-layer-in${J?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:ie?wn(ie.images):null})},`slide-in-${he}-${we}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:_e,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:q,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...te?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${te?` ${e}-lightbox-content-area-stacked`:""}`,children:$e&&a.jsx("div",{className:`${e}-text-bar-cell${te?` ${e}-text-bar-cell-stacked`:""}`,style:te?void 0:{flex:1,minWidth:0,width:"100%"},children:te?F==="fade"?to():no():F==="fade"?Tt():yt()})})})]})]})]})};function cb(e){return`
|
|
15662
15613
|
.${e}-wrapper {
|
|
15663
15614
|
position: relative;
|
|
15664
15615
|
width: 100%;
|
|
@@ -16180,7 +16131,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
16180
16131
|
pointer-events: auto;
|
|
16181
16132
|
z-index: 10;
|
|
16182
16133
|
}
|
|
16183
|
-
`}const db=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=b.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,
|
|
16134
|
+
`}const db=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=b.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,S=s.useRef(null),[m,h]=s.useState(!1),[x,w]=s.useState(0),F=s.useRef(!1),v=s.useRef(!1),P=s.useRef(!1),M=s.useMemo(()=>(t??[]).filter(T=>Lo(T).length>0),[t]),K=m&&M.length>0,X=!n,j=s.useCallback(()=>{X&&(P.current=!0,bv(v.current,d),v.current=!1)},[X,d]),N=(T=0)=>{if(M.length===0||n&&!i&&!o)return;const L=ma(M,y),Y=Math.max(0,Math.min(T,L.length-1));if(w(Y),X){const R=op();ip(Y+1,d,R),v.current=!R}h(!0)},_=s.useCallback(()=>{h(!1),P.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!X||typeof window>"u")return;const T=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=T}},[X]),s.useEffect(()=>{if(!X||F.current)return;F.current=!0;const T=Ac(d);if(!T)return;const L=Fc(T,ma(M,y).length);L<0||(w(L),h(!0))},[M,d,X,y]),s.useEffect(()=>{if(!X)return;const T=()=>{if(P.current){P.current=!1,h(!1);return}const L=Ac(d);if(!L){h(!1);return}const Y=Fc(L,ma(M,y).length);if(Y<0){h(!1);return}v.current=!1,w(Y),h(!0)};return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[M,d,X,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:S,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:cb(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>N(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":Va(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),K&&typeof document<"u"&&(()=>{const T=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx(lb,{prefix:c,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:X,journalItemId:d,onBeforeClose:j,onClose:_}),T)})()]})},ub=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
16184
16135
|
import { createPortal } from 'react-dom';
|
|
16185
16136
|
import { CommonComponentProps } from '../props';
|
|
16186
16137
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -16945,7 +16896,7 @@ export type LightboxJournalSettings = {
|
|
|
16945
16896
|
closeIconColor: string;
|
|
16946
16897
|
closeIconHoverColor: string;
|
|
16947
16898
|
};
|
|
16948
|
-
`,pb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",zi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function mb(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...zi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...zi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...zi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...zi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...zi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...zi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...zi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const gb=Ei.reduce((e,t)=>({...e,...mb(t)}),{}),hb=Ei.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Goudy Bookletter 1911",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function vs(e){return Ei.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const fb=Lv(),yb={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...gb,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:pb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...hb,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...vs({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...vs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...vs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[fb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",max:2,display:{type:"media-list-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},vb={element:db,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:yb,sourceCode:ub,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ei.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{...Ei.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})}},xb={sizeType:"custom",value:700,min:400,max:700};function Ta(e,t){return{widthPx:e,heightPx:e*t}}function qs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function sd(e,t,n,i){const{heightPx:o}=Ta(n,i);return qs(e/2,t/2,e,t,n,o)}function $p(e,t,n){for(const i of n){const{heightPx:o}=Ta(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function bb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":$p(e,t,n)||r==="area"?l??"none":c??"none"}function ld(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Sb(e){return`
|
|
16899
|
+
`,pb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",zi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function mb(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...zi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...zi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...zi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...zi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...zi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...zi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...zi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const gb=Ei.reduce((e,t)=>({...e,...mb(t)}),{}),hb=Ei.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function vs(e){return Ei.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const fb=Lv(),yb={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...gb,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:pb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...hb,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...vs({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...vs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...vs({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[fb]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",max:2,display:{type:"media-list-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},vb={element:db,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:yb,sourceCode:ub,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ei.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Ei.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},xb={sizeType:"custom",value:700,min:400,max:700};function Ta(e,t){return{widthPx:e,heightPx:e*t}}function qs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function sd(e,t,n,i){const{heightPx:o}=Ta(n,i);return qs(e/2,t/2,e,t,n,o)}function $p(e,t,n){for(const i of n){const{heightPx:o}=Ta(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function bb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":$p(e,t,n)||r==="area"?l??"none":c??"none"}function ld(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Sb(e){return`
|
|
16949
16900
|
.${e}-root {
|
|
16950
16901
|
position: absolute;
|
|
16951
16902
|
top: 0;
|
|
@@ -16980,7 +16931,7 @@ export type LightboxJournalSettings = {
|
|
|
16980
16931
|
width: 32px;
|
|
16981
16932
|
height: 32px;
|
|
16982
16933
|
}
|
|
16983
|
-
`}function wb(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function $b(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await wb(i)]));return new Map(n)}function Cb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=b.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,
|
|
16934
|
+
`}function wb(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function $b(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await wb(i)]));return new Map(n)}function Cb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=b.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,S]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),x=s.useRef({x:0,y:0}),[w,F]=s.useState(!1),[v,P]=s.useState(!1),M=s.useRef(new Map),{imageSize:K=xb,cursor:X="system",target:j="area",position:N="random",visible:_="all",defaultCursor:T=null,hoverCursor:L=null}=e,Y=t.filter(E=>{var f;return!!((f=E==null?void 0:E.image)!=null&&f.assetId)}),R=s.useMemo(()=>Sb(i),[i]),I=s.useCallback((E,f,Q=l)=>{if(!o)return;const q=o.getBoundingClientRect(),pe=E-q.left,k=f-q.top;S({x:pe,y:k}),h(bb(pe,k,Q,o,X,j,L,T))},[o,l,X,j,L,T]);s.useEffect(()=>{const E=[...Y.map(Q=>Q.image.assetId),T,L].filter(Q=>!!Q);if(E.length===0){M.current=new Map,P(!0);return}let f=!1;return P(!1),$b(E).then(Q=>{f||(M.current=Q,P(!0))}),()=>{f=!0}},[t,T,L]),s.useEffect(()=>{if(!o)return;const E=Q=>{Q.stopPropagation(),x.current={x:Q.clientX,y:Q.clientY},I(Q.clientX,Q.clientY)},f=()=>{w&&I(x.current.x,x.current.y)};return o.addEventListener("mousemove",E),window.addEventListener("scroll",f,!0),()=>{o.removeEventListener("mousemove",E),window.removeEventListener("scroll",f,!0)}},[o,w,I]),s.useEffect(()=>{!o||!w||I(x.current.x,x.current.y)},[l,o,w,I]),s.useEffect(()=>{w||h("none")},[w]);const $=(E,f,Q,q={})=>{var te,fe;if(!((te=E==null?void 0:E.image)!=null&&te.assetId))return null;const pe=((fe=M.current.get(E.image.assetId))==null?void 0:fe.aspectRatio)??1,k=ld(E.image.assetId,K,M.current),{heightPx:me}=Ta(k,pe);let C=0,ue=0;return N==="same"?{x:C,y:ue}=sd(f,Q,k,pe):(C=q.x??Math.random()*f,ue=q.y??Math.random()*Q,{x:C,y:ue}=qs(C,ue,f,Q,k,me)),{id:p.current++,assetId:E.image.assetId,link:E.link,name:E.image.name,x:C,y:ue,xRatio:C/f,yRatio:ue/Q,aspectRatio:pe,widthPx:k}},G=()=>{if(!o)return;const E=o.getBoundingClientRect(),f=E.width,Q=E.height;f===0||Q===0||c(q=>q.length===0?q:q.map(pe=>{const k=K.sizeType==="random"?pe.widthPx:ld(pe.assetId,K,M.current),{heightPx:me}=Ta(k,pe.aspectRatio);if(N==="same"){const{x:te,y:fe}=sd(f,Q,k,pe.aspectRatio);return{...pe,x:te,y:fe,widthPx:k}}const{x:C,y:ue}=qs(pe.xRatio*f,pe.yRatio*Q,f,Q,k,me);return{...pe,x:C,y:ue,widthPx:k}}))};s.useEffect(()=>{if(!o||Y.length===0||!v)return;const E=o.getBoundingClientRect(),f=E.width,Q=E.height,q=$(Y[0],f,Q);q&&(c([q]),u(Y.length>1?1:0))},[K,N,o,t,v]),s.useEffect(()=>{if(!o)return;G();const E=new ResizeObserver(G);return E.observe(o),window.addEventListener("resize",G),()=>{E.disconnect(),window.removeEventListener("resize",G)}},[o,N,K,l.length]),s.useEffect(()=>{_==="last One"&&c(E=>E.length>0?[E[E.length-1]]:[])},[_]);const O=E=>{if(!o||Y.length===0||!v)return;const f=o.getBoundingClientRect(),Q=E.clientX-f.left,q=E.clientY-f.top;if(j==="image"&&!$p(Q,q,l))return;let pe=0,k=0;N==="on Click"?(pe=Q,k=q):N==="same"?(pe=f.width/2,k=f.height/2):(pe=Math.random()*f.width,k=Math.random()*f.height);const me=Y[d%Y.length],C=$(me,f.width,f.height,{x:pe,y:k});if(!C)return;const ue=_==="all"?[...l,C]:[C];c(ue),u(te=>(te+1)%Y.length),I(E.clientX,E.clientY,ue)},U=X==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:R}}),a.jsxs("div",{ref:r,onClick:O,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),className:`${i}-root`,style:{cursor:U?"none":"default"},children:[l.map(E=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${E.y}px`,left:`${E.x}px`,width:`${E.widthPx}px`,cursor:U?"none":"default"},children:a.jsx(b.LinkWrapper,{link:j==="area"?E.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:E.assetId,alt:E.name,className:`${i}-image`})})},E.id)),w&&U&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const Tb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
16984
16935
|
import { CommonComponentProps } from '../props';
|
|
16985
16936
|
import { LinkWrapper, useScopedStyles, type ContentLink } from '../utils/index';
|
|
16986
16937
|
|
|
@@ -17506,7 +17457,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
17506
17457
|
</>
|
|
17507
17458
|
);
|
|
17508
17459
|
}
|
|
17509
|
-
`,Ib={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Lb={element:Cb,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Ib,sourceCode:Tb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},
|
|
17460
|
+
`,Ib={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:{type:"url",value:"",target:"blank"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Lb={element:Cb,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:Ib,sourceCode:Tb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},Pb=100,Mb=70,vi="cubic-bezier(0.86, 0, 0.07, 1)";function Eb(e){return`
|
|
17510
17461
|
.${e}-wrapper {
|
|
17511
17462
|
position: relative;
|
|
17512
17463
|
width: 100%;
|
|
@@ -17616,7 +17567,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
17616
17567
|
display: block;
|
|
17617
17568
|
pointer-events: none;
|
|
17618
17569
|
}
|
|
17619
|
-
`}function Rb(e){return e==="blur"?
|
|
17570
|
+
`}function Rb(e){return e==="blur"?Mb:e==="greyscale"?Pb:0}function Yo(e,t=1,n=1){const i=Rb(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function cd(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function kb(e,t){return t<=1?0:(e-1+t)%t}function Ab(e,t=1){return!e||e.height===0?t:e.width/e.height}function Fb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function dd(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function Cp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function ud(e,t,n){return{...Cp(e),[`--${n}-stage-scale`]:t}}function Nb(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function _b({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,g,Z,J,re,he,z;const{prefix:o}=b.useScopedStyles(),r=s.useMemo(()=>Eb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],S=cd(y.length),[m,h]=s.useState(S.activeIndex),[x,w]=s.useState(S.backgroundIndex),[F,v]=s.useState(!1),[P,M]=s.useState(!1),[K,X]=s.useState(null),[j,N]=s.useState(null),[_,T]=s.useState(0),[L,Y]=s.useState(1),[R,I]=s.useState("none"),[$,G]=s.useState("next"),[O,U]=s.useState({}),[E,f]=s.useState({width:0,height:0}),Q=s.useRef(null),q=s.useRef(null),pe=!n||!!i,k=l??60,me=Math.max(10,Math.min(100,c??k)),C=Math.max(10,Math.min(100,d??k)),ue=Math.max(100,u),te=Yo(p),fe=s.useCallback(B=>{const ne=Ab(B?O[B]:void 0);return Fb(E.width,E.height,ne,me,C)},[E.height,E.width,O,C,me]);s.useEffect(()=>{const B=q.current;if(!B)return;const ne=new ResizeObserver(([ce])=>{const{width:ee,height:H}=ce.contentRect;f({width:ee,height:H})});return ne.observe(B),()=>ne.disconnect()},[]),s.useEffect(()=>{const B=(t??[]).map(ne=>{var ce;return(ce=ne.image)==null?void 0:ce.assetId}).filter(ne=>!!ne);Nb(B,(ne,ce)=>{U(ee=>{var H,be;return((H=ee[ne])==null?void 0:H.width)===ce.width&&((be=ee[ne])==null?void 0:be.height)===ce.height?ee:{...ee,[ne]:ce}})})},[t]),s.useEffect(()=>{const{backgroundIndex:B,activeIndex:ne}=cd(y.length);h(ne),w(B),v(!1),M(!1),X(null),N(null),T(0),Y(1),I("none"),G("next")},[y.length,t]),s.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current)},[]);const Pe=s.useCallback(B=>{var ae,W,ke,ze;if(!pe||F||y.length<=1)return;const ne=B==="next"?(m+1)%y.length:(m-1+y.length)%y.length,ce=fe((W=(ae=y[m])==null?void 0:ae.image)==null?void 0:W.assetId),ee=fe((ze=(ke=y[ne])==null?void 0:ke.image)==null?void 0:ze.assetId),H=dd(E.width,E.height,ce),be=dd(E.width,E.height,ee);Q.current&&clearTimeout(Q.current),G(B),M(!0),v(!0),B==="next"?(X(m),N(ne),T(0),Y(1),I(Yo(p,0,1))):(w(kb(ne,y.length)),X(ne),N(m),T(1),Y(be),I(Yo(p,1,be))),requestAnimationFrame(()=>{M(!1),requestAnimationFrame(()=>{B==="next"?(T(1),Y(H),I(Yo(p,1,H))):(T(0),Y(1),I(Yo(p,0,1)))})}),Q.current=setTimeout(()=>{B==="next"&&w(m),h(ne),X(null),N(null),v(!1)},ue)},[m,p,E.height,E.width,fe,F,pe,y,ue]),de=y[m],we=x!==null?y[x]:null,V=K!==null?y[K]:null,ie=j!==null?y[j]:null,oe=y.length<=1?0:(m-1+y.length)%y.length,le=y.length<=1?0:(m+1)%y.length,ve=fe((Se=de==null?void 0:de.image)==null?void 0:Se.assetId),Fe=fe((g=V==null?void 0:V.image)==null?void 0:g.assetId),Ee=fe((Z=ie==null?void 0:ie.image)==null?void 0:Z.assetId),Ce={[`--${o}-transition-ms`]:`${ue}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:q,className:Et(`${o}-wrapper`,P&&`${o}-snap`,n&&!i&&`${o}-editor`),style:Ce,"aria-label":"Zoom gallery",children:[((J=we==null?void 0:we.image)==null?void 0:J.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:we.image.assetId,alt:"",style:{filter:te}})}),F&&((re=V==null?void 0:V.image)==null?void 0:re.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${$}`),style:ud(Fe,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:V.image.assetId,alt:"",style:{filter:R}})}),F&&((he=ie==null?void 0:ie.image)==null?void 0:he.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${$}`),style:ud(Ee,_,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:ie.image.assetId,alt:""})}),!F&&((z=de==null?void 0:de.image)==null?void 0:z.assetId)&&a.jsx("div",{className:Et(`${o}-stage`,`${o}-foreground`),style:Cp(ve),children:a.jsx("img",{className:`${o}-image`,src:de.image.assetId,alt:de.image.name??""})}),pe&&y.length>1&&!F&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Pe("prev"),"aria-label":`Show previous image (${oe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Et(`${o}-nav`,`${o}-nav-next`),onClick:()=>Pe("next"),"aria-label":`Show next image (${le+1} of ${y.length})`})]})]})]})}const Hb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
17620
17571
|
import cn from 'classnames';
|
|
17621
17572
|
import { CommonComponentProps } from '../props';
|
|
17622
17573
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -18135,7 +18086,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
|
|
|
18135
18086
|
</>
|
|
18136
18087
|
);
|
|
18137
18088
|
}
|
|
18138
|
-
`,Wb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Ob={element:_b,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Wb,sourceCode:Hb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Db={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},zb=["hover","active"],xs={left:"flex-start",center:"center",right:"flex-end"};function Bb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function jb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Vb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,
|
|
18089
|
+
`,Wb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Ob={element:_b,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:Wb,sourceCode:Hb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Db={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},zb=["hover","active"],xs={left:"flex-start",center:"center",right:"flex-end"};function Bb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function jb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Vb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,S=`.${e}-button:hover, ${y}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
|
|
18139
18090
|
.${e}-root {
|
|
18140
18091
|
line-height: 0;
|
|
18141
18092
|
}
|
|
@@ -18298,7 +18249,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
|
|
|
18298
18249
|
transform: translateY(-50%);
|
|
18299
18250
|
opacity: 1;
|
|
18300
18251
|
}
|
|
18301
|
-
${
|
|
18252
|
+
${S} {
|
|
18302
18253
|
background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
|
|
18303
18254
|
color: var(--${e}-hover-text-color, var(--${e}-text-color));
|
|
18304
18255
|
border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
|
|
@@ -18377,7 +18328,7 @@ a:active .${e}-button .${e}-icon-image,
|
|
|
18377
18328
|
height: calc(1em * var(--${e}-icon-scale, 1));
|
|
18378
18329
|
width: calc(1em * var(--${e}-icon-scale, 1));
|
|
18379
18330
|
}
|
|
18380
|
-
`}function bs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function pd(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=b.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Gb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=b.useScopedStyles(),l=s.useMemo(()=>Vb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:
|
|
18331
|
+
`}function bs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function pd(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=b.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Gb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=b.useScopedStyles(),l=s.useMemo(()=>Vb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:S="text-icon",gap:m=0,iconSize:h=0,iconWidthC:x=0,dimensions:w=!1,padding:F={top:0,right:0,bottom:0,left:0},cornerRadius:v=0,boxShadow:P={top:0,left:0,right:0,bottom:0},boxShadowColor:M="rgba(0, 0, 0, 0)",innerBoxShadow:K={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:X="rgba(0, 0, 0, 0)",stroke:j=0,blur:N=0,backgroundColor:_="#000000",textColor:T="#ffffff",borderColor:L="#ffffff",iconColor:Y="#ffffff",hoverEffect:R="none",fontFamily:I,fontSettings:$,fontSize:G,lineHeight:O,letterSpacing:U=0,wordSpacing:E=0,textAppearance:f,stateOverrides:Q,minWidth:q=0,minHeight:pe=0,width:k=0,height:me=0}=e,C=b.buildColorVars(r,{backgroundColor:_,textColor:T,borderColor:L,iconColor:Y,boxShadowColor:M,innerBoxShadowColor:X},Db,zb,Q),ue=i&&i!=="default"?`${r}-state-${i}`:"",te=t&&!n?`${r}-editing`:"",fe=R!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${R}`:"",Pe=R==="reveal"||R==="swipe",de=R==="content-roll",we=R==="reveal"&&(!t||n),V=w===!0,oe=c==="a"?y??p:p,le=c==="c",ve=c!=="b",Fe={fontSettings:{fontFamily:I,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:G??.01,lineHeight:O,letterSpacing:U,wordSpacing:E,textAppearance:f,color:T},Ce={...ve?pn(nn(Fe,t)):{},[`--${r}-box-shadow-x`]:b.scalingValue(P.left,t),[`--${r}-box-shadow-y`]:b.scalingValue(P.top,t),[`--${r}-box-shadow-blur`]:b.scalingValue(P.right,t),[`--${r}-box-shadow-spread`]:b.scalingValue(P.bottom,t),[`--${r}-inner-box-shadow-x`]:b.scalingValue(K.left,t),[`--${r}-inner-box-shadow-y`]:b.scalingValue(K.top,t),[`--${r}-inner-box-shadow-blur`]:b.scalingValue(K.right,t),[`--${r}-inner-box-shadow-spread`]:b.scalingValue(K.bottom,t),[`--${r}-backdrop-blur`]:N>0?`blur(${b.scalingValue(N,t)})`:void 0,paddingTop:b.scalingValue(F.top,t),paddingRight:b.scalingValue(F.right,t),paddingBottom:b.scalingValue(F.bottom,t),paddingLeft:b.scalingValue(F.left,t),borderRadius:b.scalingValue(v,t),borderWidth:b.scalingValue(j,t),...le?{}:{justifyContent:xs[oe],textAlign:oe},...le&&!de?{gap:b.scalingValue(m,t)}:{},...V?{width:b.scalingValue(k,t),height:b.scalingValue(me,t)}:{minWidth:b.scalingValue(q,t),minHeight:b.scalingValue(pe,t),...le?{width:"100%"}:{}}};let Se;const g={display:"inline-flex",alignItems:"center",justifyContent:le?xs[oe]:xs[c==="a"?oe:"center"],gap:le?b.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:oe}:{}};if(c==="b"){const re=()=>pd(r,u,h>0?"fixed":"fill",100,h,t);Se=de?bs(r,re,`${r}-icon-roll`,void 0,g):re()}else if(c==="c"){const re=()=>{const he=a.jsx("span",{className:`${r}-text`,style:{textAlign:oe},children:d}),z=pd(r,u,x>0?"fixed":"fill",100,x,t);return S==="icon-text"?a.jsxs(a.Fragment,{children:[z,he]}):a.jsxs(a.Fragment,{children:[he,z]})};Se=de?bs(r,re,`${r}-icon-text-roll`,void 0,g):re()}else Se=de?bs(r,()=>d,`${r}-label-roll`,void 0,g):Pe?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Z=we?re=>Bb(re,r):void 0,J=we?re=>jb(re,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:C,children:a.jsx("div",{className:`${r}-wrapper ${ue} ${te}`.trim(),children:a.jsx("div",{className:`${r}-button ${fe}`.trim(),style:Ce,onMouseEnter:Z,onMouseLeave:J,role:"button",tabIndex:o||t&&!n?void 0:0,children:Se})})})]})}const Xb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
18381
18332
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
18382
18333
|
import { CommonComponentProps } from '../props';
|
|
18383
18334
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
@@ -19207,7 +19158,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
19207
19158
|
pointer-events: auto;
|
|
19208
19159
|
flex-shrink: 0;
|
|
19209
19160
|
}
|
|
19210
|
-
`}const Dn=500,Qo=650,Tn="cubic-bezier(0.22, 1, 0.36, 1)",Zb=72,Jb=50,eS=1e4,tS=650,nS=500;function iS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Tp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function oS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Tp(i,n):null}function rS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function md(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const aS=.03;function Ip(e){return e.width*aS}const Ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Kr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ks(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function lS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ks(e,t.width,t.height)}function cS(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Ga(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function dS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function uS({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ga(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Ip(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ia(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function pS(e,t,n){const{left:i,width:o}=n,r=Ip(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Lp(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=Ia(e,"left",i),c=Ia(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function mS(e,t,n,i){const{start:o,end:r}=Lp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function gS(e,t,n){const i=No(e,t,n),o=Ia(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ga(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function hS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Yr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Ga(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function fS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:f,onPrev:S,onNext:w}){const N=s.useRef(null),v=s.useRef(null),M=s.useRef(null),E=s.useRef(new Map),[U,X]=s.useState(0),D=s.useRef(null),_=s.useRef(0),W=s.useRef(0),T=s.useRef("none"),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(!1),$=s.useRef(null),I=s.useRef(null),j=s.useRef(null),F=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),h=s.useRef(null),J=s.useRef(!1),[V,he]=s.useState(null),[k,ce]=s.useState(Ss),[L,me]=s.useState(0),[te,ve]=s.useState("opening"),[Le,de]=s.useState(0),[ue,Z]=s.useState(0),[le,oe]=s.useState(!1),[ge,Se]=s.useState(null),[Re,Ne]=s.useState(null),[Te,Ce]=s.useState(null),[g,Y]=s.useState(!1),[ee,ae]=s.useState(null),[ye,ne]=s.useState(!1),B=s.useRef(!1),[G,z]=s.useState(!1),[ie,H]=s.useState(!1),be=s.useRef(n),re=s.useRef(void 0),Q=t[n],Pe=Q?Ga(Q):!1,Ae=Q?b.isEmbedMedia(Q):!1,He=ue!==0||le,Xe=!l&&(!r||!!c),Ue=d&&!l,Je=u.length>1,je=s.useCallback((O,Me)=>t.length<=1?null:t[(O+Me+t.length)%t.length]??null,[t]),xe=Je?or(u,p,-1):je(n,-1),Ie=Je?or(u,p,1):je(n,1),ze=ge===-1&&He?Je&&Re!==null?or(u,Re,-1):Te!==null?je(Te,-1):null:null,Ze=ge===1&&He?Je&&Re!==null?or(u,Re,1):Te!==null?je(Te,1):null:null,tt=ze&&ze.assetId!==(xe==null?void 0:xe.assetId)?ze:null,ot=Ze&&Ze.assetId!==(Ie==null?void 0:Ie.assetId)?Ze:null,lt=xe&&Ue?(()=>{const O=Je?md(u,p,-1):t.length>2?je((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==xe.assetId?O:null})():null,it=Ie&&Ue?(()=>{const O=Je?md(u,p,1):t.length>2?je((n+1)%t.length,1):null;return O&&O.assetId!==Ie.assetId?O:null})():null,xt=tt??lt,rt=ot??it,_e=s.useCallback((O,Me,Fe)=>{if(!O||!Me||!Fe)return;const Oe=E.current,ft=Oe.get(O);(ft==null?void 0:ft.width)===Me&&(ft==null?void 0:ft.height)===Fe||(Oe.set(O,{width:Me,height:Fe}),X(Tt=>Tt+1))},[]),We=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Me=E.current.get(O.assetId);return lS(v.current,Me)},[U,L]),vt=s.useCallback(()=>{if(!Q)return;const O=We(Q);if(O){he(O);return}const Me=v.current;Me&&he(gd(Me))},[Q,We]),Ve=s.useCallback(O=>{if(Je){const Me=u.length;Ne((p+O+Me)%Me),Ce(null);return}t.length>1&&(Ce((n+O+t.length)%t.length),Ne(null))},[Je,u.length,p,t.length,n]),Ke=s.useCallback(O=>{R.current=O,oe(O)},[]),pe=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),De=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{pe(),Ke(!1)},Qo+32)},[pe,Ke]),qe=s.useCallback(()=>{const O=N.current;if(!O){ce({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ss.width,height:typeof window<"u"?window.innerHeight:Ss.height});return}const Me=O.getBoundingClientRect();ce({left:Me.left,top:Me.top,width:Me.width,height:Me.height})},[]),bt=s.useCallback((O,Me)=>{if(He){if(G&&!le)return`translate(${ue}px, 0px)`;if(le&&ge!==null){const Fe=We(O);if(!Fe)return;const{x:Oe,y:ft}=mS(Fe,Me,ge,k);return`translate(${Oe}px, ${ft}px)`}if(le)return"translate(0px, 0px)"}},[He,G,le,ue,ge,k,We]),yt=s.useCallback(()=>{const O=I.current;I.current=null,pe(),Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none",O===-1?S():O===1&&w()},[pe,Ke,S,w]),Rt=s.useCallback(()=>{pe(),$.current=window.setTimeout(()=>{I.current!==null&&yt()},Qo+32)},[pe,yt]),ct=s.useCallback(()=>{pe(),I.current=null,Ke(!1),Se(null),Ne(null),Ce(null),Z(0),z(!1),C.current=!1,W.current=0,T.current="none"},[pe,Ke]),wt=s.useCallback(O=>{if(!(!Ue||!V)){if(R.current){if(I.current===O){j.current=O,yt();return}ct()}pe(),Ve(O),I.current=O,Se(O),Ke(!0),Rt()}},[Ue,V,yt,ct,pe,Ve,Ke,Rt]);F.current=wt;const nt=s.useCallback(()=>{K.current=null,J.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),h.current!==null&&(window.clearTimeout(h.current),h.current=null)},[]),Nt=s.useCallback(O=>{P.current!==null&&window.clearInterval(P.current);const Me=J.current?nS:tS;P.current=window.setInterval(()=>{F.current(O)},Me)},[]),jt=s.useCallback(O=>{K.current!==O&&(nt(),K.current=O,J.current=!1,F.current(O),Nt(O),h.current=window.setTimeout(()=>{h.current=null,K.current===O&&(J.current=!0,Nt(O))},eS))},[nt,Nt]),$e=s.useCallback(()=>{const O=v.current;if(!O)return;const Me=Q==null?void 0:Q.assetId,Fe=Me?E.current.get(Me):void 0;if(Fe!=null&&Fe.width&&(Fe!=null&&Fe.height)){he(Ks(O,Fe.width,Fe.height));return}const Oe=M.current;if(Oe&&Me&&(Oe.src===Me||Oe.currentSrc===Me)){const{width:Tt,height:et}=sS(Oe);if(Tt&&et){_e(Me,Tt,et),he(Ks(O,Tt,et));return}}const ft=gd(O);!ft.width||!ft.height||he(ft)},[Q==null?void 0:Q.assetId,_e]),Ge=s.useCallback(O=>{if(M.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&$e();return}O.complete&&O.naturalWidth>0&&$e()}},[$e]),ht=s.useCallback(()=>{qe(),$e(),me(O=>O+1)},[qe,$e]);s.useEffect(()=>{ht();const O=v.current,Me=N.current,Fe=new ResizeObserver(()=>ht());return O&&Fe.observe(O),Me&&Fe.observe(Me),window.addEventListener("resize",ht),()=>{Fe.disconnect(),window.removeEventListener("resize",ht)}},[ht,n,y]),s.useLayoutEffect(()=>{if(!Q)return;const O=M.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){$e();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{vt()},[vt,U]),s.useEffect(()=>{const O=new Set,Me=[],Fe=Oe=>{!(Oe!=null&&Oe.assetId)||O.has(Oe.assetId)||(O.add(Oe.assetId),Me.push(Oe))};t.forEach(Fe),u.forEach(Oe=>Oe.items.forEach(Fe)),Me.forEach(Oe=>{E.current.has(Oe.assetId)||cS(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!V)return;if(!x){ve("open");return}Y(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),ve("open")})});return()=>cancelAnimationFrame(O)},[te,V,x]),s.useEffect(()=>{if(te!=="closing")return;const O=setTimeout(()=>f(),Dn);return()=>clearTimeout(O)},[te,f]),s.useEffect(()=>()=>{pe()},[pe]),s.useLayoutEffect(()=>{be.current===n&&re.current===(Q==null?void 0:Q.assetId)||(pe(),I.current=null,Se(null),Ne(null),Ce(null),de(0),Z(0),Ke(!1),H(!1),z(!1),_.current=0,W.current=0,T.current="none",C.current=!1,D.current=null,q.current=!1,M.current=null,vt(),be.current=n,re.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Ke,pe,vt]),s.useLayoutEffect(()=>{const O=j.current;O!==null&&(j.current=null,requestAnimationFrame(()=>{F.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,ne(!1);return}if(te!=="open"||B.current)return;if(!xe&&!Ie){B.current=!0;return}ne(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ne(!0),B.current=!0})});return()=>cancelAnimationFrame(O)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const O=()=>{const et=Mt=>{Mt.stopPropagation(),Mt.preventDefault(),document.removeEventListener("click",et,!0)};document.addEventListener("click",et,!0)},Me=et=>{const Mt=et<0?1:-1;pe(),Ve(Mt),I.current=Mt,Se(Mt),Ke(!0),Rt()},Fe=et=>{if(Math.abs(et)>Jb&&Ue){Me(et);return}I.current=null,Se(null),Ne(null),Ce(null),Ke(!0),Z(0),De()},Oe=et=>{if(et.touches.length!==1||R.current)return;const Mt=et.touches[0];q.current=!0,D.current={x:Mt.clientX,y:Mt.clientY},T.current="none",W.current=0,C.current=!1},ft=et=>{if(!D.current||et.touches.length!==1||R.current)return;const Mt=et.touches[0],Ct=Mt.clientX-D.current.x,Ht=Mt.clientY-D.current.y;if(T.current==="none"){if(Math.abs(Ct)<10&&Math.abs(Ht)<10)return;if(Math.abs(Ct)>Math.abs(Ht)){if(!Ue)return;T.current="horizontal"}else if(Ht>0){if(!Xe)return;T.current="vertical"}else return}if(T.current==="horizontal"){C.current=!0,z(!0),W.current=Ct,Z(Ct),et.preventDefault();return}T.current==="vertical"&&(C.current=!0,z(!0),_.current=Ht,de(Ht),et.preventDefault())},Tt=()=>{if(!D.current)return;const et=T.current,Mt=C.current;if(Mt&&et==="horizontal")Fe(W.current),O();else if(Mt&&et==="vertical"){const Ct=_.current;if(Xe&&Ct>Zb){const Ht=window.innerHeight;_.current=Ht,H(!0),de(Ht),ve("closing")}else _.current=0,de(0);O()}else et==="horizontal"&&Math.abs(W.current)>0&&(Fe(W.current),O());D.current=null,T.current="none",W.current=0,C.current=!1,z(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Ue,Ke,De,pe,Xe,Rt,Ve]);const Lt=s.useCallback(()=>{const O=(m==null?void 0:m())??x??null;O&&V&&(ae(O),Y(!0)),ve("closing")},[m,x,V]);s.useEffect(()=>{const O=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;nt(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Ue)return;Oe.preventDefault();const ft=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&K.current===ft||jt(ft)},Me=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const ft=Oe.key==="ArrowLeft"?-1:1;K.current===ft&&nt()},Fe=()=>{nt()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Me),window.addEventListener("blur",Fe),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Me),window.removeEventListener("blur",Fe),nt()}},[te,r,c,Lt,Ue,jt,nt]),s.useEffect(()=>{te!=="open"&&nt()},[te,nt]);const $t=()=>{te==="closing"||l||Lt()},mt=te==="open",_t=te==="closing",Ot=Le>0?Math.max(0,1-Le/500):1,zt=Le>0?Math.max(.35,1-Le/500):1,Ee=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!R.current)){if(I.current!==null){yt();return}pe(),Ke(!1)}},[pe,Ke,yt]),dt=te==="closing"?ee??x:x,ut=dt&&V&&(te==="opening"||_t)?iS(dt,V):void 0,kt=He&&Q?bt(Q,"center"):Le>0?`translateY(${Le}px)`:ut,Qe=V?Kr(V,k):null,at=!!(dt&&V),It=at&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Qe==null?void 0:Qe.top,left:Qe==null?void 0:Qe.left,width:Qe==null?void 0:Qe.width,height:Qe==null?void 0:Qe.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Le>0?zt:at?1:te==="opening"||_t?0:1,transition:G&&!le?"none":le?`transform ${Qo}ms ${Tn}`:ie?`transform ${Dn}ms ${Tn}, opacity ${Dn}ms ${Tn}`:It?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:(Pe||Ae)&&mt&&!He?"auto":"none",touchAction:(Pe||Ae)&&mt?"none":void 0,zIndex:1,overflow:Pe||Ae?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:mt&&!He?"auto":"none"},Ut=(O,Me,Fe="adjacent")=>{const Oe=We(O);if(!Oe)return{display:"none"};const ft=Fe==="far"?Me==="left"?"far-left":"far-right":Me==="left"?"left-adjacent":"right-adjacent",{start:Tt}=ge!==null?Lp(Oe,ft,ge,k):{start:Fe==="far"?Ia(Oe,Me,k):No(Oe,Me,k)},et=Kr(Tt,k),Mt=bt(O,ft),Ct=!He&&Fe==="adjacent"&&mt&&!ye?gS(Oe,Me,k):null,Ht=Fe==="far"&&He&&ge===(Me==="left"?-1:1),on=G&&!le?!1:le,fn=Fe==="adjacent"&&mt&&ye&&!He;return{position:"absolute",top:et.top,left:et.left,width:et.width,height:et.height,objectFit:"contain",transform:Mt??(Ct?`translate(${Ct.x}px, ${Ct.y}px)`:void 0),opacity:Fe==="far"?mt&&Ht?1:0:mt?1:0,transition:on?Fe==="far"?`transform ${Qo}ms ${Tn}`:`transform ${Qo}ms ${Tn}, opacity ${Dn}ms ${Tn}`:fn?`transform ${Dn}ms ${Tn}`:te==="opening"||_t?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1}},qt=(O,Me)=>{const Fe=We(O);return Fe?pS(No(Fe,Me,k),Me,k):null},Dt=O=>Me=>{if(!l){if(q.current){q.current=!1;return}Me.stopPropagation(),wt(O)}},Vt=xe?qt(xe,"left"):null,Gt=Ie?qt(Ie,"right"):null,Bt=Vt?Kr(Vt,k):null,Yt=Gt?Kr(Gt,k):null;return a.jsxs("div",{ref:N,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:mt?Ot:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:mt?1:0,transition:G?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),mt&&xt&&a.jsx(Yr,{media:xt,style:Ut(xt,"left","far"),onMeasure:_e,onTransitionEnd:Ee},`far-prev-${xt.assetId}`),mt&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:xe,style:Ut(xe,"left"),onMeasure:_e,onTransitionEnd:Ee},`prev-${xe.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(-1)})]}),mt&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Ie,style:Ut(Ie,"right"),onMeasure:_e,onTransitionEnd:Ee},`next-${Ie.assetId}`),Yt&&a.jsx("div",{style:{position:"absolute",top:Yt.top,left:Yt.left,width:Yt.width,height:Yt.height,cursor:l||G?"default":"pointer",pointerEvents:l||G?"none":"auto",zIndex:3},onClick:Dt(1)})]}),mt&&rt&&a.jsx(Yr,{media:rt,style:Ut(rt,"right","far"),onMeasure:_e,onTransitionEnd:Ee},`far-next-${rt.assetId}`),V&&Q&&(Ae?a.jsx("div",{style:At,onTransitionEnd:Ee,children:a.jsx(b.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:mt&&!He,style:pt})},`${n}-${Q.assetId}`):Pe?a.jsx(hS,{src:Q.assetId,phase:te,onMediaElement:Ge,wrapperStyle:At,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ee},`${n}-${Q.assetId}`):a.jsx("img",{ref:Ge,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ee,style:At},`${n}-${Q.assetId}`))]})}const yS=20,vS=.18;function xS(e){return`
|
|
19161
|
+
`}const Dn=500,Qo=650,Tn="cubic-bezier(0.22, 1, 0.36, 1)",Zb=72,Jb=50,eS=1e4,tS=650,nS=500;function iS(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Tp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=wa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function oS(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Tp(i,n):null}function rS(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function md(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const aS=.03;function Ip(e){return e.width*aS}const Ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Kr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function gd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ks(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function lS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ks(e,t.width,t.height)}function cS(e,t){if(b.isEmbedMedia(e)){t(e.assetId,b.getEmbedAspect(e),1);return}if(Ga(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function dS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function uS({mediaList:e}){const t=e.filter(n=>!b.isEmbedMedia(n));return t.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:t.map(n=>Ga(n)?a.jsx("video",{src:n.assetId,preload:"auto",muted:!0,playsInline:!0},n.assetId):a.jsx("img",{src:n.assetId,alt:""},n.assetId))})}function No(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Ip(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ia(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function pS(e,t,n){const{left:i,width:o}=n,r=Ip(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Lp(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=Ia(e,"left",i),c=Ia(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function mS(e,t,n,i){const{start:o,end:r}=Lp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function gS(e,t,n){const i=No(e,t,n),o=Ia(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Ga(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function hS({src:e,onMediaElement:t,wrapperStyle:n,videoStyle:i,onLoadedMetadata:o,onTransitionEnd:r}){const l=s.useRef(null);return s.useEffect(()=>{const c=l.current;return t==null||t(c??null),()=>{c==null||c.pause(),t==null||t(null)}},[e,t]),a.jsx("div",{style:n,onTransitionEnd:r,children:a.jsx("video",{ref:l,src:e,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedMetadata:o,style:i},e)})}function Yr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return b.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Ga(e)?a.jsx("video",{src:e.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function fS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:S,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:w}){const F=s.useRef(null),v=s.useRef(null),P=s.useRef(null),M=s.useRef(new Map),[K,X]=s.useState(0),j=s.useRef(null),N=s.useRef(0),_=s.useRef(0),T=s.useRef("none"),L=s.useRef(!1),Y=s.useRef(!1),R=s.useRef(!1),I=s.useRef(null),$=s.useRef(null),G=s.useRef(null),O=s.useRef(()=>{}),U=s.useRef(null),E=s.useRef(null),f=s.useRef(null),Q=s.useRef(!1),[q,pe]=s.useState(null),[k,me]=s.useState(Ss),[C,ue]=s.useState(0),[te,fe]=s.useState("opening"),[Pe,de]=s.useState(0),[we,V]=s.useState(0),[ie,oe]=s.useState(!1),[le,ve]=s.useState(null),[Fe,Ee]=s.useState(null),[Ce,Se]=s.useState(null),[g,Z]=s.useState(!1),[J,re]=s.useState(null),[he,z]=s.useState(!1),B=s.useRef(!1),[ne,ce]=s.useState(!1),[ee,H]=s.useState(!1),be=s.useRef(n),ae=s.useRef(void 0),W=t[n],ke=W?Ga(W):!1,ze=W?b.isEmbedMedia(W):!1,Xe=we!==0||ie,Ue=!l&&(!r||!!c),Qe=d&&!l,We=u.length>1,it=s.useCallback((D,Le)=>t.length<=1?null:t[(D+Le+t.length)%t.length]??null,[t]),ye=We?or(u,p,-1):it(n,-1),Te=We?or(u,p,1):it(n,1),Ve=le===-1&&Xe?We&&Fe!==null?or(u,Fe,-1):Ce!==null?it(Ce,-1):null:null,Ze=le===1&&Xe?We&&Fe!==null?or(u,Fe,1):Ce!==null?it(Ce,1):null:null,et=Ve&&Ve.assetId!==(ye==null?void 0:ye.assetId)?Ve:null,at=Ze&&Ze.assetId!==(Te==null?void 0:Te.assetId)?Ze:null,tt=ye&&Qe?(()=>{const D=We?md(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return D&&D.assetId!==ye.assetId?D:null})():null,Ye=Te&&Qe?(()=>{const D=We?md(u,p,1):t.length>2?it((n+1)%t.length,1):null;return D&&D.assetId!==Te.assetId?D:null})():null,xt=et??tt,pt=at??Ye,De=s.useCallback((D,Le,Ne)=>{if(!D||!Le||!Ne)return;const Oe=M.current,yt=Oe.get(D);(yt==null?void 0:yt.width)===Le&&(yt==null?void 0:yt.height)===Ne||(Oe.set(D,{width:Le,height:Ne}),X(Tt=>Tt+1))},[]),_e=s.useCallback(D=>{if(!(D!=null&&D.assetId))return null;const Le=M.current.get(D.assetId);return lS(v.current,Le)},[K,C]),He=s.useCallback(()=>{if(!W)return;const D=_e(W);if(D){pe(D);return}const Le=v.current;Le&&pe(gd(Le))},[W,_e]),Ae=s.useCallback(D=>{if(We){const Le=u.length;Ee((p+D+Le)%Le),Se(null);return}t.length>1&&(Se((n+D+t.length)%t.length),Ee(null))},[We,u.length,p,t.length,n]),Be=s.useCallback(D=>{R.current=D,oe(D)},[]),Ie=s.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),mt=s.useCallback(()=>{Ie(),I.current=window.setTimeout(()=>{Ie(),Be(!1)},Qo+32)},[Ie,Be]),ot=s.useCallback(()=>{const D=F.current;if(!D){me({left:0,top:0,width:typeof window<"u"?window.innerWidth:Ss.width,height:typeof window<"u"?window.innerHeight:Ss.height});return}const Le=D.getBoundingClientRect();me({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),Ct=s.useCallback((D,Le)=>{if(Xe){if(ne&&!ie)return`translate(${we}px, 0px)`;if(ie&&le!==null){const Ne=_e(D);if(!Ne)return;const{x:Oe,y:yt}=mS(Ne,Le,le,k);return`translate(${Oe}px, ${yt}px)`}if(ie)return"translate(0px, 0px)"}},[Xe,ne,ie,we,le,k,_e]),rt=s.useCallback(()=>{const D=$.current;$.current=null,Ie(),Be(!1),ve(null),Ee(null),Se(null),V(0),ce(!1),L.current=!1,_.current=0,T.current="none",D===-1?x():D===1&&w()},[Ie,Be,x,w]),St=s.useCallback(()=>{Ie(),I.current=window.setTimeout(()=>{$.current!==null&&rt()},Qo+32)},[Ie,rt]),nt=s.useCallback(()=>{Ie(),$.current=null,Be(!1),ve(null),Ee(null),Se(null),V(0),ce(!1),L.current=!1,_.current=0,T.current="none"},[Ie,Be]),Rt=s.useCallback(D=>{if(!(!Qe||!q)){if(R.current){if($.current===D){G.current=D,rt();return}nt()}Ie(),Ae(D),$.current=D,ve(D),Be(!0),St()}},[Qe,q,rt,nt,Ie,Ae,Be,St]);O.current=Rt;const ht=s.useCallback(()=>{U.current=null,Q.current=!1,E.current!==null&&(window.clearInterval(E.current),E.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Vt=s.useCallback(D=>{E.current!==null&&window.clearInterval(E.current);const Le=Q.current?nS:tS;E.current=window.setInterval(()=>{O.current(D)},Le)},[]),Zt=s.useCallback(D=>{U.current!==D&&(ht(),U.current=D,Q.current=!1,O.current(D),Vt(D),f.current=window.setTimeout(()=>{f.current=null,U.current===D&&(Q.current=!0,Vt(D))},eS))},[ht,Vt]),$e=s.useCallback(()=>{const D=v.current;if(!D)return;const Le=W==null?void 0:W.assetId,Ne=Le?M.current.get(Le):void 0;if(Ne!=null&&Ne.width&&(Ne!=null&&Ne.height)){pe(Ks(D,Ne.width,Ne.height));return}const Oe=P.current;if(Oe&&Le&&(Oe.src===Le||Oe.currentSrc===Le)){const{width:Tt,height:Je}=sS(Oe);if(Tt&&Je){De(Le,Tt,Je),pe(Ks(D,Tt,Je));return}}const yt=gd(D);!yt.width||!yt.height||pe(yt)},[W==null?void 0:W.assetId,De]),Ge=s.useCallback(D=>{if(P.current=D,!!D){if(D instanceof HTMLVideoElement){D.readyState>=1&&D.videoWidth>0&&$e();return}D.complete&&D.naturalWidth>0&&$e()}},[$e]),ft=s.useCallback(()=>{ot(),$e(),ue(D=>D+1)},[ot,$e]);s.useEffect(()=>{ft();const D=v.current,Le=F.current,Ne=new ResizeObserver(()=>ft());return D&&Ne.observe(D),Le&&Ne.observe(Le),window.addEventListener("resize",ft),()=>{Ne.disconnect(),window.removeEventListener("resize",ft)}},[ft,n,y]),s.useLayoutEffect(()=>{if(!W)return;const D=P.current;if(D){if(D instanceof HTMLImageElement&&D.complete&&D.naturalWidth>0){$e();return}D instanceof HTMLVideoElement&&D.readyState>=1&&D.videoWidth>0&&$e()}},[W==null?void 0:W.assetId,n,$e]),s.useEffect(()=>{He()},[He,K]),s.useEffect(()=>{const D=new Set,Le=[],Ne=Oe=>{!(Oe!=null&&Oe.assetId)||D.has(Oe.assetId)||(D.add(Oe.assetId),Le.push(Oe))};t.forEach(Ne),u.forEach(Oe=>Oe.items.forEach(Ne)),Le.forEach(Oe=>{M.current.has(Oe.assetId)||cS(Oe,De)})},[t,u,De]),s.useEffect(()=>{if(te!=="opening"||!q)return;if(!S){fe("open");return}Z(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(!0),fe("open")})});return()=>cancelAnimationFrame(D)},[te,q,S]),s.useEffect(()=>{if(te!=="closing")return;const D=setTimeout(()=>h(),Dn);return()=>clearTimeout(D)},[te,h]),s.useEffect(()=>()=>{Ie()},[Ie]),s.useLayoutEffect(()=>{be.current===n&&ae.current===(W==null?void 0:W.assetId)||(Ie(),$.current=null,ve(null),Ee(null),Se(null),de(0),V(0),Be(!1),H(!1),ce(!1),N.current=0,_.current=0,T.current="none",L.current=!1,j.current=null,Y.current=!1,P.current=null,He(),be.current=n,ae.current=W==null?void 0:W.assetId)},[n,W==null?void 0:W.assetId,Be,Ie,He]),s.useLayoutEffect(()=>{const D=G.current;D!==null&&(G.current=null,requestAnimationFrame(()=>{O.current(D)}))},[n,p,W==null?void 0:W.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){B.current=!1,z(!1);return}if(te!=="open"||B.current)return;if(!ye&&!Te){B.current=!0;return}z(!1);const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),B.current=!0})});return()=>cancelAnimationFrame(D)},[te,ye==null?void 0:ye.assetId,Te==null?void 0:Te.assetId]),s.useEffect(()=>{if(te!=="open")return;const D=()=>{const Je=Pt=>{Pt.stopPropagation(),Pt.preventDefault(),document.removeEventListener("click",Je,!0)};document.addEventListener("click",Je,!0)},Le=Je=>{const Pt=Je<0?1:-1;Ie(),Ae(Pt),$.current=Pt,ve(Pt),Be(!0),St()},Ne=Je=>{if(Math.abs(Je)>Jb&&Qe){Le(Je);return}$.current=null,ve(null),Ee(null),Se(null),Be(!0),V(0),mt()},Oe=Je=>{if(Je.touches.length!==1||R.current)return;const Pt=Je.touches[0];Y.current=!0,j.current={x:Pt.clientX,y:Pt.clientY},T.current="none",_.current=0,L.current=!1},yt=Je=>{if(!j.current||Je.touches.length!==1||R.current)return;const Pt=Je.touches[0],$t=Pt.clientX-j.current.x,_t=Pt.clientY-j.current.y;if(T.current==="none"){if(Math.abs($t)<10&&Math.abs(_t)<10)return;if(Math.abs($t)>Math.abs(_t)){if(!Qe)return;T.current="horizontal"}else if(_t>0){if(!Ue)return;T.current="vertical"}else return}if(T.current==="horizontal"){L.current=!0,ce(!0),_.current=$t,V($t),Je.preventDefault();return}T.current==="vertical"&&(L.current=!0,ce(!0),N.current=_t,de(_t),Je.preventDefault())},Tt=()=>{if(!j.current)return;const Je=T.current,Pt=L.current;if(Pt&&Je==="horizontal")Ne(_.current),D();else if(Pt&&Je==="vertical"){const $t=N.current;if(Ue&&$t>Zb){const _t=window.innerHeight;N.current=_t,H(!0),de(_t),fe("closing")}else N.current=0,de(0);D()}else Je==="horizontal"&&Math.abs(_.current)>0&&(Ne(_.current),D());j.current=null,T.current="none",_.current=0,L.current=!1,ce(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",yt,{passive:!1}),document.addEventListener("touchend",Tt),document.addEventListener("touchcancel",Tt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",yt),document.removeEventListener("touchend",Tt),document.removeEventListener("touchcancel",Tt)}},[te,Qe,Be,mt,Ie,Ue,St,Ae]);const Lt=s.useCallback(()=>{const D=(m==null?void 0:m())??S??null;D&&q&&(re(D),Z(!0)),fe("closing")},[m,S,q]);s.useEffect(()=>{const D=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;ht(),Lt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!Qe)return;Oe.preventDefault();const yt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&U.current===yt||Zt(yt)},Le=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const yt=Oe.key==="ArrowLeft"?-1:1;U.current===yt&&ht()},Ne=()=>{ht()};return window.addEventListener("keydown",D),window.addEventListener("keyup",Le),window.addEventListener("blur",Ne),()=>{window.removeEventListener("keydown",D),window.removeEventListener("keyup",Le),window.removeEventListener("blur",Ne),ht()}},[te,r,c,Lt,Qe,Zt,ht]),s.useEffect(()=>{te!=="open"&&ht()},[te,ht]);const wt=()=>{te==="closing"||l||Lt()},vt=te==="open",Nt=te==="closing",Wt=Pe>0?Math.max(0,1-Pe/500):1,Dt=Pe>0?Math.max(.35,1-Pe/500):1,Me=s.useCallback(D=>{if(!(D.propertyName!=="transform"||!R.current)){if($.current!==null){rt();return}Ie(),Be(!1)}},[Ie,Be,rt]),ct=te==="closing"?J??S:S,dt=ct&&q&&(te==="opening"||Nt)?iS(ct,q):void 0,kt=Xe&&W?Ct(W,"center"):Pe>0?`translateY(${Pe}px)`:dt,Ke=q?Kr(q,k):null,st=!!(ct&&q),It=st&&(te==="closing"||te==="open"&&g),At={position:"absolute",top:Ke==null?void 0:Ke.top,left:Ke==null?void 0:Ke.left,width:Ke==null?void 0:Ke.width,height:Ke==null?void 0:Ke.height,objectFit:"contain",transformOrigin:"top left",transform:kt,opacity:Pe>0?Dt:st?1:te==="opening"||Nt?0:1,transition:ne&&!ie?"none":ie?`transform ${Qo}ms ${Tn}`:ee?`transform ${Dn}ms ${Tn}, opacity ${Dn}ms ${Tn}`:It?`transform ${Dn}ms ${Tn}`:te==="opening"||Nt?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1,overflow:ke||ze?"hidden":void 0},ut={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:"none"},Gt=(D,Le,Ne="adjacent")=>{const Oe=_e(D);if(!Oe)return{display:"none"};const yt=Ne==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Tt}=le!==null?Lp(Oe,yt,le,k):{start:Ne==="far"?Ia(Oe,Le,k):No(Oe,Le,k)},Je=Kr(Tt,k),Pt=Ct(D,yt),$t=!Xe&&Ne==="adjacent"&&vt&&!he?gS(Oe,Le,k):null,_t=Ne==="far"&&Xe&&le===(Le==="left"?-1:1),on=ne&&!ie?!1:ie,fn=Ne==="adjacent"&&vt&&he&&!Xe;return{position:"absolute",top:Je.top,left:Je.left,width:Je.width,height:Je.height,objectFit:"contain",transform:Pt??($t?`translate(${$t.x}px, ${$t.y}px)`:void 0),opacity:Ne==="far"?vt&&_t?1:0:vt?1:0,transition:on?Ne==="far"?`transform ${Qo}ms ${Tn}`:`transform ${Qo}ms ${Tn}, opacity ${Dn}ms ${Tn}`:fn?`transform ${Dn}ms ${Tn}`:te==="opening"||Nt?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1}},Ut=(D,Le)=>{const Ne=_e(D);return Ne?pS(No(Ne,Le,k),Le,k):null},Ot=D=>Le=>{if(!l){if(Y.current){Y.current=!1;return}Le.stopPropagation(),Rt(D)}},Bt=ye?Ut(ye,"left"):null,Xt=Te?Ut(Te,"right"):null,zt=Bt?Kr(Bt,k):null,Kt=Xt?Kr(Xt,k):null;return a.jsxs("div",{ref:F,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:wt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:vt?Wt:0,transition:ne?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:vt?1:0,transition:ne?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"},children:a.jsx(lp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:wt})})]}),vt&&xt&&a.jsx(Yr,{media:xt,style:Gt(xt,"left","far"),onMeasure:De,onTransitionEnd:Me},`far-prev-${xt.assetId}`),vt&&ye&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:ye,style:Gt(ye,"left"),onMeasure:De,onTransitionEnd:Me},`prev-${ye.assetId}`),zt&&a.jsx("div",{style:{position:"absolute",top:zt.top,left:zt.left,width:zt.width,height:zt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Ot(-1)})]}),vt&&Te&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Te,style:Gt(Te,"right"),onMeasure:De,onTransitionEnd:Me},`next-${Te.assetId}`),Kt&&a.jsx("div",{style:{position:"absolute",top:Kt.top,left:Kt.left,width:Kt.width,height:Kt.height,cursor:l||ne?"default":"pointer",pointerEvents:l||ne?"none":"auto",zIndex:3},onClick:Ot(1)})]}),vt&&pt&&a.jsx(Yr,{media:pt,style:Gt(pt,"right","far"),onMeasure:De,onTransitionEnd:Me},`far-next-${pt.assetId}`),q&&W&&(ze?a.jsx("div",{style:At,onTransitionEnd:Me,children:a.jsx(b.EmbedMediaFrame,{media:W,fit:"contain",lazy:!1,startsAtOnce:!0,style:ut})},`${n}-${W.assetId}`):ke?a.jsx(hS,{src:W.assetId,onMediaElement:Ge,wrapperStyle:At,videoStyle:ut,onLoadedMetadata:$e,onTransitionEnd:Me},`${n}-${W.assetId}`):a.jsx("img",{ref:Ge,src:W.assetId,alt:W.name,onLoad:$e,onTransitionEnd:Me,style:At},`${n}-${W.assetId}`))]})}const yS=20,vS=.18;function xS(e){return`
|
|
19211
19162
|
.${e}-wrapper {
|
|
19212
19163
|
box-sizing: border-box;
|
|
19213
19164
|
max-width: 100%;
|
|
@@ -19296,7 +19247,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
19296
19247
|
pointer-events: auto;
|
|
19297
19248
|
}
|
|
19298
19249
|
${Qb(e)}
|
|
19299
|
-
`}function bS(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function SS(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function wS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:b.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:b.scalingValue(i*vS,n??!1),[`--${t}-image-aspect`]:bS(e)}}function $S(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function CS(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function TS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Tp(c,o):void 0)}}function IS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>xS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,
|
|
19250
|
+
`}function bS(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function SS(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function wS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:b.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:b.scalingValue(i*vS,n??!1),[`--${t}-image-aspect`]:bS(e)}}function $S(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function CS(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function TS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Tp(c,o):void 0)}}function IS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=b.useScopedStyles(),d=s.useMemo(()=>xS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,S=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=b.scalingValue(S,n??!1),h=`max(${m}, ${yS}px)`,{objectFitMode:x,imageStyle:w}=CS(e),F=$S(e,n),v=s.useRef(null),[P,M]=s.useState(!1),[K,X]=s.useState([]),[j,N]=s.useState(0),[_,T]=s.useState(0),[L,Y]=s.useState(null),[R,I]=s.useState({title1:"",title2:"",title3:""}),$=(!n||i)&&!P,G=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},O=G.sizeType??"none",U=$&&O!=="none"?`${c}-item-image-hover-${O}`:void 0,E=(G.value??120)/100,f=s.useCallback(V=>{!V||O!=="scale"||(V.style.transformOrigin=yf(V))},[O]),Q=s.useCallback(V=>{if(V){if(x==="contain"){const ie=SS(V);if(ie){const oe=V.closest(`.${c}-item-image`);oe instanceof HTMLElement&&oe.style.setProperty(`--${c}-item-media-aspect`,String(ie))}}f(V)}},[c,f,x]),q={width:b.scalingValue(y,n??!1),...F,...wS(e,c,n),[`--${c}-image-hover-scale`]:String(E)},pe=(()=>{const V={},ie=v.current?getComputedStyle(v.current).getPropertyValue("--cntrl-article-width").trim():"";return ie&&(V["--cntrl-article-width"]=ie),V})(),me=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),C=s.useMemo(()=>rS(u),[u]),ue=s.useMemo(()=>dS(u),[u]),te=(V,ie)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const oe=C.findIndex(ve=>ve.gridIndex===V);if(oe<0)return;const le=C[oe];T(oe),X(le.items),N(0),I(le.entry),Y(ie??null),M(!0)},fe=s.useCallback(()=>{M(!1),Y(null)},[]),Pe=s.useCallback(()=>{const V=C[_];return!V||!v.current?L:oS(v.current,V.gridIndex,x)??L},[C,_,L,x]),de=s.useCallback(V=>{if(C.length>1){const ie=C.length,oe=(_+V+ie)%ie,le=C[oe];T(oe),X(le.items),N(0),I(le.entry);return}N(ie=>(ie+V+K.length)%K.length)},[C,_,K.length]),we=C.length>1||K.length>1;return s.useEffect(()=>{if(!P||typeof document>"u")return;const V=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=V}},[P]),s.useEffect(()=>{!n||o||i||M(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&M(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(uS,{mediaList:ue}),a.jsx("div",{ref:v,className:`${c}-wrapper ${c}-type-${p}`,style:q,children:u.map((V,ie)=>{var ve,Fe;const oe=!!((ve=V.image)!=null&&ve.assetId),le=TS(!!me,oe,ie,c,x,te);return a.jsxs("div",{className:`${c}-item`,children:[V.title?a.jsx("span",{className:`${c}-item-title`,onClick:le,style:le?{cursor:"pointer"}:void 0,children:V.title}):null,(Fe=V.image)!=null&&Fe.assetId?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,U].filter(Boolean).join(" "),style:b.isEmbedMedia(V.image)?{[`--${c}-item-media-aspect`]:String(b.getEmbedAspect(V.image))}:void 0,children:b.isEmbedMedia(V.image)?a.jsx(b.EmbedMediaFrame,{media:V.image,fit:x,silentLoop:oe,"data-waterfall-index":ie,style:{...w,position:"absolute",left:0,bottom:0,width:"100%",height:"1cap"},onClick:le}):V.image.type==="video"?a.jsx("video",{ref:Q,src:V.image.assetId,"data-waterfall-index":ie,style:w,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:le,onLoadedData:Ee=>Q(Ee.currentTarget)}):a.jsx("img",{ref:Q,src:V.image.assetId,alt:V.image.name??"","data-waterfall-index":ie,style:w,onClick:le,onLoad:Ee=>Q(Ee.currentTarget)})}):null,ie<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!P&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},ie)})}),P&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const V=(l?document.getElementById(l):null)??document.body;return qn.createPortal(a.jsx("div",{style:pe,"data-selection":"none",children:a.jsx(fS,{prefix:c,items:K,index:j,entry:R,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:we,lightboxEntries:C,entryIdx:_,layoutId:r,sourceRect:L,resolveCloseSourceRect:Pe,onClose:fe,onPrev:()=>de(-1),onNext:()=>de(1)})}),V)})()]})}const LS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
19300
19251
|
import type React from 'react';
|
|
19301
19252
|
import { createPortal } from 'react-dom';
|
|
19302
19253
|
import { CommonComponentProps } from '../props';
|
|
@@ -19626,7 +19577,9 @@ export function Waterfall({
|
|
|
19626
19577
|
return style as React.CSSProperties;
|
|
19627
19578
|
})();
|
|
19628
19579
|
|
|
19629
|
-
const
|
|
19580
|
+
const hasLightbox = (settings?.lightbox ?? 'on') === 'on';
|
|
19581
|
+
// an embed in a cell that opens the lightbox plays there as it was set to, and here as a silent loop
|
|
19582
|
+
const canOpenLightbox = hasLightbox && (!isEditor || isPreviewMode || isEditMode);
|
|
19630
19583
|
const allLightboxEntries = useMemo(() => buildLightboxEntries(items), [items]);
|
|
19631
19584
|
const allMedia = useMemo(() => collectAllWaterfallMedia(items), [items]);
|
|
19632
19585
|
|
|
@@ -19738,8 +19691,8 @@ export function Waterfall({
|
|
|
19738
19691
|
{isEmbedMedia(item.image) ? (
|
|
19739
19692
|
<EmbedMediaFrame
|
|
19740
19693
|
media={item.image}
|
|
19741
|
-
mode="background"
|
|
19742
19694
|
fit={objectFitMode}
|
|
19695
|
+
silentLoop={hasLightbox}
|
|
19743
19696
|
data-waterfall-index={index}
|
|
19744
19697
|
// placed the way the image rule above places a picture, inline since the frame positions itself inline
|
|
19745
19698
|
style={{ ...imageStyle, position: 'absolute', left: 0, bottom: 0, width: '100%', height: '1cap' }}
|
|
@@ -19826,7 +19779,7 @@ export function Waterfall({
|
|
|
19826
19779
|
</>
|
|
19827
19780
|
);
|
|
19828
19781
|
}
|
|
19829
|
-
`,MS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Si={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function PS(e){const t={};return t[St(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[St(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[St(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[St(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[St(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[St(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[St(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Ei.filter(e=>e!=="count"),ES=_o.reduce((e,t)=>({...e,...PS(t)}),{}),RS=_o.reduce((e,t)=>({...e,[St(t,"fontFamily")]:"Arial",[St(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[St(t,"letterSpacing")]:0,[St(t,"wordSpacing")]:0,[St(t,"textAlign")]:"left",[St(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ws(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[St(n,"fontSize")]=i),o!==void 0&&(t[St(n,"lineHeight")]=o),t},{})}const kS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[_l[e],Hl(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},AS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],FS={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:AS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...ES},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:MS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...RS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ws({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ws({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ws({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[kS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},NS={element:IS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${St(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${St(t,"fontFamily")}`}),{})},schema:FS,sourceCode:LS},wo=500,Mp="cubic-bezier(0.25, 1, 0.5, 1)",_S=300,HS=5,WS=.15,OS=.4,DS=100,ao=100,hd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},zS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},$s={offset:{x:0,y:0},linkColor:"#cccccc"},fd={sizeType:"drag",value:3},BS="left";function jS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:BS,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function so(e,t,n){return`${e}: ${b.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function VS(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function GS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function XS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(ao,0),l=i(0,ao);e.removeChild(n);const c={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},d={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function US(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function qS(e,t){return`
|
|
19782
|
+
`,PS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Si={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function MS(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Ei.filter(e=>e!=="count"),ES=_o.reduce((e,t)=>({...e,...MS(t)}),{}),RS=_o.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ws(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const kS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[_l[e],Hl(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},AS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],FS={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:AS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...ES},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:PS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...RS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ws({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ws({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ws({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[kS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},NS={element:IS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},..._o.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:FS,sourceCode:LS},wo=500,Pp="cubic-bezier(0.25, 1, 0.5, 1)",_S=300,HS=5,WS=.15,OS=.4,DS=100,ao=100,hd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},zS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},$s={offset:{x:0,y:0},linkColor:"#cccccc"},fd={sizeType:"drag",value:3},BS="left";function jS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:BS,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function so(e,t,n){return`${e}: ${b.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function VS(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function GS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function XS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const S=n.getBoundingClientRect();return{x:S.left,y:S.top}},o=i(0,0),r=i(ao,0),l=i(0,ao);e.removeChild(n);const c={x:(r.x-o.x)/ao,y:(r.y-o.y)/ao},d={x:(l.x-o.x)/ao,y:(l.y-o.y)/ao},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function US(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function qS(e,t){return`
|
|
19830
19783
|
.${e}-wrapper {
|
|
19831
19784
|
position: relative;
|
|
19832
19785
|
width: 100%;
|
|
@@ -19898,7 +19851,7 @@ export function Waterfall({
|
|
|
19898
19851
|
top: 0;
|
|
19899
19852
|
left: 0;
|
|
19900
19853
|
opacity: 0;
|
|
19901
|
-
transition: opacity ${wo}ms ${
|
|
19854
|
+
transition: opacity ${wo}ms ${Pp};
|
|
19902
19855
|
}
|
|
19903
19856
|
.${e}-list-fade .${e}-slide.${e}-is-active {
|
|
19904
19857
|
opacity: 1;
|
|
@@ -20097,7 +20050,7 @@ export function Waterfall({
|
|
|
20097
20050
|
from { clip-path: inset(100% 0 0 0); }
|
|
20098
20051
|
to { clip-path: inset(0 0 0 0); }
|
|
20099
20052
|
}
|
|
20100
|
-
`}function KS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=b.useScopedStyles(),l=jS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??fd,p=u.sizeType??"drag",y=u.value??fd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",f=(e==null?void 0:e.nav)??"classic",S=(e==null?void 0:e.navSize)??"m",w=zS[S],N=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=xe=>b.scalingValue(xe*N,n),M=(e==null?void 0:e.show)??"always",E=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,D=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??hd.color,W=(e==null?void 0:e.controlsHoverColor)??hd.hover,T=(e==null?void 0:e.navColor)??Zo.colors.inactive,C=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,q=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,R=(e==null?void 0:e.linkColor)??$s.linkColor,$=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,I=x==="horizontal",j=p==="click",F=p==="drag",K=p==="auto"&&(!n||!!i),P=!n,h=m==="slide",J=f==="classic",V=M!=="never"&&U>0,he=M==="on hover",k=b.scalingValue(U,n),ce={width:k,height:k,maxWidth:k},L=h&&d>1,[me,te]=s.useState(0),[ve,Le]=s.useState(L?1:0),[de,ue]=s.useState(!1),[Z,le]=s.useState(!1),[oe,ge]=s.useState(!1),[Se,Re]=s.useState(0),[Ne,Te]=s.useState(!1),[Ce,g]=s.useState(!1),Y=s.useRef(!1),ee=s.useRef(ve);ee.current=ve;const ae=s.useRef(null),ye=s.useRef(0),ne=s.useRef(null),B=s.useRef(null),G=s.useRef(null),z=s.useRef(null),ie=s.useCallback(xe=>{Y.current=xe,ue(xe)},[]),H=s.useCallback(xe=>{if(d<2||xe===0)return;const Ie=xe>0?1:-1,ze=Math.abs(xe);if(Te(!0),ie(!0),!h){te(xt=>rr(xt+xe,d));return}let Ze=ee.current;const tt=L&&(Ze===0||Ze===d+1),ot=tt?me+1:null;tt&&(Ze=me+1);let lt=ze;for(;lt>0;){const xt=VS(Ze,Ie,d,L);if(Ze=xt.position,lt-=1,xt.hitBoundary){ye.current=lt*Ie;break}}const it=ze-lt;if(it>0&&te(xt=>rr(xt+it*Ie,d)),ee.current=Ze,ot!==null){if(ee.current=ot,Ze===ot){le(!0),Le(Ze);return}ae.current=Ze,le(!0),Le(ot);return}le(!1),Le(Ze)},[me,d,L,h,ie]),be=s.useCallback(xe=>{H(xe)},[H]),re=s.useCallback(xe=>{if(d<2)return;const Ie=rr(xe,d);if(!(Ie===me&&!Y.current)&&(Te(!0),ie(!0),te(Ie),h)){const ze=Ie+(L?1:0);ae.current=null,ye.current=0,ee.current=ze,le(!1),Le(ze)}},[me,d,L,h,ie]);s.useEffect(()=>{if(!de)return;const xe=window.setTimeout(()=>{if(L&&(ve===0||ve===d+1)){ae.current=null,le(!0),Le(me+1);return}ie(!1)},wo);return()=>window.clearTimeout(xe)},[me,d,L,de,ie,ve]),s.useEffect(()=>{if(!Z)return;let xe=0;const Ie=requestAnimationFrame(()=>{xe=requestAnimationFrame(()=>{const ze=ae.current;ae.current=null;const Ze=ye.current;if(ye.current=0,le(!1),ze!==null){ee.current=ze,Le(ze);return}if(Ze!==0){H(Ze);return}ie(!1)})});return()=>{cancelAnimationFrame(Ie),cancelAnimationFrame(xe)}},[H,ie,Z]);const Q=`${L}:${d}`,Pe=s.useRef(Q);s.useEffect(()=>{if(Pe.current===Q)return;Pe.current=Q;const xe=d>0?Math.min(me,d-1):0;G.current=null,z.current=null,ge(!1),Re(0),te(xe),le(!0),Le(xe+(L?1:0))},[me,d,L,Q]),s.useEffect(()=>{if(!Ne)return;const xe=window.setTimeout(()=>Te(!1),_S);return()=>window.clearTimeout(xe)},[Ne,me]),s.useEffect(()=>{if(!K||d<2)return;const xe=Math.max(y,.1)*1e3,Ie=window.setInterval(()=>{P&&Ce||be(1)},xe);return()=>window.clearInterval(Ie)},[y,d,be,K,Ce,P]);const Ae=s.useCallback(xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;G.current=null,z.current=null;const ze=ne.current;if(ze!=null&&ze.hasPointerCapture(xe.pointerId)&&ze.releasePointerCapture(xe.pointerId),!Ie.isActive){h&&Re(0);return}const tt=!(xe.timeStamp-Ie.lastTime>DS)&&Math.abs(Ie.velocity)>OS,ot=Ie.size>0&&Math.abs(Ie.offset-Ie.baseOffset)>Ie.size*WS;if(ge(!1),!tt&&!ot){Re(0);return}const lt=ot?Ie.offset-Ie.baseOffset:Ie.velocity;let it=1;ot&&Ie.size>0&&(it=Math.max(1,Math.round(Math.abs(lt)/Ie.size))),Re(0),H(lt<0?it:-it)},[H,h]);s.useEffect(()=>{const xe=Ie=>{z.current===null||Ie.pointerId!==z.current||Ae(Ie)};return window.addEventListener("pointerup",xe),window.addEventListener("pointercancel",xe),()=>{window.removeEventListener("pointerup",xe),window.removeEventListener("pointercancel",xe)}},[Ae]);const He=xe=>{const Ie=ne.current;if(!F||d<2||!Ie||xe.pointerType==="mouse"&&xe.button!==0)return;ae.current=null,ye.current=0,Y.current&&ie(!1);let ze=0;const Ze=B.current;if(h&&Ze){const tt=I?Ze.offsetWidth:Ze.offsetHeight;if(tt>0){const ot=GS(Ze,I);let lt=ee.current;L&&(lt===0||lt===d+1)?(lt=me+1,ee.current=lt,le(!0),Le(lt),ze=0):ze=ot+lt*tt,Re(ze)}}Ie.setPointerCapture(xe.pointerId),z.current=xe.pointerId,G.current={pointerId:xe.pointerId,startClientX:xe.clientX,startClientY:xe.clientY,axes:XS(Ie,`${r}-axis-probe`),size:I?Ie.offsetWidth:Ie.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:xe.timeStamp,velocity:0}},Xe=xe=>{const Ie=G.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;if(xe.pointerType==="mouse"&&xe.buttons===0){Ae(xe);return}const ze=xe.clientX-Ie.startClientX,Ze=xe.clientY-Ie.startClientY,tt=Ie.axes?US(Ie.axes,ze,Ze):{x:ze,y:Ze},ot=I?tt.x:tt.y,lt=I?tt.y:tt.x,it=Ie.baseOffset+ot;if(!Ie.isActive){if(Math.max(Math.abs(ot),Math.abs(lt))<HS)return;if(Math.abs(lt)>Math.abs(ot)){const rt=ne.current;rt!=null&&rt.hasPointerCapture(Ie.pointerId)&&rt.releasePointerCapture(Ie.pointerId),G.current=null,z.current=null,h&&Re(0);return}Ie.isActive=!0,ge(!0)}const xt=xe.timeStamp-Ie.lastTime;xt>0&&(Ie.velocity=(it-Ie.offset)/xt,Ie.lastTime=xe.timeStamp),Ie.offset=it,h&&Re(it)},Ue=xe=>{Ae(xe)},Je=I?`translate3d(calc(${-ve*100}% + ${Se}px), 0, 0)`:`translate3d(0, calc(${-ve*100}% + ${Se}px), 0)`,je=L?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:qS(r,n)}}),a.jsxs("div",{className:Et(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!I}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:ne,className:Et(`${r}-track`,{[`${r}-track-draggable`]:F,[`${r}-track-draggable-vertical`]:F&&!I}),onPointerDown:He,onPointerMove:Xe,onPointerUp:Ue,onPointerCancel:Ue,onLostPointerCapture:xe=>{z.current===xe.pointerId&&Ae(xe)},children:[a.jsx("div",{ref:B,className:Et(`${r}-list`,{[`${r}-list-slide`]:h,[`${r}-list-slide-vertical`]:h&&!I,[`${r}-list-fade`]:!h}),style:h?{transform:Je,transition:oe||Z?"none":`transform ${wo}ms ${Mp}`}:void 0,children:je.map((xe,Ie)=>{const ze=L?rr(Ie-1,d):Ie,tt=L&&(Ie===0||Ie===d+1)?`clone-${Ie===0?"start":"end"}`:`slide-${ze}`;return a.jsx("div",{className:Et(`${r}-slide`,{[`${r}-is-active`]:!h&&ze===me}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Et(`${r}-slider-image`,{[`${r}-contain`]:xe.image.objectFit==="contain",[`${r}-cover`]:xe.image.objectFit==="cover"}),src:xe.image.assetId,alt:xe.image.name??"",draggable:!1})})})},tt)})}),j&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>be(1)})]}),V&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-prev`]:I,[`${r}-arrow-prev-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{onClick:xe=>{xe.stopPropagation(),be(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${b.scalingValue(X,n)}, ${b.scalingValue(D*(I?1:-1),n)}) rotate(${I?"0deg":"90deg"})`},children:[E&&a.jsx(mn,{url:E,fill:_,hoverFill:W,className:Et(`${r}-arrow-img`,`${r}-mirror`),style:ce}),!E&&a.jsx(yd,{color:_,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-next`]:I,[`${r}-arrow-next-vertical`]:!I,[`${r}-hover-arrow`]:he}),style:{color:_,"--arrow-hover-color":W,...ce},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:xe=>{xe.stopPropagation(),be(1)},style:{transform:`translate(${b.scalingValue(X*(I?-1:1),n)}, ${b.scalingValue(D,n)}) rotate(${I?"0deg":"90deg"})`},children:[E&&a.jsx(mn,{url:E,fill:_,hoverFill:W,className:`${r}-arrow-img`,style:ce}),!E&&a.jsx(yd,{color:_,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),J&&a.jsx("div",{className:Et(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:I,[`${r}-pagination-inside-left`]:!I}),style:I?{bottom:v(w.inset)}:{left:v(w.inset)},children:a.jsx("div",{className:Et(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!I,[`${r}-animate-dots`]:Ne}),style:{backgroundColor:q,gap:v(w.gapInactive-w.activeDot+w.dot),...I?{height:v(w.activeDot+w.paddingY*2),paddingTop:v(w.paddingY),paddingBottom:v(w.paddingY),paddingLeft:v(w.paddingActive),paddingRight:v(w.paddingActive)}:{width:v(w.activeDot+w.paddingY*2),paddingLeft:v(w.paddingY),paddingRight:v(w.paddingY),paddingTop:v(w.paddingActive),paddingBottom:v(w.paddingActive)},borderRadius:v(w.borderRadius),transform:`translate(${b.scalingValue(Zo.offset.x,n)}, ${b.scalingValue(Zo.offset.y,n)})`},children:c.map((xe,Ie)=>{const ze=Ie===me,Ze=ze?w.activeDot:w.dot;return a.jsx("button",{onClick:()=>re(Ie),className:`${r}-pagination-item`,style:{width:v(w.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:ze?C:T,width:v(Ze)}})},Ie)})},`${S}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:b.scalingValue($,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((xe,Ie)=>a.jsx("div",{className:Et(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ie===me&&n,[`${r}-active`]:Ie===me}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":R,"--link-hover-color":R,position:"relative",top:b.scalingValue($s.offset.y,n),left:b.scalingValue($s.offset.x,n)},children:a.jsx(Zi,{content:xe.imageCaption})})},Ie))})]})]})]})}function yd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 YS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
20053
|
+
`}function KS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=b.useScopedStyles(),l=jS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??fd,p=u.sizeType??"drag",y=u.value??fd.value,S=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",w=zS[x],F=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,v=ye=>b.scalingValue(ye*F,n),P=(e==null?void 0:e.show)??"always",M=(e==null?void 0:e.controls)??null,K=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,X=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,j=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,N=(e==null?void 0:e.controlsColor)??hd.color,_=(e==null?void 0:e.controlsHoverColor)??hd.hover,T=(e==null?void 0:e.navColor)??Zo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,Y=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,R=(e==null?void 0:e.linkColor)??$s.linkColor,I=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,$=S==="horizontal",G=p==="click",O=p==="drag",U=p==="auto"&&(!n||!!i),E=!n,f=m==="slide",Q=h==="classic",q=P!=="never"&&K>0,pe=P==="on hover",k=b.scalingValue(K,n),me={width:k,height:k,maxWidth:k},C=f&&d>1,[ue,te]=s.useState(0),[fe,Pe]=s.useState(C?1:0),[de,we]=s.useState(!1),[V,ie]=s.useState(!1),[oe,le]=s.useState(!1),[ve,Fe]=s.useState(0),[Ee,Ce]=s.useState(!1),[Se,g]=s.useState(!1),Z=s.useRef(!1),J=s.useRef(fe);J.current=fe;const re=s.useRef(null),he=s.useRef(0),z=s.useRef(null),B=s.useRef(null),ne=s.useRef(null),ce=s.useRef(null),ee=s.useCallback(ye=>{Z.current=ye,we(ye)},[]),H=s.useCallback(ye=>{if(d<2||ye===0)return;const Te=ye>0?1:-1,Ve=Math.abs(ye);if(Ce(!0),ee(!0),!f){te(xt=>rr(xt+ye,d));return}let Ze=J.current;const et=C&&(Ze===0||Ze===d+1),at=et?ue+1:null;et&&(Ze=ue+1);let tt=Ve;for(;tt>0;){const xt=VS(Ze,Te,d,C);if(Ze=xt.position,tt-=1,xt.hitBoundary){he.current=tt*Te;break}}const Ye=Ve-tt;if(Ye>0&&te(xt=>rr(xt+Ye*Te,d)),J.current=Ze,at!==null){if(J.current=at,Ze===at){ie(!0),Pe(Ze);return}re.current=Ze,ie(!0),Pe(at);return}ie(!1),Pe(Ze)},[ue,d,C,f,ee]),be=s.useCallback(ye=>{H(ye)},[H]),ae=s.useCallback(ye=>{if(d<2)return;const Te=rr(ye,d);if(!(Te===ue&&!Z.current)&&(Ce(!0),ee(!0),te(Te),f)){const Ve=Te+(C?1:0);re.current=null,he.current=0,J.current=Ve,ie(!1),Pe(Ve)}},[ue,d,C,f,ee]);s.useEffect(()=>{if(!de)return;const ye=window.setTimeout(()=>{if(C&&(fe===0||fe===d+1)){re.current=null,ie(!0),Pe(ue+1);return}ee(!1)},wo);return()=>window.clearTimeout(ye)},[ue,d,C,de,ee,fe]),s.useEffect(()=>{if(!V)return;let ye=0;const Te=requestAnimationFrame(()=>{ye=requestAnimationFrame(()=>{const Ve=re.current;re.current=null;const Ze=he.current;if(he.current=0,ie(!1),Ve!==null){J.current=Ve,Pe(Ve);return}if(Ze!==0){H(Ze);return}ee(!1)})});return()=>{cancelAnimationFrame(Te),cancelAnimationFrame(ye)}},[H,ee,V]);const W=`${C}:${d}`,ke=s.useRef(W);s.useEffect(()=>{if(ke.current===W)return;ke.current=W;const ye=d>0?Math.min(ue,d-1):0;ne.current=null,ce.current=null,le(!1),Fe(0),te(ye),ie(!0),Pe(ye+(C?1:0))},[ue,d,C,W]),s.useEffect(()=>{if(!Ee)return;const ye=window.setTimeout(()=>Ce(!1),_S);return()=>window.clearTimeout(ye)},[Ee,ue]),s.useEffect(()=>{if(!U||d<2)return;const ye=Math.max(y,.1)*1e3,Te=window.setInterval(()=>{E&&Se||be(1)},ye);return()=>window.clearInterval(Te)},[y,d,be,U,Se,E]);const ze=s.useCallback(ye=>{const Te=ne.current;if(!Te||Te.pointerId!==ye.pointerId)return;ne.current=null,ce.current=null;const Ve=z.current;if(Ve!=null&&Ve.hasPointerCapture(ye.pointerId)&&Ve.releasePointerCapture(ye.pointerId),!Te.isActive){f&&Fe(0);return}const et=!(ye.timeStamp-Te.lastTime>DS)&&Math.abs(Te.velocity)>OS,at=Te.size>0&&Math.abs(Te.offset-Te.baseOffset)>Te.size*WS;if(le(!1),!et&&!at){Fe(0);return}const tt=at?Te.offset-Te.baseOffset:Te.velocity;let Ye=1;at&&Te.size>0&&(Ye=Math.max(1,Math.round(Math.abs(tt)/Te.size))),Fe(0),H(tt<0?Ye:-Ye)},[H,f]);s.useEffect(()=>{const ye=Te=>{ce.current===null||Te.pointerId!==ce.current||ze(Te)};return window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye),()=>{window.removeEventListener("pointerup",ye),window.removeEventListener("pointercancel",ye)}},[ze]);const Xe=ye=>{const Te=z.current;if(!O||d<2||!Te||ye.pointerType==="mouse"&&ye.button!==0)return;re.current=null,he.current=0,Z.current&&ee(!1);let Ve=0;const Ze=B.current;if(f&&Ze){const et=$?Ze.offsetWidth:Ze.offsetHeight;if(et>0){const at=GS(Ze,$);let tt=J.current;C&&(tt===0||tt===d+1)?(tt=ue+1,J.current=tt,ie(!0),Pe(tt),Ve=0):Ve=at+tt*et,Fe(Ve)}}Te.setPointerCapture(ye.pointerId),ce.current=ye.pointerId,ne.current={pointerId:ye.pointerId,startClientX:ye.clientX,startClientY:ye.clientY,axes:XS(Te,`${r}-axis-probe`),size:$?Te.offsetWidth:Te.offsetHeight,isActive:!1,baseOffset:Ve,offset:Ve,lastTime:ye.timeStamp,velocity:0}},Ue=ye=>{const Te=ne.current;if(!Te||Te.pointerId!==ye.pointerId)return;if(ye.pointerType==="mouse"&&ye.buttons===0){ze(ye);return}const Ve=ye.clientX-Te.startClientX,Ze=ye.clientY-Te.startClientY,et=Te.axes?US(Te.axes,Ve,Ze):{x:Ve,y:Ze},at=$?et.x:et.y,tt=$?et.y:et.x,Ye=Te.baseOffset+at;if(!Te.isActive){if(Math.max(Math.abs(at),Math.abs(tt))<HS)return;if(Math.abs(tt)>Math.abs(at)){const pt=z.current;pt!=null&&pt.hasPointerCapture(Te.pointerId)&&pt.releasePointerCapture(Te.pointerId),ne.current=null,ce.current=null,f&&Fe(0);return}Te.isActive=!0,le(!0)}const xt=ye.timeStamp-Te.lastTime;xt>0&&(Te.velocity=(Ye-Te.offset)/xt,Te.lastTime=ye.timeStamp),Te.offset=Ye,f&&Fe(Ye)},Qe=ye=>{ze(ye)},We=$?`translate3d(calc(${-fe*100}% + ${ve}px), 0, 0)`:`translate3d(0, calc(${-fe*100}% + ${ve}px), 0)`,it=C?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:qS(r,n)}}),a.jsxs("div",{className:Et(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!$}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsxs("div",{ref:z,className:Et(`${r}-track`,{[`${r}-track-draggable`]:O,[`${r}-track-draggable-vertical`]:O&&!$}),onPointerDown:Xe,onPointerMove:Ue,onPointerUp:Qe,onPointerCancel:Qe,onLostPointerCapture:ye=>{ce.current===ye.pointerId&&ze(ye)},children:[a.jsx("div",{ref:B,className:Et(`${r}-list`,{[`${r}-list-slide`]:f,[`${r}-list-slide-vertical`]:f&&!$,[`${r}-list-fade`]:!f}),style:f?{transform:We,transition:oe||V?"none":`transform ${wo}ms ${Pp}`}:void 0,children:it.map((ye,Te)=>{const Ve=C?rr(Te-1,d):Te,et=C&&(Te===0||Te===d+1)?`clone-${Te===0?"start":"end"}`:`slide-${Ve}`;return a.jsx("div",{className:Et(`${r}-slide`,{[`${r}-is-active`]:!f&&Ve===ue}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Et(`${r}-slider-image`,{[`${r}-contain`]:ye.image.objectFit==="contain",[`${r}-cover`]:ye.image.objectFit==="cover"}),src:ye.image.assetId,alt:ye.image.name??"",draggable:!1})})})},et)})}),G&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>be(1)})]}),q&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-prev`]:$,[`${r}-arrow-prev-vertical`]:!$,[`${r}-hover-arrow`]:pe}),style:{color:N,"--arrow-hover-color":_,...me},children:a.jsxs("button",{onClick:ye=>{ye.stopPropagation(),be(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${b.scalingValue(X,n)}, ${b.scalingValue(j*($?1:-1),n)}) rotate(${$?"0deg":"90deg"})`},children:[M&&a.jsx(mn,{url:M,fill:N,hoverFill:_,className:Et(`${r}-arrow-img`,`${r}-mirror`),style:me}),!M&&a.jsx(yd,{color:N,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Et(`${r}-arrow`,{[`${r}-arrow-next`]:$,[`${r}-arrow-next-vertical`]:!$,[`${r}-hover-arrow`]:pe}),style:{color:N,"--arrow-hover-color":_,...me},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ye=>{ye.stopPropagation(),be(1)},style:{transform:`translate(${b.scalingValue(X*($?-1:1),n)}, ${b.scalingValue(j,n)}) rotate(${$?"0deg":"90deg"})`},children:[M&&a.jsx(mn,{url:M,fill:N,hoverFill:_,className:`${r}-arrow-img`,style:me}),!M&&a.jsx(yd,{color:N,className:Et(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),Q&&a.jsx("div",{className:Et(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:$,[`${r}-pagination-inside-left`]:!$}),style:$?{bottom:v(w.inset)}:{left:v(w.inset)},children:a.jsx("div",{className:Et(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!$,[`${r}-animate-dots`]:Ee}),style:{backgroundColor:Y,gap:v(w.gapInactive-w.activeDot+w.dot),...$?{height:v(w.activeDot+w.paddingY*2),paddingTop:v(w.paddingY),paddingBottom:v(w.paddingY),paddingLeft:v(w.paddingActive),paddingRight:v(w.paddingActive)}:{width:v(w.activeDot+w.paddingY*2),paddingLeft:v(w.paddingY),paddingRight:v(w.paddingY),paddingTop:v(w.paddingActive),paddingBottom:v(w.paddingActive)},borderRadius:v(w.borderRadius),transform:`translate(${b.scalingValue(Zo.offset.x,n)}, ${b.scalingValue(Zo.offset.y,n)})`},children:c.map((ye,Te)=>{const Ve=Te===ue,Ze=Ve?w.activeDot:w.dot;return a.jsx("button",{onClick:()=>ae(Te),className:`${r}-pagination-item`,style:{width:v(w.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Ve?L:T,width:v(Ze)}})},Te)})},`${x}-${S}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:b.scalingValue(I,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ye,Te)=>a.jsx("div",{className:Et(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Te===ue&&n,[`${r}-active`]:Te===ue}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":R,"--link-hover-color":R,position:"relative",top:b.scalingValue($s.offset.y,n),left:b.scalingValue($s.offset.x,n)},children:a.jsx(Zi,{content:ye.imageCaption})})},Te))})]})]})]})}function yd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 YS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
20101
20054
|
import cn from 'classnames';
|
|
20102
20055
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
20103
20056
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -21545,11 +21498,11 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
|
|
|
21545
21498
|
left: 50%;
|
|
21546
21499
|
transform: translate(-50%, -50%);
|
|
21547
21500
|
}
|
|
21548
|
-
`}const Pp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function nw(e){return e in Pp}function iw(e){if(e&&nw(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Xl(e){return Pp[e]}const ow="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",rw=72,aw=50,sw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},lw=[];function cw(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function dw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function uw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function pw(e){if(!Array.isArray(e)||e.length===0)return[];if(cw(e)){const t=[];for(const n of e){const i=dw(n);if(!i)continue;const o=uw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function mw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const hw=1140/1440;function fw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function yw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function vw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function xw({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{mw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}const bw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",Sw=.004;function ww({prefix:e,closeIcon:t=bw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const x=b.scalingValue(n,c),m=b.scalingValue(r,c),f=b.scalingValue(l,c),S=b.scalingValue(Math.max(l,Sw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:f,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:S,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:x,height:x,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function $w({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:x,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v}){const M=i==="cover",E=s.useRef(null),U=s.useRef(null),X=s.useRef(null),D=s.useRef(0),_=s.useRef(0),W=s.useRef("none"),T=s.useRef(!1),C=s.useRef(!1),q=s.useRef(!1),R=s.useRef(null),[$,I]=s.useState(null),[j,F]=s.useState("opening"),[K,P]=s.useState(0),[h,J]=s.useState(0),[V,he]=s.useState(!1),[k,ce]=s.useState(!1),[L,me]=s.useState(!1),te=s.useRef(n),ve=t[n],Le=ve?Ys(ve):!1,de=ve?b.isEmbedMedia(ve):!1,ue=h!==0||V,Z=s.useCallback(G=>{q.current=G,he(G)},[]),le=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),oe=s.useCallback(()=>{le(),R.current=window.setTimeout(()=>{le(),Z(!1)},Jn+32)},[le,Z]),ge=s.useCallback(()=>{const G=E.current,z=U.current;if(!G)return;const ie=G.getBoundingClientRect(),H=ie.width,be=ie.height;if(!H||!be)return;if(i==="cover"){I({width:H,height:be,left:ie.left,top:ie.top});return}let re=ve&&b.isEmbedMedia(ve)?b.getEmbedAspect(ve):null;if(re===null){if(!z){I(Zr(G));return}const{width:Pe,height:Ae}=gw(z);if(!Pe||!Ae){I(Zr(G));return}re=Pe/Ae}const Q=H/be;if(re>Q){const Pe=H/re;I({width:H,height:Pe,left:ie.left,top:ie.top+(be-Pe)/2})}else{const Pe=be*re;I({width:Pe,height:be,left:ie.left+(H-Pe)/2,top:ie.top})}},[i,ve]);s.useEffect(()=>{ge();const G=E.current;if(!G)return;const z=new ResizeObserver(()=>ge());return z.observe(G),()=>z.disconnect()},[ge,n]),s.useEffect(()=>{j==="opening"&&$&&F("open")},[j,$]),s.useEffect(()=>{if(j!=="closing")return;const G=setTimeout(()=>c(),Jn);return()=>clearTimeout(G)},[j,c]),s.useEffect(()=>()=>{le()},[le]),s.useLayoutEffect(()=>{if(te.current===n)return;le(),P(0),J(0),Z(!1),me(!1),ce(!1),D.current=0,_.current=0,W.current="none",T.current=!1,X.current=null,C.current=!1;const G=E.current;G&&I(Zr(G)),te.current=n},[n,Z,le]),s.useEffect(()=>{if(j!=="open")return;let G=null;const z=()=>{G&&(document.removeEventListener("click",G,!0),G=null)},ie=()=>{z(),G=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),z()},document.addEventListener("click",G,!0)},H=Ae=>{le(),q.current=!1,he(!1),J(0),ce(!1),T.current=!1,_.current=0,W.current="none";const He=E.current;He&&I(Zr(He)),Ae<0?u():d()},be=Ae=>{if(Math.abs(Ae)>aw&&t.length>1){H(Ae);return}Z(!0),J(0),oe()},re=Ae=>{if(Ae.touches.length!==1||q.current)return;const He=Ae.touches[0];C.current=!0,X.current={x:He.clientX,y:He.clientY},W.current="none",_.current=0,T.current=!1},Q=Ae=>{if(!X.current||Ae.touches.length!==1||q.current)return;const He=Ae.touches[0],Xe=He.clientX-X.current.x,Ue=He.clientY-X.current.y;if(W.current==="none"){if(Math.abs(Xe)<10&&Math.abs(Ue)<10)return;if(Math.abs(Xe)>Math.abs(Ue)){if(t.length<=1)return;W.current="horizontal"}else if(Ue>0)W.current="vertical";else return}if(W.current==="horizontal"){T.current=!0,ce(!0),_.current=Xe,J(Xe),Ae.preventDefault();return}W.current==="vertical"&&(T.current=!0,ce(!0),D.current=Ue,P(Ue),Ae.preventDefault())},Pe=()=>{if(!X.current)return;const Ae=W.current,He=T.current;if(He&&Ae==="horizontal")be(_.current),ie();else if(He&&Ae==="vertical")if(D.current>rw){const Ue=window.innerHeight;D.current=Ue,me(!0),P(Ue),F("closing")}else D.current=0,P(0),ie();else Ae==="horizontal"&&Math.abs(_.current)>0&&(be(_.current),ie());X.current=null,W.current="none",_.current=0,T.current=!1,ce(!1)};return document.addEventListener("touchstart",re,{passive:!0}),document.addEventListener("touchmove",Q,{passive:!1}),document.addEventListener("touchend",Pe),document.addEventListener("touchcancel",Pe),()=>{document.removeEventListener("touchstart",re),document.removeEventListener("touchmove",Q),document.removeEventListener("touchend",Pe),document.removeEventListener("touchcancel",Pe),z()}},[j,t.length,u,d,Z,oe,le]),s.useEffect(()=>{const G=z=>{z.key==="Escape"&&(z.preventDefault(),z.stopPropagation(),j!=="closing"&&F("closing"))};return window.addEventListener("keydown",G,!0),()=>window.removeEventListener("keydown",G,!0)},[j]);const Se=()=>{j!=="closing"&&F("closing")},Re=j==="open",Ne=j==="closing",Te=K>0?Math.max(0,1-K/500):1,Ce=K>0?Math.max(.35,1-K/500):1,g=G=>{if(G.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientY-z.top,H=Math.min(52,z.height*.2);if(!(ie>z.height-H)){if(G.clientX-z.left<z.width/2){d();return}u()}},Y=G=>{if(t.length<=1)return;const z=G.currentTarget.getBoundingClientRect(),ie=G.clientX-z.left,H=G.clientY-z.top,be=Math.min(52,z.height*.2);if(H>z.height-be){G.currentTarget.style.cursor="default";return}G.currentTarget.style.cursor=ie<z.width/2?"w-resize":"e-resize"},ee=s.useCallback(G=>{G.propertyName!=="transform"||!q.current||(le(),Z(!1))},[le,Z]),ae=ue?`translateX(${h}px)`:K>0?`translateY(${K}px)`:void 0,ye={position:"fixed",top:$==null?void 0:$.top,left:$==null?void 0:$.left,width:$==null?void 0:$.width,height:$==null?void 0:$.height,objectFit:i==="cover"?"cover":"contain",transform:ae,opacity:K>0?Ce:j==="opening"||Ne?0:1,transition:k&&!V?"none":V?`transform ${Jn}ms ${Bi}`:L?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:j==="opening"||Ne?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:(Le||de)&&Re&&!ue?"auto":"none",touchAction:(Le||de)&&Re?"none":void 0,zIndex:9998},ne=de&&$?Math.min(52,$.height*.2):0,B=$?{position:"fixed",top:$.top,height:$.height-ne,width:$.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Se,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:x,opacity:Re?Te:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:M?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:E,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Re?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:E,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Re?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),$&&ve&&(de?a.jsx(b.EmbedMediaFrame,{media:ve,mode:"player",fit:i==="cover"?"cover":"contain",lazy:!1,interactive:Re&&!ue,style:ye,onTransitionEnd:ee},`${n}-${ve.assetId}`):Le?a.jsx(xw,{src:ve.assetId,phase:j,mediaRef:U,mediaStyle:ye,onLoadedMetadata:ge,onClick:g,onMouseMove:Y,onTransitionEnd:ee},`${n}-${ve.assetId}`):a.jsx("img",{ref:U,src:ve.assetId,alt:ve.name,onLoad:ge,onTransitionEnd:ee,style:ye},`${n}-${ve.assetId}`)),Re&&B&&t.length>1&&!Le&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:$.left,cursor:"w-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),d()}}),a.jsx("div",{style:{...B,left:$.left+$.width/2,cursor:"e-resize",pointerEvents:ue?"none":"auto"},onClick:G=>{if(C.current){C.current=!1;return}G.stopPropagation(),u()}})]}),a.jsx(ww,{prefix:e,closeIcon:m,closeIconMaxWidth:f,closeIconColor:S,closeIconHoverColor:w,iconMarginRight:N,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Re,onClose:Se})]})}function vd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Ys(t)?"video":"image"}`,x=r.display==="cover",m=yw(r),f=_=>b.scalingValue(_,l??!1),S=n??mo,w=o?{width:"100%",maxWidth:"100%"}:{width:f(S),maxWidth:"100%"},N=i?{borderRadius:f(i)}:{},v={...w,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...N},M={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":f(S)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:N},U={className:y,style:M,onClick:p?_=>{_.stopPropagation(),p()}:void 0},X=Math.max(c,ti),D=b.isEmbedMedia(t)?a.jsx(b.EmbedMediaFrame,{...U,media:t,mode:"background",fit:x?"cover":"contain"}):Ys(t)?a.jsx("video",{...U,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:v,children:D}):D,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:f(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:f(X)}})]})}function Cw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function Tw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function xd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Is({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:f=!1,topPaddingControl:S,bottomPaddingControl:w}){const N=s.useRef(null),[v,M]=s.useState(0),E=t??"",U=n??"",X=U.length>0,{horizontal:D,vertical:_}=Xl(i),W=_==="center"||_==="bottom",T=_==="bottom";s.useLayoutEffect(()=>{if(!W)return;const $=N.current;if(!$||typeof ResizeObserver>"u")return;const I=()=>M($.offsetHeight);I();const j=new ResizeObserver(I);return j.observe($),()=>j.disconnect()},[E,U,W]);const C=a.jsx("span",{className:`${e}-title-text`,style:d,children:E}),q=X?a.jsx("span",{className:u,style:p,children:U}):null,R=X?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...f?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:$=>{N.current=$,o($)},className:[r,`${e}-title-h-${D}`,`${e}-title-v-${_}`].join(" "),style:{...W?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[S,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:T?a.jsxs(a.Fragment,{children:[q,R,C]}):a.jsxs(a.Fragment,{children:[C,R,q]})})}),w]})})}const bd=45;function Sd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Iw(e){const t=Sd(e,"--cntrl-viewport-height",window.innerHeight),n=Sd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Lw(e,t,n){const{vertical:i}=Xl(t),{top:o,height:r,centerY:l}=Iw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function Mw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=Lw(u,n,d);return Math.exp(-(p*p)/(2*bd*bd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Pw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(Mw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function wd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Ew({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var kt,Qe;const{prefix:l}=b.useScopedStyles(),c=s.useMemo(()=>tw(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??hw,m=fw(e==null?void 0:e.imageDisplay),f=(e==null?void 0:e.cornerRadius)??JS,S=iw(e==null?void 0:e.position),{horizontal:w,vertical:N}=Xl(S),v=(e==null?void 0:e.titleTopPadding)??0,M=(e==null?void 0:e.titleBottomPadding)??0,E=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,X=(e==null?void 0:e.titleDescriptionPadding)??0,D=Tw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",W=p==="b",T=D==="fade"||D==="retype",{setTitleRef:C,dominantIndex:q}=Pw(d.length,T,S),R=((kt=d[q])==null?void 0:kt.title)??"",$=((Qe=d[q])==null?void 0:Qe.description)??"",I=wd(R,D==="retype"),j=wd($,D==="retype"),F=D==="fade"||D==="retype",K=D==="retype"?I:R,P=D==="retype"?j:$,h=W?void 0:{width:b.scalingValue(y,n??!1)},J=_==="on"&&(!n||i||o),V=o??!1,he=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,ce=(e==null?void 0:e.galleryPaddingBetween)??0,L=at=>b.scalingValue(at,n??!1),te={width:L(x)},ve=p==="a"?he:k,Le=W?{width:"100%"}:{width:`calc(100% - ${L(y)} - ${L(ve)})`,...p==="c"?{marginLeft:"auto"}:{}},de=Math.max(he,ti),ue=Math.max(k,ti),Z=Math.max(ce,ti),le=Math.max(v,ti),oe=Math.max(M,ti),ge=Math.max(E,ti),Se=Math.max(U,ti),Re=Math.max(X,ti),Ne=Math.max(0,(u??1)-(y??mo)),Te=p==="a"?Math.max(0,(u??1)-(y??mo)-he):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,Ce=V&&N==="top",g=V&&N==="bottom",Y=V&&w==="left",ee=V&&w==="right",ae=d.length>1,ye=W?void 0:L((p==="c"?k:he)+(y??mo)),ne=p==="c"&&ye?{left:ye}:void 0,B=p==="a"&&ye?{right:ye}:void 0,G=W?{left:0,width:"100%"}:p==="a"?{right:L(he),width:L(y)}:{left:L(k),width:L(y)},{titleColor:z,titleFontFamily:ie,titleFontSettings:H,titleFontSize:be,titleLineHeight:re,titleLetterSpacing:Q,titleWordSpacing:Pe,titleAlign:Ae,titleTextAppearance:He,descriptionColor:Xe,descriptionFontFamily:Ue,descriptionFontSettings:Je,descriptionFontSize:je,descriptionLineHeight:xe,descriptionLetterSpacing:Ie,descriptionWordSpacing:ze,descriptionAlign:Ze,descriptionTextAppearance:tt,lightboxCounterColor:ot,lightboxCounterFontFamily:lt,lightboxCounterFontSettings:it,lightboxCounterFontSize:xt,lightboxCounterLineHeight:rt,lightboxCounterLetterSpacing:_e,lightboxCounterWordSpacing:We,lightboxCounterTextAppearance:vt}=e??{},Ve={fontSettings:{fontFamily:ie,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:Q??0,wordSpacing:Pe??0,textAlign:Ae??"left",textAppearance:He,color:z??"#000000"},pe=pn(nn(Ve,n)),De=te,qe={...Ts(be,re,l,n),...Ts(je,xe,l,n,"description-leading-gap")},bt=Cs(be,re,`${l}-title`,`${l}-text-tight-leading`),yt={fontSettings:{fontFamily:Ue,fontWeight:(Je==null?void 0:Je.fontWeight)??400,fontStyle:(Je==null?void 0:Je.fontStyle)??"normal"},fontSize:je??.01,lineHeight:xe,letterSpacing:Ie??0,wordSpacing:ze??0,textAlign:Ze??"left",textAppearance:tt,color:Xe??"#000000"},Rt=pn(nn(yt,n)),ct=Cs(je,xe,`${l}-description-text`,`${l}-description-tight-leading`),wt=L(V?Re:X),nt={fontSettings:{fontFamily:lt,fontWeight:(it==null?void 0:it.fontWeight)??400,fontStyle:(it==null?void 0:it.fontStyle)??"normal"},fontSize:xt??.01,lineHeight:rt,letterSpacing:_e??0,wordSpacing:We??0,textAppearance:vt,color:ot??"#DEDDDD"},jt={...pn(nn(nt,n)),...Ts(xt,rt,l,n)},$e=Cs(xt,rt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ge=b.buildColorVars(l,{titleColor:z??"#000000",descriptionColor:Xe??"#000000",lightboxCounterColor:ot??"#DEDDDD"},sw,lw),ht=s.useRef(null),[Lt,$t]=s.useState(!1),[mt,_t]=s.useState([]),[Ot,zt]=s.useState(0),Ee=s.useCallback((at,It)=>{J&&(_t(at),zt(It),$t(!0))},[J]),dt=s.useCallback(()=>{$t(!1)},[]),ut=s.useMemo(()=>{const at={...Ge},It=ht.current?getComputedStyle(ht.current).getPropertyValue("--cntrl-article-width").trim():"";return It&&(at["--cntrl-article-width"]=It),at},[Ge,Lt]);return s.useEffect(()=>{if(!Lt||_!=="on"||typeof document>"u")return;const at=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=at}},[Lt,_]),s.useEffect(()=>{!n||o||i||$t(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&$t(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Ge,children:a.jsxs("div",{ref:ht,className:`${l}-wrapper`,style:{width:b.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:N==="top"?L(v):void 0,[`--${l}-title-bottom-padding`]:N==="bottom"?L(M):void 0,[`--${l}-title-left-padding`]:w==="left"?L(E):void 0,[`--${l}-title-right-padding`]:w==="right"?L(U):void 0},children:[F&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Is,{P:l,title:K,description:P,position:S,titleRef:()=>{},titleClassName:`${bt} ${l}-single-title`,titleContainerStyle:{...qe,...Le},titleTextBoxStyle:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Rt,descriptionPadding:wt,showTextBoxOutline:V,showDescriptionPaddingControl:V,topPaddingControl:Ce?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:!1,side:"bottom"}):void 0})}),d.map((at,It)=>{const At=pw(at.gallery),pt=It<d.length-1,Ut=At.filter(Dt=>Dt.lightboxMedia).map(Dt=>Dt.lightboxMedia),qt={P:l,position:S,titleRef:C(It),titleClassName:bt,titleContainerStyle:qe,titleTextBoxStyle:F?{maxWidth:"100%"}:De,titleStyle:pe,descriptionClassName:ct,descriptionStyle:Rt,descriptionPadding:wt,showTextBoxOutline:V&&!F,showDescriptionPaddingControl:V&&!F,descriptionPaddingPaired:ae,topPaddingControl:Ce&&!F?Jr({P:l,controlKey:"titleTopPadding",scaled:L,height:le,paired:ae,side:"top"}):void 0,bottomPaddingControl:g&&!F?Jr({P:l,controlKey:"titleBottomPadding",scaled:L,height:oe,paired:ae,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":It,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:pt?L(ce):void 0},children:[Y&&xd({P:l,controlKey:"titleLeftPadding",scaled:L,width:ge,maxFraction:Te,side:"left",paired:ae,anchorStyle:ne}),ee&&xd({P:l,controlKey:"titleRightPadding",scaled:L,width:Se,maxFraction:Te,side:"right",paired:ae,anchorStyle:B}),V&&pt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:L(Z),...G}}),W?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(vd,{P:l,media:Dt,imgWidth:y||void 0,cornerRadius:f||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Ee(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Is,{...qt,title:F?"":at.title,description:F?"":at.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Is,{...qt,title:F?"":at.title,description:F?"":at.description}),At.length>0&&a.jsx(Cw,{P:l,layoutType:p,galleryWidthStyle:h,galleryPaddingRight:he,galleryPaddingLeft:k,galleryPaddingRightWidth:de,galleryPaddingLeftWidth:ue,galleryPaddingMaxFraction:Ne,showControls:V,scaled:L,children:At.map(({displayMedia:Dt,lightboxMedia:Vt},Gt)=>{const Bt=Vt?Ut.findIndex(Yt=>Yt.assetId===Vt.assetId):-1;return a.jsx(vd,{P:l,media:Dt,cornerRadius:f||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ce,showPaddingAfter:Gt<At.length-1,showControls:V,onMediaClick:J&&Bt>=0?()=>Ee(Ut,Bt):void 0},`${Dt.assetId}-${Gt}`)})})]})]},It)})]})}),Lt&&_==="on"&&typeof document<"u"&&e&&(()=>{const at=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:ut,"data-selection":"none",children:a.jsx($w,{prefix:l,items:mt,index:Ot,imageDisplay:vw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:dt,onPrev:()=>zt(It=>(It-1+mt.length)%mt.length),onNext:()=>zt(It=>(It+1)%mt.length),counterClassName:$e,counterStyle:jt,backgroundColor:e.backgroundColor??ow})}),at)})()]})}const Rw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
21501
|
+
`}const Mp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function nw(e){return e in Mp}function iw(e){if(e&&nw(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Xl(e){return Mp[e]}const ow="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",rw=72,aw=50,sw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},lw=[];function cw(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function dw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function uw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function pw(e){if(!Array.isArray(e)||e.length===0)return[];if(cw(e)){const t=[];for(const n of e){const i=dw(n);if(!i)continue;const o=uw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function mw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function gw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const hw=1140/1440;function fw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function yw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function vw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function xw({src:e,mediaRef:t,mediaStyle:n,onLoadedMetadata:i,onTransitionEnd:o}){return s.useEffect(()=>{const r=t.current;if(r)return()=>{mw(r)}},[e,t]),a.jsx("video",{ref:t,src:e,muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedMetadata:i,onTransitionEnd:o,style:n})}const bw="https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg",Sw=.004;function ww({prefix:e,closeIcon:t=bw,closeIconMaxWidth:n=.0125,closeIconColor:i="#FFFFFF",closeIconHoverColor:o="#999999",iconMarginRight:r=.01,contentMarginTop:l=.01,isEditor:c,isPreviewMode:d,isEditMode:u,visible:p,onClose:y}){if(!t)return null;const S=b.scalingValue(n,c),m=b.scalingValue(r,c),h=b.scalingValue(l,c),x=b.scalingValue(Math.max(l,Sw),c);return a.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:1e4,display:"flex",flexDirection:"column",alignItems:"flex-end",pointerEvents:"none",opacity:p?1:0,transition:"opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"},children:[a.jsx("div",{style:{position:"relative",width:"100%",height:h,flexShrink:0},children:u&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:x,pointerEvents:p?"auto":"none"}})}),a.jsxs("div",{className:`${e}-close-icon`,style:{width:S,height:S,marginRight:m,pointerEvents:p?"auto":"none"},onClick:w=>w.stopPropagation(),children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,"aria-label":"Close",onClick:w=>{w.stopPropagation(),y()},children:a.jsx(mn,{url:t,fill:i,hoverFill:c&&!d?i:o,className:`${e}-close-icon-img`})}),u&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:m,height:"100%",pointerEvents:p?"auto":"none"}})]})]})}function $w({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,isPreviewMode:r,isEditMode:l,onClose:c,onPrev:d,onNext:u,counterClassName:p,counterStyle:y,backgroundColor:S,closeIcon:m,closeIconMaxWidth:h,closeIconColor:x,closeIconHoverColor:w,iconMarginRight:F,contentMarginTop:v}){const P=i==="cover",M=s.useRef(null),K=s.useRef(null),X=s.useRef(null),j=s.useRef(0),N=s.useRef(0),_=s.useRef("none"),T=s.useRef(!1),L=s.useRef(!1),Y=s.useRef(!1),R=s.useRef(null),[I,$]=s.useState(null),[G,O]=s.useState("opening"),[U,E]=s.useState(0),[f,Q]=s.useState(0),[q,pe]=s.useState(!1),[k,me]=s.useState(!1),[C,ue]=s.useState(!1),te=s.useRef(n),fe=t[n],Pe=fe?Ys(fe):!1,de=fe?b.isEmbedMedia(fe):!1,we=f!==0||q,V=s.useCallback(z=>{Y.current=z,pe(z)},[]),ie=s.useCallback(()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},[]),oe=s.useCallback(()=>{ie(),R.current=window.setTimeout(()=>{ie(),V(!1)},Jn+32)},[ie,V]),le=s.useCallback(()=>{const z=M.current,B=K.current;if(!z)return;const ne=z.getBoundingClientRect(),ce=ne.width,ee=ne.height;if(!ce||!ee)return;if(i==="cover"){$({width:ce,height:ee,left:ne.left,top:ne.top});return}let H=fe&&b.isEmbedMedia(fe)?b.getEmbedAspect(fe):null;if(H===null){if(!B){$(Zr(z));return}const{width:ae,height:W}=gw(B);if(!ae||!W){$(Zr(z));return}H=ae/W}const be=ce/ee;if(H>be){const ae=ce/H;$({width:ce,height:ae,left:ne.left,top:ne.top+(ee-ae)/2})}else{const ae=ee*H;$({width:ae,height:ee,left:ne.left+(ce-ae)/2,top:ne.top})}},[i,fe]);s.useEffect(()=>{le();const z=M.current;if(!z)return;const B=new ResizeObserver(()=>le());return B.observe(z),()=>B.disconnect()},[le,n]),s.useEffect(()=>{G==="opening"&&I&&O("open")},[G,I]),s.useEffect(()=>{if(G!=="closing")return;const z=setTimeout(()=>c(),Jn);return()=>clearTimeout(z)},[G,c]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(te.current===n)return;ie(),E(0),Q(0),V(!1),ue(!1),me(!1),j.current=0,N.current=0,_.current="none",T.current=!1,X.current=null,L.current=!1;const z=M.current;z&&$(Zr(z)),te.current=n},[n,V,ie]),s.useEffect(()=>{if(G!=="open")return;let z=null;const B=()=>{z&&(document.removeEventListener("click",z,!0),z=null)},ne=()=>{B(),z=W=>{W.stopPropagation(),W.preventDefault(),B()},document.addEventListener("click",z,!0)},ce=W=>{ie(),Y.current=!1,pe(!1),Q(0),me(!1),T.current=!1,N.current=0,_.current="none";const ke=M.current;ke&&$(Zr(ke)),W<0?u():d()},ee=W=>{if(Math.abs(W)>aw&&t.length>1){ce(W);return}V(!0),Q(0),oe()},H=W=>{if(W.touches.length!==1||Y.current)return;const ke=W.touches[0];L.current=!0,X.current={x:ke.clientX,y:ke.clientY},_.current="none",N.current=0,T.current=!1},be=W=>{if(!X.current||W.touches.length!==1||Y.current)return;const ke=W.touches[0],ze=ke.clientX-X.current.x,Xe=ke.clientY-X.current.y;if(_.current==="none"){if(Math.abs(ze)<10&&Math.abs(Xe)<10)return;if(Math.abs(ze)>Math.abs(Xe)){if(t.length<=1)return;_.current="horizontal"}else if(Xe>0)_.current="vertical";else return}if(_.current==="horizontal"){T.current=!0,me(!0),N.current=ze,Q(ze),W.preventDefault();return}_.current==="vertical"&&(T.current=!0,me(!0),j.current=Xe,E(Xe),W.preventDefault())},ae=()=>{if(!X.current)return;const W=_.current,ke=T.current;if(ke&&W==="horizontal")ee(N.current),ne();else if(ke&&W==="vertical")if(j.current>rw){const Xe=window.innerHeight;j.current=Xe,ue(!0),E(Xe),O("closing")}else j.current=0,E(0),ne();else W==="horizontal"&&Math.abs(N.current)>0&&(ee(N.current),ne());X.current=null,_.current="none",N.current=0,T.current=!1,me(!1)};return document.addEventListener("touchstart",H,{passive:!0}),document.addEventListener("touchmove",be,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",H),document.removeEventListener("touchmove",be),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae),B()}},[G,t.length,u,d,V,oe,ie]),s.useEffect(()=>{const z=B=>{B.key==="Escape"&&(B.preventDefault(),B.stopPropagation(),G!=="closing"&&O("closing"))};return window.addEventListener("keydown",z,!0),()=>window.removeEventListener("keydown",z,!0)},[G]);const ve=()=>{G!=="closing"&&O("closing")},Fe=G==="open",Ee=G==="closing",Ce=U>0?Math.max(0,1-U/500):1,Se=U>0?Math.max(.35,1-U/500):1,g=s.useCallback(z=>{z.propertyName!=="transform"||!Y.current||(ie(),V(!1))},[ie,V]),Z=we?`translateX(${f}px)`:U>0?`translateY(${U}px)`:void 0,J={position:"fixed",top:I==null?void 0:I.top,left:I==null?void 0:I.left,width:I==null?void 0:I.width,height:I==null?void 0:I.height,objectFit:i==="cover"?"cover":"contain",transform:Z,opacity:U>0?Se:G==="opening"||Ee?0:1,transition:k&&!q?"none":q?`transform ${Jn}ms ${Bi}`:C?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:G==="opening"||Ee?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:"none",zIndex:9998},re=de&&fe&&b.getEmbedPlayback(fe).controls&&I?Math.min(52,I.height*.2):0,he=I?{position:"fixed",top:I.top,height:I.height-re,width:I.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:G==="open"?"none":void 0},onClick:ve,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:S,opacity:Fe?Ce:0,transition:k?"none":`opacity ${Jn}ms ${Bi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:P?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:M,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Fe?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:M,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Fe?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:p,style:y,children:[n+1," / ",t.length]})})]})}),I&&fe&&(de?a.jsx(b.EmbedMediaFrame,{media:fe,fit:i==="cover"?"cover":"contain",lazy:!1,startsAtOnce:!0,style:J,onTransitionEnd:g},`${n}-${fe.assetId}`):Pe?a.jsx(xw,{src:fe.assetId,mediaRef:K,mediaStyle:J,onLoadedMetadata:le,onTransitionEnd:g},`${n}-${fe.assetId}`):a.jsx("img",{ref:K,src:fe.assetId,alt:fe.name,onLoad:le,onTransitionEnd:g,style:J},`${n}-${fe.assetId}`)),Fe&&he&&t.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...he,left:I.left,cursor:"w-resize",pointerEvents:we?"none":"auto"},onClick:z=>{if(L.current){L.current=!1;return}z.stopPropagation(),d()}}),a.jsx("div",{style:{...he,left:I.left+I.width/2,cursor:"e-resize",pointerEvents:we?"none":"auto"},onClick:z=>{if(L.current){L.current=!1;return}z.stopPropagation(),u()}})]}),a.jsx(ww,{prefix:e,closeIcon:m,closeIconMaxWidth:h,closeIconColor:x,closeIconHoverColor:w,iconMarginRight:F,contentMarginTop:v,isEditor:o,isPreviewMode:r,isEditMode:l,visible:Fe,onClose:ve})]})}function vd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,hasLightbox:p,onMediaClick:y}){const S=`${e}-gallery-${Ys(t)?"video":"image"}`,m=r.display==="cover",h=yw(r),x=_=>b.scalingValue(_,l??!1),w=n??mo,F=o?{width:"100%",maxWidth:"100%"}:{width:x(w),maxWidth:"100%"},v=i?{borderRadius:x(i)}:{},P={...F,...m?{aspectRatio:h,height:"auto",overflow:"hidden"}:{},...v},M={...m?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":x(w)},...y?{cursor:"pointer",pointerEvents:"auto"}:{},...m?{}:v},X={className:S,style:M,onClick:y?_=>{_.stopPropagation(),y()}:void 0},j=Math.max(c,ti),N=b.isEmbedMedia(t)?a.jsx(b.EmbedMediaFrame,{...X,media:t,fit:m?"cover":"contain",silentLoop:p}):Ys(t)?a.jsx("video",{...X,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...X,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[m?a.jsx("div",{style:P,children:N}):N,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:x(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:x(j)}})]})}function Cw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,S=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&S&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&S&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function Tw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function xd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Is({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:S=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:h=!1,topPaddingControl:x,bottomPaddingControl:w}){const F=s.useRef(null),[v,P]=s.useState(0),M=t??"",K=n??"",X=K.length>0,{horizontal:j,vertical:N}=Xl(i),_=N==="center"||N==="bottom",T=N==="bottom";s.useLayoutEffect(()=>{if(!_)return;const I=F.current;if(!I||typeof ResizeObserver>"u")return;const $=()=>P(I.offsetHeight);$();const G=new ResizeObserver($);return G.observe(I),()=>G.disconnect()},[M,K,_]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:M}),Y=X?a.jsx("span",{className:u,style:p,children:K}):null,R=X?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...h?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:I=>{F.current=I,o(I)},className:[r,`${e}-title-h-${j}`,`${e}-title-v-${N}`].join(" "),style:{..._?{[`--${e}-title-height`]:`${v}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:S?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:T?a.jsxs(a.Fragment,{children:[Y,R,L]}):a.jsxs(a.Fragment,{children:[L,R,Y]})})}),w]})})}const bd=45;function Sd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function Iw(e){const t=Sd(e,"--cntrl-viewport-height",window.innerHeight),n=Sd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function Lw(e,t,n){const{vertical:i}=Xl(t),{top:o,height:r,centerY:l}=Iw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function Pw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=Lw(u,n,d);return Math.exp(-(p*p)/(2*bd*bd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Mw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(Pw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function wd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Ew({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var kt,Ke;const{prefix:l}=b.useScopedStyles(),c=s.useMemo(()=>tw(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??mo,S=(e==null?void 0:e.titleWidth)??hw,m=fw(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??JS,x=iw(e==null?void 0:e.position),{horizontal:w,vertical:F}=Xl(x),v=(e==null?void 0:e.titleTopPadding)??0,P=(e==null?void 0:e.titleBottomPadding)??0,M=(e==null?void 0:e.titleLeftPadding)??0,K=(e==null?void 0:e.titleRightPadding)??0,X=(e==null?void 0:e.titleDescriptionPadding)??0,j=Tw(e==null?void 0:e.transition),N=(e==null?void 0:e.lightbox)??"on",_=p==="b",T=j==="fade"||j==="retype",{setTitleRef:L,dominantIndex:Y}=Mw(d.length,T,x),R=((kt=d[Y])==null?void 0:kt.title)??"",I=((Ke=d[Y])==null?void 0:Ke.description)??"",$=wd(R,j==="retype"),G=wd(I,j==="retype"),O=j==="fade"||j==="retype",U=j==="retype"?$:R,E=j==="retype"?G:I,f=_?void 0:{width:b.scalingValue(y,n??!1)},Q=N==="on"&&(!n||i||o),q=o??!1,pe=(e==null?void 0:e.galleryPaddingRight)??0,k=(e==null?void 0:e.galleryPaddingLeft)??0,me=(e==null?void 0:e.galleryPaddingBetween)??0,C=st=>b.scalingValue(st,n??!1),te={width:C(S)},fe=p==="a"?pe:k,Pe=_?{width:"100%"}:{width:`calc(100% - ${C(y)} - ${C(fe)})`,...p==="c"?{marginLeft:"auto"}:{}},de=Math.max(pe,ti),we=Math.max(k,ti),V=Math.max(me,ti),ie=Math.max(v,ti),oe=Math.max(P,ti),le=Math.max(M,ti),ve=Math.max(K,ti),Fe=Math.max(X,ti),Ee=Math.max(0,(u??1)-(y??mo)),Ce=p==="a"?Math.max(0,(u??1)-(y??mo)-pe):p==="c"?Math.max(0,(u??1)-(y??mo)-k):p==="b"?u??1:1,Se=q&&F==="top",g=q&&F==="bottom",Z=q&&w==="left",J=q&&w==="right",re=d.length>1,he=_?void 0:C((p==="c"?k:pe)+(y??mo)),z=p==="c"&&he?{left:he}:void 0,B=p==="a"&&he?{right:he}:void 0,ne=_?{left:0,width:"100%"}:p==="a"?{right:C(pe),width:C(y)}:{left:C(k),width:C(y)},{titleColor:ce,titleFontFamily:ee,titleFontSettings:H,titleFontSize:be,titleLineHeight:ae,titleLetterSpacing:W,titleWordSpacing:ke,titleAlign:ze,titleTextAppearance:Xe,descriptionColor:Ue,descriptionFontFamily:Qe,descriptionFontSettings:We,descriptionFontSize:it,descriptionLineHeight:ye,descriptionLetterSpacing:Te,descriptionWordSpacing:Ve,descriptionAlign:Ze,descriptionTextAppearance:et,lightboxCounterColor:at,lightboxCounterFontFamily:tt,lightboxCounterFontSettings:Ye,lightboxCounterFontSize:xt,lightboxCounterLineHeight:pt,lightboxCounterLetterSpacing:De,lightboxCounterWordSpacing:_e,lightboxCounterTextAppearance:He}=e??{},Ae={fontSettings:{fontFamily:ee,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:be??.01,lineHeight:ae,letterSpacing:W??0,wordSpacing:ke??0,textAlign:ze??"left",textAppearance:Xe,color:ce??"#000000"},Ie=pn(nn(Ae,n)),mt=te,ot={...Ts(be,ae,l,n),...Ts(it,ye,l,n,"description-leading-gap")},Ct=Cs(be,ae,`${l}-title`,`${l}-text-tight-leading`),rt={fontSettings:{fontFamily:Qe,fontWeight:(We==null?void 0:We.fontWeight)??400,fontStyle:(We==null?void 0:We.fontStyle)??"normal"},fontSize:it??.01,lineHeight:ye,letterSpacing:Te??0,wordSpacing:Ve??0,textAlign:Ze??"left",textAppearance:et,color:Ue??"#000000"},St=pn(nn(rt,n)),nt=Cs(it,ye,`${l}-description-text`,`${l}-description-tight-leading`),Rt=C(q?Fe:X),ht={fontSettings:{fontFamily:tt,fontWeight:(Ye==null?void 0:Ye.fontWeight)??400,fontStyle:(Ye==null?void 0:Ye.fontStyle)??"normal"},fontSize:xt??.01,lineHeight:pt,letterSpacing:De??0,wordSpacing:_e??0,textAppearance:He,color:at??"#DEDDDD"},Zt={...pn(nn(ht,n)),...Ts(xt,pt,l,n)},$e=Cs(xt,pt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Ge=b.buildColorVars(l,{titleColor:ce??"#000000",descriptionColor:Ue??"#000000",lightboxCounterColor:at??"#DEDDDD"},sw,lw),ft=s.useRef(null),[Lt,wt]=s.useState(!1),[vt,Nt]=s.useState([]),[Wt,Dt]=s.useState(0),Me=s.useCallback((st,It)=>{Q&&(Nt(st),Dt(It),wt(!0))},[Q]),ct=s.useCallback(()=>{wt(!1)},[]),dt=s.useMemo(()=>{const st={...Ge},It=ft.current?getComputedStyle(ft.current).getPropertyValue("--cntrl-article-width").trim():"";return It&&(st["--cntrl-article-width"]=It),st},[Ge,Lt]);return s.useEffect(()=>{if(!Lt||N!=="on"||typeof document>"u")return;const st=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=st}},[Lt,N]),s.useEffect(()=>{!n||o||i||wt(!1)},[n,o,i]),s.useEffect(()=>{N==="off"&&wt(!1)},[N]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Ge,children:a.jsxs("div",{ref:ft,className:`${l}-wrapper`,style:{width:b.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:F==="top"?C(v):void 0,[`--${l}-title-bottom-padding`]:F==="bottom"?C(P):void 0,[`--${l}-title-left-padding`]:w==="left"?C(M):void 0,[`--${l}-title-right-padding`]:w==="right"?C(K):void 0},children:[O&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Is,{P:l,title:U,description:E,position:x,titleRef:()=>{},titleClassName:`${Ct} ${l}-single-title`,titleContainerStyle:{...ot,...Pe},titleTextBoxStyle:mt,titleStyle:Ie,descriptionClassName:nt,descriptionStyle:St,descriptionPadding:Rt,showTextBoxOutline:q,showDescriptionPaddingControl:q,topPaddingControl:Se?Jr({P:l,controlKey:"titleTopPadding",scaled:C,height:ie,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:C,height:oe,paired:!1,side:"bottom"}):void 0})}),d.map((st,It)=>{const At=pw(st.gallery),ut=It<d.length-1,Gt=At.filter(Ot=>Ot.lightboxMedia).map(Ot=>Ot.lightboxMedia),Ut={P:l,position:x,titleRef:L(It),titleClassName:Ct,titleContainerStyle:ot,titleTextBoxStyle:O?{maxWidth:"100%"}:mt,titleStyle:Ie,descriptionClassName:nt,descriptionStyle:St,descriptionPadding:Rt,showTextBoxOutline:q&&!O,showDescriptionPaddingControl:q&&!O,descriptionPaddingPaired:re,topPaddingControl:Se&&!O?Jr({P:l,controlKey:"titleTopPadding",scaled:C,height:ie,paired:re,side:"top"}):void 0,bottomPaddingControl:g&&!O?Jr({P:l,controlKey:"titleBottomPadding",scaled:C,height:oe,paired:re,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":It,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:ut?C(me):void 0},children:[Z&&xd({P:l,controlKey:"titleLeftPadding",scaled:C,width:le,maxFraction:Ce,side:"left",paired:re,anchorStyle:z}),J&&xd({P:l,controlKey:"titleRightPadding",scaled:C,width:ve,maxFraction:Ce,side:"right",paired:re,anchorStyle:B}),q&&ut&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:C(V),...ne}}),_?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:At.map(({displayMedia:Ot,lightboxMedia:Bt},Xt)=>{const zt=Bt?Gt.findIndex(Kt=>Kt.assetId===Bt.assetId):-1;return a.jsx(vd,{P:l,media:Ot,imgWidth:y||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:me,showPaddingAfter:Xt<At.length-1,showControls:q,hasLightbox:N==="on",onMediaClick:Q&&zt>=0?()=>Me(Gt,zt):void 0},`${Ot.assetId}-${Xt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Is,{...Ut,title:O?"":st.title,description:O?"":st.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Is,{...Ut,title:O?"":st.title,description:O?"":st.description}),At.length>0&&a.jsx(Cw,{P:l,layoutType:p,galleryWidthStyle:f,galleryPaddingRight:pe,galleryPaddingLeft:k,galleryPaddingRightWidth:de,galleryPaddingLeftWidth:we,galleryPaddingMaxFraction:Ee,showControls:q,scaled:C,children:At.map(({displayMedia:Ot,lightboxMedia:Bt},Xt)=>{const zt=Bt?Gt.findIndex(Kt=>Kt.assetId===Bt.assetId):-1;return a.jsx(vd,{P:l,media:Ot,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:me,showPaddingAfter:Xt<At.length-1,showControls:q,hasLightbox:N==="on",onMediaClick:Q&&zt>=0?()=>Me(Gt,zt):void 0},`${Ot.assetId}-${Xt}`)})})]})]},It)})]})}),Lt&&N==="on"&&typeof document<"u"&&e&&(()=>{const st=(r?document.getElementById(r):null)??document.body;return qn.createPortal(a.jsx("div",{style:dt,"data-selection":"none",children:a.jsx($w,{prefix:l,items:vt,index:Wt,imageDisplay:vw(e.lightboxImageDisplay),isEditor:n,isPreviewMode:i,isEditMode:o,closeIcon:e.closeIcon,closeIconMaxWidth:e.closeIconMaxWidth,closeIconColor:e.closeIconColor,closeIconHoverColor:e.closeIconHoverColor,iconMarginRight:e.iconMarginRight,contentMarginTop:e.contentMarginTop,onClose:ct,onPrev:()=>Dt(It=>(It-1+vt.length)%vt.length),onNext:()=>Dt(It=>(It+1)%vt.length),counterClassName:$e,counterStyle:Zt,backgroundColor:e.backgroundColor??ow})}),st)})()]})}const Rw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
21549
21502
|
import { createPortal } from 'react-dom';
|
|
21550
21503
|
import type React from 'react';
|
|
21551
21504
|
import { CommonComponentProps } from '../props';
|
|
21552
|
-
import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia } from '../utils/index';
|
|
21505
|
+
import { EmbedMediaFrame, getEmbedAspect, getEmbedPlayback, isEmbedMedia } from '../utils/index';
|
|
21553
21506
|
import {
|
|
21554
21507
|
buildColorVars,
|
|
21555
21508
|
scalingValue,
|
|
@@ -22183,21 +22136,15 @@ function resolveLightboxImageDisplay(
|
|
|
22183
22136
|
|
|
22184
22137
|
function LightboxVideo({
|
|
22185
22138
|
src,
|
|
22186
|
-
phase,
|
|
22187
22139
|
mediaRef,
|
|
22188
22140
|
mediaStyle,
|
|
22189
22141
|
onLoadedMetadata,
|
|
22190
|
-
onClick,
|
|
22191
|
-
onMouseMove,
|
|
22192
22142
|
onTransitionEnd,
|
|
22193
22143
|
}: {
|
|
22194
22144
|
src: string;
|
|
22195
|
-
phase: 'opening' | 'open' | 'closing';
|
|
22196
22145
|
mediaRef: React.RefObject<HTMLVideoElement>;
|
|
22197
22146
|
mediaStyle: React.CSSProperties;
|
|
22198
22147
|
onLoadedMetadata: () => void;
|
|
22199
|
-
onClick: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
22200
|
-
onMouseMove: (e: React.MouseEvent<HTMLVideoElement>) => void;
|
|
22201
22148
|
onTransitionEnd: (e: React.TransitionEvent<HTMLVideoElement>) => void;
|
|
22202
22149
|
}) {
|
|
22203
22150
|
useEffect(() => {
|
|
@@ -22213,12 +22160,12 @@ function LightboxVideo({
|
|
|
22213
22160
|
<video
|
|
22214
22161
|
ref={mediaRef}
|
|
22215
22162
|
src={src}
|
|
22216
|
-
|
|
22163
|
+
muted
|
|
22164
|
+
autoPlay
|
|
22165
|
+
loop
|
|
22217
22166
|
playsInline
|
|
22218
22167
|
preload="auto"
|
|
22219
22168
|
onLoadedMetadata={onLoadedMetadata}
|
|
22220
|
-
onClick={onClick}
|
|
22221
|
-
onMouseMove={onMouseMove}
|
|
22222
22169
|
onTransitionEnd={onTransitionEnd}
|
|
22223
22170
|
style={mediaStyle}
|
|
22224
22171
|
/>
|
|
@@ -22675,46 +22622,6 @@ function Lightbox({
|
|
|
22675
22622
|
const swipeBackdropOpacity = swipeOffset > 0 ? Math.max(0, 1 - swipeOffset / 500) : 1;
|
|
22676
22623
|
const swipeMediaOpacity = swipeOffset > 0 ? Math.max(0.35, 1 - swipeOffset / 500) : 1;
|
|
22677
22624
|
|
|
22678
|
-
const handleVideoClick = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
22679
|
-
e.stopPropagation();
|
|
22680
|
-
if (touchInteractionRef.current) {
|
|
22681
|
-
touchInteractionRef.current = false;
|
|
22682
|
-
return;
|
|
22683
|
-
}
|
|
22684
|
-
if (items.length <= 1) return;
|
|
22685
|
-
|
|
22686
|
-
const rect = e.currentTarget.getBoundingClientRect();
|
|
22687
|
-
const y = e.clientY - rect.top;
|
|
22688
|
-
const controlsZoneHeight = Math.min(52, rect.height * 0.2);
|
|
22689
|
-
|
|
22690
|
-
if (y > rect.height - controlsZoneHeight) {
|
|
22691
|
-
return;
|
|
22692
|
-
}
|
|
22693
|
-
|
|
22694
|
-
if (e.clientX - rect.left < rect.width / 2) {
|
|
22695
|
-
onPrev();
|
|
22696
|
-
return;
|
|
22697
|
-
}
|
|
22698
|
-
|
|
22699
|
-
onNext();
|
|
22700
|
-
};
|
|
22701
|
-
|
|
22702
|
-
const handleVideoMouseMove = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
22703
|
-
if (items.length <= 1) return;
|
|
22704
|
-
|
|
22705
|
-
const rect = e.currentTarget.getBoundingClientRect();
|
|
22706
|
-
const x = e.clientX - rect.left;
|
|
22707
|
-
const y = e.clientY - rect.top;
|
|
22708
|
-
const controlsZoneHeight = Math.min(52, rect.height * 0.2);
|
|
22709
|
-
|
|
22710
|
-
if (y > rect.height - controlsZoneHeight) {
|
|
22711
|
-
e.currentTarget.style.cursor = 'default';
|
|
22712
|
-
return;
|
|
22713
|
-
}
|
|
22714
|
-
|
|
22715
|
-
e.currentTarget.style.cursor = x < rect.width / 2 ? 'w-resize' : 'e-resize';
|
|
22716
|
-
};
|
|
22717
|
-
|
|
22718
22625
|
const handleNavSwipeTransitionEnd = useCallback((e: React.TransitionEvent<HTMLElement>) => {
|
|
22719
22626
|
if (e.propertyName !== 'transform' || !navSwipeAnimatingRef.current) return;
|
|
22720
22627
|
|
|
@@ -22750,13 +22657,14 @@ function Lightbox({
|
|
|
22750
22657
|
: phase === 'opening' || isClosing
|
|
22751
22658
|
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
22752
22659
|
: 'none',
|
|
22753
|
-
pointerEvents:
|
|
22754
|
-
touchAction: (isCurrentVideo || isCurrentEmbed) && isOpen ? 'none' : undefined,
|
|
22660
|
+
pointerEvents: 'none',
|
|
22755
22661
|
zIndex: 9998,
|
|
22756
22662
|
};
|
|
22757
22663
|
|
|
22758
|
-
// over an embed the overlays stop short of the player's own control bar
|
|
22759
|
-
const navOverlayInset = isCurrentEmbed &&
|
|
22664
|
+
// over an embed with controls the overlays stop short of the player's own control bar
|
|
22665
|
+
const navOverlayInset = isCurrentEmbed && currentItem && getEmbedPlayback(currentItem).controls && finalRect
|
|
22666
|
+
? Math.min(52, finalRect.height * 0.2)
|
|
22667
|
+
: 0;
|
|
22760
22668
|
const navOverlayBaseStyle = finalRect ? {
|
|
22761
22669
|
position: 'fixed' as const,
|
|
22762
22670
|
top: finalRect.top,
|
|
@@ -22864,10 +22772,9 @@ function Lightbox({
|
|
|
22864
22772
|
<EmbedMediaFrame
|
|
22865
22773
|
key={\`\${index}-\${currentItem.assetId}\`}
|
|
22866
22774
|
media={currentItem}
|
|
22867
|
-
mode="player"
|
|
22868
22775
|
fit={imageDisplay === 'cover' ? 'cover' : 'contain'}
|
|
22869
22776
|
lazy={false}
|
|
22870
|
-
|
|
22777
|
+
startsAtOnce
|
|
22871
22778
|
style={mediaStyle}
|
|
22872
22779
|
onTransitionEnd={handleNavSwipeTransitionEnd}
|
|
22873
22780
|
/>
|
|
@@ -22875,12 +22782,9 @@ function Lightbox({
|
|
|
22875
22782
|
<LightboxVideo
|
|
22876
22783
|
key={\`\${index}-\${currentItem.assetId}\`}
|
|
22877
22784
|
src={currentItem.assetId}
|
|
22878
|
-
phase={phase}
|
|
22879
22785
|
mediaRef={mediaRef as React.RefObject<HTMLVideoElement>}
|
|
22880
22786
|
mediaStyle={mediaStyle}
|
|
22881
22787
|
onLoadedMetadata={computeFinalRect}
|
|
22882
|
-
onClick={handleVideoClick}
|
|
22883
|
-
onMouseMove={handleVideoMouseMove}
|
|
22884
22788
|
onTransitionEnd={handleNavSwipeTransitionEnd}
|
|
22885
22789
|
/>
|
|
22886
22790
|
) : (
|
|
@@ -22896,7 +22800,7 @@ function Lightbox({
|
|
|
22896
22800
|
)
|
|
22897
22801
|
)}
|
|
22898
22802
|
|
|
22899
|
-
{isOpen && navOverlayBaseStyle && items.length > 1 &&
|
|
22803
|
+
{isOpen && navOverlayBaseStyle && items.length > 1 && (
|
|
22900
22804
|
<>
|
|
22901
22805
|
<div
|
|
22902
22806
|
style={{
|
|
@@ -22961,6 +22865,7 @@ function GalleryMediaItem({
|
|
|
22961
22865
|
galleryPaddingBetween = 0,
|
|
22962
22866
|
showPaddingAfter = false,
|
|
22963
22867
|
showControls = false,
|
|
22868
|
+
hasLightbox,
|
|
22964
22869
|
onMediaClick,
|
|
22965
22870
|
}: {
|
|
22966
22871
|
P: string;
|
|
@@ -22973,6 +22878,8 @@ function GalleryMediaItem({
|
|
|
22973
22878
|
galleryPaddingBetween?: number;
|
|
22974
22879
|
showPaddingAfter?: boolean;
|
|
22975
22880
|
showControls?: boolean;
|
|
22881
|
+
/** An embed then plays here as a silent loop, and as it was set to in the lightbox. */
|
|
22882
|
+
hasLightbox: boolean;
|
|
22976
22883
|
onMediaClick?: () => void;
|
|
22977
22884
|
}) {
|
|
22978
22885
|
const mediaClassName = \`\${P}-gallery-\${isVideoMedia(media) ? 'video' : 'image'}\`;
|
|
@@ -23026,8 +22933,8 @@ function GalleryMediaItem({
|
|
|
23026
22933
|
<EmbedMediaFrame
|
|
23027
22934
|
{...mediaProps}
|
|
23028
22935
|
media={media}
|
|
23029
|
-
mode="background"
|
|
23030
22936
|
fit={isCover ? 'cover' : 'contain'}
|
|
22937
|
+
silentLoop={hasLightbox}
|
|
23031
22938
|
/>
|
|
23032
22939
|
) : isVideoMedia(media) ? (
|
|
23033
22940
|
<video
|
|
@@ -23972,6 +23879,7 @@ export function Mercury({
|
|
|
23972
23879
|
galleryPaddingBetween={galleryPaddingBetween}
|
|
23973
23880
|
showPaddingAfter={mediaIndex < displayItems.length - 1}
|
|
23974
23881
|
showControls={showControls}
|
|
23882
|
+
hasLightbox={lightbox === 'on'}
|
|
23975
23883
|
onMediaClick={canOpenLightbox && lightboxItemIndex >= 0
|
|
23976
23884
|
? () => openLightbox(lightboxItemsForEntry, lightboxItemIndex)
|
|
23977
23885
|
: undefined}
|
|
@@ -24023,6 +23931,7 @@ export function Mercury({
|
|
|
24023
23931
|
galleryPaddingBetween={galleryPaddingBetween}
|
|
24024
23932
|
showPaddingAfter={mediaIndex < displayItems.length - 1}
|
|
24025
23933
|
showControls={showControls}
|
|
23934
|
+
hasLightbox={lightbox === 'on'}
|
|
24026
23935
|
onMediaClick={canOpenLightbox && lightboxItemIndex >= 0
|
|
24027
23936
|
? () => openLightbox(lightboxItemsForEntry, lightboxItemIndex)
|
|
24028
23937
|
: undefined}
|
|
@@ -24112,7 +24021,7 @@ export function Mercury({
|
|
|
24112
24021
|
object-fit: cover;
|
|
24113
24022
|
object-position: center;
|
|
24114
24023
|
}
|
|
24115
|
-
`}function kp(e){return Number(e.toFixed(4))}function $d(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ls(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Zw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Jw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function e$(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function Ap(e,t){return(1-e)/(1-e*Math.cos(t))}function t$(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Ap(e,i)))}return t||1}function n$(e,t){return e?1:1+Rp*(.35+t)}function i$(e,t,n,i){const o=t*n$(n,i);return Math.max(0,(e-o)/2)}function o$(e,t,n){const i=Ap(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function r$(e,t,n){return e/2+t*n}function a$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${kp(n)})`}function s$(e){return Math.round(e*1e3)}function Fp(e,t,n){const i=Math.cos(e),o=Math.cos(Yw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return kp(t+(n-t)*r)}function l$(e){return Fp(e,Xw,Uw)}function c$(e){return Fp(e,qw,Kw)}function d$(e,t){if(!t)return"none";const n=c$(e);return n<=0?"none":`blur(${n}px)`}function Cd(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=o$(e.depthFactor,e.spreadFactor,n),r=r$(e.width,e.orbitRadius,i);return{transform:a$(e.scaled,r,o),zIndex:s$(o),opacity:l$(n),filter:d$(n,e.blurEnabled)}}function Np(e,t){return(e%t+t)%t}function u$(e,t){return Ul(e,t)/t}function Ul(e,t){return Np(e,t)}function p$(e,t){return Math.floor(e/t)}function m$(e,t,n,i){return p$(e,t)*n+Ul(e,t)*i}function Td(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function fa(e){const t=e%1;return t<0?t+1:t}function g$(e,t,n){const i=t/Ep,o=n==="left"?-e*i:e*i;return fa(o)}function h$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=b.useScopedStyles(),r=s.useRef(null),l=Ls((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ww),c=Ls(e==null?void 0:e.imageWidth,Ow),d=Ls(e==null?void 0:e.turnHeight,Dw),u=$d(e==null?void 0:e.itemsPerTurn,zw,3,40),p=$d(e==null?void 0:e.turns,Bw,1,30),y=Math.min(Gw,Math.max(0,jw)),
|
|
24024
|
+
`}function kp(e){return Number(e.toFixed(4))}function $d(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Ls(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Zw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Jw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function e$(e){return b.isEmbedMedia(e)?!1:e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function Ap(e,t){return(1-e)/(1-e*Math.cos(t))}function t$(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*Ap(e,i)))}return t||1}function n$(e,t){return e?1:1+Rp*(.35+t)}function i$(e,t,n,i){const o=t*n$(n,i);return Math.max(0,(e-o)/2)}function o$(e,t,n){const i=Ap(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function r$(e,t,n){return e/2+t*n}function a$(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${kp(n)})`}function s$(e){return Math.round(e*1e3)}function Fp(e,t,n){const i=Math.cos(e),o=Math.cos(Yw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return kp(t+(n-t)*r)}function l$(e){return Fp(e,Xw,Uw)}function c$(e){return Fp(e,qw,Kw)}function d$(e,t){if(!t)return"none";const n=c$(e);return n<=0?"none":`blur(${n}px)`}function Cd(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=o$(e.depthFactor,e.spreadFactor,n),r=r$(e.width,e.orbitRadius,i);return{transform:a$(e.scaled,r,o),zIndex:s$(o),opacity:l$(n),filter:d$(n,e.blurEnabled)}}function Np(e,t){return(e%t+t)%t}function u$(e,t){return Ul(e,t)/t}function Ul(e,t){return Np(e,t)}function p$(e,t){return Math.floor(e/t)}function m$(e,t,n,i){return p$(e,t)*n+Ul(e,t)*i}function Td(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function fa(e){const t=e%1;return t<0?t+1:t}function g$(e,t,n){const i=t/Ep,o=n==="left"?-e*i:e*i;return fa(o)}function h$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=b.useScopedStyles(),r=s.useRef(null),l=Ls((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ww),c=Ls(e==null?void 0:e.imageWidth,Ow),d=Ls(e==null?void 0:e.turnHeight,Dw),u=$d(e==null?void 0:e.itemsPerTurn,zw,3,40),p=$d(e==null?void 0:e.turns,Bw,1,30),y=Math.min(Gw,Math.max(0,jw)),S=Math.min(1,Math.max(0,Vw)),m=Math.max(0,(e==null?void 0:e.speed)??Ep),h=(e==null?void 0:e.direction)==="left"?"left":"right",x=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",w=(e==null?void 0:e.cornerRadius)??0,F=(e==null?void 0:e.blur)!=="off",v=s.useMemo(()=>Zw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),P=v.display==="cover",M=C=>b.scalingValue(C,n??!1),K=s.useMemo(()=>t$(y),[y]),X=s.useMemo(()=>i$(l,c,P,S),[l,c,P,S]),j=s.useMemo(()=>Qw(o),[o]),N=s.useMemo(()=>({scaled:C=>b.scalingValue(C,n??!1),width:l,orbitRadius:X,depthFactor:y,spreadFactor:K,blurEnabled:F}),[n,l,X,y,K,F]),_=s.useRef([]),T=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(C=>{var ue;return!!((ue=C.image)!=null&&ue.assetId)}),[t]),Y=d/u,R=c*Jw(v),I=Math.min(_w,p*u),$=Hw*u,G=I+$*2,U=Math.max(0,p-1)*d+(u-1)*Y,E=m>0,f=x==="scroll"&&E,Q=x==="autoplay"&&E&&(n?!!i:!0),q=Q?360/(m*Nw):0,pe=L.length===0?0:G,k=s.useMemo(()=>Array.from({length:pe},(C,ue)=>u$(ue-$,u)),[pe,$,u]);s.useEffect(()=>{if(!Q&&!f)return;const C=r.current;if(!C)return;const ue=oe=>{T.current=oe,k.forEach((le,ve)=>{const Fe=_.current[ve];if(!Fe)return;const Ee=Cd(N,fa(le+oe));Fe.style.transform=Ee.transform,Fe.style.zIndex=String(Ee.zIndex),Fe.style.opacity=String(Ee.opacity),Fe.style.filter=Ee.filter})};if(f){const oe=C.ownerDocument.defaultView??window,le=()=>{const Fe=C.getBoundingClientRect(),Ee=oe.innerHeight||C.ownerDocument.documentElement.clientHeight,Ce=Ee+Fe.height;if(Ce<=0)return;const Se=Math.min(1,Math.max(0,(Ee-Fe.top)/Ce));ue(g$(Se,m,h))};le(),oe.addEventListener("scroll",le,{passive:!0,capture:!0}),oe.addEventListener("resize",le);const ve=new ResizeObserver(le);return ve.observe(C),()=>{oe.removeEventListener("scroll",le,{capture:!0}),oe.removeEventListener("resize",le),ve.disconnect()}}const te=h==="left"?-1:1;let fe=null,Pe=null;const de=oe=>{if(Pe!==null){const le=(oe-Pe)/1e3/q*te;T.current=fa(T.current+le)}Pe=oe,ue(T.current),fe=requestAnimationFrame(de)},we=()=>{fe===null&&(Pe=null,fe=requestAnimationFrame(de))},V=()=>{fe!==null&&cancelAnimationFrame(fe),fe=null},ie=new IntersectionObserver(([oe])=>{oe!=null&&oe.isIntersecting?we():V()});return ie.observe(C),()=>{V(),ie.disconnect()}},[Q,f,k,N,q,m,h]);const me=Q||f?T.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:M(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:M(l),height:M(U)},children:Array.from({length:G},(C,ue)=>{const te=ue-$,Pe=L[Np(te,L.length)].image,de=Ul(te,u),we=k[ue],V=m$(te,u,d,Y),ie=S===0?0:(Td(de+7.3)-.5)*S*Y,oe=P?1:1+(Td(de+3.1)-.5)*2*Rp*(.35+S),le=c*oe,ve={"--helix-base-w":M(le),...P?{"--helix-base-h":M(R)}:{}},Fe={top:M(V+ie),...ve,...Cd(N,fa(we+me))},Ee=w>0?{borderRadius:M(w)}:{},Ce=P?{...Ee,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Ee,Se=b.isEmbedMedia(Pe)?a.jsx(b.EmbedMediaFrame,{className:`${o}-media`,style:P?{...Ce,position:"absolute",inset:0}:Ce,media:Pe,fit:P?"cover":"contain"}):e$(Pe)?a.jsx("video",{className:`${o}-media`,style:Ce,src:Pe.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:Ce,src:Pe.assetId,alt:Pe.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{_.current[ue]=g},className:P?`${o}-item ${o}-item-cover`:`${o}-item`,style:Fe,children:P?a.jsx("div",{className:`${o}-cover`,style:Ee,children:Se}):Se},`${p}-${u}-${te}`)})})]})}const f$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
|
|
24116
24025
|
import { CommonComponentProps } from '../props';
|
|
24117
24026
|
import { scalingValue } from '../utils/scalingValue';
|
|
24118
24027
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -24638,7 +24547,6 @@ export function Helix({
|
|
|
24638
24547
|
// the frame positions itself inline, so the cover's absolute placement is given the same way
|
|
24639
24548
|
style={isCover ? { ...coverMediaStyle, position: 'absolute', inset: 0 } : coverMediaStyle}
|
|
24640
24549
|
media={media}
|
|
24641
|
-
mode="background"
|
|
24642
24550
|
fit={isCover ? 'cover' : 'contain'}
|
|
24643
24551
|
/>
|
|
24644
24552
|
) : isVideoMedia(media) ? (
|
|
@@ -24686,7 +24594,7 @@ export function Helix({
|
|
|
24686
24594
|
</>
|
|
24687
24595
|
);
|
|
24688
24596
|
}
|
|
24689
|
-
`,y$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],v$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}}}},default:y$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},x$={element:h$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:v$,sourceCode:f$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},In=300,rn=300,b$=8/1440,ho=.004,S$=50,w$=1440,Xi=S$/w$;function $$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function C$(e){return e==="center"||e==="right"?e:"left"}function T$(e){return e==="left"||e==="right"?e:"center"}function I$(e,t,n){const i=b.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function L$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function _p(e,t){const n=(L$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function M$(e,t,n){switch(_p(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function P$(e,t){switch(_p(e.showIn,t)){case"default and compact":return!1;default:return!0}}function E$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function R$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):E$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Id(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Hp(e){const t=e.link;if(t&&typeof t=="object"){const i=Id(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Id(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Qs(e,t){const n=e.label||"Link",i=Hp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=R$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Wp=$i*.125,Ms=($i-(3*wi+2*Wp))/2,Ld=wi+Wp;function k$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ms,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ms+Ld,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ms+2*Ld,width:$i,height:wi,rx:wi/2})]})}function A$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function F$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}const Op=.004;let er;function N$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function _$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=N$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Md(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=_$(o);i(u=>Math.abs(u-d)<Op?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<Op))return`translateY(${e}em)`}function Ed(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function kd(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function Ad(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...F$(t.fontSize,t.lineHeight,e,n)},className:A$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Fd(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Nd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Dp(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Nd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Nd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function H$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function W$(e){return e.position?H$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function O$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const D$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function zp(e){var o,r;const t=e,n={};for(const[l,c]of D$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function _d(e){var o,r,l,c,d,u,p,y,x,m,f,S,w,N,v,M;e=zp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const E=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;E!==void 0&&(n.openLinkColor=E)}if(e.compactIconColor===void 0){const E=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;E!==void 0&&(n.compactIconColor=E)}if(e.compactLinkColor===void 0){const E=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;E!==void 0&&(n.compactLinkColor=E)}if(e.compactLogoColor===void 0){const E=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;E!==void 0&&(n.compactLogoColor=E)}if(e.openLogoColor===void 0){const E=((S=(f=e.stateOverrides)==null?void 0:f.open)==null?void 0:S.logoColor)??e.logoColor;E!==void 0&&(n.openLogoColor=E)}if(e.compactBackgroundColor===void 0){const E=((N=(w=e.stateOverrides)==null?void 0:w.compact)==null?void 0:N.backgroundColor)??((M=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:M.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;E!==void 0&&(n.compactBackgroundColor=E)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(E,U)=>{if(e[E]!==void 0)return;const X=e[U];X!==void 0&&(n[E]=X)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function z$(e,t){const n=Dp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function B$(e,t){return{paddingLeft:b.scalingValue(e.effectivePaddingLeft,t),paddingRight:b.scalingValue(e.effectivePaddingRight,t),paddingTop:b.scalingValue(e.effectivePaddingTop,t),paddingBottom:b.scalingValue(e.effectivePaddingBottom,t)}}function j$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const V$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},G$=["hover","open"],X$={top:"flex-start",center:"center",bottom:"flex-end"},U$={left:"flex-start",center:"center",right:"flex-end"};function q$(e){return`
|
|
24597
|
+
`,y$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],v$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}}}},default:y$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},x$={element:h$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:v$,sourceCode:f$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},In=300,rn=300,b$=8/1440,ho=.004,S$=50,w$=1440,Xi=S$/w$;function $$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function C$(e){return e==="center"||e==="right"?e:"left"}function T$(e){return e==="left"||e==="right"?e:"center"}function I$(e,t,n){const i=b.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function L$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function _p(e,t){const n=(L$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function P$(e,t,n){switch(_p(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function M$(e,t){switch(_p(e.showIn,t)){case"default and compact":return!1;default:return!0}}function E$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function R$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):E$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Id(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Hp(e){const t=e.link;if(t&&typeof t=="object"){const i=Id(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Id(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Qs(e,t){const n=e.label||"Link",i=Hp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=R$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Wp=$i*.125,Ps=($i-(3*wi+2*Wp))/2,Ld=wi+Wp;function k$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ps,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ps+Ld,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ps+2*Ld,width:$i,height:wi,rx:wi/2})]})}function A$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function F$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:b.scalingValue((o-t)/2,i)}}const Op=.004;let er;function N$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function _$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=N$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Pd(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=_$(o);i(u=>Math.abs(u-d)<Op?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Md(e){if(!(Math.abs(e)<Op))return`translateY(${e}em)`}function Ed(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Rd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function kd(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function Ad(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...F$(t.fontSize,t.lineHeight,e,n)},className:A$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Fd(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Nd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Dp(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Nd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Nd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function H$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function W$(e){return e.position?H$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function O$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const D$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function zp(e){var o,r;const t=e,n={};for(const[l,c]of D$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function _d(e){var o,r,l,c,d,u,p,y,S,m,h,x,w,F,v,P;e=zp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const M=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;M!==void 0&&(n.openLinkColor=M)}if(e.compactIconColor===void 0){const M=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;M!==void 0&&(n.compactIconColor=M)}if(e.compactLinkColor===void 0){const M=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;M!==void 0&&(n.compactLinkColor=M)}if(e.compactLogoColor===void 0){const M=((m=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:m.logoColor)??e.logoColor;M!==void 0&&(n.compactLogoColor=M)}if(e.openLogoColor===void 0){const M=((x=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:x.logoColor)??e.logoColor;M!==void 0&&(n.openLogoColor=M)}if(e.compactBackgroundColor===void 0){const M=((F=(w=e.stateOverrides)==null?void 0:w.compact)==null?void 0:F.backgroundColor)??((P=(v=t.stateOverrides)==null?void 0:v.compact)==null?void 0:P.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;M!==void 0&&(n.compactBackgroundColor=M)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(M,K)=>{if(e[M]!==void 0)return;const X=e[K];X!==void 0&&(n[M]=X)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function z$(e,t){const n=Dp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function B$(e,t){return{paddingLeft:b.scalingValue(e.effectivePaddingLeft,t),paddingRight:b.scalingValue(e.effectivePaddingRight,t),paddingTop:b.scalingValue(e.effectivePaddingTop,t),paddingBottom:b.scalingValue(e.effectivePaddingBottom,t)}}function j$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,ho),l=Math.max(t.effectivePaddingBottom,ho),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,ho),p=Math.max(t.effectivePaddingRight,ho),y=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),S=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(S),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const V$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},G$=["hover","open"],X$={top:"flex-start",center:"center",bottom:"flex-end"},U$={left:"flex-start",center:"center",right:"flex-end"};function q$(e){return`
|
|
24690
24598
|
.${e}-root {
|
|
24691
24599
|
position: relative;
|
|
24692
24600
|
display: block;
|
|
@@ -25346,7 +25254,7 @@ export function Helix({
|
|
|
25346
25254
|
word-spacing ${rn}ms ease,
|
|
25347
25255
|
padding ${rn}ms ease;
|
|
25348
25256
|
}
|
|
25349
|
-
`}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function K$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Zs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function Y$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Q$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Z$(e){const t=Q$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function J$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return Ku(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function eC(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function tC(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Bp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function Hd(e){const t=Bp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function nC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=eC(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Qs(r,l),m=Hp(r),f={mode:m.type==="url"?"url":"page",href:x.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:x.target};f.target==="_blank"?c(f):d(()=>c(f)),t();return}if(i){e.preventDefault(),d(()=>Hd(p)),t();return}!y&&p&&tC(u)&&Bp(p)&&(e.preventDefault(),d(()=>Hd(p))),t()}const iC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function oC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function rC(e){const t={},n=oC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of iC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Wd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function aC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){var nc;const{prefix:m}=b.useScopedStyles(),f=s.useRef(null),S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),M=s.useRef(0),E=s.useRef(null),U=s.useRef(null),X=s.useRef(d),D=s.useMemo(()=>q$(m),[m]),[_,W]=s.useState(!1),[T,C]=s.useState(!1),[q,R]=s.useState(!1),$=$$(r),I=s.useMemo(()=>new Set(c),[c]),j=Ft=>!!(Ft&&I.has(Ft)),K=!!(t&&!i&&$==="open"&&!j("open"))||!(t&&!i)&&_,P=!!(t&&!i),h=K&&!P;Vl(h),s.useEffect(()=>{if(!K||!P)return;const Ft=document.documentElement,Qt=Ft.style.overflow;return Ft.style.overflow="hidden",()=>{Ft.style.overflow=Qt}},[K,P]);const J=!j("compact")&&!j("onScroll"),V=!t||!!i&&!n,he=o&&o!=="default"?o:void 0,k=J&&$==="compact"?"compact":"default",[ce,L]=s.useState(k),[me,te]=s.useState(!1),ve=!n;k!==ce&&(L(k),ve&&te(!0));const Le=zp(e),{logo:de,logoMaxHeight:ue=120/1440,logoPosition:Z="left",panelHeight:le=60/1440,backgroundColor:oe="#b3b3b3",logoColor:ge="#000000",position:Se,horizontalAlign:Re,verticalAlign:Ne,iconColor:Te="#000000",showIcon:Ce="on",iconSize:g=16/1440,linkColor:Y="#000000",openLinkColor:ee="#000000",compactIconColor:ae="#000000",compactLinkColor:ye="#000000",compactLogoColor:ne="#000000",compactBackgroundColor:B="#ffffff",compactLogoMaxHeight:G=120/1440,compactLogoPosition:z,compactPanelHeight:ie=60/1440,compactShowIcon:H="on",compactIconSize:be=16/1440,compactNavTextWidth:re,compactNavTextPosition:Q,compactNavTextOffset:Pe,compactNavGap:Ae,compactNavPaddingLeft:He=10/1440,compactNavPaddingRight:Xe=10/1440,compactFontFamily:Ue,compactFontSettings:Je,compactFontSize:je,compactLineHeight:xe,compactLetterSpacing:Ie=0,compactWordSpacing:ze=0,compactTextAlign:Ze="left",compactTextAppearance:tt,openLogoColor:ot="#000000",menuBackgroundColor:lt="#ffffff",overlayColor:it="rgba(0, 0, 0, 0.45)",closeButtonColor:xt="#000000",effect:rt="fade",openPanelSize:_e=100,textWidth:We=280/1440,navTextWidth:vt,navTextPosition:Ve="center",navTextOffset:Ke=0,gap:pe=0,navGap:De,navPaddingLeft:qe=10/1440,navPaddingRight:bt=10/1440,textPaddingLeft:yt=10/1440,textPaddingRight:Rt=10/1440,textPaddingTop:ct=10/1440,textPaddingBottom:wt=10/1440,fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge=0,wordSpacing:ht=0,textAlign:Lt="left",textAppearance:$t,openFontFamily:mt,openFontSettings:_t,openFontSize:Ot,openLineHeight:zt,openLetterSpacing:Ee,openWordSpacing:dt,openTextAlign:ut,openTextAppearance:kt,stateOverrides:Qe,link:at}=Le,{horizontalAlign:It,verticalAlign:At}=W$({position:Se,horizontalAlign:Re,verticalAlign:Ne}),pt=k==="compact",Ut=pt?G:ue,qt=C$(pt?z:Z),Dt=pt?ie:le,Vt=pt?be:g,Gt=pt?re:vt,Bt=T$(pt?Q:Ve),Yt=(pt?Pe:Ke)??0,O=pt?Ae:De,Me=pt?He:qe,Fe=pt?Xe:bt,Oe=Gt??We,ft=K||(pt?H:Ce)!=="off",Tt=b.buildColorVars(m,{iconColor:Te,closeButtonColor:xt,linkColor:Y,openLinkColor:ee,compactIconColor:ae,compactLinkColor:ye,compactLogoColor:ne,compactBackgroundColor:B,openLogoColor:ot,menuBackgroundColor:lt,overlayColor:it,backgroundColor:oe,logoColor:ge},V$,G$,Qe),et=kd(pt?{fontFamily:Ue,fontSettings:Je,fontSize:je,lineHeight:xe,letterSpacing:Ie,wordSpacing:ze,textAlign:Ze,textAppearance:tt}:{fontFamily:nt,fontSettings:Nt,fontSize:jt,lineHeight:$e,letterSpacing:Ge,wordSpacing:ht,textAlign:Lt,textAppearance:$t}),Mt=kd({fontFamily:mt,fontSettings:_t,fontSize:Ot,lineHeight:zt,letterSpacing:Ee,wordSpacing:dt,textAlign:ut,textAppearance:kt},et),Ct=Ad(m,et,t),Ht=Ad(m,Mt,t),on=Md(w,Ed(et)),fn=Md(N,Ed(Mt)),bn={...Ht.css,whiteSpace:"pre-wrap",transform:Pd(fn)},ui=Ht.className,dn=Ft=>b.scalingValue(Ft,t),pi=O??pe,Yn=Math.max(Me,ho),Sn=Math.max(Fe,ho),mi=Math.max(0,1-Vt),eo=Math.max(0,1-Vt),wn=n??!1,Qn=wn&&!K,to=s.useMemo(()=>Dp({textPaddingLeft:yt,textPaddingRight:Rt,textPaddingTop:ct,textPaddingBottom:wt,fontSize:Mt.fontSize}),[yt,Rt,ct,wt,Mt.fontSize]),no=Ft=>{const Qt=a.jsx("span",{className:ui,style:bn,children:Fd(Ft)});return Wd(m,Qt,We,wn,dn)},Ye=rt==="left"||rt==="right"?{width:`${_e}%`}:{height:`${_e}%`},A={...B$(to,t),...Ye,alignItems:U$[It],justifyContent:X$[At]},se=s.useRef(e),fe=s.useRef(d),ke=s.useRef(null);Zs((nc=e.logo)==null?void 0:nc.icon)&&(ke.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){se.current=e,fe.current=d;return}const Ft=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Ft)&&!ke.current){se.current=e,fe.current=d;return}const Qt=_r=>{y(K$(_r,ke.current))};if(fe.current!==d){se.current=e,fe.current=d;const _r=_d(e);_r!==e&&Qt(_r);return}const cn=_d(e),yn=se.current,$n=yn!==e,Fn=$n?z$(cn,yn):cn;se.current=e;const io=cn!==e,Xo=$n&&O$(cn,Fn);!io&&!Xo||Qt(Fn)},[e,y,t,d]);const Be=b.scalingValue(Vt,t),gt={width:Be,height:Be,minWidth:Be,minHeight:Be,maxWidth:Be,maxHeight:Be},Wt={...Ct.css,textDecoration:"none",transform:Pd(on)},Kt=Ct.className,sn=(de==null?void 0:de.mode)!=="Off",en=(de==null?void 0:de.icon)??"",gi=Z$(en),An=J$(en,gi),Zn=!!An,kr=dn(Math.min(Ut,Dt)),Go=!!(sn&&en&&qt==="right")?"left":"right",Zl=Array.isArray(at)?at:[],Xa=[k!=="default"?`${m}-state-${k}`:"",K||$==="open"?`${m}-state-open`:"",he&&he!==k&&he!==$?`${m}-state-${he}`:""].filter(Boolean).join(" "),Jp=t&&!i?`${m}-editor`:"",Jl=V?`${m}-interactive`:"",em=ve&&(k!==ce||me)?`${m}-nav-state-anim`:"",tm=K?`${m}-open`:"",nm=s.useMemo(()=>rC(f.current),[T,K,d]),Ua=()=>{W(!1)},qa=!t||i,im=Ft=>{if(h){U.current=Ft;return}Ft()};s.useEffect(()=>{if(K)return;const Ft=U.current;U.current=null,Ft==null||Ft()},[K]);const ec=(Ft,Qt)=>{nC(Ft,Ua,{isEditor:t,isPreviewMode:i,item:Qt,pages:u,onLinkNavigate:p,runAfterClose:im})},om=()=>{t&&!i||W(Ft=>!Ft)},rm=Ft=>{Ft.pointerType==="touch"&&Ft.currentTarget.blur()},Ar=()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)};s.useEffect(()=>{if(!me)return;const Ft=window.setTimeout(()=>{te(!1)},rn);return()=>window.clearTimeout(Ft)},[me,k]),s.useEffect(()=>{if(K){Ar(),C(!0);return}return M.current+=1,R(!1),Ar(),E.current=window.setTimeout(()=>{E.current=null,C(!1)},In),Ar},[K]),s.useLayoutEffect(()=>{X.current!==d&&(X.current=d,M.current+=1,Ar(),W(!1),R(!1),C(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!T||!K)return;const Ft=M.current+1;M.current=Ft,R(!1),(cn=S.current)==null||cn.offsetHeight;const Qt=requestAnimationFrame(()=>{M.current===Ft&&R(!0)});return()=>{cancelAnimationFrame(Qt)}},[T,K]),s.useLayoutEffect(()=>{if(!h||!T)return;const Ft=v.current;if(!Ft)return;const Qt=getComputedStyle(Ft).backgroundColor;if(!Qt)return;const cn=document.documentElement,{body:yn}=document,$n=cn.style.backgroundColor,Fn=yn.style.backgroundColor;return cn.style.backgroundColor=Qt,yn.style.backgroundColor=Qt,()=>{cn.style.backgroundColor=$n,yn.style.backgroundColor=Fn}},[h,T,Xa,lt,Qe]),s.useEffect(()=>{x==null||x(K)},[K,x]),s.useEffect(()=>{if(!K)return;const Ft=Qt=>{Qt.key==="Escape"&&(t&&i||Ua())};return window.addEventListener("keydown",Ft),()=>window.removeEventListener("keydown",Ft)},[K,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&W(!1)},[t,i,$]),s.useEffect(()=>{i&&W(!1)},[i]);const tc=wn&&K,am=Ft=>Zl.filter(Qt=>P$(Qt,d)).map((Qt,cn)=>{const{label:yn,href:$n,target:Fn}=Qs(Qt,u),io=$n?a.jsx("a",{href:$n,target:Fn,rel:Fn==="_blank"?"noopener noreferrer":void 0,className:`${Ft} ${m}-has-href`,onClick:Xo=>ec(Xo,Qt),children:no(yn)}):a.jsx("span",{className:Ft,children:no(yn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":tc?"gap":void 0,"data-controls-axis":"y",className:tc?`${m}-gap-control`:void 0,style:{height:dn(pe)}}),io]},cn)}),sm=T?a.jsxs("div",{ref:S,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${rt}`,q?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Jl,Xa].filter(Boolean).join(" "),style:{...Tt,...nm},"aria-hidden":!q,children:[a.jsx("div",{className:[`${m}-backdrop`,qa?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:qa?Ua:void 0}),a.jsxs("nav",{className:[`${m}-panel`,qa?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[wn&&j$(m,to,Mt.fontSize,dn),am(`${m}-link`)]}),h?a.jsx("div",{ref:v,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,lm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:om,onPointerUp:rm,"aria-expanded":K,"aria-label":K?"Close menu":"Open menu",children:a.jsx(k$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Ft=>{const Qt=Ft==="left",cn=Qt?Me:Fe,yn=Qt?Yn:Sn,$n=Qt?mi:eo,Fn=pt?Qt?"compactNavPaddingLeft":"compactNavPaddingRight":Qt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Qt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":Fn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Qt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String($n),className:`${m}-control-anchor`,style:{top:0,[Qt?"left":"right"]:0,width:dn(yn),height:"100%"}}):null})},cm=(Ft,Qt)=>{const{label:cn,href:yn,target:$n}=Qs(Ft,u),Fn=a.jsx("span",{className:Kt,style:Wt,children:Fd(cn)}),io=Wd(m,Fn,Oe,Qn,dn),Xo=yn?a.jsx("a",{href:yn,target:$n,rel:$n==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>ec(Nr,Ft),children:io}):a.jsx("span",{className:`${m}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Qt>0&&a.jsx("div",{"data-controls":Qn?pt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Xo]},Qt)},dm={...Tt,height:b.scalingValue(Dt,t),minHeight:b.scalingValue(Dt,t),[`--${m}-panel-height`]:b.scalingValue(Dt,t)},um=l&&k==="default"&&$!=="open"&&!i?dn(le+b$):"0px";return a.jsxs("div",{ref:f,className:`${m}-root ${Xa} ${Jp} ${Jl} ${em}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:um,...Tt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),a.jsx("span",{ref:w,"aria-hidden":!0,style:Rd(Ct.css),children:"H"}),a.jsx("span",{ref:N,"aria-hidden":!0,style:Rd(Ht.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:dm,children:[sn&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${qt}`,children:[qt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Zn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&An?{[`--${m}-logo-image`]:Y$(An)}:{}},children:[a.jsx("img",{src:Zn&&An?An:en,alt:"",className:`${m}-nav-logo-img`}),Zn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),qt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Bt}`,style:{transform:I$(Bt,Yt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Zl.filter(Ft=>M$(Ft,k,d)).map((Ft,Qt)=>cm(Ft,Qt))})})]})}),sm,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Go}`,children:[Go==="left"?Fr("left"):null,ft?a.jsx("div",{className:`${m}-root ${tm}`.trim(),style:gt,children:lm()}):null,Go==="right"?Fr("right"):null]})]})}const sC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
25257
|
+
`}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function K$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Zs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function Y$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function Q$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function Z$(e){const t=Q$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function J$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return Ku(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function eC(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function tC(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Bp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function Hd(e){const t=Bp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function nC(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(S=>S()),u=e.currentTarget.getAttribute("href")??"",p=eC(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const S=Qs(r,l),m=Hp(r),h={mode:m.type==="url"?"url":"page",href:S.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:S.target};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>Hd(p)),t();return}!y&&p&&tC(u)&&Bp(p)&&(e.preventDefault(),d(()=>Hd(p))),t()}const iC=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function oC(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function rC(e){const t={},n=oC(e);if(!n)return t;const i=getComputedStyle(n);for(const o of iC){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Wd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function aC({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:S}){var nc;const{prefix:m}=b.useScopedStyles(),h=s.useRef(null),x=s.useRef(null),w=s.useRef(null),F=s.useRef(null),v=s.useRef(null),P=s.useRef(0),M=s.useRef(null),K=s.useRef(null),X=s.useRef(d),j=s.useMemo(()=>q$(m),[m]),[N,_]=s.useState(!1),[T,L]=s.useState(!1),[Y,R]=s.useState(!1),I=$$(r),$=s.useMemo(()=>new Set(c),[c]),G=Ft=>!!(Ft&&$.has(Ft)),U=!!(t&&!i&&I==="open"&&!G("open"))||!(t&&!i)&&N,E=!!(t&&!i),f=U&&!E;Vl(f),s.useEffect(()=>{if(!U||!E)return;const Ft=document.documentElement,Yt=Ft.style.overflow;return Ft.style.overflow="hidden",()=>{Ft.style.overflow=Yt}},[U,E]);const Q=!G("compact")&&!G("onScroll"),q=!t||!!i&&!n,pe=o&&o!=="default"?o:void 0,k=Q&&I==="compact"?"compact":"default",[me,C]=s.useState(k),[ue,te]=s.useState(!1),fe=!n;k!==me&&(C(k),fe&&te(!0));const Pe=zp(e),{logo:de,logoMaxHeight:we=120/1440,logoPosition:V="left",panelHeight:ie=60/1440,backgroundColor:oe="#b3b3b3",logoColor:le="#000000",position:ve,horizontalAlign:Fe,verticalAlign:Ee,iconColor:Ce="#000000",showIcon:Se="on",iconSize:g=16/1440,linkColor:Z="#000000",openLinkColor:J="#000000",compactIconColor:re="#000000",compactLinkColor:he="#000000",compactLogoColor:z="#000000",compactBackgroundColor:B="#ffffff",compactLogoMaxHeight:ne=120/1440,compactLogoPosition:ce,compactPanelHeight:ee=60/1440,compactShowIcon:H="on",compactIconSize:be=16/1440,compactNavTextWidth:ae,compactNavTextPosition:W,compactNavTextOffset:ke,compactNavGap:ze,compactNavPaddingLeft:Xe=10/1440,compactNavPaddingRight:Ue=10/1440,compactFontFamily:Qe,compactFontSettings:We,compactFontSize:it,compactLineHeight:ye,compactLetterSpacing:Te=0,compactWordSpacing:Ve=0,compactTextAlign:Ze="left",compactTextAppearance:et,openLogoColor:at="#000000",menuBackgroundColor:tt="#ffffff",overlayColor:Ye="rgba(0, 0, 0, 0.45)",closeButtonColor:xt="#000000",effect:pt="fade",openPanelSize:De=100,textWidth:_e=280/1440,navTextWidth:He,navTextPosition:Ae="center",navTextOffset:Be=0,gap:Ie=0,navGap:mt,navPaddingLeft:ot=10/1440,navPaddingRight:Ct=10/1440,textPaddingLeft:rt=10/1440,textPaddingRight:St=10/1440,textPaddingTop:nt=10/1440,textPaddingBottom:Rt=10/1440,fontFamily:ht,fontSettings:Vt,fontSize:Zt,lineHeight:$e,letterSpacing:Ge=0,wordSpacing:ft=0,textAlign:Lt="left",textAppearance:wt,openFontFamily:vt,openFontSettings:Nt,openFontSize:Wt,openLineHeight:Dt,openLetterSpacing:Me,openWordSpacing:ct,openTextAlign:dt,openTextAppearance:kt,stateOverrides:Ke,link:st}=Pe,{horizontalAlign:It,verticalAlign:At}=W$({position:ve,horizontalAlign:Fe,verticalAlign:Ee}),ut=k==="compact",Gt=ut?ne:we,Ut=C$(ut?ce:V),Ot=ut?ee:ie,Bt=ut?be:g,Xt=ut?ae:He,zt=T$(ut?W:Ae),Kt=(ut?ke:Be)??0,D=ut?ze:mt,Le=ut?Xe:ot,Ne=ut?Ue:Ct,Oe=Xt??_e,yt=U||(ut?H:Se)!=="off",Tt=b.buildColorVars(m,{iconColor:Ce,closeButtonColor:xt,linkColor:Z,openLinkColor:J,compactIconColor:re,compactLinkColor:he,compactLogoColor:z,compactBackgroundColor:B,openLogoColor:at,menuBackgroundColor:tt,overlayColor:Ye,backgroundColor:oe,logoColor:le},V$,G$,Ke),Je=kd(ut?{fontFamily:Qe,fontSettings:We,fontSize:it,lineHeight:ye,letterSpacing:Te,wordSpacing:Ve,textAlign:Ze,textAppearance:et}:{fontFamily:ht,fontSettings:Vt,fontSize:Zt,lineHeight:$e,letterSpacing:Ge,wordSpacing:ft,textAlign:Lt,textAppearance:wt}),Pt=kd({fontFamily:vt,fontSettings:Nt,fontSize:Wt,lineHeight:Dt,letterSpacing:Me,wordSpacing:ct,textAlign:dt,textAppearance:kt},Je),$t=Ad(m,Je,t),_t=Ad(m,Pt,t),on=Pd(w,Ed(Je)),fn=Pd(F,Ed(Pt)),bn={..._t.css,whiteSpace:"pre-wrap",transform:Md(fn)},ui=_t.className,dn=Ft=>b.scalingValue(Ft,t),pi=D??Ie,Yn=Math.max(Le,ho),Sn=Math.max(Ne,ho),mi=Math.max(0,1-Bt),eo=Math.max(0,1-Bt),wn=n??!1,Qn=wn&&!U,to=s.useMemo(()=>Dp({textPaddingLeft:rt,textPaddingRight:St,textPaddingTop:nt,textPaddingBottom:Rt,fontSize:Pt.fontSize}),[rt,St,nt,Rt,Pt.fontSize]),no=Ft=>{const Yt=a.jsx("span",{className:ui,style:bn,children:Fd(Ft)});return Wd(m,Yt,_e,wn,dn)},qe=pt==="left"||pt==="right"?{width:`${De}%`}:{height:`${De}%`},A={...B$(to,t),...qe,alignItems:U$[It],justifyContent:X$[At]},se=s.useRef(e),ge=s.useRef(d),Re=s.useRef(null);Zs((nc=e.logo)==null?void 0:nc.icon)&&(Re.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){se.current=e,ge.current=d;return}const Ft=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Ft)&&!Re.current){se.current=e,ge.current=d;return}const Yt=_r=>{y(K$(_r,Re.current))};if(ge.current!==d){se.current=e,ge.current=d;const _r=_d(e);_r!==e&&Yt(_r);return}const cn=_d(e),yn=se.current,$n=yn!==e,Fn=$n?z$(cn,yn):cn;se.current=e;const io=cn!==e,Xo=$n&&O$(cn,Fn);!io&&!Xo||Yt(Fn)},[e,y,t,d]);const je=b.scalingValue(Bt,t),gt={width:je,height:je,minWidth:je,minHeight:je,maxWidth:je,maxHeight:je},Ht={...$t.css,textDecoration:"none",transform:Md(on)},qt=$t.className,sn=(de==null?void 0:de.mode)!=="Off",en=(de==null?void 0:de.icon)??"",gi=Z$(en),An=J$(en,gi),Zn=!!An,kr=dn(Math.min(Gt,Ot)),Go=!!(sn&&en&&Ut==="right")?"left":"right",Zl=Array.isArray(st)?st:[],Xa=[k!=="default"?`${m}-state-${k}`:"",U||I==="open"?`${m}-state-open`:"",pe&&pe!==k&&pe!==I?`${m}-state-${pe}`:""].filter(Boolean).join(" "),Jp=t&&!i?`${m}-editor`:"",Jl=q?`${m}-interactive`:"",em=fe&&(k!==me||ue)?`${m}-nav-state-anim`:"",tm=U?`${m}-open`:"",nm=s.useMemo(()=>rC(h.current),[T,U,d]),Ua=()=>{_(!1)},qa=!t||i,im=Ft=>{if(f){K.current=Ft;return}Ft()};s.useEffect(()=>{if(U)return;const Ft=K.current;K.current=null,Ft==null||Ft()},[U]);const ec=(Ft,Yt)=>{nC(Ft,Ua,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p,runAfterClose:im})},om=()=>{t&&!i||_(Ft=>!Ft)},rm=Ft=>{Ft.pointerType==="touch"&&Ft.currentTarget.blur()},Ar=()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)};s.useEffect(()=>{if(!ue)return;const Ft=window.setTimeout(()=>{te(!1)},rn);return()=>window.clearTimeout(Ft)},[ue,k]),s.useEffect(()=>{if(U){Ar(),L(!0);return}return P.current+=1,R(!1),Ar(),M.current=window.setTimeout(()=>{M.current=null,L(!1)},In),Ar},[U]),s.useLayoutEffect(()=>{X.current!==d&&(X.current=d,P.current+=1,Ar(),_(!1),R(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!T||!U)return;const Ft=P.current+1;P.current=Ft,R(!1),(cn=x.current)==null||cn.offsetHeight;const Yt=requestAnimationFrame(()=>{P.current===Ft&&R(!0)});return()=>{cancelAnimationFrame(Yt)}},[T,U]),s.useLayoutEffect(()=>{if(!f||!T)return;const Ft=v.current;if(!Ft)return;const Yt=getComputedStyle(Ft).backgroundColor;if(!Yt)return;const cn=document.documentElement,{body:yn}=document,$n=cn.style.backgroundColor,Fn=yn.style.backgroundColor;return cn.style.backgroundColor=Yt,yn.style.backgroundColor=Yt,()=>{cn.style.backgroundColor=$n,yn.style.backgroundColor=Fn}},[f,T,Xa,tt,Ke]),s.useEffect(()=>{S==null||S(U)},[U,S]),s.useEffect(()=>{if(!U)return;const Ft=Yt=>{Yt.key==="Escape"&&(t&&i||Ua())};return window.addEventListener("keydown",Ft),()=>window.removeEventListener("keydown",Ft)},[U,t,i]),s.useEffect(()=>{t&&!i&&I!=="open"&&_(!1)},[t,i,I]),s.useEffect(()=>{i&&_(!1)},[i]);const tc=wn&&U,am=Ft=>Zl.filter(Yt=>M$(Yt,d)).map((Yt,cn)=>{const{label:yn,href:$n,target:Fn}=Qs(Yt,u),io=$n?a.jsx("a",{href:$n,target:Fn,rel:Fn==="_blank"?"noopener noreferrer":void 0,className:`${Ft} ${m}-has-href`,onClick:Xo=>ec(Xo,Yt),children:no(yn)}):a.jsx("span",{className:Ft,children:no(yn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":tc?"gap":void 0,"data-controls-axis":"y",className:tc?`${m}-gap-control`:void 0,style:{height:dn(Ie)}}),io]},cn)}),sm=T?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${pt}`,Y?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Jl,Xa].filter(Boolean).join(" "),style:{...Tt,...nm},"aria-hidden":!Y,children:[a.jsx("div",{className:[`${m}-backdrop`,qa?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:qa?Ua:void 0}),a.jsxs("nav",{className:[`${m}-panel`,qa?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:A,"aria-label":"Menu","data-lightbox-scrollable":"",children:[wn&&j$(m,to,Pt.fontSize,dn),am(`${m}-link`)]}),f?a.jsx("div",{ref:v,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,lm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:om,onPointerUp:rm,"aria-expanded":U,"aria-label":U?"Close menu":"Open menu",children:a.jsx(k$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Ft=>{const Yt=Ft==="left",cn=Yt?Le:Ne,yn=Yt?Yn:Sn,$n=Yt?mi:eo,Fn=ut?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":Fn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String($n),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:dn(yn),height:"100%"}}):null})},cm=(Ft,Yt)=>{const{label:cn,href:yn,target:$n}=Qs(Ft,u),Fn=a.jsx("span",{className:qt,style:Ht,children:Fd(cn)}),io=Wd(m,Fn,Oe,Qn,dn),Xo=yn?a.jsx("a",{href:yn,target:$n,rel:$n==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>ec(Nr,Ft),children:io}):a.jsx("span",{className:`${m}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Qn?ut?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),Xo]},Yt)},dm={...Tt,height:b.scalingValue(Ot,t),minHeight:b.scalingValue(Ot,t),[`--${m}-panel-height`]:b.scalingValue(Ot,t)},um=l&&k==="default"&&I!=="open"&&!i?dn(ie+b$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Xa} ${Jp} ${Jl} ${em}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:um,...Tt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),a.jsx("span",{ref:w,"aria-hidden":!0,style:Rd($t.css),children:"H"}),a.jsx("span",{ref:F,"aria-hidden":!0,style:Rd(_t.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:dm,children:[sn&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Ut}`,children:[Ut==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Zn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&An?{[`--${m}-logo-image`]:Y$(An)}:{}},children:[a.jsx("img",{src:Zn&&An?An:en,alt:"",className:`${m}-nav-logo-img`}),Zn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Ut==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${zt}`,style:{transform:I$(zt,Kt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Zl.filter(Ft=>P$(Ft,k,d)).map((Ft,Yt)=>cm(Ft,Yt))})})]})}),sm,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Go}`,children:[Go==="left"?Fr("left"):null,yt?a.jsx("div",{className:`${m}-root ${tm}`.trim(),style:gt,children:lm()}):null,Go==="right"?Fr("right"):null]})]})}const sC=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
25350
25258
|
import { CommonComponentProps } from '../props';
|
|
25351
25259
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
25352
25260
|
import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
|
|
@@ -27987,8 +27895,8 @@ export function Burger({
|
|
|
27987
27895
|
</div>
|
|
27988
27896
|
);
|
|
27989
27897
|
}
|
|
27990
|
-
`;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function ql(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const lC=ql(""),cC=ql("open"),dC=ql("compact"),uC=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],pC=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],mC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},gC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],hC=["iconColor","logoColor","linkColor","backgroundColor"],fC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...gC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...lC,...cC,...dC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:uC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:pC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:mC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...hC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},yC={element:aC,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:fC,sourceCode:sC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Od=120,Dd=3,vC=.12,Kl={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function La(e){return e<0?0:e>1?1:e}function zd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function xC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function bC(e){return e.map(([t,n])=>({x:t,y:n}))}function Es(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function SC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=La(n[o]),l=La(n[o+1]);l>r&&i.push({x0:r,x1:l})}return wC(i)}function wC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function $C(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function CC(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function TC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function IC(e,t,n,i){let o=null;for(let r=0;r<Dd;r+=1){const l=La(t+(n-t)*r/Math.max(1,Dd-1)),c=SC(e,l),d=i==="avoid"?CC(c):c;if(o=o===null?d:$C(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=Kl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?$o(c,n):Es(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const f=[];for(let S=0;S<Od;S+=1){const w=x.getPointAtLength(S/Od*m);f.push({x:w.x,y:w.y})}p.push(f)}return p.length?t==="viewbox"?$o(p,n):Es(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):Es([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Js="0 0 100 100",Ma=100,el=16,LC=12,MC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,PC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,jd=Math.PI/4,EC=8,RC=Math.PI/18,kC=8,fo=24,yo=[];function AC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function ks(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function FC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function NC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Vd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ks(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?ks(d,i):FC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=ks(ki(d),Kl):l=AC()}}return o==="circle"?NC(l,r):l}function Gd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function tl(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?$o($r(ki(t)),Kl):[bC([[0,0],[1,0],[1,1],[0,1]])]}function _C(e){const t=e.match(PC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Ln(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function nl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function gn(e){return{x:e.x,y:e.y}}function HC(e){return{p:gn(e.p),in:e.in?gn(e.in):null,out:e.out?gn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(HC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Xd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function WC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:gn(e),c2:gn(l),p:gn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,f=p*x+y*m,S=-y*x+p*m,w=f*f/(c*c)+S*S/(d*d);if(w>1){const K=Math.sqrt(w);c*=K,d*=K}const N=o===r?-1:1,v=c*c*S*S+d*d*f*f,M=Math.max(0,c*c*d*d-v),E=v===0?0:N*Math.sqrt(M/v),U=E*c*S/d,X=-E*d*f/c,D=p*U-y*X+(e.x+l.x)/2,_=y*U+p*X+(e.y+l.y)/2,W=Math.atan2((S-X)/d,(f-U)/c);let C=Math.atan2((-S-X)/d,(-f-U)/c)-W;!r&&C>0&&(C-=Math.PI*2),r&&C<0&&(C+=Math.PI*2);const q=Math.max(1,Math.ceil(Math.abs(C)/(Math.PI/2))),R=C/q,$=4/3*Math.tan(R/4),I=(K,P)=>({x:D+p*c*K-y*d*P,y:_+y*c*K+p*d*P}),j=[];let F=W;for(let K=0;K<q;K+=1){const P=F+R,h=Math.cos(F),J=Math.sin(F),V=Math.cos(P),he=Math.sin(P);j.push({c1:I(h-$*J,J+$*h),c2:I(V+$*he,he-$*V),p:K===q-1?gn(l):I(V,he)}),F=P}return j}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],f=i[i.length-1];Math.abs(m.p.x-f.p.x)<1e-6&&Math.abs(m.p.y-f.p.y)<1e-6&&(m.in=f.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,f)=>{i.push({p:m,in:Un(f??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const f=i[i.length-1];f.out=Un(m,f.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const m=x[1],f=m.toUpperCase(),S=m!==f,w=_C(x[2]),N=v=>S?{x:r.x+w[v],y:r.y+w[v+1]}:{x:w[v],y:w[v+1]};if(f==="Z")o=!0,u(),r=gn(l),c=null,d=null;else if(f==="M"){for(let v=0;v+1<w.length;v+=2){const M=N(v);v===0&&(u(),l=gn(M)),p(M)}c=null,d=null}else if(f==="L"){for(let v=0;v+1<w.length;v+=2)p(N(v));c=null,d=null}else if(f==="H"){for(const v of w)p({x:S?r.x+v:v,y:r.y});c=null,d=null}else if(f==="V"){for(const v of w)p({x:r.x,y:S?r.y+v:v});c=null,d=null}else if(f==="C"){for(let v=0;v+5<w.length;v+=6){const M=N(v),E=N(v+2),U=N(v+4);y(M),p(U,E),c=E}d=null}else if(f==="S"){for(let v=0;v+3<w.length;v+=4){const M=c?nl(c,r):gn(r),E=N(v),U=N(v+2);y(M),p(U,E),c=E}d=null}else if(f==="Q")for(let v=0;v+3<w.length;v+=4){const M=N(v),E=N(v+2);y(Ln(r,M,2/3)),p(E,Ln(E,M,2/3)),d=M,c=null}else if(f==="T")for(let v=0;v+1<w.length;v+=2){const M=d?nl(d,r):gn(r),E=N(v);y(Ln(r,M,2/3)),p(E,Ln(E,M,2/3)),d=M,c=null}else if(f==="A")for(let v=0;v+6<w.length;v+=7){const M=S?{x:r.x+w[v+5],y:r.y+w[v+6]}:{x:w[v+5],y:w[v+6]};for(const E of WC(r,w[v],w[v+1],w[v+2],w[v+3]!==0,w[v+4]!==0,M))y(E.c1),p(E.p,E.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function jp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Vo(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Ud(e,t){if(Vo(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Ud(r,l)),r=l;if(n.closed){const l=Ud(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Vp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function il(e,t,n){if(Vo(e,t))return Ln(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Vp(n)){if(Vo(o.from,o.to)){i.push(gn(o.from.p));continue}for(let r=0;r<el;r+=1)i.push(il(o.from,o.to,r/el))}n.closed||i.push(gn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function OC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Gp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Xp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=LC)return{closed:!0,nodes:t.map(r=>({p:gn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/MC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:gn(r),...Gp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Up(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function DC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function zC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function qp(e){const t={x:0,y:0,width:Ma,height:Ma},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Xp(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=zC(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function BC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function qd(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function jC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Kp(i,r,c)}),i}function VC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=gn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function GC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function XC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Vo(r,l))return d.splice(u,0,{p:Ln(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=Ln(r.p,p,i),m=Ln(p,y,i),f=Ln(y,l.p,i),S=Ln(x,m,i),w=Ln(m,f,i),N=Ln(S,w,i),v=(n+1)%o.nodes.length;return d[n].out=x,d[v].in=f,d.splice(u,0,{p:N,in:S,out:w}),{contours:c,nodeIndex:u}}function Kp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function Kd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),x=!!Un(l[p].in,l[p].p);if(jp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Gp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function UC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Vp(i)){const l=Vo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=UC(t,il(r.from,r.to,d),il(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function qC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Qd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Zd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function KC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function YC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function ol(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function QC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function rl(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Jd(e,t,n,i,o){if(e.axis===null)return QC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return rl(o(r)[t],t,i)}function ZC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Jd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Jd(n,"y",l,i,o)),r}function JC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return ol(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return ol(i(p),r)}function eT(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:yo};const x=Math.atan2(p,u),m=Math.round(x/jd)*jd;let f=o?m:null,S=!1;if(!o){const X=[];n&&X.push({angle:Math.atan2(n.y,n.x),smooth:!0}),X.push({angle:m,smooth:!1});for(const D of X){const _=YC(D.angle-x);if(!(Math.abs(_)>RC)&&!(Math.abs(Math.sin(_))*y>EC)){f=D.angle,S=D.smooth;break}}}const w=i!==null&&i>0&&Math.abs(y-i)<=kC;if(f===null&&!w)return{point:e,guides:yo};const N=f??x,v=w?i:y,M={x:Math.cos(N),y:Math.sin(N)},E=v+(f===null?0:fo),U=w?v:S?fo:0;return{point:l({x:c.x+M.x*v,y:c.y+M.y*v}),guides:[{kind:"angle",a:{x:c.x-M.x*U,y:c.y-M.y*U},b:{x:c.x+M.x*E,y:c.y+M.y*E}}]}}const al=.1,sl=8,tT=4,eu=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*eu,y:n.y+o*eu}},cl=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<tT?.5:La(r)},nT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=cl(e,n),p=cl(t,n),y=Math.min(sl,Math.max(al,p>0?r*(u/p):r)),x=Ui(t,n,y);return{focalX:vo(t.width,x.width,c-t.x,{clamp:!1}),focalY:vo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},iT=6,oT=3,rT=2,As="",aT=new RegExp("\\p{L}","gu"),tu=20,sT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},dl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},lT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let nu=null;const cT=()=>(nu??(nu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),nu),iu=new Map,dT=e=>{let t=iu.get(e);return t||(t=dl[e]().then(n=>lT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),iu.set(e,t)),t},ou=e=>{if(!e)return null;const t=e.toLowerCase();if(dl[t])return t;const n=t.split("-")[0];return dl[n]?n:null},uT=(e,t)=>{const n=t.trim();if(n.length<tu)return;const i=e(n,{minLength:tu});if(i!=="und")return sT[i]??i},pT={hyphenateSync:null};function mT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return cT().then(async r=>{const l=r?uT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=ou(l)??ou(c)??"en",u=await dT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:pT}const ru=e=>{var t;return((t=e.match(aT))==null?void 0:t.length)??0};function gT(e,t){if(e.length<2||e.includes(As))return;const n=new Set;if(t){const o=t(e,{hyphenChar:As,minWordLength:iT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===As?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ru(e.slice(0,o))>=(r?1:oT)&&ru(e.slice(o))>=(r?1:rT)}).sort((o,r)=>o-r);return i.length?i:void 0}const au=1.08,na=14,ia=8;function hT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const m=s.useRef(null),f=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,S=s.useRef(null),w=s.useRef(null),N=s.useRef({focalX:d,focalY:u,scale:p});N.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var R;v&&((R=m.current)==null||R.focus({preventScroll:!0}))},[v]);const M=s.useCallback((R,$)=>{var j;const I=(j=m.current)==null?void 0:j.getBoundingClientRect();return!I||I.width<=0||I.height<=0?{x:0,y:0}:{x:(R-I.left)/I.width*t.width,y:($-I.top)/I.height*t.height}},[t.width,t.height]),E=R=>{var I,j;if(!i)return;R.stopPropagation(),R.preventDefault(),(I=m.current)==null||I.focus({preventScroll:!0});const $=Ui(n,i,p);S.current={pointerId:R.pointerId,origin:M(R.clientX,R.clientY),startX:jn(n.width,$.width,d),startY:jn(n.height,$.height,u),width:$.width,height:$.height,moved:!1},(j=m.current)==null||j.setPointerCapture(R.pointerId)},U=(R,$)=>{var V,he;if(!i)return;R.stopPropagation(),R.preventDefault(),(V=m.current)==null||V.focus({preventScroll:!0});const I=Ui(n,i,p),j=jn(n.width,I.width,d),F=jn(n.height,I.height,u),K={minX:j,minY:F,maxX:j+I.width,maxY:F+I.height},P=Pa(K,Yp($)),h=Pa(K,$),J=Math.hypot(h.x-P.x,h.y-P.y);!isFinite(J)||J<=0||(w.current={pointerId:R.pointerId,anchor:P,startDistance:J,startScale:p,startX:j,startY:F,moved:!1},(he=m.current)==null||he.setPointerCapture(R.pointerId))},X=R=>{if(!i)return;const $=w.current;if($&&R.pointerId===$.pointerId){R.stopPropagation(),R.preventDefault();const j=M(R.clientX,R.clientY),F={x:j.x-n.x,y:j.y-n.y},K=Math.hypot(F.x-$.anchor.x,F.y-$.anchor.y),P=Math.min(sl,Math.max(al,$.startScale*(K/$.startDistance)));if(!$.moved&&Math.abs(P-$.startScale)<1e-4)return;$.moved=!0;const h=P/$.startScale,J=$.anchor.x+($.startX-$.anchor.x)*h,V=$.anchor.y+($.startY-$.anchor.y)*h,he=Ui(n,i,P);y({focalX:vo(n.width,he.width,J),focalY:vo(n.height,he.height,V),scale:P});return}const I=S.current;if(I&&R.pointerId===I.pointerId){R.stopPropagation(),R.preventDefault();const j=M(R.clientX,R.clientY),F=j.x-I.origin.x,K=j.y-I.origin.y;if(!I.moved&&F===0&&K===0)return;I.moved=!0,y({focalX:vo(n.width,I.width,I.startX+F),focalY:vo(n.height,I.height,I.startY+K),scale:p})}},D=R=>{var j,F;const $=S.current;if($&&R.pointerId===$.pointerId){S.current=null,R.stopPropagation(),(j=m.current)!=null&&j.hasPointerCapture($.pointerId)&&m.current.releasePointerCapture($.pointerId),$.moved&&x(N.current);return}const I=w.current;I&&R.pointerId===I.pointerId&&(w.current=null,R.stopPropagation(),(F=m.current)!=null&&F.hasPointerCapture(I.pointerId)&&m.current.releasePointerCapture(I.pointerId),I.moved&&x(N.current))},_=R=>{if(R.key==="Escape"){R.stopPropagation(),c("none");return}if(R.key==="="||R.key==="+"||R.key==="-"||R.key==="_"){R.preventDefault(),R.stopPropagation();const $=R.key==="="||R.key==="+",I=Math.min(sl,Math.max(al,p*($?au:1/au))),j={focalX:d,focalY:u,scale:I};y(j),x(j)}},W=["nw","ne","se","sw"],T={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},C=s.useMemo(()=>{const R=i??{width:n.width,height:n.height},$=Ui(n,R,p);return!($.width>0)||!($.height>0)?null:{x:n.x+jn(n.width,$.width,d),y:n.y+jn(n.height,$.height,u),width:$.width,height:$.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),q=C?{minX:C.x,minY:C.y,maxX:C.x+C.width,maxY:C.y+C.height}:T;return a.jsxs("svg",{ref:m,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:X,onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&C&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:C.x,y:C.y,width:C.width,height:C.height,children:[a.jsx("rect",{x:C.x,y:C.y,width:C.width,height:C.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:C.x,y:C.y,width:C.width,height:C.height,preserveAspectRatio:"none",mask:`url(#${f})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:C.x,y:C.y,width:C.width,height:C.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:E}),W.map(R=>{const $=ll(q,R),I=R==="ne"||R==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:$.x-ia/2,y:$.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${I?` ${e}-editor-scale-grab-nesw`:""}`,x:$.x-na/2,y:$.y-na/2,width:na,height:na,onPointerDown:j=>U(j,R)})]},R)})]})]})}const ul=10,fT=ul*2,zn=7,yT=4,lo=9,vT=3.5,su=1.08,xT=.05,oa=14,bT=1,ra=14,aa=8;function ST({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),m=s.useRef(null),f=s.useRef(i);f.current=i;const S=s.useRef(null),w=s.useRef(null),N=s.useRef(null),v=s.useRef(null),[M,E]=s.useState([]),[U,X]=s.useState(yo),[D,_]=s.useState(null),W=s.useCallback(g=>{X(Y=>KC(Y,g)?Y:g)},[]),T=c==="shape";s.useEffect(()=>{var g;T&&((g=x.current)==null||g.focus({preventScroll:!0}))},[T]),s.useEffect(()=>{T||E(g=>g.length?[]:g)},[T]);const C=M.length>0;s.useEffect(()=>{u==null||u(C)},[C,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const q=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,$=Math.min(q,R),I=r&&l?$:q,j=r&&l?$:R,F=r&&l?(t.width-n.width*$)/2:0,K=r&&l?(t.height-n.height*$)/2:0,P=s.useCallback(g=>r?{x:F+(g.x-n.x)*I,y:K+(g.y-n.y)*j}:{x:g.x-n.x,y:g.y-n.y},[r,n,I,j,F,K]),h=s.useCallback(g=>r?{x:n.x+(I>0?(g.x-F)/I:0),y:n.y+(j>0?(g.y-K)/j:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,I,j,F,K]),J=s.useMemo(()=>h({x:t.width/2,y:t.height/2}),[h,t.width,t.height]),V=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();if(!ee||ee.width<=0||ee.height<=0)return{x:0,y:0};if(r){const ye=(g-ee.left)/ee.width*t.width,ne=(Y-ee.top)/ee.height*t.height;return{x:n.x+(I>0?(ye-F)/I:0),y:n.y+(j>0?(ne-K)/j:0)}}return{x:n.x+(g-ee.left),y:n.y+(Y-ee.top)}},[r,n,t.width,t.height,I,j,F,K]),he=s.useCallback((g,Y)=>{var ae;const ee=(ae=x.current)==null?void 0:ae.getBoundingClientRect();return!ee||ee.width<=0||ee.height<=0?{x:0,y:0}:{x:(g-ee.left)/ee.width*t.width,y:(Y-ee.top)/ee.height*t.height}},[t.width,t.height]),k=s.useCallback((g,Y)=>{const ee=l&&!(Y!=null&&Y.preserveShape)?DC(g,n,t,F,K,I,j):g;y(ee,Y)},[y,l,n,t,F,K,I,j]),ce=s.useCallback(()=>{_(null)},[]),L=s.useCallback((g,Y,ee)=>{if(!ee||S.current||w.current||N.current||v.current){ce();return}const ae=he(g,Y),ye=un(f.current,P);for(const H of ye)for(const be of H.nodes)if(Math.hypot(be.p.x-ae.x,be.p.y-ae.y)<=lo){ce();return}const ne=Yd(ye,ae);if(!ne||ne.distance>ul){ce();return}const B=ye[ne.contour],G=B==null?void 0:B.nodes[ne.segment],z=B==null?void 0:B.nodes[(ne.segment+1)%((B==null?void 0:B.nodes.length)??1)],ie=!!(G&&z&&!Vo(G,z));_(H=>H&&H.curved===ie&&Math.hypot(H.point.x-ne.point.x,H.point.y-ne.point.y)<.25?H:{point:ne.point,curved:ie})},[he,P,ce]),me=g=>{var Ae;const Y=g.metaKey||g.ctrlKey,ee=N.current;if(ee&&g.pointerId===ee.pointerId){if(g.stopPropagation(),g.preventDefault(),ee.startDistance<=0)return;const He=V(g.clientX,g.clientY),Xe=Math.hypot(He.x-ee.origin.x,He.y-ee.origin.y),Ue=Math.max(xT,Xe/ee.startDistance);if(!ee.moved&&Math.abs(Ue-1)<1e-4)return;ee.moved=!0,p(Xd(ee.startContours,ee.origin,Ue));return}const ae=w.current;if(ae&&g.pointerId===ae.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY),{bbox:Xe}=ae,Ue=Xe.maxX-Xe.minX,Je=Xe.maxY-Xe.minY,je=He.x-ae.origin.x,xe=He.y-ae.origin.y;let Ie=je,ze=xe;if(isFinite(Ue)&&isFinite(Je))if(r){let tt=n.x,ot=n.x+n.width,lt=n.y,it=n.y+n.height;l&&(I>0&&(tt=n.x+(0-F)/I,ot=n.x+(t.width-F)/I),j>0&&(lt=n.y+(0-K)/j,it=n.y+(t.height-K)/j));const xt=Math.min(tt,ot-Ue),rt=Math.max(tt,ot-Ue),_e=Math.min(lt,it-Je),We=Math.max(lt,it-Je),vt=Math.min(rt,Math.max(xt,Xe.minX+je)),Ve=Math.min(We,Math.max(_e,Xe.minY+xe));Ie=vt-Xe.minX,ze=Ve-Xe.minY}else{const tt=Xe.minX-n.x,ot=Xe.minY-n.y,lt=Math.min(0,t.width-Ue),it=Math.max(0,t.width-Ue),xt=Math.min(0,t.height-Je),rt=Math.max(0,t.height-Je),_e=Math.min(it,Math.max(lt,tt+je)),We=Math.min(rt,Math.max(xt,ot+xe));Ie=_e-tt,ze=We-ot}const Ze=[];if(!Y&&isFinite(Ue)&&isFinite(Je)){const tt=P({x:Xe.minX+Ue/2+Ie,y:Xe.minY+Je/2+ze}),ot={x:t.width/2,y:t.height/2};Math.abs(tt.x-ot.x)<=oa&&(Ie=J.x-Xe.minX-Ue/2,Ze.push(rl(ot.x,"x",t))),Math.abs(tt.y-ot.y)<=oa&&(ze=J.y-Xe.minY-Je/2,Ze.push(rl(ot.y,"y",t)))}if(!ae.moved&&Ie===0&&ze===0)return;ae.moved=!0,W(Ze.length?Ze:yo),p(un(ae.startContours,tt=>({x:tt.x+Ie,y:tt.y+ze})),{carryImage:!0});return}const ye=v.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const He=V(g.clientX,g.clientY);let Xe=He.x-ye.origin.x,Ue=He.y-ye.origin.y;if(g.shiftKey&&(Math.abs(Xe)>Math.abs(Ue)?Ue=0:Xe=0),!ye.moved&&Xe===0&&Ue===0)return;ye.moved=!0,p(qd(ye.startContours,ye.selection,Xe,Ue));return}const ne=S.current;if(!ne||g.pointerId!==ne.pointerId){L(g.clientX,g.clientY,M.length>0||T);return}ce(),g.stopPropagation(),g.preventDefault();const B=V(g.clientX,g.clientY);if(ne.kind==="anchor"){const He={x:ne.anchor.x+(B.x-ne.origin.x),y:ne.anchor.y+(B.y-ne.origin.y)},Xe=Y?[]:qC(f.current,{contour:ne.contour,node:ne.node}),Ue=Y||!ne.center?[]:[ne.center],Je=Zd(Qd(Xe,Ue.map(Ie=>Ie.x),"x"),He,"x",P,oa),je=Zd(Qd(Xe,Ue.map(Ie=>Ie.y),"y"),He,"y",P,oa),xe=Y?He:{x:(Je==null?void 0:Je.value)??ta(He.x,o),y:(je==null?void 0:je.value)??ta(He.y,o)};if(g.shiftKey&&(Math.abs(xe.x-ne.anchor.x)>Math.abs(xe.y-ne.anchor.y)?xe.y=ne.anchor.y:xe.x=ne.anchor.x),!ne.moved&&xe.x===ne.anchor.x&&xe.y===ne.anchor.y)return;ne.moved=!0,W(ZC(xe,Je,je,t,P)),p(BC(f.current,ne.contour,ne.node,xe));return}const G=(Ae=f.current[ne.contour])==null?void 0:Ae.nodes[ne.node],z=ne.mirror&&!g.altKey,ie=z||Y?null:ne.kind==="in"?G==null?void 0:G.out:G==null?void 0:G.in,H=G?P(G.p):null,be=ie?P(ie):null,re=G&&(!Y||g.shiftKey)?eT(B,G.p,z||Y?null:JC(f.current[ne.contour],ne.node,ne.kind,P),H&&be?Math.hypot(be.x-H.x,be.y-H.y):null,g.shiftKey,P,h):{point:B,guides:yo},Q=re.guides.length?re.point:Y?B:{x:ta(B.x,o),y:ta(B.y,o)},Pe=ne.kind==="in"?G==null?void 0:G.in:G==null?void 0:G.out;!ne.moved&&Pe&&Q.x===Pe.x&&Q.y===Pe.y||(ne.moved=!0,W(re.guides),p(VC(f.current,ne.contour,ne.node,ne.kind,Q,z)))},te=g=>{W(yo);const Y=N.current;if(Y&&g.pointerId===Y.pointerId){N.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(Y.pointerId)&&ie.releasePointerCapture(Y.pointerId),Y.moved&&k(f.current,{preserveShape:!0});return}const ee=w.current;if(ee&&g.pointerId===ee.pointerId){w.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ee.pointerId)&&ie.releasePointerCapture(ee.pointerId),ee.moved?k(f.current,{preserveShape:!0}):E([]);return}const ae=v.current;if(ae&&g.pointerId===ae.pointerId){v.current=null,g.stopPropagation();const ie=x.current;ie!=null&&ie.hasPointerCapture(ae.pointerId)&&ie.releasePointerCapture(ae.pointerId),ae.moved&&k(f.current);return}const ye=S.current;if(!ye||g.pointerId!==ye.pointerId)return;S.current=null,g.stopPropagation();const ne=x.current;ne!=null&&ne.hasPointerCapture(ye.pointerId)&&ne.releasePointerCapture(ye.pointerId);const B=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||B>yT){ye.moved&&k(f.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const z=Kd(f.current,ye.contour,ye.node);z!==f.current&&(p(z),k(z))},ve=g=>{g.stopPropagation()},Le=g=>{var Y,ee;g.stopPropagation(),g.preventDefault(),ce(),(Y=x.current)==null||Y.focus({preventScroll:!0}),w.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(ee=x.current)==null||ee.setPointerCapture(g.pointerId)},de=(g,Y)=>{var B,G;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0}),E([]),d("shape");const ee=Li(i),ae=Pa(ee,Yp(Y)),ye=ll(ee,Y),ne=Math.hypot(ye.x-ae.x,ye.y-ae.y);!isFinite(ne)||ne<=0||(N.current={pointerId:g.pointerId,corner:Y,origin:ae,startDistance:ne,startContours:Vn(i),moved:!1},(G=x.current)==null||G.setPointerCapture(g.pointerId))},ue=(g,Y,ee,ae)=>{var B,G,z,ie;g.stopPropagation(),g.preventDefault(),ce(),(B=x.current)==null||B.focus({preventScroll:!0});const ye=(G=i[ee])==null?void 0:G.nodes[ae];if(!ye)return;if(g.altKey){const H=Y==="anchor"?Kp(i,ee,ae):GC(i,ee,ae,Y);if(H===i)return;E(Y==="anchor"?[]:[{contour:ee,node:ae}]),p(H),k(H);return}const ne=g.metaKey||g.ctrlKey;if(Y==="anchor"&&g.shiftKey&&!ne){E(H=>H.some(be=>be.contour===ee&&be.node===ae)?H.filter(be=>!(be.contour===ee&&be.node===ae)):[...H,{contour:ee,node:ae}]);return}if(Y==="anchor"&&!ne&&M.length>1&&M.some(H=>H.contour===ee&&H.node===ae)){v.current={pointerId:g.pointerId,origin:V(g.clientX,g.clientY),startContours:Vn(i),selection:M,moved:!1},(z=x.current)==null||z.setPointerCapture(g.pointerId);return}E([{contour:ee,node:ae}]),S.current={kind:Y,contour:ee,node:ae,pointerId:g.pointerId,origin:V(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:OC(i),mirror:Y!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:ne,moved:!1},(ie=x.current)==null||ie.setPointerCapture(g.pointerId)},Z=g=>{g.stopPropagation(),g.preventDefault(),ce();const Y=un(i,P),ee=Yd(Y,he(g.clientX,g.clientY));if(!ee||ee.distance>ul)return;const{contours:ae,nodeIndex:ye}=XC(i,ee.contour,ee.segment,ee.t);ye<0||(E([{contour:ee.contour,node:ye}]),p(ae),k(ae))},le=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const ne=Li(i);if(!isFinite(ne.minX)||!isFinite(ne.maxX))return;const B={x:(ne.minX+ne.maxX)/2,y:(ne.minY+ne.maxY)/2},z=g.key==="="||g.key==="+"?su:1/su,ie=Xd(i,B,z);p(ie),k(ie,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),E([]),d("none");return}if(!M.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const ne=jC(i,M);if(ne===i)return;E([]),p(ne),k(ne);return}const Y=o>0?o:bT,ee=g.shiftKey?Y*10:Y,ae={ArrowLeft:[-ee,0],ArrowRight:[ee,0],ArrowUp:[0,-ee],ArrowDown:[0,ee]}[g.key];if(!ae)return;g.preventDefault(),g.stopPropagation();const ye=qd(i,M,ae[0],ae[1]);p(ye),k(ye)},oe=s.useMemo(()=>Ho(un(i,P)),[i,P]),ge=s.useMemo(()=>Li(i),[i]),Se=P({x:ge.minX,y:ge.minY}),Re={width:P({x:ge.maxX,y:ge.minY}).x-Se.x,height:P({x:ge.minX,y:ge.maxY}).y-Se.y},Ne=T&&M.length===0&&isFinite(ge.minX)&&isFinite(ge.maxX)&&ge.maxX>ge.minX&&ge.maxY>ge.minY,Te=M.length>0||T,Ce=Te;return a.jsxs("svg",{ref:x,className:`${e}-editor${Te?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:le,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:me,onPointerLeave:ce,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:te,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{E([]),d("none")},onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),Ce&&U.map((g,Y)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${Y}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:Le,onClick:Z}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,style:{strokeWidth:fT},onClick:Z}),Ce&&D&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:D.point.x-zn/2,y:D.point.y-zn/2,width:zn,height:zn,rx:D.curved?zn/2:0}),Ce&&i.map((g,Y)=>g.nodes.map((ee,ae)=>{const ye=M.some(B=>B.contour===Y&&B.node===ae),ne=P(ee.p);return a.jsxs("g",{children:[ye&&M.length===1&&["in","out"].map(B=>{const G=ee[B];if(!G)return null;const z=P(G);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:ne.x,y1:ne.y,x2:z.x,y2:z.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:z.x,cy:z.y,r:vT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:z.x,cy:z.y,r:lo,onPointerDown:ie=>ue(ie,B,Y,ae),onClick:ve})]},B)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:ne.x-zn/2,y:ne.y-zn/2,width:zn,height:zn,rx:jp(ee)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:ne.x-lo,y:ne.y-lo,width:lo*2,height:lo*2,onPointerDown:B=>ue(B,"anchor",Y,ae),onClick:ve,onDoubleClick:B=>{B.stopPropagation(),B.preventDefault();const G=Kd(i,Y,ae);p(G),k(G)}})]},`${Y}-${ae}`)})),Ne&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:Se.x,y:Se.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(g=>{const Y=P(ll(ge,g)),ee=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Y.x-aa/2,y:Y.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${ee?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ae=>de(ae,g),onClick:ve})]},g)})]})]})}const wT=4e3,$T=/^(?:https?:|mailto:|tel:)/i;function Qp(e){return!!e&&typeof e=="object"&&e.type==="link"}function CT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!$T.test(t)))return t}function TT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Qp(d)){o(d.children??[],CT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function lu(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function IT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Qp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function LT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const f=m.x*n,S=m.y*i;f<c&&(c=f),f>d&&(d=f),S<u&&(u=S),S>p&&(p=S)}const y=(c+d)/2,x=(u+p)/2;return l.map(m=>{const f=m.x*n,S=m.y*i,w=f-y,N=S-x,v=Math.sqrt(w*w+N*N);if(v<1e-6)return m;const E=Math.max(0,v+r*t)/v;return{x:(y+w*E)/n,y:(x+N*E)/i}})})}const MT=.75;function cu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,m=x+(y?r:0);if(!(m*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-x)}}return null}function du(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,m=e.charWidths??[],f=e.hyphenPoints??[],S=e.hyphenWidth??0,w=e.lineHeight*l,N=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),M=[],E=t.map((P,h)=>({token:P,originalIndex:h,width:n[h],kind:"whole",offset:0}));if(!E.length||c<=0||w<=0)return{segments:M,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const U=Math.max(1,N*.5),X=w*vC,D=LT(i,v,c,d,o),_=Math.max(1,Math.floor(e.columns??1)),W=_>1?Math.max(0,e.columnGap??0):0,T=(c-W*(_-1))/_;let C=0,q=0,R=0,$=0,I=0,j=null;const F=(P,h,J)=>IC(D,(P+X)/d,(P+w-X)/d,o).map(V=>({x0:Math.max(h,V.x0*c),x1:Math.min(J,V.x1*c)})).filter(V=>V.x1>V.x0);for(let P=0;P<_&&C<E.length&&T>0;P+=1){const h=P*(T+W),J=h+T,V=u&&P===_-1;let he=0;for(let L=0;L+w<=d;L+=w)for(const me of F(L,h,J))he=Math.max(he,me.x1-me.x0);let k=E[C].token.para,ce=0;for(;C<E.length&&R<wT;){const L=ce+w>d;if(L&&!V)break;const me=E[C].token.para;if(me>k+1){ce+=w*(me-k-1),k=me-1,R+=1;continue}let te=L?[{x0:h,x1:J}]:F(ce,h,J);p>0&&y>0&&P===0&&!L&&te.length&&(j===null&&(j=R,$=te[0].x0,I=ce),R-j<y&&(te=TC(te,{x0:$,x1:$+p})));const ve=te.reduce((Le,de)=>Math.max(Le,de.x1-de.x0),0);for(const Le of te){const de=Le.x1-Le.x0;if(de<U)continue;if(C>=E.length||E[C].token.para!==me)break;const ue=C;let Z=0;for(;C<E.length&&E[C].token.para===me;){const le=E[C],oe=C===ue,ge=le.width*l,Se=oe?ge:N+ge;if(Z+Se<=de){Z+=Se,C+=1;continue}const Re=de-Z-(oe?0:N),Ne=oe&&ge>T-.5,Te=de>=ve-.5&&de>=he*MT,Ce=m[le.originalIndex],g=f[le.originalIndex],Y=(x&&g?cu(le,Ce,g,Re,l,S):null)??(Ne&&Te?cu(le,Ce,void 0,Re,l,S):null);if(Y){const ee={token:{...le.token,text:Y.fragmentText},originalIndex:le.originalIndex,width:Y.fragmentWidth,kind:"fragment",offset:le.offset},ae={token:{...le.token,text:Y.remainderText},originalIndex:le.originalIndex,width:Y.remainderWidth,kind:"remainder",offset:le.offset+Y.chars};E.splice(C,1,ee,ae),Z+=(oe?0:N)+Y.fragmentWidth*l,C+=1;break}if(Ne&&_===1&&de>=he-.5){Z+=Se,C+=1;continue}break}if(C>ue){const le=C>=E.length||E[C].token.para!==me;M.push({top:ce,left:Le.x0,width:de,from:ue,to:C,justify:r==="justify"&&!le})}if(C>=E.length||E[C].token.para!==me)break}k=me,ce+=w,R+=1}q=Math.max(q,ce)}let K=0;if(C>0){const P=E[C-1];K=P.kind==="fragment"?P.originalIndex:P.originalIndex+1}return{segments:M,placed:K,height:M.length?q:0,capLeft:$,capTop:I,renderTokens:E.map(P=>P.token)}}const PT=.12,ET=2,RT=10,Fs=.25,kT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},AT=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,FT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=kT(e);(!r||!AT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ns=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function NT(){return typeof document>"u"?null:document.body}function _T({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,columns:m,gutter:f,hyphenate:S,showOverflowIndicator:w,dropCapLines:N,dropCapSize:v,showGuides:M,typography:E,imageUrl:U,imageFocalX:X,imageFocalY:D,imageScale:_,imageCustomPath:W,imagePathEdited:T,pathDragActive:C,pathCarryImage:q,onCarryImageConsumed:R,pathEditor:$,imageEditor:I}){var Nt,jt;const j=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[F,K]=s.useState(null),P=s.useRef(null),[h,J]=s.useState({width:0,height:0}),[V,he]=s.useState(0),[k,ce]=s.useState(0),[L,me]=s.useState(null),[te,ve]=s.useState(0),[Le,de]=s.useState("none");s.useEffect(()=>{!$&&!I&&de("none")},[$,I]);const[ue,Z]=s.useState(null);s.useEffect(()=>{if(!U||typeof Image>"u"){Z(null);return}let $e=!1;const Ge=new Image;return Ge.onload=()=>{$e||Z({width:Ge.naturalWidth,height:Ge.naturalHeight})},Ge.src=U,()=>{$e=!0}},[U]);const le=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),oe=s.useMemo(()=>TT(le),[le]),ge=s.useMemo(()=>IT(le),[le]),Se=s.useMemo(()=>ge.join(`
|
|
27991
|
-
`),[ge]),{lang:Re,hyphenateSync:Ne}=mT(S,Se),Te=s.useMemo(()=>S?oe.map($e=>gT($e.text,Ne)):[],[S,oe,Ne]),Ce=N>0&&v>1?((jt=(Nt=oe[0])==null?void 0:Nt.text)==null?void 0:jt.charAt(0))??"":"",g=($==null?void 0:$.contours)??null,Y=s.useMemo(()=>{let $e=[];if(g){const Ge=$r(g);Ge.length&&($e=$o(Ge,r))}if(!$e.length){const Ge=i.trim(),ht=Ge?Bd(Ge,o,r):null;ht&&ht.length?$e=ht:$e=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns($e,h):$e},[g,n,i,o,r,h.width,h.height]),ee=$==null?void 0:$.onConvert,ae=($==null?void 0:$.needsConversion)??!1,ye=s.useMemo(()=>{if(n==="circle")return!1;const $e=g??(i.trim()?ki(i):null);return!!($e&&Up($e,r))},[g,i,r,n]),[ne,B]=s.useState(null);nr(()=>{if(!ye){ne&&B(null);return}!ne&&h.width>0&&h.height>0&&B({width:h.width,height:h.height})},[ye,h.width,h.height,ne]);const G=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return Y;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return Y.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[Y,ye,ne,r.width,r.height,h.width,h.height]),z=s.useMemo(()=>{if(g){const Lt=$r(g);if(Lt.length){const $t=$o(Lt,r);return n==="circle"?Ns($t,h):$t}}const $e=W.trim(),Ge=$e?Bd($e,o,r):null,ht=Ge&&Ge.length?Ge:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(ht,h):ht},[g,n,W,o,r,h.width,h.height]),ie=s.useMemo(()=>{if(!ye||h.width<=0||h.height<=0)return z;const $e=ne??h,Ge=r.width/$e.width,ht=r.height/$e.height;return z.map(Lt=>Lt.map($t=>({x:$t.x*Ge,y:$t.y*ht})))},[z,ye,ne,r.width,r.height,h.width,h.height]),H=s.useRef(null),be=s.useRef(!1);s.useEffect(()=>{if(!(!ee||h.width<=0||h.height<=0)){if(ye){if(H.current===i)return;const $e=g??(i.trim()?ki(i):null);if(!($e!=null&&$e.length))return;const Ge=un($e,ht=>({x:r.x+(ht.x-r.x)/h.width*r.width,y:r.y+(ht.y-r.y)/h.height*r.height}));H.current=Ho(Ge),ee(Ge);return}!ae||!Y.length||be.current||(be.current=!0,ee(un(Xp(Y),$e=>({x:$e.x*Ma,y:$e.y*Ma}))))}},[ae,ye,ee,Y,g,i,r,h.width,h.height]);const re=s.useCallback(()=>{const $e=F;if(!$e)return;const Ge=$e.getBoundingClientRect(),ht=window.getComputedStyle($e),Lt=parseFloat(ht.paddingTop)||0;he(_t=>Math.abs(_t-Lt)<.5?_t:Lt);const $t=parseFloat(ht.columnGap)||0;ce(_t=>Math.abs(_t-$t)<.5?_t:$t);const mt={width:Ge.width,height:Ge.height};J(_t=>Math.abs(_t.width-mt.width)<.5&&Math.abs(_t.height-mt.height)<.5?_t:mt)},[F]);nr(()=>{const $e=F;if(!$e||typeof ResizeObserver>"u")return;re();const Ge=new ResizeObserver(re);return Ge.observe($e),()=>Ge.disconnect()},[F,re]),nr(()=>{re()},[x,f,re]),s.useEffect(()=>{const $e=typeof document<"u"?document.fonts:void 0;$e!=null&&$e.ready&&$e.ready.then(()=>{ve(Ge=>Ge+1)})},[]),nr(()=>{const $e=P.current;if(!$e)return;if(!oe.length){me(null);return}const Ge=[],ht=document.createDocumentFragment();for(const Ct of oe){const Ht=document.createElement("span");Object.assign(Ht.style,lu(Ct.leaf)),Ht.textContent=Ct.text,ht.appendChild(Ht),Ge.push(Ht)}const Lt=document.createElement("span");Lt.textContent=" ",ht.appendChild(Lt);const $t=document.createElement("span");$t.textContent="-",ht.appendChild($t);const mt=Ce||"H",_t=document.createElement("span");_t.textContent=mt,_t.style.lineHeight="1",ht.appendChild(_t),$e.replaceChildren(ht);const Ot=window.getComputedStyle($e),zt=parseFloat(Ot.fontSize)||16,Ee=parseFloat(Ot.lineHeight),dt=Number.isNaN(Ee)?zt*1.2:Ee,ut=Math.max(dt,zt),kt=document.createElement("span");kt.textContent=mt,kt.style.lineHeight=`${ut}px`;const Qe=document.createElement("span");Qe.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",kt.appendChild(Qe),$e.appendChild(kt);const at=kt.getBoundingClientRect().top,It=Qe.getBoundingClientRect().top,At=Math.max(1,It-at);kt.remove();let pt=At*.8;const qt=document.createElement("canvas").getContext("2d"),Dt=Ct=>`${Ot.fontStyle} ${Ot.fontWeight} ${Ct}px ${Ot.fontFamily}`;if(qt){qt.font=Dt(zt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(pt=Ct)}const Vt=v>1?(v-1)*ut+pt:pt;let Gt=zt*(Vt/pt);if(qt){qt.font=Dt(Gt);const Ct=qt.measureText(mt).actualBoundingBoxAscent;Ct>0&&(Gt=Gt*(Vt/Ct))}_t.style.fontSize=`${Gt}px`,_t.style.lineHeight=`${Gt}px`;const Bt=document.createElement("span");Bt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",_t.appendChild(Bt);const Yt=Math.max(1,Bt.getBoundingClientRect().top-_t.getBoundingClientRect().top);Bt.remove();const Me=(v-1)*ut+At-Yt,Fe=Ge.map(Ct=>Ct.getBoundingClientRect().width),Oe=Lt.getBoundingClientRect().width,ft=$t.getBoundingClientRect().width,Tt=Ce?_t.getBoundingClientRect().width:0,et=(h.width-k*(m-1))/m,Mt=Ge.map((Ct,Ht)=>{var pi;const on=Ct.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Fe[Ht]>et-.5)&&!((pi=Te[Ht])!=null&&pi.length))return;const bn=document.createRange(),ui=Ct.getBoundingClientRect().left,dn=[];for(let Yn=1;Yn<=on.data.length;Yn+=1)bn.setStart(on,0),bn.setEnd(on,Yn),dn.push(bn.getBoundingClientRect().right-ui);return dn});$e.replaceChildren(),me({widths:Fe,spaceWidth:Oe,dashWidth:ft,charWidths:Mt,lineHeight:ut,capWidth:Tt,dropCapFontSize:Gt,dropCapTopAdjust:Me})},[oe,E,Ce,N,v,te,h.width,S,Te,m,k]);const Q=L&&Ce?L.capWidth+L.lineHeight*PT:0,Pe=Math.max(N,Math.ceil(v)),Ae=s.useMemo(()=>{if(!L||!oe.length||h.width<=0||h.height<=0||!u)return 1;const $e=Lt=>du({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:Lt,allowOverflow:!1,capInset:Q*Lt,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k});if($e(1).placed>=oe.length)return 1;if($e(Fs).placed<oe.length)return Fs;let Ge=Fs,ht=1;for(let Lt=0;Lt<RT;Lt+=1){const $t=(Ge+ht)/2;$e($t).placed>=oe.length?Ge=$t:ht=$t}return Ge},[L,oe,h.width,h.height,G,l,c,u,Q,Ce,Pe,S,Te,V,m,k]);s.useEffect(()=>{y(Ae)},[Ae,y]);const He=u?Math.min(p,Ae):1,Xe=s.useMemo(()=>!L||!oe.length||h.width<=0||h.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:oe}:du({tokens:oe,widths:L.widths,spaceWidth:L.spaceWidth,lineHeight:L.lineHeight,width:h.width,height:h.height,rings:G,mode:l,align:c,scale:He,allowOverflow:d,capInset:Q*He,capLines:Ce?Pe:0,hyphenate:S,charWidths:L.charWidths,hyphenPoints:Te,hyphenWidth:L.dashWidth,shapeMargin:V,columns:m,columnGap:k}),[L,oe,h.width,h.height,G,l,c,He,d,Q,Ce,Pe,S,Te,V,m,k]),Ue=w&&oe.length>0&&Xe.placed<oe.length,Je=L?L.dropCapFontSize*He:0,je=L?L.dropCapTopAdjust*He:0,xe=c==="justify"?"left":c,Ie=L?L.lineHeight*He:0,ze=Xe.segments.length?Xe.segments[Xe.segments.length-1]:null,Ze=ze?{top:ze.top+Ie,left:ze.left+ze.width/2}:{top:h.height,left:h.width/2},tt=!!($&&g&&h.width>0&&h.height>0),ot=!!I,lt=(tt||ot)&&h.width>0&&h.height>0,it=FT(F,lt),xt=lt&&it?NT():null,rt=s.useRef(!1),_e=s.useCallback($e=>{rt.current=$e},[]);s.useEffect(()=>{if(!tt&&!ot)return;const $e=Ge=>{const ht=F;if(!ht)return;const Lt=ht.getBoundingClientRect();Ge.clientX>=Lt.left&&Ge.clientX<=Lt.right&&Ge.clientY>=Lt.top&&Ge.clientY<=Lt.bottom&&(Ge.preventDefault(),Ge.stopPropagation(),de(mt=>mt==="shape"&&rt.current?mt:mt==="shape"&&ot?"image":tt?"shape":"image"))};return document.addEventListener("dblclick",$e,!0),()=>document.removeEventListener("dblclick",$e,!0)},[tt,ot,F]);const We=s.useMemo(()=>U&&h.width>0&&h.height>0?xC(ie,h):null,[U,ie,h.width,h.height]),vt=s.useRef(null),Ve=(()=>{const $e=vt.current;return q||!T||!I||!ue||!We||!$e||W===$e.customPath||$e.shape!==n&&n!=="custom"?null:nT($e.bounds,We,ue,$e.focalX,$e.focalY,$e.scale)})();nr(()=>{if(!I){vt.current=null;return}if(C||!ue||!We)return;const $e=vt.current,Ge=!!($e&&W!==$e.customPath);Ge&&Ve&&I.onCommit(Ve),Ge&&q&&(R==null||R()),vt.current={rings:ie,bounds:We,focalX:(Ve==null?void 0:Ve.focalX)??X,focalY:(Ve==null?void 0:Ve.focalY)??D,scale:(Ve==null?void 0:Ve.scale)??_,customPath:W,shape:n}},[C,q,W,n,ie,We,I,ue,X,D,_,Ve,R]);const Ke=vt.current,pe=!!(C&&!q&&Ke&&!Ve),De=pe&&Ke?Ke.focalX:(Ve==null?void 0:Ve.focalX)??X,qe=pe&&Ke?Ke.focalY:(Ve==null?void 0:Ve.focalY)??D,bt=pe&&Ke?Ke.scale:(Ve==null?void 0:Ve.scale)??_,yt=pe&&Ke?Ke.bounds:We,Rt=s.useMemo(()=>{if(!(h.width>0)||!(h.height>0))return"";let $e=Vd(i,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Gd($e,h)||zd(G,h)},[i,g,o,r,n,h.width,h.height,ye,ne,G]),ct=s.useMemo(()=>{if(!U||!(h.width>0)||!(h.height>0))return"";let $e=Vd(W,g,o,r,n,h);if(ye){const Ge=ne??h,ht=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,$t=>({x:$t.x*ht,y:$t.y*Lt}))}return Gd($e,h)||zd(ie,h)},[U,W,g,o,r,n,h.width,h.height,ye,ne,ie]),wt=`${j}-clip`,nt=s.useMemo(()=>{if(!yt)return null;const $e=ue??{width:yt.width,height:yt.height},Ge=Ui(yt,$e,bt);return{x:jn(yt.width,Ge.width,De),y:jn(yt.height,Ge.height,qe),width:Ge.width,height:Ge.height}},[yt,ue,De,qe,bt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:f},lang:Re,ref:K,children:[Rt?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:h.width,height:h.height},viewBox:`0 0 ${h.width} ${h.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Rt,fillRule:"evenodd"}),U&&ct&&yt&&nt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:wt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ct,fillRule:"evenodd"})})}),a.jsx("image",{href:U,x:yt.x+nt.x,y:yt.y+nt.y,width:nt.width,height:nt.height,preserveAspectRatio:"none",clipPath:`url(#${wt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...E,["--"+e+"-fit"]:He,top:0,left:0,width:h.width,height:h.height},children:[a.jsx("div",{className:`${e}-measure`,ref:P,style:E,"aria-hidden":!0}),Xe.segments.map(($e,Ge)=>{const ht=Xe.renderTokens.slice($e.from,$e.to),Lt=Ge===0;return a.jsx("div",{className:`${e}-line${$e.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${$e.top}px`,left:`${$e.left}px`,width:`${$e.width}px`,textAlign:$e.justify?void 0:xe},children:ht.map(($t,mt)=>{const Ot=Ce&&Lt&&$e.from===0&&mt===0?$t.text.slice(1):$t.text,zt=lu($t.leaf),Ee=$t.href?a.jsx("a",{className:`${e}-link`,href:$t.href,target:$t.target,rel:$t.target?"noopener noreferrer":void 0,style:zt,children:Ot}):a.jsx("span",{style:zt,children:Ot});return a.jsxs("span",{children:[!$e.justify&&mt>0?" ":null,Ee]},mt)})},`${$e.from}-${$e.to}-${Ge}`)}),M&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:G.map(($e,Ge)=>a.jsx("polygon",{points:$e.map(ht=>`${ht.x},${ht.y}`).join(" ")},Ge))})]}),Ce&&L&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...E,top:`${Xe.capTop+je}px`,left:`${Xe.capLeft}px`,fontSize:`${Je}px`,lineHeight:`${Je}px`},children:Ce}),xt&&it&&(g&&$||I)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:it.top,left:it.left,width:it.width,height:it.height,zIndex:ET,pointerEvents:"none"},children:[g&&$&&a.jsx(ST,{P:e,box:{width:it.width,height:it.height},viewBox:r,contours:g,snap:$.snap,stretchToBox:!ye,uniformStretch:n==="circle",stage:Le,onStageChange:de,onSelectionChange:_e,onChange:$.onChange,onCommit:$.onCommit}),I&&yt&&a.jsx(hT,{P:e,box:{width:it.width,height:it.height},bounds:yt,natural:ue,imageUrl:U,maskPath:ct,stage:Le,onStageChange:de,focalX:De,focalY:qe,scale:bt,onChange:I.onChange,onCommit:I.onCommit})]}),xt),a.jsx("div",{className:`${e}-a11y`,children:ge.map(($e,Ge)=>a.jsx("p",{children:$e},Ge))}),Ue&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ze.top,left:Ze.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Zp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],HT={x:0,y:0,width:100,height:100},WT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?HT:{x:t[0],y:t[1],width:t[2],height:t[3]}},OT=e=>`
|
|
27898
|
+
`;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function ql(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const lC=ql(""),cC=ql("open"),dC=ql("compact"),uC=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],pC=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],mC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ms={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},gC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],hC=["iconColor","logoColor","linkColor","backgroundColor"],fC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...gC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...lC,...cC,...dC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ms,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ms,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ms,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:uC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:pC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:mC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...hC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},yC={element:aC,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:fC,sourceCode:sC,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Od=120,Dd=3,vC=.12,Kl={x:0,y:0,width:100,height:100};function $o(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function La(e){return e<0?0:e>1?1:e}function zd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function xC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function bC(e){return e.map(([t,n])=>({x:t,y:n}))}function Es(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function SC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=La(n[o]),l=La(n[o+1]);l>r&&i.push({x0:r,x1:l})}return wC(i)}function wC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function $C(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function CC(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function TC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function IC(e,t,n,i){let o=null;for(let r=0;r<Dd;r+=1){const l=La(t+(n-t)*r/Math.max(1,Dd-1)),c=SC(e,l),d=i==="avoid"?CC(c):c;if(o=o===null?d:$C(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=Kl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?$o(c,n):Es(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d",y),u.appendChild(S);let m=0;try{m=S.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let x=0;x<Od;x+=1){const w=S.getPointAtLength(x/Od*m);h.push({x:w.x,y:w.y})}p.push(h)}return p.length?t==="viewbox"?$o(p,n):Es(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?$o([r],n):Es([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Js="0 0 100 100",Pa=100,el=16,LC=12,PC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,MC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,jd=Math.PI/4,EC=8,RC=Math.PI/18,kC=8,fo=24,yo=[];function AC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function ks(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function FC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function NC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Vd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=ks(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?ks(d,i):FC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=ks(ki(d),Kl):l=AC()}}return o==="circle"?NC(l,r):l}function Gd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Ho(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function tl(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?$o($r(ki(t)),Kl):[bC([[0,0],[1,0],[1,1],[0,1]])]}function _C(e){const t=e.match(MC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Ln(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function nl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function gn(e){return{x:e.x,y:e.y}}function HC(e){return{p:gn(e.p),in:e.in?gn(e.in):null,out:e.out?gn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(HC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Xd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function WC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:gn(e),c2:gn(l),p:gn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),S=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*S+y*m,x=-y*S+p*m,w=h*h/(c*c)+x*x/(d*d);if(w>1){const U=Math.sqrt(w);c*=U,d*=U}const F=o===r?-1:1,v=c*c*x*x+d*d*h*h,P=Math.max(0,c*c*d*d-v),M=v===0?0:F*Math.sqrt(P/v),K=M*c*x/d,X=-M*d*h/c,j=p*K-y*X+(e.x+l.x)/2,N=y*K+p*X+(e.y+l.y)/2,_=Math.atan2((x-X)/d,(h-K)/c);let L=Math.atan2((-x-X)/d,(-h-K)/c)-_;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const Y=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),R=L/Y,I=4/3*Math.tan(R/4),$=(U,E)=>({x:j+p*c*U-y*d*E,y:N+y*c*U+p*d*E}),G=[];let O=_;for(let U=0;U<Y;U+=1){const E=O+R,f=Math.cos(O),Q=Math.sin(O),q=Math.cos(E),pe=Math.sin(E);G.push({c1:$(f-I*Q,Q+I*f),c2:$(q+I*pe,pe-I*q),p:U===Y-1?gn(l):$(q,pe)}),O=E}return G}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:Un(h??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Un(m,h.p)};Rs.lastIndex=0;let S=Rs.exec(t);for(;S!==null;){const m=S[1],h=m.toUpperCase(),x=m!==h,w=_C(S[2]),F=v=>x?{x:r.x+w[v],y:r.y+w[v+1]}:{x:w[v],y:w[v+1]};if(h==="Z")o=!0,u(),r=gn(l),c=null,d=null;else if(h==="M"){for(let v=0;v+1<w.length;v+=2){const P=F(v);v===0&&(u(),l=gn(P)),p(P)}c=null,d=null}else if(h==="L"){for(let v=0;v+1<w.length;v+=2)p(F(v));c=null,d=null}else if(h==="H"){for(const v of w)p({x:x?r.x+v:v,y:r.y});c=null,d=null}else if(h==="V"){for(const v of w)p({x:r.x,y:x?r.y+v:v});c=null,d=null}else if(h==="C"){for(let v=0;v+5<w.length;v+=6){const P=F(v),M=F(v+2),K=F(v+4);y(P),p(K,M),c=M}d=null}else if(h==="S"){for(let v=0;v+3<w.length;v+=4){const P=c?nl(c,r):gn(r),M=F(v),K=F(v+2);y(P),p(K,M),c=M}d=null}else if(h==="Q")for(let v=0;v+3<w.length;v+=4){const P=F(v),M=F(v+2);y(Ln(r,P,2/3)),p(M,Ln(M,P,2/3)),d=P,c=null}else if(h==="T")for(let v=0;v+1<w.length;v+=2){const P=d?nl(d,r):gn(r),M=F(v);y(Ln(r,P,2/3)),p(M,Ln(M,P,2/3)),d=P,c=null}else if(h==="A")for(let v=0;v+6<w.length;v+=7){const P=x?{x:r.x+w[v+5],y:r.y+w[v+6]}:{x:w[v+5],y:w[v+6]};for(const M of WC(r,w[v],w[v+1],w[v+2],w[v+3]!==0,w[v+4]!==0,P))y(M.c1),p(M.p,M.c2);c=null,d=null}S=Rs.exec(t)}return u(),n}function Bn(e){return`${Number(e.toFixed(2))}`}function Un(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function jp(e){return!!(Un(e.in,e.p)||Un(e.out,e.p))}function Vo(e,t){return!Un(e.out,e.p)&&!Un(t.in,t.p)}function Ud(e,t){if(Vo(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=Un(e.out,e.p)??e.p,i=Un(t.in,t.p)??t.p;return`C${Bn(n.x)},${Bn(n.y)} ${Bn(i.x)},${Bn(i.y)} ${Bn(t.p.x)},${Bn(t.p.y)}`}function Ho(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Bn(i.p.x)},${Bn(i.p.y)}`);let r=i;for(const l of o)t.push(Ud(r,l)),r=l;if(n.closed){const l=Ud(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Vp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function il(e,t,n){if(Vo(e,t))return Ln(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Vp(n)){if(Vo(o.from,o.to)){i.push(gn(o.from.p));continue}for(let r=0;r<el;r+=1)i.push(il(o.from,o.to,r/el))}n.closed||i.push(gn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function OC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Gp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Xp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=LC)return{closed:!0,nodes:t.map(r=>({p:gn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/PC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:gn(r),...Gp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Up(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function DC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function zC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function qp(e){const t={x:0,y:0,width:Pa,height:Pa},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Xp(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=zC(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function BC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function qd(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function jC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Kp(i,r,c)}),i}function VC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=gn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function GC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function XC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Vo(r,l))return d.splice(u,0,{p:Ln(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,S=Ln(r.p,p,i),m=Ln(p,y,i),h=Ln(y,l.p,i),x=Ln(S,m,i),w=Ln(m,h,i),F=Ln(x,w,i),v=(n+1)%o.nodes.length;return d[n].out=S,d[v].in=h,d.splice(u,0,{p:F,in:x,out:w}),{contours:c,nodeIndex:u}}function Kp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function Kd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Un(l[u].out,l[u].p),S=!!Un(l[p].in,l[p].p);if(jp(c)||y||S)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Gp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function UC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Vp(i)){const l=Vo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=UC(t,il(r.from,r.to,d),il(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function qC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Qd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Zd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function KC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function YC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function ol(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function QC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*fo,y:e.y-n.y*fo},b:{x:t.x+n.x*fo,y:t.y+n.y*fo}}:{kind:"align",a:e,b:t}}function rl(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Jd(e,t,n,i,o){if(e.axis===null)return QC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return rl(o(r)[t],t,i)}function ZC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Jd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Jd(n,"y",l,i,o)),r}function JC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return ol(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return ol(i(p),r)}function eT(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:yo};const S=Math.atan2(p,u),m=Math.round(S/jd)*jd;let h=o?m:null,x=!1;if(!o){const X=[];n&&X.push({angle:Math.atan2(n.y,n.x),smooth:!0}),X.push({angle:m,smooth:!1});for(const j of X){const N=YC(j.angle-S);if(!(Math.abs(N)>RC)&&!(Math.abs(Math.sin(N))*y>EC)){h=j.angle,x=j.smooth;break}}}const w=i!==null&&i>0&&Math.abs(y-i)<=kC;if(h===null&&!w)return{point:e,guides:yo};const F=h??S,v=w?i:y,P={x:Math.cos(F),y:Math.sin(F)},M=v+(h===null?0:fo),K=w?v:x?fo:0;return{point:l({x:c.x+P.x*v,y:c.y+P.y*v}),guides:[{kind:"angle",a:{x:c.x-P.x*K,y:c.y-P.y*K},b:{x:c.x+P.x*M,y:c.y+P.y*M}}]}}const al=.1,sl=8,tT=4,eu=10,Ma=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(e,t)=>{const n=Ma(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*eu,y:n.y+o*eu}},cl=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Ui=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,vo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<tT?.5:La(r)},nT=(e,t,n,i,o,r)=>{const l=Ui(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=cl(e,n),p=cl(t,n),y=Math.min(sl,Math.max(al,p>0?r*(u/p):r)),S=Ui(t,n,y);return{focalX:vo(t.width,S.width,c-t.x,{clamp:!1}),focalY:vo(t.height,S.height,d-t.y,{clamp:!1}),scale:y}},iT=6,oT=3,rT=2,As="",aT=new RegExp("\\p{L}","gu"),tu=20,sT={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},dl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},lT=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let nu=null;const cT=()=>(nu??(nu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),nu),iu=new Map,dT=e=>{let t=iu.get(e);return t||(t=dl[e]().then(n=>lT(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),iu.set(e,t)),t},ou=e=>{if(!e)return null;const t=e.toLowerCase();if(dl[t])return t;const n=t.split("-")[0];return dl[n]?n:null},uT=(e,t)=>{const n=t.trim();if(n.length<tu)return;const i=e(n,{minLength:tu});if(i!=="und")return sT[i]??i},pT={hyphenateSync:null};function mT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return cT().then(async r=>{const l=r?uT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=ou(l)??ou(c)??"en",u=await dT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:pT}const ru=e=>{var t;return((t=e.match(aT))==null?void 0:t.length)??0};function gT(e,t){if(e.length<2||e.includes(As))return;const n=new Set;if(t){const o=t(e,{hyphenChar:As,minWordLength:iT});let r=0;for(let l=0;l<o.length;l+=1)o[l]===As?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ru(e.slice(0,o))>=(r?1:oT)&&ru(e.slice(o))>=(r?1:rT)}).sort((o,r)=>o-r);return i.length?i:void 0}const au=1.08,na=14,ia=8;function hT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:S}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),w=s.useRef(null),F=s.useRef({focalX:d,focalY:u,scale:p});F.current={focalX:d,focalY:u,scale:p};const v=l==="image";s.useEffect(()=>{var R;v&&((R=m.current)==null||R.focus({preventScroll:!0}))},[v]);const P=s.useCallback((R,I)=>{var G;const $=(G=m.current)==null?void 0:G.getBoundingClientRect();return!$||$.width<=0||$.height<=0?{x:0,y:0}:{x:(R-$.left)/$.width*t.width,y:(I-$.top)/$.height*t.height}},[t.width,t.height]),M=R=>{var $,G;if(!i)return;R.stopPropagation(),R.preventDefault(),($=m.current)==null||$.focus({preventScroll:!0});const I=Ui(n,i,p);x.current={pointerId:R.pointerId,origin:P(R.clientX,R.clientY),startX:jn(n.width,I.width,d),startY:jn(n.height,I.height,u),width:I.width,height:I.height,moved:!1},(G=m.current)==null||G.setPointerCapture(R.pointerId)},K=(R,I)=>{var q,pe;if(!i)return;R.stopPropagation(),R.preventDefault(),(q=m.current)==null||q.focus({preventScroll:!0});const $=Ui(n,i,p),G=jn(n.width,$.width,d),O=jn(n.height,$.height,u),U={minX:G,minY:O,maxX:G+$.width,maxY:O+$.height},E=Ma(U,Yp(I)),f=Ma(U,I),Q=Math.hypot(f.x-E.x,f.y-E.y);!isFinite(Q)||Q<=0||(w.current={pointerId:R.pointerId,anchor:E,startDistance:Q,startScale:p,startX:G,startY:O,moved:!1},(pe=m.current)==null||pe.setPointerCapture(R.pointerId))},X=R=>{if(!i)return;const I=w.current;if(I&&R.pointerId===I.pointerId){R.stopPropagation(),R.preventDefault();const G=P(R.clientX,R.clientY),O={x:G.x-n.x,y:G.y-n.y},U=Math.hypot(O.x-I.anchor.x,O.y-I.anchor.y),E=Math.min(sl,Math.max(al,I.startScale*(U/I.startDistance)));if(!I.moved&&Math.abs(E-I.startScale)<1e-4)return;I.moved=!0;const f=E/I.startScale,Q=I.anchor.x+(I.startX-I.anchor.x)*f,q=I.anchor.y+(I.startY-I.anchor.y)*f,pe=Ui(n,i,E);y({focalX:vo(n.width,pe.width,Q),focalY:vo(n.height,pe.height,q),scale:E});return}const $=x.current;if($&&R.pointerId===$.pointerId){R.stopPropagation(),R.preventDefault();const G=P(R.clientX,R.clientY),O=G.x-$.origin.x,U=G.y-$.origin.y;if(!$.moved&&O===0&&U===0)return;$.moved=!0,y({focalX:vo(n.width,$.width,$.startX+O),focalY:vo(n.height,$.height,$.startY+U),scale:p})}},j=R=>{var G,O;const I=x.current;if(I&&R.pointerId===I.pointerId){x.current=null,R.stopPropagation(),(G=m.current)!=null&&G.hasPointerCapture(I.pointerId)&&m.current.releasePointerCapture(I.pointerId),I.moved&&S(F.current);return}const $=w.current;$&&R.pointerId===$.pointerId&&(w.current=null,R.stopPropagation(),(O=m.current)!=null&&O.hasPointerCapture($.pointerId)&&m.current.releasePointerCapture($.pointerId),$.moved&&S(F.current))},N=R=>{if(R.key==="Escape"){R.stopPropagation(),c("none");return}if(R.key==="="||R.key==="+"||R.key==="-"||R.key==="_"){R.preventDefault(),R.stopPropagation();const I=R.key==="="||R.key==="+",$=Math.min(sl,Math.max(al,p*(I?au:1/au))),G={focalX:d,focalY:u,scale:$};y(G),S(G)}},_=["nw","ne","se","sw"],T={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const R=i??{width:n.width,height:n.height},I=Ui(n,R,p);return!(I.width>0)||!(I.height>0)?null:{x:n.x+jn(n.width,I.width,d),y:n.y+jn(n.height,I.height,u),width:I.width,height:I.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),Y=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:T;return a.jsxs("svg",{ref:m,className:`${e}-editor${v?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:N,onPointerMove:X,onPointerUp:j,onPointerCancel:j,onLostPointerCapture:j,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),v&&o&&L&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:L.x,y:L.y,width:L.width,height:L.height,children:[a.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:L.x,y:L.y,width:L.width,height:L.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:L.x,y:L.y,width:L.width,height:L.height})]}),v&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:M}),_.map(R=>{const I=ll(Y,R),$=R==="ne"||R==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:I.x-ia/2,y:I.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${$?` ${e}-editor-scale-grab-nesw`:""}`,x:I.x-na/2,y:I.y-na/2,width:na,height:na,onPointerDown:G=>K(G,R)})]},R)})]})]})}const ul=10,fT=ul*2,zn=7,yT=4,lo=9,vT=3.5,su=1.08,xT=.05,oa=14,bT=1,ra=14,aa=8;function ST({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const S=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const x=s.useRef(null),w=s.useRef(null),F=s.useRef(null),v=s.useRef(null),[P,M]=s.useState([]),[K,X]=s.useState(yo),[j,N]=s.useState(null),_=s.useCallback(g=>{X(Z=>KC(Z,g)?Z:g)},[]),T=c==="shape";s.useEffect(()=>{var g;T&&((g=S.current)==null||g.focus({preventScroll:!0}))},[T]),s.useEffect(()=>{T||M(g=>g.length?[]:g)},[T]);const L=P.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const Y=n.width>0?t.width/n.width:1,R=n.height>0?t.height/n.height:1,I=Math.min(Y,R),$=r&&l?I:Y,G=r&&l?I:R,O=r&&l?(t.width-n.width*I)/2:0,U=r&&l?(t.height-n.height*I)/2:0,E=s.useCallback(g=>r?{x:O+(g.x-n.x)*$,y:U+(g.y-n.y)*G}:{x:g.x-n.x,y:g.y-n.y},[r,n,$,G,O,U]),f=s.useCallback(g=>r?{x:n.x+($>0?(g.x-O)/$:0),y:n.y+(G>0?(g.y-U)/G:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,$,G,O,U]),Q=s.useMemo(()=>f({x:t.width/2,y:t.height/2}),[f,t.width,t.height]),q=s.useCallback((g,Z)=>{var re;const J=(re=S.current)==null?void 0:re.getBoundingClientRect();if(!J||J.width<=0||J.height<=0)return{x:0,y:0};if(r){const he=(g-J.left)/J.width*t.width,z=(Z-J.top)/J.height*t.height;return{x:n.x+($>0?(he-O)/$:0),y:n.y+(G>0?(z-U)/G:0)}}return{x:n.x+(g-J.left),y:n.y+(Z-J.top)}},[r,n,t.width,t.height,$,G,O,U]),pe=s.useCallback((g,Z)=>{var re;const J=(re=S.current)==null?void 0:re.getBoundingClientRect();return!J||J.width<=0||J.height<=0?{x:0,y:0}:{x:(g-J.left)/J.width*t.width,y:(Z-J.top)/J.height*t.height}},[t.width,t.height]),k=s.useCallback((g,Z)=>{const J=l&&!(Z!=null&&Z.preserveShape)?DC(g,n,t,O,U,$,G):g;y(J,Z)},[y,l,n,t,O,U,$,G]),me=s.useCallback(()=>{N(null)},[]),C=s.useCallback((g,Z,J)=>{if(!J||x.current||w.current||F.current||v.current){me();return}const re=pe(g,Z),he=un(h.current,E);for(const H of he)for(const be of H.nodes)if(Math.hypot(be.p.x-re.x,be.p.y-re.y)<=lo){me();return}const z=Yd(he,re);if(!z||z.distance>ul){me();return}const B=he[z.contour],ne=B==null?void 0:B.nodes[z.segment],ce=B==null?void 0:B.nodes[(z.segment+1)%((B==null?void 0:B.nodes.length)??1)],ee=!!(ne&&ce&&!Vo(ne,ce));N(H=>H&&H.curved===ee&&Math.hypot(H.point.x-z.point.x,H.point.y-z.point.y)<.25?H:{point:z.point,curved:ee})},[pe,E,me]),ue=g=>{var ze;const Z=g.metaKey||g.ctrlKey,J=F.current;if(J&&g.pointerId===J.pointerId){if(g.stopPropagation(),g.preventDefault(),J.startDistance<=0)return;const Xe=q(g.clientX,g.clientY),Ue=Math.hypot(Xe.x-J.origin.x,Xe.y-J.origin.y),Qe=Math.max(xT,Ue/J.startDistance);if(!J.moved&&Math.abs(Qe-1)<1e-4)return;J.moved=!0,p(Xd(J.startContours,J.origin,Qe));return}const re=w.current;if(re&&g.pointerId===re.pointerId){g.stopPropagation(),g.preventDefault();const Xe=q(g.clientX,g.clientY),{bbox:Ue}=re,Qe=Ue.maxX-Ue.minX,We=Ue.maxY-Ue.minY,it=Xe.x-re.origin.x,ye=Xe.y-re.origin.y;let Te=it,Ve=ye;if(isFinite(Qe)&&isFinite(We))if(r){let et=n.x,at=n.x+n.width,tt=n.y,Ye=n.y+n.height;l&&($>0&&(et=n.x+(0-O)/$,at=n.x+(t.width-O)/$),G>0&&(tt=n.y+(0-U)/G,Ye=n.y+(t.height-U)/G));const xt=Math.min(et,at-Qe),pt=Math.max(et,at-Qe),De=Math.min(tt,Ye-We),_e=Math.max(tt,Ye-We),He=Math.min(pt,Math.max(xt,Ue.minX+it)),Ae=Math.min(_e,Math.max(De,Ue.minY+ye));Te=He-Ue.minX,Ve=Ae-Ue.minY}else{const et=Ue.minX-n.x,at=Ue.minY-n.y,tt=Math.min(0,t.width-Qe),Ye=Math.max(0,t.width-Qe),xt=Math.min(0,t.height-We),pt=Math.max(0,t.height-We),De=Math.min(Ye,Math.max(tt,et+it)),_e=Math.min(pt,Math.max(xt,at+ye));Te=De-et,Ve=_e-at}const Ze=[];if(!Z&&isFinite(Qe)&&isFinite(We)){const et=E({x:Ue.minX+Qe/2+Te,y:Ue.minY+We/2+Ve}),at={x:t.width/2,y:t.height/2};Math.abs(et.x-at.x)<=oa&&(Te=Q.x-Ue.minX-Qe/2,Ze.push(rl(at.x,"x",t))),Math.abs(et.y-at.y)<=oa&&(Ve=Q.y-Ue.minY-We/2,Ze.push(rl(at.y,"y",t)))}if(!re.moved&&Te===0&&Ve===0)return;re.moved=!0,_(Ze.length?Ze:yo),p(un(re.startContours,et=>({x:et.x+Te,y:et.y+Ve})),{carryImage:!0});return}const he=v.current;if(he&&g.pointerId===he.pointerId){g.stopPropagation(),g.preventDefault();const Xe=q(g.clientX,g.clientY);let Ue=Xe.x-he.origin.x,Qe=Xe.y-he.origin.y;if(g.shiftKey&&(Math.abs(Ue)>Math.abs(Qe)?Qe=0:Ue=0),!he.moved&&Ue===0&&Qe===0)return;he.moved=!0,p(qd(he.startContours,he.selection,Ue,Qe));return}const z=x.current;if(!z||g.pointerId!==z.pointerId){C(g.clientX,g.clientY,P.length>0||T);return}me(),g.stopPropagation(),g.preventDefault();const B=q(g.clientX,g.clientY);if(z.kind==="anchor"){const Xe={x:z.anchor.x+(B.x-z.origin.x),y:z.anchor.y+(B.y-z.origin.y)},Ue=Z?[]:qC(h.current,{contour:z.contour,node:z.node}),Qe=Z||!z.center?[]:[z.center],We=Zd(Qd(Ue,Qe.map(Te=>Te.x),"x"),Xe,"x",E,oa),it=Zd(Qd(Ue,Qe.map(Te=>Te.y),"y"),Xe,"y",E,oa),ye=Z?Xe:{x:(We==null?void 0:We.value)??ta(Xe.x,o),y:(it==null?void 0:it.value)??ta(Xe.y,o)};if(g.shiftKey&&(Math.abs(ye.x-z.anchor.x)>Math.abs(ye.y-z.anchor.y)?ye.y=z.anchor.y:ye.x=z.anchor.x),!z.moved&&ye.x===z.anchor.x&&ye.y===z.anchor.y)return;z.moved=!0,_(ZC(ye,We,it,t,E)),p(BC(h.current,z.contour,z.node,ye));return}const ne=(ze=h.current[z.contour])==null?void 0:ze.nodes[z.node],ce=z.mirror&&!g.altKey,ee=ce||Z?null:z.kind==="in"?ne==null?void 0:ne.out:ne==null?void 0:ne.in,H=ne?E(ne.p):null,be=ee?E(ee):null,ae=ne&&(!Z||g.shiftKey)?eT(B,ne.p,ce||Z?null:JC(h.current[z.contour],z.node,z.kind,E),H&&be?Math.hypot(be.x-H.x,be.y-H.y):null,g.shiftKey,E,f):{point:B,guides:yo},W=ae.guides.length?ae.point:Z?B:{x:ta(B.x,o),y:ta(B.y,o)},ke=z.kind==="in"?ne==null?void 0:ne.in:ne==null?void 0:ne.out;!z.moved&&ke&&W.x===ke.x&&W.y===ke.y||(z.moved=!0,_(ae.guides),p(VC(h.current,z.contour,z.node,z.kind,W,ce)))},te=g=>{_(yo);const Z=F.current;if(Z&&g.pointerId===Z.pointerId){F.current=null,g.stopPropagation();const ee=S.current;ee!=null&&ee.hasPointerCapture(Z.pointerId)&&ee.releasePointerCapture(Z.pointerId),Z.moved&&k(h.current,{preserveShape:!0});return}const J=w.current;if(J&&g.pointerId===J.pointerId){w.current=null,g.stopPropagation();const ee=S.current;ee!=null&&ee.hasPointerCapture(J.pointerId)&&ee.releasePointerCapture(J.pointerId),J.moved?k(h.current,{preserveShape:!0}):M([]);return}const re=v.current;if(re&&g.pointerId===re.pointerId){v.current=null,g.stopPropagation();const ee=S.current;ee!=null&&ee.hasPointerCapture(re.pointerId)&&ee.releasePointerCapture(re.pointerId),re.moved&&k(h.current);return}const he=x.current;if(!he||g.pointerId!==he.pointerId)return;x.current=null,g.stopPropagation();const z=S.current;z!=null&&z.hasPointerCapture(he.pointerId)&&z.releasePointerCapture(he.pointerId);const B=Math.hypot(g.clientX-he.clientOrigin.x,g.clientY-he.clientOrigin.y);if(he.moved||B>yT){he.moved&&k(h.current);return}if(!he.toggleOnRelease||g.type!=="pointerup")return;const ce=Kd(h.current,he.contour,he.node);ce!==h.current&&(p(ce),k(ce))},fe=g=>{g.stopPropagation()},Pe=g=>{var Z,J;g.stopPropagation(),g.preventDefault(),me(),(Z=S.current)==null||Z.focus({preventScroll:!0}),w.current={pointerId:g.pointerId,origin:q(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(J=S.current)==null||J.setPointerCapture(g.pointerId)},de=(g,Z)=>{var B,ne;g.stopPropagation(),g.preventDefault(),me(),(B=S.current)==null||B.focus({preventScroll:!0}),M([]),d("shape");const J=Li(i),re=Ma(J,Yp(Z)),he=ll(J,Z),z=Math.hypot(he.x-re.x,he.y-re.y);!isFinite(z)||z<=0||(F.current={pointerId:g.pointerId,corner:Z,origin:re,startDistance:z,startContours:Vn(i),moved:!1},(ne=S.current)==null||ne.setPointerCapture(g.pointerId))},we=(g,Z,J,re)=>{var B,ne,ce,ee;g.stopPropagation(),g.preventDefault(),me(),(B=S.current)==null||B.focus({preventScroll:!0});const he=(ne=i[J])==null?void 0:ne.nodes[re];if(!he)return;if(g.altKey){const H=Z==="anchor"?Kp(i,J,re):GC(i,J,re,Z);if(H===i)return;M(Z==="anchor"?[]:[{contour:J,node:re}]),p(H),k(H);return}const z=g.metaKey||g.ctrlKey;if(Z==="anchor"&&g.shiftKey&&!z){M(H=>H.some(be=>be.contour===J&&be.node===re)?H.filter(be=>!(be.contour===J&&be.node===re)):[...H,{contour:J,node:re}]);return}if(Z==="anchor"&&!z&&P.length>1&&P.some(H=>H.contour===J&&H.node===re)){v.current={pointerId:g.pointerId,origin:q(g.clientX,g.clientY),startContours:Vn(i),selection:P,moved:!1},(ce=S.current)==null||ce.setPointerCapture(g.pointerId);return}M([{contour:J,node:re}]),x.current={kind:Z,contour:J,node:re,pointerId:g.pointerId,origin:q(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:he.p,center:OC(i),mirror:Z!=="anchor"&&!!(he.in&&he.out),toggleOnRelease:z,moved:!1},(ee=S.current)==null||ee.setPointerCapture(g.pointerId)},V=g=>{g.stopPropagation(),g.preventDefault(),me();const Z=un(i,E),J=Yd(Z,pe(g.clientX,g.clientY));if(!J||J.distance>ul)return;const{contours:re,nodeIndex:he}=XC(i,J.contour,J.segment,J.t);he<0||(M([{contour:J.contour,node:he}]),p(re),k(re))},ie=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const z=Li(i);if(!isFinite(z.minX)||!isFinite(z.maxX))return;const B={x:(z.minX+z.maxX)/2,y:(z.minY+z.maxY)/2},ce=g.key==="="||g.key==="+"?su:1/su,ee=Xd(i,B,ce);p(ee),k(ee,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),M([]),d("none");return}if(!P.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const z=jC(i,P);if(z===i)return;M([]),p(z),k(z);return}const Z=o>0?o:bT,J=g.shiftKey?Z*10:Z,re={ArrowLeft:[-J,0],ArrowRight:[J,0],ArrowUp:[0,-J],ArrowDown:[0,J]}[g.key];if(!re)return;g.preventDefault(),g.stopPropagation();const he=qd(i,P,re[0],re[1]);p(he),k(he)},oe=s.useMemo(()=>Ho(un(i,E)),[i,E]),le=s.useMemo(()=>Li(i),[i]),ve=E({x:le.minX,y:le.minY}),Fe={width:E({x:le.maxX,y:le.minY}).x-ve.x,height:E({x:le.minX,y:le.maxY}).y-ve.y},Ee=T&&P.length===0&&isFinite(le.minX)&&isFinite(le.maxX)&&le.maxX>le.minX&&le.maxY>le.minY,Ce=P.length>0||T,Se=Ce;return a.jsxs("svg",{ref:S,className:`${e}-editor${Ce?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:ie,onPointerDown:()=>{var g;return(g=S.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:ue,onPointerLeave:me,onPointerUp:te,onPointerCancel:te,onLostPointerCapture:te,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{M([]),d("none")},onClick:V}),Se&&a.jsx("path",{className:`${e}-editor-outline`,d:oe}),Se&&K.map((g,Z)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${Z}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:oe,fillRule:"evenodd",onPointerDown:Pe,onClick:V}),Se&&a.jsx("path",{className:`${e}-editor-hit`,d:oe,style:{strokeWidth:fT},onClick:V}),Se&&j&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:j.point.x-zn/2,y:j.point.y-zn/2,width:zn,height:zn,rx:j.curved?zn/2:0}),Se&&i.map((g,Z)=>g.nodes.map((J,re)=>{const he=P.some(B=>B.contour===Z&&B.node===re),z=E(J.p);return a.jsxs("g",{children:[he&&P.length===1&&["in","out"].map(B=>{const ne=J[B];if(!ne)return null;const ce=E(ne);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:z.x,y1:z.y,x2:ce.x,y2:ce.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:ce.x,cy:ce.y,r:vT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:ce.x,cy:ce.y,r:lo,onPointerDown:ee=>we(ee,B,Z,re),onClick:fe})]},B)}),a.jsx("rect",{className:`${e}-editor-anchor${he?` ${e}-editor-anchor-selected`:""}`,x:z.x-zn/2,y:z.y-zn/2,width:zn,height:zn,rx:jp(J)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:z.x-lo,y:z.y-lo,width:lo*2,height:lo*2,onPointerDown:B=>we(B,"anchor",Z,re),onClick:fe,onDoubleClick:B=>{B.stopPropagation(),B.preventDefault();const ne=Kd(i,Z,re);p(ne),k(ne)}})]},`${Z}-${re}`)})),Ee&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:ve.x,y:ve.y,width:Fe.width,height:Fe.height}),["nw","ne","se","sw"].map(g=>{const Z=E(ll(le,g)),J=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:Z.x-aa/2,y:Z.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${J?` ${e}-editor-scale-grab-nesw`:""}`,x:Z.x-ra/2,y:Z.y-ra/2,width:ra,height:ra,onPointerDown:re=>de(re,g),onClick:fe})]},g)})]})]})}const wT=4e3,$T=/^(?:https?:|mailto:|tel:)/i;function Qp(e){return!!e&&typeof e=="object"&&e.type==="link"}function CT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!$T.test(t)))return t}function TT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Qp(d)){o(d.children??[],CT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function lu(e){return{...e.fontFamily&&{fontFamily:zo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function IT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Qp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function LT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const h=m.x*n,x=m.y*i;h<c&&(c=h),h>d&&(d=h),x<u&&(u=x),x>p&&(p=x)}const y=(c+d)/2,S=(u+p)/2;return l.map(m=>{const h=m.x*n,x=m.y*i,w=h-y,F=x-S,v=Math.sqrt(w*w+F*F);if(v<1e-6)return m;const M=Math.max(0,v+r*t)/v;return{x:(y+w*M)/n,y:(S+F*M)/i}})})}const PT=.75;function cu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const y=!!n&&l[p-1]!=="-",S=t[e.offset+p-1]-c,m=S+(y?r:0);if(!(m*o>i))return{chars:p,fragmentText:y?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-S)}}return null}function du(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,S=!!e.hyphenate,m=e.charWidths??[],h=e.hyphenPoints??[],x=e.hyphenWidth??0,w=e.lineHeight*l,F=e.spaceWidth*l,v=Math.max(0,e.shapeMargin??0),P=[],M=t.map((E,f)=>({token:E,originalIndex:f,width:n[f],kind:"whole",offset:0}));if(!M.length||c<=0||w<=0)return{segments:P,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const K=Math.max(1,F*.5),X=w*vC,j=LT(i,v,c,d,o),N=Math.max(1,Math.floor(e.columns??1)),_=N>1?Math.max(0,e.columnGap??0):0,T=(c-_*(N-1))/N;let L=0,Y=0,R=0,I=0,$=0,G=null;const O=(E,f,Q)=>IC(j,(E+X)/d,(E+w-X)/d,o).map(q=>({x0:Math.max(f,q.x0*c),x1:Math.min(Q,q.x1*c)})).filter(q=>q.x1>q.x0);for(let E=0;E<N&&L<M.length&&T>0;E+=1){const f=E*(T+_),Q=f+T,q=u&&E===N-1;let pe=0;for(let C=0;C+w<=d;C+=w)for(const ue of O(C,f,Q))pe=Math.max(pe,ue.x1-ue.x0);let k=M[L].token.para,me=0;for(;L<M.length&&R<wT;){const C=me+w>d;if(C&&!q)break;const ue=M[L].token.para;if(ue>k+1){me+=w*(ue-k-1),k=ue-1,R+=1;continue}let te=C?[{x0:f,x1:Q}]:O(me,f,Q);p>0&&y>0&&E===0&&!C&&te.length&&(G===null&&(G=R,I=te[0].x0,$=me),R-G<y&&(te=TC(te,{x0:I,x1:I+p})));const fe=te.reduce((Pe,de)=>Math.max(Pe,de.x1-de.x0),0);for(const Pe of te){const de=Pe.x1-Pe.x0;if(de<K)continue;if(L>=M.length||M[L].token.para!==ue)break;const we=L;let V=0;for(;L<M.length&&M[L].token.para===ue;){const ie=M[L],oe=L===we,le=ie.width*l,ve=oe?le:F+le;if(V+ve<=de){V+=ve,L+=1;continue}const Fe=de-V-(oe?0:F),Ee=oe&&le>T-.5,Ce=de>=fe-.5&&de>=pe*PT,Se=m[ie.originalIndex],g=h[ie.originalIndex],Z=(S&&g?cu(ie,Se,g,Fe,l,x):null)??(Ee&&Ce?cu(ie,Se,void 0,Fe,l,x):null);if(Z){const J={token:{...ie.token,text:Z.fragmentText},originalIndex:ie.originalIndex,width:Z.fragmentWidth,kind:"fragment",offset:ie.offset},re={token:{...ie.token,text:Z.remainderText},originalIndex:ie.originalIndex,width:Z.remainderWidth,kind:"remainder",offset:ie.offset+Z.chars};M.splice(L,1,J,re),V+=(oe?0:F)+Z.fragmentWidth*l,L+=1;break}if(Ee&&N===1&&de>=pe-.5){V+=ve,L+=1;continue}break}if(L>we){const ie=L>=M.length||M[L].token.para!==ue;P.push({top:me,left:Pe.x0,width:de,from:we,to:L,justify:r==="justify"&&!ie})}if(L>=M.length||M[L].token.para!==ue)break}k=ue,me+=w,R+=1}Y=Math.max(Y,me)}let U=0;if(L>0){const E=M[L-1];U=E.kind==="fragment"?E.originalIndex:E.originalIndex+1}return{segments:P,placed:U,height:P.length?Y:0,capLeft:I,capTop:$,renderTokens:M.map(E=>E.token)}}const MT=.12,ET=2,RT=10,Fs=.25,kT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},AT=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,FT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=kT(e);(!r||!AT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ns=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function NT(){return typeof document>"u"?null:document.body}function _T({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:S,columns:m,gutter:h,hyphenate:x,showOverflowIndicator:w,dropCapLines:F,dropCapSize:v,showGuides:P,typography:M,imageUrl:K,imageFocalX:X,imageFocalY:j,imageScale:N,imageCustomPath:_,imagePathEdited:T,pathDragActive:L,pathCarryImage:Y,onCarryImageConsumed:R,pathEditor:I,imageEditor:$}){var Vt,Zt;const G=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[O,U]=s.useState(null),E=s.useRef(null),[f,Q]=s.useState({width:0,height:0}),[q,pe]=s.useState(0),[k,me]=s.useState(0),[C,ue]=s.useState(null),[te,fe]=s.useState(0),[Pe,de]=s.useState("none");s.useEffect(()=>{!I&&!$&&de("none")},[I,$]);const[we,V]=s.useState(null);s.useEffect(()=>{if(!K||typeof Image>"u"){V(null);return}let $e=!1;const Ge=new Image;return Ge.onload=()=>{$e||V({width:Ge.naturalWidth,height:Ge.naturalHeight})},Ge.src=K,()=>{$e=!0}},[K]);const ie=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),oe=s.useMemo(()=>TT(ie),[ie]),le=s.useMemo(()=>IT(ie),[ie]),ve=s.useMemo(()=>le.join(`
|
|
27899
|
+
`),[le]),{lang:Fe,hyphenateSync:Ee}=mT(x,ve),Ce=s.useMemo(()=>x?oe.map($e=>gT($e.text,Ee)):[],[x,oe,Ee]),Se=F>0&&v>1?((Zt=(Vt=oe[0])==null?void 0:Vt.text)==null?void 0:Zt.charAt(0))??"":"",g=(I==null?void 0:I.contours)??null,Z=s.useMemo(()=>{let $e=[];if(g){const Ge=$r(g);Ge.length&&($e=$o(Ge,r))}if(!$e.length){const Ge=i.trim(),ft=Ge?Bd(Ge,o,r):null;ft&&ft.length?$e=ft:$e=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns($e,f):$e},[g,n,i,o,r,f.width,f.height]),J=I==null?void 0:I.onConvert,re=(I==null?void 0:I.needsConversion)??!1,he=s.useMemo(()=>{if(n==="circle")return!1;const $e=g??(i.trim()?ki(i):null);return!!($e&&Up($e,r))},[g,i,r,n]),[z,B]=s.useState(null);nr(()=>{if(!he){z&&B(null);return}!z&&f.width>0&&f.height>0&&B({width:f.width,height:f.height})},[he,f.width,f.height,z]);const ne=s.useMemo(()=>{if(!he||f.width<=0||f.height<=0)return Z;const $e=z??f,Ge=r.width/$e.width,ft=r.height/$e.height;return Z.map(Lt=>Lt.map(wt=>({x:wt.x*Ge,y:wt.y*ft})))},[Z,he,z,r.width,r.height,f.width,f.height]),ce=s.useMemo(()=>{if(g){const Lt=$r(g);if(Lt.length){const wt=$o(Lt,r);return n==="circle"?Ns(wt,f):wt}}const $e=_.trim(),Ge=$e?Bd($e,o,r):null,ft=Ge&&Ge.length?Ge:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(ft,f):ft},[g,n,_,o,r,f.width,f.height]),ee=s.useMemo(()=>{if(!he||f.width<=0||f.height<=0)return ce;const $e=z??f,Ge=r.width/$e.width,ft=r.height/$e.height;return ce.map(Lt=>Lt.map(wt=>({x:wt.x*Ge,y:wt.y*ft})))},[ce,he,z,r.width,r.height,f.width,f.height]),H=s.useRef(null),be=s.useRef(!1);s.useEffect(()=>{if(!(!J||f.width<=0||f.height<=0)){if(he){if(H.current===i)return;const $e=g??(i.trim()?ki(i):null);if(!($e!=null&&$e.length))return;const Ge=un($e,ft=>({x:r.x+(ft.x-r.x)/f.width*r.width,y:r.y+(ft.y-r.y)/f.height*r.height}));H.current=Ho(Ge),J(Ge);return}!re||!Z.length||be.current||(be.current=!0,J(un(Xp(Z),$e=>({x:$e.x*Pa,y:$e.y*Pa}))))}},[re,he,J,Z,g,i,r,f.width,f.height]);const ae=s.useCallback(()=>{const $e=O;if(!$e)return;const Ge=$e.getBoundingClientRect(),ft=window.getComputedStyle($e),Lt=parseFloat(ft.paddingTop)||0;pe(Nt=>Math.abs(Nt-Lt)<.5?Nt:Lt);const wt=parseFloat(ft.columnGap)||0;me(Nt=>Math.abs(Nt-wt)<.5?Nt:wt);const vt={width:Ge.width,height:Ge.height};Q(Nt=>Math.abs(Nt.width-vt.width)<.5&&Math.abs(Nt.height-vt.height)<.5?Nt:vt)},[O]);nr(()=>{const $e=O;if(!$e||typeof ResizeObserver>"u")return;ae();const Ge=new ResizeObserver(ae);return Ge.observe($e),()=>Ge.disconnect()},[O,ae]),nr(()=>{ae()},[S,h,ae]),s.useEffect(()=>{const $e=typeof document<"u"?document.fonts:void 0;$e!=null&&$e.ready&&$e.ready.then(()=>{fe(Ge=>Ge+1)})},[]),nr(()=>{const $e=E.current;if(!$e)return;if(!oe.length){ue(null);return}const Ge=[],ft=document.createDocumentFragment();for(const $t of oe){const _t=document.createElement("span");Object.assign(_t.style,lu($t.leaf)),_t.textContent=$t.text,ft.appendChild(_t),Ge.push(_t)}const Lt=document.createElement("span");Lt.textContent=" ",ft.appendChild(Lt);const wt=document.createElement("span");wt.textContent="-",ft.appendChild(wt);const vt=Se||"H",Nt=document.createElement("span");Nt.textContent=vt,Nt.style.lineHeight="1",ft.appendChild(Nt),$e.replaceChildren(ft);const Wt=window.getComputedStyle($e),Dt=parseFloat(Wt.fontSize)||16,Me=parseFloat(Wt.lineHeight),ct=Number.isNaN(Me)?Dt*1.2:Me,dt=Math.max(ct,Dt),kt=document.createElement("span");kt.textContent=vt,kt.style.lineHeight=`${dt}px`;const Ke=document.createElement("span");Ke.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",kt.appendChild(Ke),$e.appendChild(kt);const st=kt.getBoundingClientRect().top,It=Ke.getBoundingClientRect().top,At=Math.max(1,It-st);kt.remove();let ut=At*.8;const Ut=document.createElement("canvas").getContext("2d"),Ot=$t=>`${Wt.fontStyle} ${Wt.fontWeight} ${$t}px ${Wt.fontFamily}`;if(Ut){Ut.font=Ot(Dt);const $t=Ut.measureText(vt).actualBoundingBoxAscent;$t>0&&(ut=$t)}const Bt=v>1?(v-1)*dt+ut:ut;let Xt=Dt*(Bt/ut);if(Ut){Ut.font=Ot(Xt);const $t=Ut.measureText(vt).actualBoundingBoxAscent;$t>0&&(Xt=Xt*(Bt/$t))}Nt.style.fontSize=`${Xt}px`,Nt.style.lineHeight=`${Xt}px`;const zt=document.createElement("span");zt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Nt.appendChild(zt);const Kt=Math.max(1,zt.getBoundingClientRect().top-Nt.getBoundingClientRect().top);zt.remove();const Le=(v-1)*dt+At-Kt,Ne=Ge.map($t=>$t.getBoundingClientRect().width),Oe=Lt.getBoundingClientRect().width,yt=wt.getBoundingClientRect().width,Tt=Se?Nt.getBoundingClientRect().width:0,Je=(f.width-k*(m-1))/m,Pt=Ge.map(($t,_t)=>{var pi;const on=$t.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Ne[_t]>Je-.5)&&!((pi=Ce[_t])!=null&&pi.length))return;const bn=document.createRange(),ui=$t.getBoundingClientRect().left,dn=[];for(let Yn=1;Yn<=on.data.length;Yn+=1)bn.setStart(on,0),bn.setEnd(on,Yn),dn.push(bn.getBoundingClientRect().right-ui);return dn});$e.replaceChildren(),ue({widths:Ne,spaceWidth:Oe,dashWidth:yt,charWidths:Pt,lineHeight:dt,capWidth:Tt,dropCapFontSize:Xt,dropCapTopAdjust:Le})},[oe,M,Se,F,v,te,f.width,x,Ce,m,k]);const W=C&&Se?C.capWidth+C.lineHeight*MT:0,ke=Math.max(F,Math.ceil(v)),ze=s.useMemo(()=>{if(!C||!oe.length||f.width<=0||f.height<=0||!u)return 1;const $e=Lt=>du({tokens:oe,widths:C.widths,spaceWidth:C.spaceWidth,lineHeight:C.lineHeight,width:f.width,height:f.height,rings:ne,mode:l,align:c,scale:Lt,allowOverflow:!1,capInset:W*Lt,capLines:Se?ke:0,hyphenate:x,charWidths:C.charWidths,hyphenPoints:Ce,hyphenWidth:C.dashWidth,shapeMargin:q,columns:m,columnGap:k});if($e(1).placed>=oe.length)return 1;if($e(Fs).placed<oe.length)return Fs;let Ge=Fs,ft=1;for(let Lt=0;Lt<RT;Lt+=1){const wt=(Ge+ft)/2;$e(wt).placed>=oe.length?Ge=wt:ft=wt}return Ge},[C,oe,f.width,f.height,ne,l,c,u,W,Se,ke,x,Ce,q,m,k]);s.useEffect(()=>{y(ze)},[ze,y]);const Xe=u?Math.min(p,ze):1,Ue=s.useMemo(()=>!C||!oe.length||f.width<=0||f.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:oe}:du({tokens:oe,widths:C.widths,spaceWidth:C.spaceWidth,lineHeight:C.lineHeight,width:f.width,height:f.height,rings:ne,mode:l,align:c,scale:Xe,allowOverflow:d,capInset:W*Xe,capLines:Se?ke:0,hyphenate:x,charWidths:C.charWidths,hyphenPoints:Ce,hyphenWidth:C.dashWidth,shapeMargin:q,columns:m,columnGap:k}),[C,oe,f.width,f.height,ne,l,c,Xe,d,W,Se,ke,x,Ce,q,m,k]),Qe=w&&oe.length>0&&Ue.placed<oe.length,We=C?C.dropCapFontSize*Xe:0,it=C?C.dropCapTopAdjust*Xe:0,ye=c==="justify"?"left":c,Te=C?C.lineHeight*Xe:0,Ve=Ue.segments.length?Ue.segments[Ue.segments.length-1]:null,Ze=Ve?{top:Ve.top+Te,left:Ve.left+Ve.width/2}:{top:f.height,left:f.width/2},et=!!(I&&g&&f.width>0&&f.height>0),at=!!$,tt=(et||at)&&f.width>0&&f.height>0,Ye=FT(O,tt),xt=tt&&Ye?NT():null,pt=s.useRef(!1),De=s.useCallback($e=>{pt.current=$e},[]);s.useEffect(()=>{if(!et&&!at)return;const $e=Ge=>{const ft=O;if(!ft)return;const Lt=ft.getBoundingClientRect();Ge.clientX>=Lt.left&&Ge.clientX<=Lt.right&&Ge.clientY>=Lt.top&&Ge.clientY<=Lt.bottom&&(Ge.preventDefault(),Ge.stopPropagation(),de(vt=>vt==="shape"&&pt.current?vt:vt==="shape"&&at?"image":et?"shape":"image"))};return document.addEventListener("dblclick",$e,!0),()=>document.removeEventListener("dblclick",$e,!0)},[et,at,O]);const _e=s.useMemo(()=>K&&f.width>0&&f.height>0?xC(ee,f):null,[K,ee,f.width,f.height]),He=s.useRef(null),Ae=(()=>{const $e=He.current;return Y||!T||!$||!we||!_e||!$e||_===$e.customPath||$e.shape!==n&&n!=="custom"?null:nT($e.bounds,_e,we,$e.focalX,$e.focalY,$e.scale)})();nr(()=>{if(!$){He.current=null;return}if(L||!we||!_e)return;const $e=He.current,Ge=!!($e&&_!==$e.customPath);Ge&&Ae&&$.onCommit(Ae),Ge&&Y&&(R==null||R()),He.current={rings:ee,bounds:_e,focalX:(Ae==null?void 0:Ae.focalX)??X,focalY:(Ae==null?void 0:Ae.focalY)??j,scale:(Ae==null?void 0:Ae.scale)??N,customPath:_,shape:n}},[L,Y,_,n,ee,_e,$,we,X,j,N,Ae,R]);const Be=He.current,Ie=!!(L&&!Y&&Be&&!Ae),mt=Ie&&Be?Be.focalX:(Ae==null?void 0:Ae.focalX)??X,ot=Ie&&Be?Be.focalY:(Ae==null?void 0:Ae.focalY)??j,Ct=Ie&&Be?Be.scale:(Ae==null?void 0:Ae.scale)??N,rt=Ie&&Be?Be.bounds:_e,St=s.useMemo(()=>{if(!(f.width>0)||!(f.height>0))return"";let $e=Vd(i,g,o,r,n,f);if(he){const Ge=z??f,ft=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,wt=>({x:wt.x*ft,y:wt.y*Lt}))}return Gd($e,f)||zd(ne,f)},[i,g,o,r,n,f.width,f.height,he,z,ne]),nt=s.useMemo(()=>{if(!K||!(f.width>0)||!(f.height>0))return"";let $e=Vd(_,g,o,r,n,f);if(he){const Ge=z??f,ft=r.width/Ge.width,Lt=r.height/Ge.height;$e=un($e,wt=>({x:wt.x*ft,y:wt.y*Lt}))}return Gd($e,f)||zd(ee,f)},[K,_,g,o,r,n,f.width,f.height,he,z,ee]),Rt=`${G}-clip`,ht=s.useMemo(()=>{if(!rt)return null;const $e=we??{width:rt.width,height:rt.height},Ge=Ui(rt,$e,Ct);return{x:jn(rt.width,Ge.width,mt),y:jn(rt.height,Ge.height,ot),width:Ge.width,height:Ge.height}},[rt,we,mt,ot,Ct]);return a.jsxs("div",{className:`${e}-column`,style:{padding:S,columnGap:h},lang:Fe,ref:U,children:[St?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:f.width,height:f.height},viewBox:`0 0 ${f.width} ${f.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:St,fillRule:"evenodd"}),K&&nt&&rt&&ht?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Rt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:nt,fillRule:"evenodd"})})}),a.jsx("image",{href:K,x:rt.x+ht.x,y:rt.y+ht.y,width:ht.width,height:ht.height,preserveAspectRatio:"none",clipPath:`url(#${Rt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...M,["--"+e+"-fit"]:Xe,top:0,left:0,width:f.width,height:f.height},children:[a.jsx("div",{className:`${e}-measure`,ref:E,style:M,"aria-hidden":!0}),Ue.segments.map(($e,Ge)=>{const ft=Ue.renderTokens.slice($e.from,$e.to),Lt=Ge===0;return a.jsx("div",{className:`${e}-line${$e.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${$e.top}px`,left:`${$e.left}px`,width:`${$e.width}px`,textAlign:$e.justify?void 0:ye},children:ft.map((wt,vt)=>{const Wt=Se&&Lt&&$e.from===0&&vt===0?wt.text.slice(1):wt.text,Dt=lu(wt.leaf),Me=wt.href?a.jsx("a",{className:`${e}-link`,href:wt.href,target:wt.target,rel:wt.target?"noopener noreferrer":void 0,style:Dt,children:Wt}):a.jsx("span",{style:Dt,children:Wt});return a.jsxs("span",{children:[!$e.justify&&vt>0?" ":null,Me]},vt)})},`${$e.from}-${$e.to}-${Ge}`)}),P&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map(($e,Ge)=>a.jsx("polygon",{points:$e.map(ft=>`${ft.x},${ft.y}`).join(" ")},Ge))})]}),Se&&C&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...M,top:`${Ue.capTop+it}px`,left:`${Ue.capLeft}px`,fontSize:`${We}px`,lineHeight:`${We}px`},children:Se}),xt&&Ye&&(g&&I||$)&&qn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ye.top,left:Ye.left,width:Ye.width,height:Ye.height,zIndex:ET,pointerEvents:"none"},children:[g&&I&&a.jsx(ST,{P:e,box:{width:Ye.width,height:Ye.height},viewBox:r,contours:g,snap:I.snap,stretchToBox:!he,uniformStretch:n==="circle",stage:Pe,onStageChange:de,onSelectionChange:De,onChange:I.onChange,onCommit:I.onCommit}),$&&rt&&a.jsx(hT,{P:e,box:{width:Ye.width,height:Ye.height},bounds:rt,natural:we,imageUrl:K,maskPath:nt,stage:Pe,onStageChange:de,focalX:mt,focalY:ot,scale:Ct,onChange:$.onChange,onCommit:$.onCommit})]}),xt),a.jsx("div",{className:`${e}-a11y`,children:le.map(($e,Ge)=>a.jsx("p",{children:$e},Ge))}),Qe&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ze.top,left:Ze.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Zp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],HT={x:0,y:0,width:100,height:100},WT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?HT:{x:t[0],y:t[1],width:t[2],height:t[3]}},OT=e=>`
|
|
27992
27900
|
.${e}-wrapper {
|
|
27993
27901
|
box-sizing: border-box;
|
|
27994
27902
|
display: flex;
|
|
@@ -28217,7 +28125,7 @@ export function Burger({
|
|
|
28217
28125
|
clip-path: inset(50%);
|
|
28218
28126
|
white-space: nowrap;
|
|
28219
28127
|
}
|
|
28220
|
-
`,DT=1;function zT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:
|
|
28128
|
+
`,DT=1;function zT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,isUIHidden:l,onUpdateSettings:c}){const{prefix:d}=b.useScopedStyles(),u=s.useMemo(()=>OT(d),[d]),p=n??!1,y=!!r||!!o,S=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),m=(e==null?void 0:e.shape)??"custom",h=(e==null?void 0:e.customPath)??"",x=(e==null?void 0:e.pathFit)??"stretch",w=s.useMemo(()=>WT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),F=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",v=(e==null?void 0:e.textAlign)??"left",P=((e==null?void 0:e.overflowMode)??"clip")==="visible",M=((e==null?void 0:e.fitText)??"off")==="on",K=((e==null?void 0:e.hyphenate)??"off")==="on",X=b.scalingValue((e==null?void 0:e.padding)??0,p),j=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),N=b.scalingValue((e==null?void 0:e.columnGutter)??0,p),_=(e==null?void 0:e.dropCapSize)??DT,T=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??_)),L=p&&y&&!i,Y=p&&!i&&!l,[R,I]=s.useState(!1);s.useEffect(()=>{if(!p||!y){I(!1);return}const ee=()=>I(!0),H=()=>I(!1),be=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ae=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const W of be)window.addEventListener(W,ee);for(const W of ae)window.addEventListener(W,H);return()=>{for(const W of be)window.removeEventListener(W,ee);for(const W of ae)window.removeEventListener(W,H)}},[p,y]);const $=p&&y&&!i&&typeof c=="function",G=!R&&!l,O=Math.max(0,(e==null?void 0:e.pathSnap)??0),U=s.useRef(e??{}),E=s.useRef(""),f=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(f!==E.current)E.current=f,U.current=e??{};else if(e){const{customPath:ee,shape:H,pathFit:be,pathViewBox:ae,imageScale:W,imageFocalX:ke,imageFocalY:ze,image:Xe,...Ue}=e,Qe=U.current;for(const We of Object.keys(Ue))if(Qe[We]!==Ue[We]){U.current={...Qe,...Ue};break}}const[Q,q]=s.useState(null),[pe,k]=s.useState(!1),[me,C]=s.useState(!1),ue=s.useCallback(()=>C(!1),[]),te=U.current.shape??m,fe=!!(Q&&(Q.base===h||Q.serialized===h)),Pe=fe&&Q?Q.serialized:h;s.useEffect(()=>{$||(k(!1),C(!1))},[$]),s.useEffect(()=>{!Q||pe||Q.serialized===h&&q(null)},[Q,h,pe]);const de=s.useMemo(()=>{if(!$)return null;if(Q&&(Q.base===h||Q.serialized===h))return Q.contours;const ee=ki(h);return ee.length?ee:null},[$,Q,h]),we=!!(x==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&de&&(m==="circle"||!Up(de,w))),V=s.useCallback((ee,H,be)=>{const ae=Ho(ee);if(q(W=>({base:W&&(W.base===h||W.serialized===h)?W.base:h,serialized:ae,contours:ee})),H){const W=U.current,ke=be!=null&&be.preserveShape?W.shape:"custom",ze={...W,shape:ke,customPath:ae};U.current=ze,c==null||c(ze)}},[h,c]),ie=s.useMemo(()=>$?{contours:we?de:null,snap:O,needsConversion:!we,onConvert:ee=>{const H=Ho(ee);q({base:H,serialized:H,contours:ee});const be={...U.current,pathFit:"viewbox",pathViewBox:Js,customPath:H};U.current=be,c==null||c(be)},onChange:(ee,H)=>{k(!0),C(!!(H!=null&&H.carryImage)),V(ee,!1)},onCommit:(ee,H)=>{V(ee,!0,H),k(!1)}}:null,[$,we,de,O,c,V]),oe=F==="avoid"&&!!(e!=null&&e.image),le=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ve,Fe]=s.useState(null),Ee=ve??le,Ce=s.useCallback(ee=>Fe(ee),[]),Se=s.useCallback(ee=>{Fe(ee);const H={...U.current,imageFocalX:ee.focalX,imageFocalY:ee.focalY,imageScale:ee.scale};U.current=H,c==null||c(H)},[c]);s.useEffect(()=>{ve&&Math.abs(ve.focalX-le.focalX)<1e-9&&Math.abs(ve.focalY-le.focalY)<1e-9&&Math.abs(ve.scale-le.scale)<1e-9&&Fe(null)},[ve,le]);const g=s.useMemo(()=>!$||!oe?null:{onChange:Ce,onCommit:Se},[$,oe,Ce,Se]),[Z,J]=s.useState(void 0),re=s.useRef(void 0),he=s.useCallback(ee=>{const H=re.current;H!==void 0&&Math.abs(H-ee)<.005||(re.current=ee,J(ee))},[]),z=s.useMemo(()=>M&&typeof Z=="number"?Z:1,[Z,M]),B=ee=>`calc(${ee} * var(--${d}-fit, 1))`,ne=s.useMemo(()=>{var be,ae,W,ke,ze;const ee=(e==null?void 0:e.textFontSize)??.012,H=Math.max((e==null?void 0:e.textLineHeight)??ee,ee);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(be=e==null?void 0:e.textFontSettings)==null?void 0:be.fontWeight,fontStyle:(ae=e==null?void 0:e.textFontSettings)==null?void 0:ae.fontStyle,fontSize:B(b.scalingValue(ee,p)),lineHeight:B(b.scalingValue(H,p)),letterSpacing:B(b.scalingValue((e==null?void 0:e.textLetterSpacing)??0,p)),wordSpacing:B(b.scalingValue((e==null?void 0:e.textWordSpacing)??0,p)),textTransform:(W=e==null?void 0:e.textTextAppearance)==null?void 0:W.textTransform,textDecoration:(ke=e==null?void 0:e.textTextAppearance)==null?void 0:ke.textDecoration,fontVariant:(ze=e==null?void 0:e.textTextAppearance)==null?void 0:ze.fontVariant}},[e,p,d]),ce={[`--${d}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${d}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${d}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:`${d}-wrapper`,style:{...ce},children:a.jsx(_T,{P:d,item:S,shape:te,customPath:h,pathFit:x,viewBox:w,mode:F,align:v,allowOverflow:P,fitEnabled:M,scale:z,onFitScale:he,padding:X,columns:j,gutter:N,hyphenate:K,showOverflowIndicator:Y,dropCapLines:T,dropCapSize:_,showGuides:(L||$)&&G,typography:ne,imageUrl:F==="avoid"?e==null?void 0:e.image:null,imageFocalX:Ee.focalX,imageFocalY:Ee.focalY,imageScale:Ee.scale,imageCustomPath:Pe,imagePathEdited:fe,pathDragActive:pe,pathCarryImage:me,onCarryImageConsumed:ue,pathEditor:G?ie:null,imageEditor:G?g:null})})]})}const BT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
28221
28129
|
import type React from 'react';
|
|
28222
28130
|
import { CommonComponentProps } from '../props';
|
|
28223
28131
|
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -28314,6 +28222,7 @@ export type PretextProps = {
|
|
|
28314
28222
|
isPreviewMode?: boolean;
|
|
28315
28223
|
isEditMode?: boolean;
|
|
28316
28224
|
isSelected?: boolean;
|
|
28225
|
+
isUIHidden?: boolean;
|
|
28317
28226
|
onUpdateSettings?: (settings: PretextSettings) => void;
|
|
28318
28227
|
} & CommonComponentProps;
|
|
28319
28228
|
|
|
@@ -28753,7 +28662,7 @@ export {
|
|
|
28753
28662
|
nearestSegmentHit,
|
|
28754
28663
|
} from './vecContours';
|
|
28755
28664
|
|
|
28756
|
-
export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode, isSelected, onUpdateSettings }: PretextProps) {
|
|
28665
|
+
export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode, isSelected, isUIHidden, onUpdateSettings }: PretextProps) {
|
|
28757
28666
|
const { prefix: P } = useScopedStyles();
|
|
28758
28667
|
const scopedCss = useMemo(() => getCSS(P), [P]);
|
|
28759
28668
|
const editor = isEditor ?? false;
|
|
@@ -28779,7 +28688,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
28779
28688
|
const dropCapSize = settings?.dropCapSize ?? DROP_CAP_SIZE_DEFAULT;
|
|
28780
28689
|
const dropCapLines = Math.max(1, Math.round(settings?.dropCapLines ?? dropCapSize));
|
|
28781
28690
|
const showGuides = editor && selected && !isPreviewMode;
|
|
28782
|
-
const showOverflowIndicator = editor && !isPreviewMode;
|
|
28691
|
+
const showOverflowIndicator = editor && !isPreviewMode && !isUIHidden;
|
|
28783
28692
|
|
|
28784
28693
|
const [isItemTransforming, setIsItemTransforming] = useState(false);
|
|
28785
28694
|
useEffect(() => {
|
|
@@ -28809,7 +28718,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
28809
28718
|
|
|
28810
28719
|
const pathEditing = editor && selected && !isPreviewMode
|
|
28811
28720
|
&& typeof onUpdateSettings === 'function';
|
|
28812
|
-
const shapeOverlayVisible = !isItemTransforming;
|
|
28721
|
+
const shapeOverlayVisible = !isItemTransforming && !isUIHidden;
|
|
28813
28722
|
const pathSnap = Math.max(0, settings?.pathSnap ?? 0);
|
|
28814
28723
|
const settingsRef = useRef(settings ?? {});
|
|
28815
28724
|
const settingsPropsKeyRef = useRef('');
|
|
@@ -29055,4 +28964,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
29055
28964
|
</>
|
|
29056
28965
|
);
|
|
29057
28966
|
}
|
|
29058
|
-
`,uu=[...Zp],jT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},VT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:uu},enum:uu},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words between syllables, using the detected language of the text.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:24,step:1,display:{type:"common-numeric-input"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...jT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...qp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"01M3QM74XGCCGW8DXMAHA0RGGH",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},GT={element:zT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Zp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...qp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:VT,sourceCode:BT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},XT=[Sh,
|
|
28967
|
+
`,uu=[...Zp],jT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},VT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:uu},enum:uu},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words between syllables, using the detected language of the text.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:24,step:1,display:{type:"common-numeric-input"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...jT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...qp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"01M3QM74XGCCGW8DXMAHA0RGGH",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},GT={element:zT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Zp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...qp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:VT,sourceCode:BT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},XT=[Sh,Ph,Lb,Sf,Ef,Df,ry,Py,Ny,By,yv,u0,fx,Tx,sb,vb,Ob,NS,Yb,ZS,Fw,x$,yC,GT];function sa(e){return{assetId:e,name:"",type:"image",objectFit:"cover"}}function UT(e,{text:t,images:n}){switch(e){case"media-pair-list-input":return n.map(i=>({media:[sa(i),sa("")]}));case"media-list-input":return n.map(sa);case"media-input":return n.length>0?sa(n[0]):{assetId:"",name:""};case"rich-text":return[{type:"paragraph",children:[{text:t}]}];case"link-input":return{type:"url",value:"",target:"self"};default:return t}}function qT(e,{pageId:t,slug:n}){return e==="link-input"?{type:"page",value:t,target:"self"}:`/${n}`}function KT(e){var n;const t=((n=e==null?void 0:e.items)==null?void 0:n.properties)??{};return Object.entries(t).map(([i,o])=>{var l;const r=(l=o.display)==null?void 0:l.type;return{fieldKey:i,...o.contentKey!==void 0?{contentKey:o.contentKey}:{},fromEntry:c=>UT(r,c),toPage:c=>qT(r,c)}})}exports.getAvailableStatePanels=b.getAvailableStatePanels;exports.getUnavailableStates=b.getUnavailableStates;exports.isPanelAvailable=b.isPanelAvailable;exports.components=XT;exports.getPostFieldBindings=KT;exports.isSchemaV1=pm;
|