@cntrl-site/components 1.0.97-3 → 1.0.97-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/Components/Pretext/Pretext.d.ts +5 -0
  2. package/dist/Components/Pretext/PretextColumn.d.ts +1 -1
  3. package/dist/Components/Pretext/hyphenation.d.ts +21 -0
  4. package/dist/Components/Pretext/textLayout.d.ts +3 -0
  5. package/dist/export-contract-Ca9b5SgN.js +1 -0
  6. package/dist/export-contract-DQ4zqboX.mjs +282 -0
  7. package/dist/index-1HMblVmZ.js +1 -0
  8. package/dist/index-2JTNRDR1.js +1 -0
  9. package/dist/index-6Pkh3skU.mjs +45858 -0
  10. package/dist/index-7g44aFH6.mjs +2406 -0
  11. package/dist/index-B-0_dAcP.mjs +3966 -0
  12. package/dist/index-B0n2O6vm.mjs +2740 -0
  13. package/dist/index-B1vNL0m-.js +1 -0
  14. package/dist/index-B6E31HBG.js +1 -0
  15. package/dist/index-BA25un1c.mjs +457 -0
  16. package/dist/index-BK-G0i5L.js +1 -0
  17. package/dist/index-B_Fyqx22.mjs +28247 -0
  18. package/dist/index-BkmSPu6z.js +1 -0
  19. package/dist/index-BlAuAthm.js +1 -0
  20. package/dist/index-Bq8huKYW.mjs +2685 -0
  21. package/dist/index-BrL2zv3x.js +1 -0
  22. package/dist/index-By2pnaap.mjs +4107 -0
  23. package/dist/index-C-Y61Lcr.mjs +7087 -0
  24. package/dist/index-C0IKjloI.mjs +114 -0
  25. package/dist/index-C0cxTf5o.js +1 -0
  26. package/dist/index-C2kp589t.mjs +483 -0
  27. package/dist/index-C7aqOvnk.mjs +6479 -0
  28. package/dist/index-CADju5Cy.js +1 -0
  29. package/dist/index-CBQfJnR5.mjs +1469 -0
  30. package/dist/index-CDO1-R3j.js +1 -0
  31. package/dist/index-CG_43X7q.js +1 -0
  32. package/dist/index-CIgabTwE.js +1 -0
  33. package/dist/index-CJ0NMfJ3.js +1 -0
  34. package/dist/index-CNFsG2yO.js +1 -0
  35. package/dist/index-CNGjgoL-.mjs +648 -0
  36. package/dist/index-CbVelYDh.mjs +212 -0
  37. package/dist/index-CcAPGjN3.mjs +6188 -0
  38. package/dist/index-D5u4q2ir.mjs +5660 -0
  39. package/dist/index-D6ylLL_6.mjs +604 -0
  40. package/dist/index-DA8t6EZ4.mjs +255 -0
  41. package/dist/index-DEtZMhOE.mjs +3691 -0
  42. package/dist/index-DGU-dfFs.mjs +3786 -0
  43. package/dist/index-DVS4MiPy.mjs +114 -0
  44. package/dist/index-DapMA5nM.js +1 -0
  45. package/dist/index-DehKWXGA.js +1 -0
  46. package/dist/index-DmSeFq2X.mjs +811 -0
  47. package/dist/index-DtWVe73G.mjs +9278 -0
  48. package/dist/index-HhE2sJlU.js +1 -0
  49. package/dist/index-Rwqfce2n.js +1 -0
  50. package/dist/index-Ypt3vHbi.js +1 -0
  51. package/dist/index-gBhj9Tcu.js +1 -0
  52. package/dist/index-kFrlcZxC.js +1 -0
  53. package/dist/index-kjKI70JX.js +1 -0
  54. package/dist/index-x_p4zv7D.js +1 -0
  55. package/dist/index.js +112 -100
  56. package/dist/index.mjs +9561 -9363
  57. package/package.json +3 -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"),Tt=require("classnames"),$=require("./EmbedMediaFrame-C5O6lDaq.js"),Un=require("react-dom");function rm(e){return e.type==="object"&&e.version===1}const am="ControlSlider-module__wrapper___sHEkd",sm="ControlSlider-module__hoverArrow___A-dOH",lm="ControlSlider-module__sliderItem___QQSkR",cm="ControlSlider-module__sliderImage___9hRl-",dm="ControlSlider-module__arrow___05ghY",um="ControlSlider-module__arrowVertical___tBfVN",pm="ControlSlider-module__nextArrow___-30Yc",mm="ControlSlider-module__arrowInner___aEra3",gm="ControlSlider-module__arrowIcon___S4ztF",hm="ControlSlider-module__arrowImg___2dwJW",fm="ControlSlider-module__mirror___brd6U",ym="ControlSlider-module__pagination___bicLF",vm="ControlSlider-module__paginationInner___bT-P-",xm="ControlSlider-module__paginationVertical___zYqKw",bm="ControlSlider-module__paginationItem___nTRbk",Sm="ControlSlider-module__dot___p1Qun",wm="ControlSlider-module__activeDot___LHFaj",$m="ControlSlider-module__paginationInsideBottom___R3FWn",Cm="ControlSlider-module__paginationInsideTop___V-qb-",Tm="ControlSlider-module__paginationOutsideBottom___14w8D",Im="ControlSlider-module__paginationOutsideTop___SCLqB",Lm="ControlSlider-module__paginationInsideLeft___yOBRZ",Pm="ControlSlider-module__paginationInsideRight___Rtt3o",Mm="ControlSlider-module__paginationOutsideLeft___lahaw",Rm="ControlSlider-module__paginationOutsideRight___EtuQa",Em="ControlSlider-module__imgWrapper___UjEgB",km="ControlSlider-module__captionBlock___dJ6-j",Am="ControlSlider-module__captionTextWrapper___HFlpf",Fm="ControlSlider-module__captionText___uGBVc",Nm="ControlSlider-module__active___WZK4G",_m="ControlSlider-module__withPointerEvents___t-18M",Hm="ControlSlider-module__topLeftAlignment___zjnGM",Wm="ControlSlider-module__topCenterAlignment___gD1xW",Om="ControlSlider-module__topRightAlignment___NMapS",Dm="ControlSlider-module__middleLeftAlignment___OnUrY",zm="ControlSlider-module__middleCenterAlignment___Tdkl0",Bm="ControlSlider-module__middleRightAlignment___wEbfX",jm="ControlSlider-module__bottomLeftAlignment___cTP2-",Vm="ControlSlider-module__bottomCenterAlignment___c54fB",Gm="ControlSlider-module__bottomRightAlignment___kEwrz",Xm="ControlSlider-module__clickOverlay___DZA28",Um="ControlSlider-module__contain___pLyq7",qm="ControlSlider-module__cover___KdDat",$t={wrapper:am,hoverArrow:sm,sliderItem:lm,sliderImage:cm,arrow:dm,arrowVertical:um,nextArrow:pm,arrowInner:mm,arrowIcon:gm,arrowImg:hm,mirror:fm,pagination:ym,paginationInner:vm,paginationVertical:xm,paginationItem:bm,dot:Sm,activeDot:wm,paginationInsideBottom:$m,paginationInsideTop:Cm,paginationOutsideBottom:Tm,paginationOutsideTop:Im,paginationInsideLeft:Lm,paginationInsideRight:Pm,paginationOutsideLeft:Mm,paginationOutsideRight:Rm,imgWrapper:Em,captionBlock:km,captionTextWrapper:Am,captionText:Fm,active:Nm,withPointerEvents:_m,topLeftAlignment:Hm,topCenterAlignment:Wm,topRightAlignment:Om,middleLeftAlignment:Dm,middleCenterAlignment:zm,middleRightAlignment:Bm,bottomLeftAlignment:jm,bottomCenterAlignment:Vm,bottomRightAlignment:Gm,clickOverlay:Xm,contain:Um,cover:qm};function Km(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 Ym(e,t,n){return t&&Km(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",po=1,Qm=2,wo=3,_o=4,Cr=5,sa=6,fa=7,Zm={CREATED:po,MOUNTED:Qm,IDLE:wo,MOVING:_o,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function li(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var ru=setTimeout,_s=function(){};function ic(e){return requestAnimationFrame(e)}function Ma(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ma("object",e)}var ul=Array.isArray,au=tn(Ma,"function"),Ti=tn(Ma,"string"),Tr=tn(Ma,"undefined");function pl(e){return e===null}function su(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function En(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function ii(e,t,n){e&&En(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Vn(e,t){ii(e,Ti(t)?t.split(" "):t,!0)}function Lr(e,t){En(t,e.appendChild.bind(e))}function gl(e,t){En(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return su(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function lu(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?lu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(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 Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function Si(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Si({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){En(t||pr(e),function(n){delete e[n]})}function Gn(e,t){En(e,function(n){En(t,function(i){n&&n.removeAttribute(i)})})}function Wt(e,t,n){dr(t)?Gi(t,function(i,o){Wt(e,o,i)}):En(e,function(i){pl(n)||n===""?Gn(i,t):i.setAttribute(t,String(n))})}function yo(e,t,n){var i=document.createElement(e);return t&&(Ti(t)?Vn(i,t):Wt(i,t)),n&&Lr(n,i),i}function Nn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(e,t){Nn(e,"display",t)}function cu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function _n(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ui(e){En(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ti(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function uu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ri(e.querySelectorAll(t)):[]}function oi(e,t){ii(e,t,!1)}function Hs(e){return e.timeStamp}function Ai(e){return Ti(e)?e:e?e+"px":""}var Mr="splide",fl="data-"+Mr;function ar(e,t){if(!e)throw new Error("["+Mr+"] "+(t||""))}var Ii=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function pu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Ii(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function so(e,t,n){var i=Ii(t,n),o=ya(t,n);return Ii(ya(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return En(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function Jm(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function mu(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){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,x,d,h])})}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){En(l,function(u){u&&En(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]()}),li(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ei="mounted",Ds="ready",ci="move",Ho="moved",vl="click",gu="active",hu="inactive",fu="visible",yu="hidden",sn="refresh",gn="updated",$o="resize",Ra="resized",vu="drag",xu="dragging",bu="dragged",Ea="scroll",Yi="scrolled",eg="overflow",xl="destroy",Su="arrows:mounted",wu="arrows:updated",$u="pagination:mounted",Cu="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Tu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",Iu="sk",Lu="sh",xa="ei";function rn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=mu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ii((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=ic(p)}}function y(E){E||h(),r=o()-(E?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function v(E){e=E}function b(){return d}return{start:y,rewind:m,pause:x,cancel:h,set:v,isPaused:b}}function tg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function ng(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ig(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=mu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(v,b){return h?+v-+b:+b-+v}).forEach(function(v){p(o[v],"("+(h?"min":"max")+"-width:"+v+"px)")}),p(r,nc),y()}function u(h){h&&l.destroy()}function p(h,v){var b=matchMedia(v);l.bind(b,"change",y),c.push([h,b])}function y(){var h=i.is(fa),v=n.direction,b=c.reduce(function(E,f){return Si(E,f[1].matches?f[0]:{})},{});oc(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):v!==n.direction&&e.refresh()}function x(h){matchMedia(nc).matches&&(h?Si(n,r):oc(n,pr(r)))}function m(h,v,b){Si(n,h),v&&Si(Object.getPrototypeOf(n),h),(b||!i.is(po))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Pu=Aa+"Up",Mu=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Pu,Na],ArrowRight:[Mu,Fa]};function og(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return qa[r]&&qa[r][d]||r.replace(/width|left|right/i,function(u,p){var y=qa[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ri="role",vo="tabindex",rg="disabled",Hn="aria-",Rr=Hn+"controls",Ru=Hn+"current",lc=Hn+"selected",Mn=Hn+"label",Cl=Hn+"labelledby",Eu=Hn+"hidden",Tl=Hn+"orientation",fr=Hn+"roledescription",cc=Hn+"live",dc=Hn+"busy",uc=Hn+"atomic",Il=[ri,vo,rg,Rr,Ru,Mn,Cl,Eu,Tl,fr],qn=Mr+"__",ki="is-",Ka=Mr,pc=qn+"track",ag=qn+"list",Ha=qn+"slide",ku=Ha+"--clone",sg=Ha+"__container",Ll=qn+"arrows",Wa=qn+"arrow",Au=Wa+"--prev",Fu=Wa+"--next",Oa=qn+"pagination",Nu=Oa+"__page",lg=qn+"progress",cg=lg+"__bar",dg=qn+"toggle",ug=qn+"spinner",pg=qn+"sr",mg=ki+"initialized",qi=ki+"active",_u=ki+"prev",Hu=ki+"next",zs=ki+"visible",Bs=ki+"loading",Wu=ki+"focus-in",Ou=ki+"overflow",gg=[qi,zs,_u,Hu,Bs,Wu,Ou],hg={slide:Ha,clone:ku,arrows:Ll,arrow:Wa,prev:Au,next:Fu,pagination:Oa,page:Nu,spinner:ug};function fg(e,t){if(au(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var yg=5,mc=200,Du="touchstart mousedown",Ya="touchmove mousemove",Qa="touchend touchcancel mouseup click";function vg(e,t,n){var i=rn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,m,h;function v(){w(),H(),f()}function b(){o(sn,E),o(sn,v),o(gn,f),r(document,Du+" keydown",function(M){h=M.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!h)})}function E(M){var _=Il.concat("style");li(u),oi(l,p),oi(x,y),Gn([x,m],_),Gn(l,M?_:["style",fr])}function f(){oi(l,p),oi(x,y),p=B(Ka),y=B(pc),Vn(l,p),Vn(x,y),Wt(l,Mn,n.label),Wt(l,Cl,n.labelledby)}function w(){x=q("."+pc),m=Pr(x,"."+ag),ar(x&&m,"A track/list element is missing."),la(u,lu(m,"."+Ha+":not(."+ku+")")),Gi({arrows:Ll,pagination:Oa,prev:Au,next:Fu,bar:cg,toggle:dg},function(M,_){d[_]=q("."+M)}),mr(d,{root:l,track:x,list:m,slides:u})}function H(){var M=l.id||Jm(Mr),_=n.role;l.id=M,x.id=x.id||M+"-track",m.id=m.id||M+"-list",!_n(l,ri)&&l.tagName!=="SECTION"&&_&&Wt(l,ri,_),Wt(l,fr,c.carousel),Wt(m,ri,"presentation")}function q(M){var _=uu(l,M);return _&&fg(_,"."+Ka)===l?_:void 0}function B(M){return[M+"--"+n.type,M+"--"+n.direction,n.drag&&M+"--draggable",n.isNavigation&&M+"--nav",M===Ka&&qi]}return mr(d,{setup:v,mount:b,destroy:E})}var Co="slide",Wo="loop",Er="fade";function xg(e,t,n,i){var o=rn(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,h=p.pagination,v=p.slideFocus,b=d.Direction.resolve,E=_n(i,"style"),f=_n(i,Mn),w=n>-1,H=Pr(i,"."+sg),q;function B(){w||(i.id=u.id+"-slide"+yl(t+1),Wt(i,ri,h?"tabpanel":"group"),Wt(i,fr,m.slide),Wt(i,Mn,f||Os(m.slideLabel,[t+1,e.length]))),M()}function M(){c(i,"click",tn(l,vl,X)),c(i,"keydown",tn(l,Iu,X)),r([Ho,Lu,Yi],L),r(bl,j),x&&r(ci,C)}function _(){q=!0,o.destroy(),oi(i,gg),Gn(i,Il),Wt(i,"style",E),Wt(i,Mn,f||"")}function j(){var P=e.splides.map(function(k){var O=k.splide.Components.Slides.getAt(t);return O?O.slide.id:""}).join(" ");Wt(i,Mn,Os(m.slideX,(w?n:t)+1)),Wt(i,Rr,P),Wt(i,ri,v?"button":""),v&&Gn(i,fr)}function C(){q||L()}function L(){if(!q){var P=e.index;W(),A(),ii(i,_u,t===P-1),ii(i,Hu,t===P+1)}}function W(){var P=T();P!==rc(i,qi)&&(ii(i,qi,P),Wt(i,Ru,y&&P||""),l(P?gu:hu,X))}function A(){var P=V(),k=!P&&(!T()||w);if(e.state.is([_o,Cr])||Wt(i,Eu,k||""),Wt(hl(i,p.focusableNodes||""),vo,k?-1:""),v&&Wt(i,vo,k?-1:0),P!==rc(i,zs)&&(ii(i,zs,P),l(P?fu:yu,X)),!P&&document.activeElement===i){var O=d.Slides.getAt(e.index);O&&cu(O.slide)}}function I(P,k,O){Nn(O&&H||i,P,k)}function T(){var P=e.index;return P===t||p.cloneStatus&&P===n}function V(){if(e.is(Er))return T();var P=Ln(d.Elements.track),k=Ln(i),O=b("left",!0),ie=b("right",!0);return va(P[O])<=hr(k[O])&&va(k[ie])<=hr(P[ie])}function S(P,k){var O=vn(P-t);return!w&&(p.rewind||e.is(Wo))&&(O=Ii(O,e.length-O)),O<=k}var X={index:t,slideIndex:n,slide:i,container:H,isClone:w,mount:B,destroy:_,update:L,style:I,isWithin:S};return X}function bg(e,t,n){var i=rn(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(sn,m),o(sn,x)}function x(){d.forEach(function(L,W){v(L,W,-1)})}function m(){q(function(L){L.destroy()}),li(p)}function h(){q(function(L){L.update()})}function v(L,W,A){var I=xg(e,W,A,L);I.mount(),p.push(I),p.sort(function(T,V){return T.index-V.index})}function b(L){return L?B(function(W){return!W.isClone}):p}function E(L){var W=t.Controller,A=W.toIndex(L),I=W.hasFocus()?1:n.perPage;return B(function(T){return ca(T.index,A,A+I-1)})}function f(L){return B(L)[0]}function w(L,W){En(L,function(A){if(Ti(A)&&(A=du(A)),su(A)){var I=d[W];I?gl(A,I):Lr(u,A),Vn(A,n.classes.slide),_(A,tn(r,$o))}}),r(sn)}function H(L){Ui(B(L).map(function(W){return W.slide})),r(sn)}function q(L,W){b(W).forEach(L)}function B(L){return p.filter(au(L)?L:function(W){return Ti(L)?ur(W.slide,L):ml(Ir(L),W.index)})}function M(L,W,A){q(function(I){I.style(L,W,A)})}function _(L,W){var A=hl(L,"img"),I=A.length;I?A.forEach(function(T){l(T,"load error",function(){--I||W()})}):W()}function j(L){return L?d.length:p.length}function C(){return p.length>n.perPage}return{mount:y,destroy:m,update:h,register:v,get:b,getIn:E,getAt:f,add:w,remove:H,forEach:q,filter:B,style:M,getLength:j,isEnough:C}}function Sg(e,t,n){var i=rn(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,h=c.style,v,b,E;function f(){w(),r(window,"resize load",ng(tn(l,$o))),o([gn,sn],w),o($o,H)}function w(){v=n.direction===_a,Nn(p,"maxWidth",Ai(n.width)),Nn(y,d("paddingLeft"),q(!1)),Nn(y,d("paddingRight"),q(!0)),H(!0)}function H(X){var P=Ln(p);(X||b.width!==P.width||b.height!==P.height)&&(Nn(y,"height",B()),h(d("marginRight"),Ai(n.gap)),h("width",_()),h("height",j(),!0),b=P,l(Ra),E!==(E=S())&&(ii(p,Ou,E),l(eg,E)))}function q(X){var P=n.padding,k=d(X?"right":"left");return P&&Ai(P[k]||(dr(P)?0:P))||"0px"}function B(){var X="";return v&&(X=M(),ar(X,"height or heightRatio is missing."),X="calc("+X+" - "+q(!1)+" - "+q(!0)+")"),X}function M(){return Ai(n.height||Ln(x).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(v?"":C())}function j(){return Ai(n.fixedHeight)||(v?n.autoHeight?null:C():M())}function C(){var X=Ai(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function L(){return Ln(x)[d("width")]}function W(X,P){var k=m(X||0);return k?Ln(k.slide)[d("width")]+(P?0:T()):0}function A(X,P){var k=m(X);if(k){var O=Ln(k.slide)[d("right")],ie=Ln(x)[d("left")];return vn(O-ie)+(P?0:T())}return 0}function I(X){return A(e.length-1)-A(0)+W(0,X)}function T(){var X=m(0);return X&&parseFloat(Nn(X.slide,d("marginRight")))||0}function V(X){return parseFloat(Nn(y,d("padding"+(X?"Right":"Left"))))||0}function S(){return e.is(Er)||I(!0)>L()}return{mount:f,resize:H,listSize:L,slideSize:W,sliderSize:I,totalSize:A,getPadding:V,isOverflow:S}}var wg=2;function $g(e,t,n){var i=rn(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,y),o([gn,$o],m),(u=b())&&(h(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){Ui(d),li(d),i.destroy()}function m(){var E=b();u!==E&&(u<E||!E)&&i.emit(sn)}function h(E){var f=l.get().slice(),w=f.length;if(w){for(;f.length<E;)la(f,f);la(f.slice(-E),f.slice(0,E)).forEach(function(H,q){var B=q<E,M=v(H.slide,q);B?gl(M,f[0].slide):Lr(r.list,M),la(d,M),l.register(M,q-E+(B?0:w),H.index)})}}function v(E,f){var w=E.cloneNode(!0);return Vn(w,n.classes.clone),w.id=e.root.id+"-clone"+yl(f+1),w}function b(){var E=n.clones;if(!e.is(Wo))E=0;else if(Tr(E)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),w=f&&hr(Ln(r.track)[c("width")]/f);E=w||n[c("autoWidth")]&&e.length||n.perPage*wg}return E}return{mount:p,destroy:x}}function Cg(e,t,n){var i=rn(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,h=m.resolve,v=m.orient,b=t.Elements,E=b.list,f=b.track,w;function H(){w=t.Transition,o([Ei,Ra,gn,sn],q)}function q(){t.Controller.isBusy()||(t.Scroll.cancel(),M(e.index),t.Slides.update())}function B(k,O,ie,ae){k!==O&&X(k>ie)&&(L(),_(C(I(),k>ie),!0)),l(_o),r(ci,O,ie,k),w.start(O,function(){l(wo),r(Ho,O,ie,k),ae&&ae()})}function M(k){_(A(k,!0))}function _(k,O){if(!e.is(Er)){var ie=O?k:j(k);Nn(E,"transform","translate"+h("X")+"("+ie+"px)"),k!==ie&&r(Lu)}}function j(k){if(e.is(Wo)){var O=W(k),ie=O>t.Controller.getEnd(),ae=O<0;(ae||ie)&&(k=C(k,ie))}return k}function C(k,O){var ie=k-S(O),ae=x();return k-=v(ae*(hr(vn(ie)/ae)||1))*(O?1:-1),k}function L(){_(I(),!0),w.cancel()}function W(k){for(var O=t.Slides.get(),ie=0,ae=1/0,D=0;D<O.length;D++){var se=O[D].index,R=vn(A(se,!0)-k);if(R<=ae)ae=R,ie=se;else break}return ie}function A(k,O){var ie=v(p(k-1)-V(k));return O?T(ie):ie}function I(){var k=h("left");return Ln(E)[k]-Ln(f)[k]+v(u(!1))}function T(k){return n.trimSpace&&e.is(Co)&&(k=so(k,0,v(x(!0)-y()))),k}function V(k){var O=n.focus;return O==="center"?(y()-d(k,!0))/2:+O*d(k)||0}function S(k){return A(k?t.Controller.getEnd():0,!!n.trimSpace)}function X(k){var O=v(C(I(),k));return k?O>=0:O<=E[h("scrollWidth")]-Ln(f)[h("width")]}function P(k,O){O=Tr(O)?I():O;var ie=k!==!0&&v(O)<v(S(!1)),ae=k!==!1&&v(O)>v(S(!0));return ie||ae}return{mount:H,move:B,jump:M,translate:_,shift:C,cancel:L,toIndex:W,toPosition:A,getPosition:I,getLimit:S,exceededLimit:P,reposition:q}}function Tg(e,t,n){var i=rn(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,h=e.is(Wo),v=e.is(Co),b=tn(I,!1),E=tn(I,!0),f=n.start||0,w,H=f,q,B,M;function _(){j(),o([gn,sn,xa],j),o(Ra,C)}function j(){q=x(!0),B=n.perMove,M=n.perPage,w=X();var R=so(f,0,m?w:q-1);R!==f&&(f=R,l.reposition())}function C(){w!==X()&&r(xa)}function L(R,de,te){if(!se()){var Se=A(R),Ce=S(Se);Ce>-1&&(de||Ce!==f)&&(ie(Ce),l.move(Se,Ce,H,te))}}function W(R,de,te,Se){t.Scroll.scroll(R,de,te,function(){var Ce=S(l.toIndex(c()));ie(m?Ii(Ce,w):Ce),Se&&Se()})}function A(R){var de=f;if(Ti(R)){var te=R.match(/([+\-<>])(\d+)?/)||[],Se=te[1],Ce=te[2];Se==="+"||Se==="-"?de=T(f+ +(""+Se+(+Ce||1)),f):Se===">"?de=Ce?P(+Ce):b(!0):Se==="<"&&(de=E(!0))}else de=h?R:so(R,0,w);return de}function I(R,de){var te=B||(D()?1:M),Se=T(f+te*(R?-1:1),f,!(B||D()));return Se===-1&&v&&!pu(c(),d(!R),1)?R?0:w:de?Se:S(Se)}function T(R,de,te){if(y()||D()){var Se=V(R);Se!==R&&(de=R,R=Se,te=!1),R<0||R>w?!B&&(ca(0,R,de,!0)||ca(w,de,R,!0))?R=P(k(R)):h?R=te?R<0?-(q%M||M):q:R:n.rewind?R=R<0?w:0:R=-1:te&&R!==de&&(R=P(k(de)+(R<de?-1:1)))}else R=-1;return R}function V(R){if(v&&n.trimSpace==="move"&&R!==f)for(var de=c();de===u(R,!0)&&ca(R,0,e.length-1,!n.rewind);)R<f?--R:++R;return R}function S(R){return h?(R+q)%q||0:R}function X(){for(var R=q-(D()||h&&B?1:M);m&&R-- >0;)if(u(q-1,!0)!==u(R,!0)){R++;break}return so(R,0,q-1)}function P(R){return so(D()?R:M*R,0,w)}function k(R){return D()?Ii(R,w):va((R>=w?q-1:R)/M)}function O(R){var de=l.toIndex(R);return v?so(de,0,w):de}function ie(R){R!==f&&(H=f,f=R)}function ae(R){return R?H:f}function D(){return!Tr(n.focus)||n.isNavigation}function se(){return e.state.is([_o,Cr])&&!!n.waitForTransition}return{mount:_,go:L,scroll:W,getNext:b,getPrev:E,getAdjacent:I,getEnd:X,setIndex:ie,getIndex:ae,toIndex:P,toPage:k,toDest:O,hasFocus:D,isBusy:se}}var Ig="http://www.w3.org/2000/svg",Lg="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 Pg(e,t,n){var i=rn(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,h=u.prev,v=u.next,b,E,f={};function w(){q(),o(gn,H)}function H(){B(),w()}function q(){var W=n.arrows;W&&!(h&&v)&&j(),h&&v&&(mr(f,{prev:h,next:v}),gr(m,W?"":"none"),Vn(m,E=Ll+"--"+n.direction),W&&(M(),L(),Wt([h,v],Rr,x.id),l(Su,h,v)))}function B(){i.destroy(),oi(m,E),b?(Ui(y?[h,v]:m),h=v=null):Gn([h,v],Il)}function M(){o([Ei,Ho,sn,Yi,xa],L),r(v,"click",tn(_,">")),r(h,"click",tn(_,"<"))}function _(W){p.go(W,!0)}function j(){m=y||yo("div",c.arrows),h=C(!0),v=C(!1),b=!0,Lr(m,[h,v]),!y&&gl(m,x)}function C(W){var A='<button class="'+c.arrow+" "+(W?c.prev:c.next)+'" type="button"><svg xmlns="'+Ig+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Lg)+'" />';return du(A)}function L(){if(h&&v){var W=e.index,A=p.getPrev(),I=p.getNext(),T=A>-1&&W<A?d.last:d.prev,V=I>-1&&W>I?d.first:d.next;h.disabled=A<0,v.disabled=I<0,Wt(h,Mn,T),Wt(v,Mn,V),l(wu,h,v,A,I)}}return{arrows:f,mount:w,destroy:B,update:L}}var Mg=fl+"-interval";function Rg(e,t,n){var i=rn(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),M),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,m=n.autoplay,h,v,b=m==="pause";function E(){m&&(f(),x&&Wt(x,Rr,u.track.id),b||w(),B())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(j){h=j.type==="mouseenter",q()}),n.pauseOnFocus&&r(y,"focusin focusout",function(j){v=j.type==="focusin",q()}),x&&r(x,"click",function(){b?w():H(!0)}),o([ci,Ea,sn],c.rewind),o(ci,_)}function w(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),v=h=b=!1,B(),l(Sl))}function H(j){j===void 0&&(j=!0),b=!!j,B(),d()||(c.pause(),l(wl))}function q(){b||(h||v?H(!1):w())}function B(){x&&(ii(x,qi,!b),Wt(x,Mn,n.i18n[b?"play":"pause"]))}function M(j){var C=u.bar;C&&Nn(C,"width",j*100+"%"),l(Tu,j)}function _(j){var C=t.Slides.getAt(j);c.set(C&&+_n(C.slide,Mg)||n.interval)}return{mount:E,destroy:c.cancel,play:w,pause:H,isPaused:d}}function Eg(e,t,n){var i=rn(e),o=i.on;function r(){n.cover&&(o($l,tn(c,!0)),o([Ei,gn,sn],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 kg=10,Ag=600,Fg=.6,Ng=1.5,_g=800;function Hg(e,t,n){var i=rn(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(Co),m,h,v=1;function b(){o(ci,H),o([gn,sn],q)}function E(M,_,j,C,L){var W=d();if(H(),j&&(!x||!p())){var A=t.Layout.sliderSize(),I=Ws(M)*A*va(vn(M)/A)||0;M=c.toPosition(t.Controller.toDest(M%A))+I}var T=pu(W,M,1);v=1,_=T?0:_||ya(vn(M-W)/Ng,_g),h=C,m=ka(_,f,tn(w,W,M,L),1),l(Cr),r(Ea),m.start()}function f(){l(wo),h&&h(),r(Yi)}function w(M,_,j,C){var L=d(),W=M+(_-M)*B(C),A=(W-L)*v;y(L+A),x&&!j&&p()&&(v*=Fg,vn(A)<kg&&E(u(p(!0)),Ag,!1,h,!0))}function H(){m&&m.cancel()}function q(){m&&!m.isPaused()&&(H(),f())}function B(M){var _=n.easingFunc;return _?_(M):1-Math.pow(1-M,4)}return{mount:b,destroy:H,scroll:E,cancel:q}}var lo={passive:!1,capture:!0};function Wg(e,t,n){var i=rn(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,h=t.Direction,v=h.resolve,b=h.orient,E=u.getPosition,f=u.exceededLimit,w,H,q,B,M,_=!1,j,C,L;function W(){l(x,Ya,_s,lo),l(x,Qa,_s,lo),l(x,Du,I,lo),l(x,"click",S,{capture:!0}),l(x,"dragstart",ti),o([Ei,gn],A)}function A(){var Q=n.drag;ue(!Q),B=Q==="free"}function I(Q){if(j=!1,!C){var re=Ce(Q);Se(Q.target)&&(re||!Q.button)&&(y.isBusy()?ti(Q,!0):(L=re?x:window,M=d.is([_o,Cr]),q=null,l(L,Ya,T,lo),l(L,Qa,V,lo),u.cancel(),p.cancel(),X(Q)))}}function T(Q){if(d.is(sa)||(d.set(sa),r(vu)),Q.cancelable)if(M){u.translate(w+te(D(Q)));var re=se(Q)>mc,fe=_!==(_=f());(re||fe)&&X(Q),j=!0,r(xu),ti(Q)}else O(Q)&&(M=k(Q),ti(Q))}function V(Q){d.is(sa)&&(d.set(wo),r(bu)),M&&(P(Q),ti(Q)),c(L,Ya,T),c(L,Qa,V),M=!1}function S(Q){!C&&j&&ti(Q,!0)}function X(Q){q=H,H=Q,w=E()}function P(Q){var re=ie(Q),fe=ae(re),he=n.rewind&&n.rewindByDrag;m(!1),B?y.scroll(fe,0,n.snap):e.is(Er)?y.go(b(Ws(re))<0?he?"<":"-":he?">":"+"):e.is(Co)&&_&&he?y.go(f(!0)?">":"<"):y.go(y.toDest(fe),!0),m(!0)}function k(Q){var re=n.dragMinThreshold,fe=dr(re),he=fe&&re.mouse||0,be=(fe?re.touch:+re)||10;return vn(D(Q))>(Ce(Q)?be:he)}function O(Q){return vn(D(Q))>vn(D(Q,!0))}function ie(Q){if(e.is(Wo)||!_){var re=se(Q);if(re&&re<mc)return D(Q)/re}return 0}function ae(Q){return E()+Ws(Q)*Ii(vn(Q)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function D(Q,re){return de(Q,re)-de(R(Q),re)}function se(Q){return Hs(Q)-Hs(R(Q))}function R(Q){return H===Q&&q||H}function de(Q,re){return(Ce(Q)?Q.changedTouches[0]:Q)["page"+v(re?"Y":"X")]}function te(Q){return Q/(_&&e.is(Co)?yg:1)}function Se(Q){var re=n.noDrag;return!ur(Q,"."+Nu+", ."+Wa)&&(!re||!ur(Q,re))}function Ce(Q){return typeof TouchEvent<"u"&&Q instanceof TouchEvent}function ve(){return M}function ue(Q){C=Q}return{mount:W,disable:ue,isDragging:ve}}var Og={Spacebar:" ",Right:Na,Left:Fa,Up:Pu,Down:Mu};function Pl(e){return e=Ti(e)?e:e.key,Og[e]||e}var gc="keydown";function Dg(e,t,n){var i=rn(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(gn,m),o(gn,x),o(ci,v)}function x(){var E=n.keyboard;E&&(u=E==="global"?window:c,r(u,gc,b))}function m(){l(u,gc)}function h(E){p=E}function v(){var E=p;p=!0,ru(function(){p=E})}function b(E){if(!p){var f=Pl(E);f===d(Fa)?e.go("<"):f===d(Na)&&e.go(">")}}return{mount:y,destroy:m,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",zg="["+sr+"], ["+da+"]";function Bg(e,t,n){var i=rn(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Ho,Yi],p=[];function y(){n.lazyLoad&&(x(),o(sn,x))}function x(){li(p),m(),d?E():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(f){hl(f.slide,zg).forEach(function(w){var H=_n(w,sr),q=_n(w,da);if(H!==w.src||q!==w.srcset){var B=n.classes.spinner,M=w.parentElement,_=Pr(M,"."+B)||yo("span",B,M);p.push([w,f,_]),w.src||gr(w,"none")}})})}function h(){p=p.filter(function(f){var w=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,w)?v(f):!0}),p.length||r(u)}function v(f){var w=f[0];Vn(f[1].slide,Bs),l(w,"load error",tn(b,f)),Wt(w,"src",_n(w,sr)),Wt(w,"srcset",_n(w,da)),Gn(w,sr),Gn(w,da)}function b(f,w){var H=f[0],q=f[1];oi(q.slide,Bs),w.type!=="error"&&(Ui(f[2]),gr(H,""),c($l,H,q),c($o)),d&&E()}function E(){p.length&&v(p.shift())}return{mount:y,destroy:tn(li,p),check:h}}function jg(e,t,n){var i=rn(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,h=d.pagination,v=[],b,E;function f(){w(),o([gn,sn,xa],f);var C=n.pagination;h&&gr(h,C?"":"none"),C&&(o([ci,Ea,Yi],j),H(),j(),r($u,{list:b,items:v},_(e.index)))}function w(){b&&(Ui(h?Ri(b.children):b),oi(b,E),li(v),b=null),i.destroy()}function H(){var C=e.length,L=n.classes,W=n.i18n,A=n.perPage,I=p()?u.getEnd()+1:hr(C/A);b=h||yo("ul",L.pagination,d.track.parentElement),Vn(b,E=Oa+"--"+M()),Wt(b,ri,"tablist"),Wt(b,Mn,W.select),Wt(b,Tl,M()===_a?"vertical":"");for(var T=0;T<I;T++){var V=yo("li",null,b),S=yo("button",{class:L.page,type:"button"},V),X=c.getIn(T).map(function(k){return k.slide.id}),P=!p()&&A>1?W.pageX:W.slideX;l(S,"click",tn(q,T)),n.paginationKeyboard&&l(S,"keydown",tn(B,T)),Wt(V,ri,"presentation"),Wt(S,ri,"tab"),Wt(S,Rr,X.join(" ")),Wt(S,Mn,Os(P,T+1)),Wt(S,vo,-1),v.push({li:V,button:S,page:T})}}function q(C){x(">"+C,!0)}function B(C,L){var W=v.length,A=Pl(L),I=M(),T=-1;A===m(Na,!1,I)?T=++C%W:A===m(Fa,!1,I)?T=(--C+W)%W:A==="Home"?T=0:A==="End"&&(T=W-1);var V=v[T];V&&(cu(V.button),x(">"+T),ti(L,!0))}function M(){return n.paginationDirection||n.direction}function _(C){return v[u.toPage(C)]}function j(){var C=_(y(!0)),L=_(y());if(C){var W=C.button;oi(W,qi),Gn(W,lc),Wt(W,vo,-1)}if(L){var A=L.button;Vn(A,qi),Wt(A,lc,!0),Wt(A,vo,"")}r(Cu,{list:b,items:v},C,L)}return{items:v,mount:f,destroy:w,getAt:_,update:j}}var Vg=[" ","Enter"];function Gg(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()}),li(r)}function d(){c(),l()}function u(h,v){var b=rn(h);b.on(ci,function(E,f,w){v.go(v.is(Wo)?w:E)}),r.push(b)}function p(){var h=rn(e),v=h.on;v(vl,x),v(Iu,m),v([Ei,gn],y),r.push(h),h.emit(bl,e.splides)}function y(){Wt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(h){e.go(h.index)}function m(h,v){ml(Vg,Pl(v))&&(x(h),ti(v))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Xg(e,t,n){var i=rn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,lo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=Hs(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;vn(p)>m&&x-r>h&&(e.go(y?"<":">"),r=x),d(y)&&ti(u)}}function d(u){return!n.releaseWheel||e.state.is(_o)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Ug=90;function qg(e,t,n){var i=rn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=yo("span",pg),d=ka(Ug,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Wt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Ho,Yi],tn(p,!0)))}function p(m){Wt(r,dc,m),m?(Lr(r,c),d.start()):(Ui(c),d.cancel())}function y(){Gn(r,[cc,uc,dc]),Ui(c)}function x(m){l&&Wt(r,cc,m?"off":"polite")}return{mount:u,disable:x,destroy:y}}var Kg=Object.freeze({__proto__:null,Media:ig,Direction:og,Elements:vg,Slides:bg,Layout:Sg,Clones:$g,Move:Cg,Controller:Tg,Arrows:Pg,Autoplay:Rg,Cover:Eg,Scroll:Hg,Drag:Wg,Keyboard:Dg,LazyLoad:Bg,Pagination:jg,Sync:Gg,Wheel:Xg,Live:qg}),Yg={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"},Qg={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:hg,i18n:Yg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zg(e,t,n){var i=t.Slides;function o(){rn(e).on([Ei,sn],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),ru(d)}return{mount:o,start:l,cancel:_s}}function Jg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(Nn,l,"transition"),d;function u(){rn(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,h){var v=i.toPosition(m,!0),b=i.getPosition(),E=x(m);vn(v-b)>=1&&E>=1?n.useScroll?r.scroll(v,E,!1,h):(c("transform "+E+"ms "+n.easing),i.translate(v,!0),d=h):(i.jump(m),h())}function y(){c(""),r.cancel()}function x(m){var h=n.rewindSpeed;if(e.is(Co)&&h){var v=o.getIndex(!0),b=o.getEnd();if(v===0&&m>=b||v>=b&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:y}}var eh=(function(){function e(n,i){this.event=rn(),this.Components={},this.state=tg(po),this.splides=[],this._o={},this._E={};var o=Ti(n)?uu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Si({label:_n(o,Mn)||"",labelledby:_n(o,Cl)||""},Qg,e.defaults,i||{});try{Si(i,JSON.parse(_n(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Si({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([po,fa]),"Already mounted!"),l.set(po),this._C=c,this._T=o||this._T||(this.is(Er)?Zg:Jg),this._E=i||this._E;var d=mr({},Kg,this._E,{Transition:this._T});return Gi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(Ei),Vn(this.root,mg),l.set(wo),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(wo)&&(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(Ri(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(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(po)?rn(this).on(Ds,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&li(this.splides),r.set(fa)),this},Ym(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})(),Ml=eh;Ml.defaults={};Ml.STATES=Zm;var hc=[[Ei,"onMounted"],[Ds,"onReady"],[ci,"onMove"],[Ho,"onMoved"],[vl,"onClick"],[gu,"onActive"],[hu,"onInactive"],[fu,"onVisible"],[yu,"onHidden"],[sn,"onRefresh"],[gn,"onUpdated"],[$o,"onResize"],[Ra,"onResized"],[vu,"onDrag"],[xu,"onDragging"],[bu,"onDragged"],[Ea,"onScroll"],[Yi,"onScrolled"],[xl,"onDestroy"],[Su,"onArrowsMounted"],[wu,"onArrowsUpdated"],[$u,"onPaginationMounted"],[Cu,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Tu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(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(ba(e)&&ba(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 th(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function nh(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 nh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=Vs(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ih=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=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 Ml(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();th(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){hc.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",...hc.map(r=>r[1])])},n?s.createElement(ih,null,i):i)}},kl=({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"),Pt=require("classnames"),w=require("./EmbedMediaFrame-C5O6lDaq.js"),Un=require("react-dom");function um(e){return e.type==="object"&&e.version===1}const pm="ControlSlider-module__wrapper___sHEkd",mm="ControlSlider-module__hoverArrow___A-dOH",gm="ControlSlider-module__sliderItem___QQSkR",hm="ControlSlider-module__sliderImage___9hRl-",fm="ControlSlider-module__arrow___05ghY",ym="ControlSlider-module__arrowVertical___tBfVN",vm="ControlSlider-module__nextArrow___-30Yc",xm="ControlSlider-module__arrowInner___aEra3",bm="ControlSlider-module__arrowIcon___S4ztF",Sm="ControlSlider-module__arrowImg___2dwJW",wm="ControlSlider-module__mirror___brd6U",$m="ControlSlider-module__pagination___bicLF",Cm="ControlSlider-module__paginationInner___bT-P-",Tm="ControlSlider-module__paginationVertical___zYqKw",Im="ControlSlider-module__paginationItem___nTRbk",Lm="ControlSlider-module__dot___p1Qun",Pm="ControlSlider-module__activeDot___LHFaj",Mm="ControlSlider-module__paginationInsideBottom___R3FWn",Rm="ControlSlider-module__paginationInsideTop___V-qb-",Em="ControlSlider-module__paginationOutsideBottom___14w8D",km="ControlSlider-module__paginationOutsideTop___SCLqB",Am="ControlSlider-module__paginationInsideLeft___yOBRZ",Fm="ControlSlider-module__paginationInsideRight___Rtt3o",Nm="ControlSlider-module__paginationOutsideLeft___lahaw",_m="ControlSlider-module__paginationOutsideRight___EtuQa",Hm="ControlSlider-module__imgWrapper___UjEgB",Wm="ControlSlider-module__captionBlock___dJ6-j",Om="ControlSlider-module__captionTextWrapper___HFlpf",Dm="ControlSlider-module__captionText___uGBVc",zm="ControlSlider-module__active___WZK4G",Bm="ControlSlider-module__withPointerEvents___t-18M",jm="ControlSlider-module__topLeftAlignment___zjnGM",Vm="ControlSlider-module__topCenterAlignment___gD1xW",Gm="ControlSlider-module__topRightAlignment___NMapS",Xm="ControlSlider-module__middleLeftAlignment___OnUrY",qm="ControlSlider-module__middleCenterAlignment___Tdkl0",Um="ControlSlider-module__middleRightAlignment___wEbfX",Km="ControlSlider-module__bottomLeftAlignment___cTP2-",Ym="ControlSlider-module__bottomCenterAlignment___c54fB",Qm="ControlSlider-module__bottomRightAlignment___kEwrz",Zm="ControlSlider-module__clickOverlay___DZA28",Jm="ControlSlider-module__contain___pLyq7",eg="ControlSlider-module__cover___KdDat",Lt={wrapper:pm,hoverArrow:mm,sliderItem:gm,sliderImage:hm,arrow:fm,arrowVertical:ym,nextArrow:vm,arrowInner:xm,arrowIcon:bm,arrowImg:Sm,mirror:wm,pagination:$m,paginationInner:Cm,paginationVertical:Tm,paginationItem:Im,dot:Lm,activeDot:Pm,paginationInsideBottom:Mm,paginationInsideTop:Rm,paginationOutsideBottom:Em,paginationOutsideTop:km,paginationInsideLeft:Am,paginationInsideRight:Fm,paginationOutsideLeft:Nm,paginationOutsideRight:_m,imgWrapper:Hm,captionBlock:Wm,captionTextWrapper:Om,captionText:Dm,active:zm,withPointerEvents:Bm,topLeftAlignment:jm,topCenterAlignment:Vm,topRightAlignment:Gm,middleLeftAlignment:Xm,middleCenterAlignment:qm,middleRightAlignment:Um,bottomLeftAlignment:Km,bottomCenterAlignment:Ym,bottomRightAlignment:Qm,clickOverlay:Zm,contain:Jm,cover:eg};function tg(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 ng(e,t,n){return t&&tg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",go=1,ig=2,Co=3,Wo=4,Cr=5,sa=6,fa=7,og={CREATED:go,MOUNTED:ig,IDLE:Co,MOVING:Wo,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};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 uu=setTimeout,Ns=function(){};function ic(e){return requestAnimationFrame(e)}function Ma(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ma("object",e)}var ul=Array.isArray,pu=tn(Ma,"function"),Pi=tn(Ma,"string"),Tr=tn(Ma,"undefined");function pl(e){return e===null}function mu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function kn(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(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 gl(e,t){kn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return mu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gu(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?gu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Ui(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){Ui(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){Ui(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(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 Gt(e,t,n){dr(t)?Ui(t,function(i,o){Gt(e,o,i)}):kn(e,function(i){pl(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):Gt(i,t)),n&&Lr(n,i),i}function _n(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(e,t){_n(e,"display",t)}function hu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Hn(e,t){return e.getAttribute(t)}function rc(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 fu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function _s(e){return e.timeStamp}function _i(e){return Pi(e)?e:e?e+"px":""}var Mr="splide",fl="data-"+Mr;function ar(e,t){if(!e)throw new Error("["+Mr+"] "+(t||""))}var Mi=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,xn=Math.abs;function vu(e,t,n){return xn(e-t)<n}function ca(e,t,n,i){var o=Mi(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function co(e,t,n){var i=Mi(t,n),o=ya(t,n);return Mi(ya(i,e),o)}function Hs(e){return+(e>0)-+(e<0)}function Ws(e,t){return kn(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function rg(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function xu(){var e=[];function t(l,c,d,u){o(l,c,function(p,v,x){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,d,u):p.removeListener.bind(p,d);m?p.addEventListener(v,d,u):p.addListener(d),e.push([p,v,x,d,h])})}function n(l,c,d){o(l,c,function(u,p,v){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===v&&(!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(v){var x=v.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",Os="ready",di="move",Oo="moved",vl="click",bu="active",Su="inactive",wu="visible",$u="hidden",ln="refresh",hn="updated",To="resize",Ra="resized",Cu="drag",Tu="dragging",Iu="dragged",Ea="scroll",Ji="scrolled",ag="overflow",xl="destroy",Lu="arrows:mounted",Pu="arrows:updated",Mu="pagination:mounted",Ru="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Eu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",ku="sk",Au="sh",xa="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(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 x();c=ic(p)}}function v(R){R||h(),r=o()-(R?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function b(R){e=R}function S(){return d}return{start:v,rewind:m,pause:x,cancel:h,set:b,isPaused:S}}function sg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function lg(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=xu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(b,S){return h?+b-+S:+S-+b}).forEach(function(b){p(o[b],"("+(h?"min":"max")+"-width:"+b+"px)")}),p(r,nc),v()}function u(h){h&&l.destroy()}function p(h,b){var S=matchMedia(b);l.bind(S,"change",v),c.push([h,S])}function v(){var h=i.is(fa),b=n.direction,S=c.reduce(function(R,y){return Ci(R,y[1].matches?y[0]:{})},{});oc(n),m(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):b!==n.direction&&e.refresh()}function x(h){matchMedia(nc).matches&&(h?Ci(n,r):oc(n,pr(r)))}function m(h,b,S){Ci(n,h),b&&Ci(Object.getPrototypeOf(n),h),(S||!i.is(go))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Fu=Aa+"Up",Nu=Aa+"Down",sc="rtl",_a="ttb",Ua={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fu,Na],ArrowRight:[Nu,Fa]};function dg(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return Ua[r]&&Ua[r][d]||r.replace(/width|left|right/i,function(u,p){var v=Ua[u.toLowerCase()][d]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ai="role",bo="tabindex",ug="disabled",Wn="aria-",Rr=Wn+"controls",_u=Wn+"current",lc=Wn+"selected",Rn=Wn+"label",Cl=Wn+"labelledby",Hu=Wn+"hidden",Tl=Wn+"orientation",fr=Wn+"roledescription",cc=Wn+"live",dc=Wn+"busy",uc=Wn+"atomic",Il=[ai,bo,ug,Rr,_u,Rn,Cl,Hu,Tl,fr],Kn=Mr+"__",Ni="is-",Ka=Mr,pc=Kn+"track",pg=Kn+"list",Ha=Kn+"slide",Wu=Ha+"--clone",mg=Ha+"__container",Ll=Kn+"arrows",Wa=Kn+"arrow",Ou=Wa+"--prev",Du=Wa+"--next",Oa=Kn+"pagination",zu=Oa+"__page",gg=Kn+"progress",hg=gg+"__bar",fg=Kn+"toggle",yg=Kn+"spinner",vg=Kn+"sr",xg=Ni+"initialized",Qi=Ni+"active",Bu=Ni+"prev",ju=Ni+"next",Ds=Ni+"visible",zs=Ni+"loading",Vu=Ni+"focus-in",Gu=Ni+"overflow",bg=[Qi,Ds,Bu,ju,zs,Vu,Gu],Sg={slide:Ha,clone:Wu,arrows:Ll,arrow:Wa,prev:Ou,next:Du,pagination:Oa,page:zu,spinner:yg};function wg(e,t){if(pu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var $g=5,mc=200,Xu="touchstart mousedown",Ya="touchmove mousemove",Qa="touchend touchcancel mouseup click";function Cg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],v=[],x,m,h;function b(){C(),E(),y()}function S(){o(ln,R),o(ln,b),o(hn,y),r(document,Xu+" keydown",function(O){h=O.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Vu,!!h)})}function R(O){var F=Il.concat("style");ci(u),ri(l,p),ri(x,v),Xn([x,m],F),Xn(l,O?F:["style",fr])}function y(){ri(l,p),ri(x,v),p=H(Ka),v=H(pc),Gn(l,p),Gn(x,v),Gt(l,Rn,n.label),Gt(l,Cl,n.labelledby)}function C(){x=G("."+pc),m=Pr(x,"."+pg),ar(x&&m,"A track/list element is missing."),la(u,gu(m,"."+Ha+":not(."+Wu+")")),Ui({arrows:Ll,pagination:Oa,prev:Ou,next:Du,bar:hg,toggle:fg},function(O,F){d[F]=G("."+O)}),mr(d,{root:l,track:x,list:m,slides:u})}function E(){var O=l.id||rg(Mr),F=n.role;l.id=O,x.id=x.id||O+"-track",m.id=m.id||O+"-list",!Hn(l,ai)&&l.tagName!=="SECTION"&&F&&Gt(l,ai,F),Gt(l,fr,c.carousel),Gt(m,ai,"presentation")}function G(O){var F=yu(l,O);return F&&wg(F,"."+Ka)===l?F:void 0}function H(O){return[O+"--"+n.type,O+"--"+n.direction,n.drag&&O+"--draggable",n.isNavigation&&O+"--nav",O===Ka&&Qi]}return mr(d,{setup:b,mount:S,destroy:R})}var Io="slide",Do="loop",Er="fade";function Tg(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,v=p.isNavigation,x=p.updateOnMove,m=p.i18n,h=p.pagination,b=p.slideFocus,S=d.Direction.resolve,R=Hn(i,"style"),y=Hn(i,Rn),C=n>-1,E=Pr(i,"."+mg),G;function H(){C||(i.id=u.id+"-slide"+yl(t+1),Gt(i,ai,h?"tabpanel":"group"),Gt(i,fr,m.slide),Gt(i,Rn,y||Ws(m.slideLabel,[t+1,e.length]))),O()}function O(){c(i,"click",tn(l,vl,K)),c(i,"keydown",tn(l,ku,K)),r([Oo,Au,Ji],L),r(bl,D),x&&r(di,I)}function F(){G=!0,o.destroy(),ri(i,bg),Xn(i,Il),Gt(i,"style",R),Gt(i,Rn,y||"")}function D(){var M=e.splides.map(function(f){var X=f.splide.Components.Slides.getAt(t);return X?X.slide.id:""}).join(" ");Gt(i,Rn,Ws(m.slideX,(C?n:t)+1)),Gt(i,Rr,M),Gt(i,ai,b?"button":""),b&&Xn(i,fr)}function I(){G||L()}function L(){if(!G){var M=e.index;z(),k(),oi(i,Bu,t===M-1),oi(i,ju,t===M+1)}}function z(){var M=P();M!==rc(i,Qi)&&(oi(i,Qi,M),Gt(i,_u,v&&M||""),l(M?bu:Su,K))}function k(){var M=q(),f=!M&&(!P()||C);if(e.state.is([Wo,Cr])||Gt(i,Hu,f||""),Gt(hl(i,p.focusableNodes||""),bo,f?-1:""),b&&Gt(i,bo,f?-1:0),M!==rc(i,Ds)&&(oi(i,Ds,M),l(M?wu:$u,K)),!M&&document.activeElement===i){var X=d.Slides.getAt(e.index);X&&hu(X.slide)}}function $(M,f,X){_n(X&&E||i,M,f)}function P(){var M=e.index;return M===t||p.cloneStatus&&M===n}function q(){if(e.is(Er))return P();var M=Pn(d.Elements.track),f=Pn(i),X=S("left",!0),oe=S("right",!0);return va(M[X])<=hr(f[X])&&va(f[oe])<=hr(M[oe])}function _(M,f){var X=xn(M-t);return!C&&(p.rewind||e.is(Do))&&(X=Mi(X,e.length-X)),X<=f}var K={index:t,slideIndex:n,slide:i,container:E,isClone:C,mount:H,destroy:F,update:L,style:$,isWithin:_};return K}function Ig(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 v(){x(),o(ln,m),o(ln,x)}function x(){d.forEach(function(L,z){b(L,z,-1)})}function m(){G(function(L){L.destroy()}),ci(p)}function h(){G(function(L){L.update()})}function b(L,z,k){var $=Tg(e,z,k,L);$.mount(),p.push($),p.sort(function(P,q){return P.index-q.index})}function S(L){return L?H(function(z){return!z.isClone}):p}function R(L){var z=t.Controller,k=z.toIndex(L),$=z.hasFocus()?1:n.perPage;return H(function(P){return ca(P.index,k,k+$-1)})}function y(L){return H(L)[0]}function C(L,z){kn(L,function(k){if(Pi(k)&&(k=fu(k)),mu(k)){var $=d[z];$?gl(k,$):Lr(u,k),Gn(k,n.classes.slide),F(k,tn(r,To))}}),r(ln)}function E(L){Yi(H(L).map(function(z){return z.slide})),r(ln)}function G(L,z){S(z).forEach(L)}function H(L){return p.filter(pu(L)?L:function(z){return Pi(L)?ur(z.slide,L):ml(Ir(L),z.index)})}function O(L,z,k){G(function($){$.style(L,z,k)})}function F(L,z){var k=hl(L,"img"),$=k.length;$?k.forEach(function(P){l(P,"load error",function(){--$||z()})}):z()}function D(L){return L?d.length:p.length}function I(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:b,get:S,getIn:R,getAt:y,add:C,remove:E,forEach:G,filter:H,style:O,getLength:D,isEnough:I}}function Lg(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,v=u.track,x=u.list,m=c.getAt,h=c.style,b,S,R;function y(){C(),r(window,"resize load",lg(tn(l,To))),o([hn,ln],C),o(To,E)}function C(){b=n.direction===_a,_n(p,"maxWidth",_i(n.width)),_n(v,d("paddingLeft"),G(!1)),_n(v,d("paddingRight"),G(!0)),E(!0)}function E(K){var M=Pn(p);(K||S.width!==M.width||S.height!==M.height)&&(_n(v,"height",H()),h(d("marginRight"),_i(n.gap)),h("width",F()),h("height",D(),!0),S=M,l(Ra),R!==(R=_())&&(oi(p,Gu,R),l(ag,R)))}function G(K){var M=n.padding,f=d(K?"right":"left");return M&&_i(M[f]||(dr(M)?0:M))||"0px"}function H(){var K="";return b&&(K=O(),ar(K,"height or heightRatio is missing."),K="calc("+K+" - "+G(!1)+" - "+G(!0)+")"),K}function O(){return _i(n.height||Pn(x).width*n.heightRatio)}function F(){return n.autoWidth?null:_i(n.fixedWidth)||(b?"":I())}function D(){return _i(n.fixedHeight)||(b?n.autoHeight?null:I():O())}function I(){var K=_i(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function L(){return Pn(x)[d("width")]}function z(K,M){var f=m(K||0);return f?Pn(f.slide)[d("width")]+(M?0:P()):0}function k(K,M){var f=m(K);if(f){var X=Pn(f.slide)[d("right")],oe=Pn(x)[d("left")];return xn(X-oe)+(M?0:P())}return 0}function $(K){return k(e.length-1)-k(0)+z(0,K)}function P(){var K=m(0);return K&&parseFloat(_n(K.slide,d("marginRight")))||0}function q(K){return parseFloat(_n(v,d("padding"+(K?"Right":"Left"))))||0}function _(){return e.is(Er)||$(!0)>L()}return{mount:y,resize:E,listSize:L,slideSize:z,sliderSize:$,totalSize:k,getPadding:q,isOverflow:_}}var Pg=2;function Mg(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,v),o([hn,To],m),(u=S())&&(h(u),t.Layout.resize(!0))}function v(){x(),p()}function x(){Yi(d),ci(d),i.destroy()}function m(){var R=S();u!==R&&(u<R||!R)&&i.emit(ln)}function h(R){var y=l.get().slice(),C=y.length;if(C){for(;y.length<R;)la(y,y);la(y.slice(-R),y.slice(0,R)).forEach(function(E,G){var H=G<R,O=b(E.slide,G);H?gl(O,y[0].slide):Lr(r.list,O),la(d,O),l.register(O,G-R+(H?0:C),E.index)})}}function b(R,y){var C=R.cloneNode(!0);return Gn(C,n.classes.clone),C.id=e.root.id+"-clone"+yl(y+1),C}function S(){var R=n.clones;if(!e.is(Do))R=0;else if(Tr(R)){var y=n[c("fixedWidth")]&&t.Layout.slideSize(0),C=y&&hr(Pn(r.track)[c("width")]/y);R=C||n[c("autoWidth")]&&e.length||n.perPage*Pg}return R}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,v=c.listSize,x=c.sliderSize,m=t.Direction,h=m.resolve,b=m.orient,S=t.Elements,R=S.list,y=S.track,C;function E(){C=t.Transition,o([Fi,Ra,hn,ln],G)}function G(){t.Controller.isBusy()||(t.Scroll.cancel(),O(e.index),t.Slides.update())}function H(f,X,oe,ue){f!==X&&K(f>oe)&&(L(),F(I($(),f>oe),!0)),l(Wo),r(di,X,oe,f),C.start(X,function(){l(Co),r(Oo,X,oe,f),ue&&ue()})}function O(f){F(k(f,!0))}function F(f,X){if(!e.is(Er)){var oe=X?f:D(f);_n(R,"transform","translate"+h("X")+"("+oe+"px)"),f!==oe&&r(Au)}}function D(f){if(e.is(Do)){var X=z(f),oe=X>t.Controller.getEnd(),ue=X<0;(ue||oe)&&(f=I(f,oe))}return f}function I(f,X){var oe=f-_(X),ue=x();return f-=b(ue*(hr(xn(oe)/ue)||1))*(X?1:-1),f}function L(){F($(),!0),C.cancel()}function z(f){for(var X=t.Slides.get(),oe=0,ue=1/0,N=0;N<X.length;N++){var se=X[N].index,T=xn(k(se,!0)-f);if(T<=ue)ue=T,oe=se;else break}return oe}function k(f,X){var oe=b(p(f-1)-q(f));return X?P(oe):oe}function $(){var f=h("left");return Pn(R)[f]-Pn(y)[f]+b(u(!1))}function P(f){return n.trimSpace&&e.is(Io)&&(f=co(f,0,b(x(!0)-v()))),f}function q(f){var X=n.focus;return X==="center"?(v()-d(f,!0))/2:+X*d(f)||0}function _(f){return k(f?t.Controller.getEnd():0,!!n.trimSpace)}function K(f){var X=b(I($(),f));return f?X>=0:X<=R[h("scrollWidth")]-Pn(y)[h("width")]}function M(f,X){X=Tr(X)?$():X;var oe=f!==!0&&b(X)<b(_(!1)),ue=f!==!1&&b(X)>b(_(!0));return oe||ue}return{mount:E,move:H,jump:O,translate:F,shift:I,cancel:L,toIndex:z,toPosition:k,getPosition:$,getLimit:_,exceededLimit:M,reposition:G}}function Eg(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,v=p.isEnough,x=p.getLength,m=n.omitEnd,h=e.is(Do),b=e.is(Io),S=tn($,!1),R=tn($,!0),y=n.start||0,C,E=y,G,H,O;function F(){D(),o([hn,ln,xa],D),o(Ra,I)}function D(){G=x(!0),H=n.perMove,O=n.perPage,C=K();var T=co(y,0,m?C:G-1);T!==y&&(y=T,l.reposition())}function I(){C!==K()&&r(xa)}function L(T,me,J){if(!se()){var we=k(T),Le=_(we);Le>-1&&(me||Le!==y)&&(oe(Le),l.move(we,Le,E,J))}}function z(T,me,J,we){t.Scroll.scroll(T,me,J,function(){var Le=_(l.toIndex(c()));oe(m?Mi(Le,C):Le),we&&we()})}function k(T){var me=y;if(Pi(T)){var J=T.match(/([+\-<>])(\d+)?/)||[],we=J[1],Le=J[2];we==="+"||we==="-"?me=P(y+ +(""+we+(+Le||1)),y):we===">"?me=Le?M(+Le):S(!0):we==="<"&&(me=R(!0))}else me=h?T:co(T,0,C);return me}function $(T,me){var J=H||(N()?1:O),we=P(y+J*(T?-1:1),y,!(H||N()));return we===-1&&b&&!vu(c(),d(!T),1)?T?0:C:me?we:_(we)}function P(T,me,J){if(v()||N()){var we=q(T);we!==T&&(me=T,T=we,J=!1),T<0||T>C?!H&&(ca(0,T,me,!0)||ca(C,me,T,!0))?T=M(f(T)):h?T=J?T<0?-(G%O||O):G:T:n.rewind?T=T<0?C:0:T=-1:J&&T!==me&&(T=M(f(me)+(T<me?-1:1)))}else T=-1;return T}function q(T){if(b&&n.trimSpace==="move"&&T!==y)for(var me=c();me===u(T,!0)&&ca(T,0,e.length-1,!n.rewind);)T<y?--T:++T;return T}function _(T){return h?(T+G)%G||0:T}function K(){for(var T=G-(N()||h&&H?1:O);m&&T-- >0;)if(u(G-1,!0)!==u(T,!0)){T++;break}return co(T,0,G-1)}function M(T){return co(N()?T:O*T,0,C)}function f(T){return N()?Mi(T,C):va((T>=C?G-1:T)/O)}function X(T){var me=l.toIndex(T);return b?co(me,0,C):me}function oe(T){T!==y&&(E=y,y=T)}function ue(T){return T?E:y}function N(){return!Tr(n.focus)||n.isNavigation}function se(){return e.state.is([Wo,Cr])&&!!n.waitForTransition}return{mount:F,go:L,scroll:z,getNext:S,getPrev:R,getAdjacent:$,getEnd:K,setIndex:oe,getIndex:ue,toIndex:M,toPage:f,toDest:X,hasFocus:N,isBusy:se}}var kg="http://www.w3.org/2000/svg",Ag="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 Fg(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,v=u.arrows,x=u.track,m=v,h=u.prev,b=u.next,S,R,y={};function C(){G(),o(hn,E)}function E(){H(),C()}function G(){var z=n.arrows;z&&!(h&&b)&&D(),h&&b&&(mr(y,{prev:h,next:b}),gr(m,z?"":"none"),Gn(m,R=Ll+"--"+n.direction),z&&(O(),L(),Gt([h,b],Rr,x.id),l(Lu,h,b)))}function H(){i.destroy(),ri(m,R),S?(Yi(v?[h,b]:m),h=b=null):Xn([h,b],Il)}function O(){o([Fi,Oo,ln,Ji,xa],L),r(b,"click",tn(F,">")),r(h,"click",tn(F,"<"))}function F(z){p.go(z,!0)}function D(){m=v||xo("div",c.arrows),h=I(!0),b=I(!1),S=!0,Lr(m,[h,b]),!v&&gl(m,x)}function I(z){var k='<button class="'+c.arrow+" "+(z?c.prev:c.next)+'" type="button"><svg xmlns="'+kg+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Ag)+'" />';return fu(k)}function L(){if(h&&b){var z=e.index,k=p.getPrev(),$=p.getNext(),P=k>-1&&z<k?d.last:d.prev,q=$>-1&&z>$?d.first:d.next;h.disabled=k<0,b.disabled=$<0,Gt(h,Rn,P),Gt(b,Rn,q),l(Pu,h,b,k,$)}}return{arrows:y,mount:C,destroy:H,update:L}}var Ng=fl+"-interval";function _g(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),O),d=c.isPaused,u=t.Elements,p=t.Elements,v=p.root,x=p.toggle,m=n.autoplay,h,b,S=m==="pause";function R(){m&&(y(),x&&Gt(x,Rr,u.track.id),S||C(),H())}function y(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",G()}),n.pauseOnFocus&&r(v,"focusin focusout",function(D){b=D.type==="focusin",G()}),x&&r(x,"click",function(){S?C():E(!0)}),o([di,Ea,ln],c.rewind),o(di,F)}function C(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),b=h=S=!1,H(),l(Sl))}function E(D){D===void 0&&(D=!0),S=!!D,H(),d()||(c.pause(),l(wl))}function G(){S||(h||b?E(!1):C())}function H(){x&&(oi(x,Qi,!S),Gt(x,Rn,n.i18n[S?"play":"pause"]))}function O(D){var I=u.bar;I&&_n(I,"width",D*100+"%"),l(Eu,D)}function F(D){var I=t.Slides.getAt(D);c.set(I&&+Hn(I.slide,Ng)||n.interval)}return{mount:R,destroy:c.cancel,play:C,pause:E,isPaused:d}}function Hg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o($l,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 Wg=10,Og=600,Dg=.6,zg=1.5,Bg=800;function jg(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,v=c.translate,x=e.is(Io),m,h,b=1;function S(){o(di,E),o([hn,ln],G)}function R(O,F,D,I,L){var z=d();if(E(),D&&(!x||!p())){var k=t.Layout.sliderSize(),$=Hs(O)*k*va(xn(O)/k)||0;O=c.toPosition(t.Controller.toDest(O%k))+$}var P=vu(z,O,1);b=1,F=P?0:F||ya(xn(O-z)/zg,Bg),h=I,m=ka(F,y,tn(C,z,O,L),1),l(Cr),r(Ea),m.start()}function y(){l(Co),h&&h(),r(Ji)}function C(O,F,D,I){var L=d(),z=O+(F-O)*H(I),k=(z-L)*b;v(L+k),x&&!D&&p()&&(b*=Dg,xn(k)<Wg&&R(u(p(!0)),Og,!1,h,!0))}function E(){m&&m.cancel()}function G(){m&&!m.isPaused()&&(E(),y())}function H(O){var F=n.easingFunc;return F?F(O):1-Math.pow(1-O,4)}return{mount:S,destroy:E,scroll:R,cancel:G}}var uo={passive:!1,capture:!0};function Vg(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,v=t.Controller,x=t.Elements.track,m=t.Media.reduce,h=t.Direction,b=h.resolve,S=h.orient,R=u.getPosition,y=u.exceededLimit,C,E,G,H,O,F=!1,D,I,L;function z(){l(x,Ya,Ns,uo),l(x,Qa,Ns,uo),l(x,Xu,$,uo),l(x,"click",_,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],k)}function k(){var ie=n.drag;fe(!ie),H=ie==="free"}function $(ie){if(D=!1,!I){var re=Le(ie);we(ie.target)&&(re||!ie.button)&&(v.isBusy()?ni(ie,!0):(L=re?x:window,O=d.is([Wo,Cr]),G=null,l(L,Ya,P,uo),l(L,Qa,q,uo),u.cancel(),p.cancel(),K(ie)))}}function P(ie){if(d.is(sa)||(d.set(sa),r(Cu)),ie.cancelable)if(O){u.translate(C+J(N(ie)));var re=se(ie)>mc,ae=F!==(F=y());(re||ae)&&K(ie),D=!0,r(Tu),ni(ie)}else X(ie)&&(O=f(ie),ni(ie))}function q(ie){d.is(sa)&&(d.set(Co),r(Iu)),O&&(M(ie),ni(ie)),c(L,Ya,P),c(L,Qa,q),O=!1}function _(ie){!I&&D&&ni(ie,!0)}function K(ie){G=E,E=ie,C=R()}function M(ie){var re=oe(ie),ae=ue(re),pe=n.rewind&&n.rewindByDrag;m(!1),H?v.scroll(ae,0,n.snap):e.is(Er)?v.go(S(Hs(re))<0?pe?"<":"-":pe?">":"+"):e.is(Io)&&F&&pe?v.go(y(!0)?">":"<"):v.go(v.toDest(ae),!0),m(!0)}function f(ie){var re=n.dragMinThreshold,ae=dr(re),pe=ae&&re.mouse||0,be=(ae?re.touch:+re)||10;return xn(N(ie))>(Le(ie)?be:pe)}function X(ie){return xn(N(ie))>xn(N(ie,!0))}function oe(ie){if(e.is(Do)||!F){var re=se(ie);if(re&&re<mc)return N(ie)/re}return 0}function ue(ie){return R()+Hs(ie)*Mi(xn(ie)*(n.flickPower||600),H?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function N(ie,re){return me(ie,re)-me(T(ie),re)}function se(ie){return _s(ie)-_s(T(ie))}function T(ie){return E===ie&&G||E}function me(ie,re){return(Le(ie)?ie.changedTouches[0]:ie)["page"+b(re?"Y":"X")]}function J(ie){return ie/(F&&e.is(Io)?$g:1)}function we(ie){var re=n.noDrag;return!ur(ie,"."+zu+", ."+Wa)&&(!re||!ur(ie,re))}function Le(ie){return typeof TouchEvent<"u"&&ie instanceof TouchEvent}function he(){return O}function fe(ie){I=ie}return{mount:z,disable:fe,isDragging:he}}var Gg={Spacebar:" ",Right:Na,Left:Fa,Up:Fu,Down:Nu};function Pl(e){return e=Pi(e)?e:e.key,Gg[e]||e}var gc="keydown";function Xg(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 v(){x(),o(hn,m),o(hn,x),o(di,b)}function x(){var R=n.keyboard;R&&(u=R==="global"?window:c,r(u,gc,S))}function m(){l(u,gc)}function h(R){p=R}function b(){var R=p;p=!0,uu(function(){p=R})}function S(R){if(!p){var y=Pl(R);y===d(Fa)?e.go("<"):y===d(Na)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",qg="["+sr+"], ["+da+"]";function Ug(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 v(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),m(),d?R():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(y){hl(y.slide,qg).forEach(function(C){var E=Hn(C,sr),G=Hn(C,da);if(E!==C.src||G!==C.srcset){var H=n.classes.spinner,O=C.parentElement,F=Pr(O,"."+H)||xo("span",H,O);p.push([C,y,F]),C.src||gr(C,"none")}})})}function h(){p=p.filter(function(y){var C=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,C)?b(y):!0}),p.length||r(u)}function b(y){var C=y[0];Gn(y[1].slide,zs),l(C,"load error",tn(S,y)),Gt(C,"src",Hn(C,sr)),Gt(C,"srcset",Hn(C,da)),Xn(C,sr),Xn(C,da)}function S(y,C){var E=y[0],G=y[1];ri(G.slide,zs),C.type!=="error"&&(Yi(y[2]),gr(E,""),c($l,E,G),c(To)),d&&R()}function R(){p.length&&b(p.shift())}return{mount:v,destroy:tn(ci,p),check:h}}function Kg(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,v=u.getIndex,x=u.go,m=t.Direction.resolve,h=d.pagination,b=[],S,R;function y(){C(),o([hn,ln,xa],y);var I=n.pagination;h&&gr(h,I?"":"none"),I&&(o([di,Ea,Ji],D),E(),D(),r(Mu,{list:S,items:b},F(e.index)))}function C(){S&&(Yi(h?Ai(S.children):S),ri(S,R),ci(b),S=null),i.destroy()}function E(){var I=e.length,L=n.classes,z=n.i18n,k=n.perPage,$=p()?u.getEnd()+1:hr(I/k);S=h||xo("ul",L.pagination,d.track.parentElement),Gn(S,R=Oa+"--"+O()),Gt(S,ai,"tablist"),Gt(S,Rn,z.select),Gt(S,Tl,O()===_a?"vertical":"");for(var P=0;P<$;P++){var q=xo("li",null,S),_=xo("button",{class:L.page,type:"button"},q),K=c.getIn(P).map(function(f){return f.slide.id}),M=!p()&&k>1?z.pageX:z.slideX;l(_,"click",tn(G,P)),n.paginationKeyboard&&l(_,"keydown",tn(H,P)),Gt(q,ai,"presentation"),Gt(_,ai,"tab"),Gt(_,Rr,K.join(" ")),Gt(_,Rn,Ws(M,P+1)),Gt(_,bo,-1),b.push({li:q,button:_,page:P})}}function G(I){x(">"+I,!0)}function H(I,L){var z=b.length,k=Pl(L),$=O(),P=-1;k===m(Na,!1,$)?P=++I%z:k===m(Fa,!1,$)?P=(--I+z)%z:k==="Home"?P=0:k==="End"&&(P=z-1);var q=b[P];q&&(hu(q.button),x(">"+P),ni(L,!0))}function O(){return n.paginationDirection||n.direction}function F(I){return b[u.toPage(I)]}function D(){var I=F(v(!0)),L=F(v());if(I){var z=I.button;ri(z,Qi),Xn(z,lc),Gt(z,bo,-1)}if(L){var k=L.button;Gn(k,Qi),Gt(k,lc,!0),Gt(k,bo,"")}r(Ru,{list:S,items:b},I,L)}return{items:b,mount:y,destroy:C,getAt:F,update:D}}var Yg=[" ","Enter"];function Qg(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,b){var S=an(h);S.on(di,function(R,y,C){b.go(b.is(Do)?C:R)}),r.push(S)}function p(){var h=an(e),b=h.on;b(vl,x),b(ku,m),b([Fi,hn],v),r.push(h),h.emit(bl,e.splides)}function v(){Gt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(h){e.go(h.index)}function m(h,b){ml(Yg,Pl(b))&&(x(h),ni(b))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Zg(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,v=p<0,x=_s(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;xn(p)>m&&x-r>h&&(e.go(v?"<":">"),r=x),d(v)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Wo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Jg=90;function eh(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=xo("span",vg),d=ka(Jg,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),Gt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Oo,Ji],tn(p,!0)))}function p(m){Gt(r,dc,m),m?(Lr(r,c),d.start()):(Yi(c),d.cancel())}function v(){Xn(r,[cc,uc,dc]),Yi(c)}function x(m){l&&Gt(r,cc,m?"off":"polite")}return{mount:u,disable:x,destroy:v}}var th=Object.freeze({__proto__:null,Media:cg,Direction:dg,Elements:Cg,Slides:Ig,Layout:Lg,Clones:Mg,Move:Rg,Controller:Eg,Arrows:Fg,Autoplay:_g,Cover:Hg,Scroll:jg,Drag:Vg,Keyboard:Xg,LazyLoad:Ug,Pagination:Kg,Sync:Qg,Wheel:Zg,Live:eh}),nh={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"},ih={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:Sg,i18n:nh,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function oh(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),uu(d)}return{mount:o,start:l,cancel:Ns}}function rh(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&&(v(),d())})}function p(m,h){var b=i.toPosition(m,!0),S=i.getPosition(),R=x(m);xn(b-S)>=1&&R>=1?n.useScroll?r.scroll(b,R,!1,h):(c("transform "+R+"ms "+n.easing),i.translate(b,!0),d=h):(i.jump(m),h())}function v(){c(""),r.cancel()}function x(m){var h=n.rewindSpeed;if(e.is(Io)&&h){var b=o.getIndex(!0),S=o.getEnd();if(b===0&&m>=S||b>=S&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ah=(function(){function e(n,i){this.event=an(),this.Components={},this.state=sg(go),this.splides=[],this._o={},this._E={};var o=Pi(n)?yu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:Hn(o,Rn)||"",labelledby:Hn(o,Cl)||""},ih,e.defaults,i||{});try{Ci(i,JSON.parse(Hn(o,fl)))}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,fa]),"Already mounted!"),l.set(go),this._C=c,this._T=o||this._T||(this.is(Er)?oh:rh),this._E=i||this._E;var d=mr({},th,this._E,{Transition:this._T});return Ui(d,function(u,p){var v=u(r,c,r._o);c[p]=v,v.setup&&v.setup()}),Ui(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,xg),l.set(Co),this.emit(Os),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(Os,this.destroy.bind(this,i)):(Ui(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&ci(this.splides),r.set(fa)),this},ng(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})(),Ml=ah;Ml.defaults={};Ml.STATES=og;var hc=[[Fi,"onMounted"],[Os,"onReady"],[di,"onMove"],[Oo,"onMoved"],[vl,"onClick"],[bu,"onActive"],[Su,"onInactive"],[wu,"onVisible"],[$u,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[To,"onResize"],[Ra,"onResized"],[Cu,"onDrag"],[Tu,"onDragging"],[Iu,"onDragged"],[Ea,"onScroll"],[Ji,"onScrolled"],[xl,"onDestroy"],[Lu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Mu,"onPaginationMounted"],[Ru,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Eu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Rl(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function Bs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Bs(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Bs(e[o],t[o]))}return e===t}function sh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lh(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 js(e,t){const n=e;return lh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=js(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ch=({children:e,className:t,...n})=>s.createElement("div",{className:Rl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=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 Ml(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=js({},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&&!Bs(this.options,e)&&(this.splide.options=e,this.options=js({},e));const t=this.getSlides();sh(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){hc.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",...hc.map(r=>r[1])])},n?s.createElement(ch,null,i):i)}},kl=({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 oh="RichTextRenderer-module__link___BWeZ2",rh={link:oh},ah=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))},Oo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ah(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function un(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Oo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:$.scalingValue(e.letterSpacing,t),wordSpacing:$.scalingValue(e.wordSpacing,t),fontSize:$.scalingValue(n,t),lineHeight:i!==void 0?$.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 zu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?zu(t.children):!!t.text):!1}const Ki=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx($.LinkWrapper,{className:rh.link,link:i,children:t(i.children)},o):a.jsx("span",{style:sh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:zu(o)?t(o):" "},i)})})};function sh(e){return{...e.fontFamily&&{fontFamily:Oo(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 lh="SvgImage-module__svg___q3xE-",ch="SvgImage-module__img___VsTm-",fc={svg:lh,img:ch},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Bu(e){if(yr(e))return Promise.resolve(e);const t=Za.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 Za.delete(e),i});return Za.set(e,n),n}const dh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},uh=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(!dh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Bu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Tt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Tt(fc.svg,i),style:{"--svg":uh(c),"--fill":t,"--hover-fill":n,...o??{}}})},ph={"top-left":$t.topLeftAlignment,"top-center":$t.topCenterAlignment,"top-right":$t.topRightAlignment,"middle-left":$t.middleLeftAlignment,"middle-center":$t.middleCenterAlignment,"middle-right":$t.middleRightAlignment,"bottom-left":$t.bottomLeftAlignment,"bottom-center":$t.bottomCenterAlignment,"bottom-right":$t.bottomRightAlignment};function mh({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??{},[h,v]=s.useState(void 0),[b,E]=s.useState(null),[f,w]=s.useState(0),[H,q]=s.useState(0),{direction:B,transition:M,controls:_,pagination:j,imageCaption:C,triggers:L}=e,W=s.useRef(M.type),{x:A,y:I}=e.controls.offset,T=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!b)return;const V=new ResizeObserver(S=>{if(!o)return;const[X]=S;v({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return V.observe(b),()=>V.unobserve(b)},[b]),s.useEffect(()=>{!o||W.current===M.type||(q(V=>V+1),W.current=M.type)},[M.type]),a.jsx("div",{className:Tt($t.wrapper,{[$t.editor]:i}),ref:E,children:a.jsxs("div",{className:$t.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:M.backgroundColor&&M.type==="fade in"?M.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Tt($t.captionBlock),children:a.jsx("div",{className:$t.captionTextWrapper,children:t.map((V,S)=>a.jsx("div",{className:Tt($t.captionText,ph[C.alignment],{[$t.withPointerEvents]:S===f&&i,[$t.active]:S===f}),style:{fontFamily:Oo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":$.scalingValue(l.width,i),letterSpacing:$.scalingValue(d,i),wordSpacing:$.scalingValue(p,i),textAlign:u,fontSize:$.scalingValue(y.fontSize,i),lineHeight:$.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:M.duration?`${Math.round(parseInt(M.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:$t.captionTextInner,style:{"--link-hover-color":C.linkHoverColor,"--link-color":C.linkColor,position:"relative",top:$.scalingValue(C.offset.y,i),left:$.scalingValue(C.offset.x,i)},children:a.jsx(Ki,{content:V.imageCaption})})},S))})}),a.jsx(El,{onMove:V=>{w(V.index)},ref:r,options:{arrows:!1,speed:M.duration?parseInt(M.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:B==="horiz"||M.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:M.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,S)=>a.jsx(kl,{children:a.jsx("div",{className:$t.sliderItem,children:a.jsx("div",{className:$t.imgWrapper,children:a.jsx("img",{className:Tt($t.sliderImage,{[$t.contain]:V.image.objectFit==="contain",[$t.cover]:V.image.objectFit==="cover"}),src:V.image.assetId,alt:V.image.name??""})})})},S))},H),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Tt($t.arrow,{[$t.arrowVertical]:B==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{T("-1")},className:$t.arrowInner,style:{transform:`translate(${$.scalingValue(A,i)}, ${$.scalingValue(I*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Tt($t.arrowImg,$t.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Tt($t.arrowIcon,$t.arrowImg,$t.mirror)})]})}),a.jsx("div",{className:Tt($t.arrow,$t.nextArrow,{[$t.arrowVertical]:B==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:$t.arrowInner,onClick:()=>T("+1"),style:{transform:`translate(${$.scalingValue(A*(B==="horiz"?-1:1),i)}, ${$.scalingValue(I,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:$t.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Tt($t.arrowIcon,$t.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:$t.clickOverlay,onClick:()=>{o&&o.go("+1")}}),j.isActive&&a.jsx("div",{className:Tt($t.pagination,{[$t.paginationInsideBottom]:j.position==="inside-1"&&B==="horiz",[$t.paginationInsideTop]:j.position==="inside-2"&&B==="horiz",[$t.paginationOutsideBottom]:j.position==="outside-1"&&B==="horiz",[$t.paginationOutsideTop]:j.position==="outside-2"&&B==="horiz",[$t.paginationInsideLeft]:j.position==="inside-1"&&B==="vert",[$t.paginationInsideRight]:j.position==="inside-2"&&B==="vert",[$t.paginationOutsideLeft]:j.position==="outside-1"&&B==="vert",[$t.paginationOutsideRight]:j.position==="outside-2"&&B==="vert",[$t.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:$t.paginationInner,style:{backgroundColor:j.colors[2],transform:`scale(${j.scale/100}) translate(${$.scalingValue(j.offset.x,i)}, ${$.scalingValue(j.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((V,S)=>a.jsx("button",{onClick:()=>{o&&o.go(S)},className:Tt($t.paginationItem),children:a.jsx("div",{className:Tt($t.dot,{[$t.activeDot]:S===f}),style:{backgroundColor:S===f?j.colors[0]:j.colors[1],"--pagination-hover-color":j.hover}})},S))})})]})})}function yc({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 gh={element:mh,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"]}},hh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",fh="ImageRevealSlider-module__image___Qjt-e",yh="ImageRevealSlider-module__link___N-iLG",vh="ImageRevealSlider-module__cursor___2U03d",Uo={imageRevealSlider:hh,image:fh,link:yh,cursor:vh};function vc(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 Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xh(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function bh({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),[h,v]=s.useState("none"),b=s.useRef({x:0,y:0}),[E,f]=s.useState(!1),{sizeType:w,imageWidth:H,randomRangeImageWidth:q}=e.imageSize,{revealPosition:B,visible:M}=e.position,{cursorType:_,target:j,defaultCursorScale:C,defaultCursor:L,hoverCursorScale:W,hoverCursor:A}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(P,k)=>{const O=i.getBoundingClientRect(),ie=P-O.left,ae=k-O.top;if(y({x:ie,y:ae}),_==="system"){v("none"),m(1);return}const D=ie,se=ae,R=document.elementFromPoint(O.left+D,O.top+se);if(R&&R.closest("a")){v("none"),m(1);return}const de=vc(D,se,r)||j==="area"?{img:A??"none",scale:W}:{img:L??"none",scale:C};v(de.img),m(de.scale)},S=P=>{P.stopPropagation(),b.current={x:P.clientX,y:P.clientY},V(P.clientX,P.clientY)},X=()=>{E&&V(b.current.x,b.current.y)};return i.addEventListener("mousemove",S),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",S),window.removeEventListener("scroll",X,!0)}},[i,E,p,_,j,A,L,W,C,r]),s.useEffect(()=>{E||(v("none"),m(0))},[E]);const I=async(V,S,X,P={})=>{const{width:k,height:O,finalWidth:ie}=await xh(V.image.assetId,w,H,q);let ae=0,D=0;B==="same"?(ae=S/2,D=X/2):(ae=P.x??Math.random()*S,D=P.y??Math.random()*X);const se=Math.min(Math.max(ae,k/2),S-k/2),R=Math.min(Math.max(D,O/2),X-O/2);return{id:u.current++,assetId:V.image.assetId,link:V.link,name:V.image.name,x:se,y:R,width:ie}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),S=V.width,X=V.height,P=[];(async()=>{const O=t[0],ie=await I(O,S,X);P.push(ie),l(P),d(1)})()},[w,H,q,B,i]),s.useEffect(()=>{M==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[M]);const T=async V=>{if(!i)return;const S=i.getBoundingClientRect(),X=V.clientX-S.left,P=V.clientY-S.top;if(j==="image"&&!vc(X,P,r))return;let k=0,O=0;B==="on Click"?(k=X,O=P):B==="same"?(k=S.width/2,O=S.height/2):(k=Math.random()*S.width,O=Math.random()*S.height);const ie=t[c],ae=await I(ie,S.width,S.height,{x:k,y:O});l(D=>M==="all"?[...D,ae]:[ae]),d(D=>D>=t.length-1?0:D+1)};return a.jsxs("div",{ref:o,onClick:T,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:Uo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:Uo.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:a.jsx($.LinkWrapper,{link:j==="area"?V.link:void 0,className:Uo.link,children:a.jsx("img",{src:V.assetId,alt:V.name,className:Uo.image},V.id)})},V.id)),E&&a.jsx("div",{className:Uo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sh={element:bh,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"}}]}}}},wh="LightBox-module__hidden___9s-9x",$h="LightBox-module__heroImage___sTxNF",Ch="LightBox-module__background___rm9ml",Th="LightBox-module__editor___4ACaY",Ih="LightBox-module__contentStyle___Bgnsq",Lh="LightBox-module__imageStyle___tLIlB",Ph="LightBox-module__imgWrapper___LuFUp",Mh="LightBox-module__contain___8-yaS",Rh="LightBox-module__cover___hNvOG",Eh="LightBox-module__caption___b6L2I",kh="LightBox-module__captionTextInner___rCGNH",Ah="LightBox-module__lightboxSplide___XFuWC",Fh="LightBox-module__arrow___iz38X",Nh="LightBox-module__arrowVertical___Zfz81",_h="LightBox-module__nextArrow___zkAQN",Hh="LightBox-module__arrowInner___p48sW",Wh="LightBox-module__arrowIcon___3VaFf",Oh="LightBox-module__arrowImg___pNV88",Dh="LightBox-module__mirror___pjeXc",zh="LightBox-module__thumbsWrapper___GB-nU",Bh="LightBox-module__thumbsContainerVertical___wttk5",jh="LightBox-module__thumbsContainer___osSma",Vh="LightBox-module__thumbsAlignStart___MO6tY",Gh="LightBox-module__thumbsAlignCenter___Q4sUx",Xh="LightBox-module__thumbsAlignEnd___p4y9R",Uh="LightBox-module__thumbItem___HvnF3",qh="LightBox-module__closeButton___g2khP",Kh="LightBox-module__fadeIn___0m5GW",Yh="LightBox-module__slideInLeft___gPYwC",Qh="LightBox-module__slideInRight___S-pPp",Zh="LightBox-module__slideInTop___DFdAj",Jh="LightBox-module__slideInBottom___m27kZ",ef="LightBox-module__fadeOut___55qBR",tf="LightBox-module__slideOutLeft___NvU7P",nf="LightBox-module__slideOutRight___SK7eC",of="LightBox-module__slideOutTop___Vgg0z",rf="LightBox-module__slideOutBottom___nJ0Ef",af="LightBox-module__scaleSlide___vZriG",ct={hidden:wh,heroImage:$h,background:Ch,editor:Th,contentStyle:Ih,imageStyle:Lh,imgWrapper:Ph,contain:Mh,cover:Rh,caption:Eh,captionTextInner:kh,lightboxSplide:Ah,arrow:Fh,arrowVertical:Nh,nextArrow:_h,arrowInner:Hh,arrowIcon:Wh,arrowImg:Oh,mirror:Dh,thumbsWrapper:zh,thumbsContainerVertical:Bh,thumbsContainer:jh,thumbsAlignStart:Vh,thumbsAlignCenter:Gh,thumbsAlignEnd:Xh,thumbItem:Uh,closeButton:qh,fadeIn:Kh,slideInLeft:Yh,slideInRight:Qh,slideInTop:Zh,slideInBottom:Jh,fadeOut:ef,slideOutLeft:tf,slideOutRight:nf,slideOutTop:of,slideOutBottom:rf,scaleSlide:af},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% + ${$.scalingValue(t.x,n)}), calc(-50% + ${$.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${$.scalingValue(t.x,n)}, calc(-50% + ${$.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), ${$.scalingValue(t.y,n)})`:i.transform=`translate(${$.scalingValue(t.x,n)}, ${$.scalingValue(t.y,n)})`,i};function ju(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 sf(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 Vu(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 lf(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 Gu(e,t,n,i,o){const{x:r,y:l}=sf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function cf(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"?lf:Vu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=Gu(n,i,u,p,c),m=(y+u/2)/n*100,h=(x+p/2)/i*100;return`${m}% ${h}%`}function df(e){return cf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=ju(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}=Vu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=Gu(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 xc(e){const t=e.getBoundingClientRect(),n=ju(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function uf(e,t){const n=(()=>{if(e==="fade in")return ct.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ct.slideInLeft;case"right":return ct.slideInRight;case"top":return ct.slideInTop;case"bottom":return ct.slideInBottom;default:return ct.slideInRight}return ct.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ct.fadeIn;if(e==="slide in")switch(t){case"left":return ct.slideInLeft;case"right":return ct.slideInRight;case"top":return ct.slideInTop;case"bottom":return ct.slideInBottom;default:return ct.slideInRight}return ct.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ct.fadeOut;if(e==="slide in")switch(t){case"left":return ct.slideOutLeft;case"right":return ct.slideOutRight;case"top":return ct.slideOutTop;case"bottom":return ct.slideOutBottom;default:return ct.slideOutRight}return ct.fadeOut})(),r=(()=>{if(e==="fade in")return ct.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ct.slideOutLeft;case"right":return ct.slideOutRight;case"top":return ct.slideOutTop;case"bottom":return ct.slideOutBottom;default:return ct.slideOutRight}return ct.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const pf=({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:ct.heroImage,onClick:()=>d(!0)}),a.jsx(mf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},mf=({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:h,color:v}=i.imageCaption??{},[b,E]=s.useState(0),[f,w]=s.useState(0),[H,q]=s.useState(!1),[B,M]=s.useState(!1),[_,j]=s.useState({}),C=s.useRef(null),L=s.useRef(null),W=s.useRef(null),A=s.useRef(!1),I=s.useRef(null),T=s.useRef(null),V=s.useRef(null),S=s.useRef(null),X=s.useRef(!1),P=s.useRef(null),[k,O]=s.useState(!1),{appear:ie,triggers:ae,slider:D,thumbnail:se,controls:R,area:de,caption:te,layout:Se}=o.lightboxBlock,{appearClass:Ce,backdropAppearClass:ve,backdropDisappearClass:ue,disappearClass:Q}=uf(ie.type,ie.direction),re=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var Z,ee;(ee=(Z=C.current)==null?void 0:Z.splide)==null||ee.refresh()},16)},Y=()=>{w(Z=>Z+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||!se.isActive){O(!1);return}const g=P.current;if(!g)return;const Y=()=>{D.direction==="horiz"?O(g.scrollWidth>g.clientWidth):O(g.scrollHeight>g.clientHeight)};Y();const Z=new ResizeObserver(Y);return Z.observe(g),()=>Z.disconnect()},[e,se.isActive,n.length,_,D.direction]);const fe=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,Y=$.getColorAlpha(de.color);g&&!l&&Y>.9&&(document.body.style.backgroundColor=""),q(!0),A.current=!0;const Z=ee=>{ee.target===I.current&&ee.animationName&&(I.current&&T.current&&I.current.removeEventListener("animationend",T.current),T.current=null,A.current&&(A.current=!1,t()),q(!1))};I.current&&(T.current=Z,I.current.addEventListener("animationend",Z))},[t,de.color,l]),he=(g,Y,Z)=>{var ee,ye;if(g){if(ae.type==="click"&&ae.switch==="image")ae.repeat==="close"&&b===n.length-1?fe():(ee=C.current)==null||ee.go("+1");else if(ae.type==="click"&&ae.switch==="50/50"){const G=g.getBoundingClientRect(),N=Y-G.left,K=Z-G.top,ne=G.width,pe=G.height;let U;D.direction==="horiz"?U=N<ne/2?"-1":"+1":U=K<pe/2?"-1":"+1",(ye=C.current)==null||ye.go(U)}}},be=g=>{if(X.current){X.current=!1;return}const Y=n[b],Z=(Y==null?void 0:Y.image.objectFit)==="cover";let ee,ye;if("changedTouches"in g&&g.changedTouches.length>0)ee=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ee=g.clientX,ye=g.clientY;else return;let G;if(Z&&W.current){const N=xc(W.current);G=ee>=N.left&&ee<=N.right&&ye>=N.top&&ye<=N.bottom}else{const N=W.current?Sa(W.current):null;if(!N){g.target===g.currentTarget&&fe();return}G=ee>=N.x&&ee<=N.x+N.width&&ye>=N.y&&ye<=N.y+N.height}G?he(W.current,ee,ye):fe()},Me=g=>{const Y=g.target;(Y.classList.contains(ct.thumbsWrapper)||Y.classList.contains(ct.thumbsContainer))&&be(g)};s.useEffect(()=>{if(!e)return;const g=Y=>{var Z,ee;if(Y.key==="Escape"){fe();return}if(Y.key==="ArrowRight"){E(ye=>(ye+1)%Math.max(n.length,1)),(Z=C.current)==null||Z.go("+1");return}Y.key==="ArrowLeft"&&(E(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ee=C.current)==null||ee.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,fe,n.length]),s.useEffect(()=>{if(e){if(E(0),w(Y=>Y+1),A.current=!1,q(!1),M(!1),j({}),!re)return;const g=new CustomEvent("page-overlay",{detail:{itemId:re}});window.dispatchEvent(g)}return()=>{I.current&&T.current&&(I.current.removeEventListener("animationend",T.current),T.current=null),M(!1)}},[e,re]),s.useEffect(()=>{L.current!==null&&L.current!==D.type&&w(g=>g+1),L.current=D.type},[D.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,Y=window.matchMedia("(max-width: 768px)").matches,Z=$.getColorAlpha(de.color);document.body.style.overflow="hidden",M(!1);const ee=G=>{G.target===I.current&&!A.current&&G.animationName&&(Y&&!l&&Z>.9&&(document.body.style.backgroundColor=de.color),M(!0),I.current&&V.current&&I.current.removeEventListener("animationend",V.current),V.current=null)};I.current&&(V.current=ee,I.current.addEventListener("animationend",ee));const ye=G=>{const N=G.target;N&&(N.closest(`.${ct.thumbsWrapper}`)||N.closest(`.${ct.thumbsContainer}`))||D.type!=="slide"&&G.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),I.current&&V.current&&(I.current.removeEventListener("animationend",V.current),V.current=null),M(!1)}},[e,l,de.color,D.type]),s.useEffect(()=>{if(!e)return;const g=Y=>{var ee,ye;if(A.current){Y.stopPropagation();return}if(X.current){X.current=!1;return}const Z=Y.target;if(!(Z&&(Z.closest(`.${ct.thumbsContainer}`)||Z.closest(`.${ct.thumbItem}`)||Z.closest(`.${ct.arrow}`)||Z.closest(`.${ct.closeButton}`)||Z.closest(`.${ct.caption}`)))){if(D.type==="slide"&&ae.type==="drag"&&((ye=(ee=C.current)==null?void 0:ee.splide)!=null&&ye.root)){const G=C.current.splide.root;if(Z&&(G.contains(Z)||G===Z))return}if(Y.touches.length===0&&Y.changedTouches.length>0){const G=n[b],N=(G==null?void 0:G.image.objectFit)==="cover",K=Y.changedTouches[0];let ne;if(N&&W.current){const pe=xc(W.current);ne=K.clientX>=pe.left&&K.clientX<=pe.right&&K.clientY>=pe.top&&K.clientY<=pe.bottom}else{const pe=W.current?Sa(W.current):null;if(!pe)return;ne=K.clientX>=pe.x&&K.clientX<=pe.x+pe.width&&K.clientY>=pe.y&&K.clientY<=pe.y+pe.height}if(!ne){Y.stopPropagation(),A.current=!0;const pe=U=>{U.stopPropagation(),U.preventDefault(),document.removeEventListener("click",pe,!0)};document.addEventListener("click",pe,!0),fe()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,fe,b,n]);const Ne=(D.type==="scale"||D.type==="fade")&&D.direction==="vert"&&ae.type==="drag";s.useEffect(()=>{var U,Pe;if(!e||!Ne||!((Pe=(U=C.current)==null?void 0:U.splide)!=null&&Pe.root))return;const g=C.current.splide.root,Y=30,Z=(le,J)=>{if(S.current){const De=Math.abs(le-S.current.x),Xe=Math.abs(J-S.current.y);(De>0||Xe>0)&&(X.current=!0)}},ee=le=>{S.current&&(le.preventDefault(),Z(le.clientX,le.clientY))},ye=le=>{S.current&&le.touches.length>0&&(le.preventDefault(),Z(le.touches[0].clientX,le.touches[0].clientY))},G=(le,J)=>{if(!S.current||!C.current){S.current=null;return}const De=Math.abs(le-S.current.x),Xe=Math.abs(J-S.current.y);Xe>Y&&Xe>De&&C.current.go(J<S.current.y?"+1":"-1"),S.current=null},N=le=>{S.current&&G(le.clientX,le.clientY),document.removeEventListener("pointerup",N),document.removeEventListener("pointercancel",N),document.removeEventListener("pointermove",ee)},K=le=>{if(S.current){if(le.changedTouches.length>0){const J=le.changedTouches[0];G(J.clientX,J.clientY)}document.removeEventListener("touchend",K),document.removeEventListener("touchcancel",K),document.removeEventListener("touchmove",ye)}},ne=le=>{S.current={x:le.clientX,y:le.clientY},X.current=!1,document.addEventListener("pointermove",ee,{passive:!1}),document.addEventListener("pointerup",N),document.addEventListener("pointercancel",N)},pe=le=>{le.touches.length>0&&(S.current={x:le.touches[0].clientX,y:le.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",K),document.addEventListener("touchcancel",K))};return g.addEventListener("pointerdown",ne),g.addEventListener("touchstart",pe),()=>{g.removeEventListener("pointerdown",ne),g.removeEventListener("touchstart",pe),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",N),document.removeEventListener("pointercancel",N),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",K),document.removeEventListener("touchcancel",K),S.current=null,X.current=!1}},[e,Ne,f]);const we={backgroundColor:de.color,backdropFilter:`blur(${de.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Un.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:I,className:Tt(ct.background,H?ue:ve,{[ct.editor]:l},{[ct.hidden]:!e}),style:{...we,...B&&!l&&!H?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?I:null,className:Tt(ct.contentStyle,H?Q:Ce,{[ct.editor]:l},{[ct.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>E(g.index),ref:C,className:ct.lightboxSplide,options:{arrows:!1,speed:D.duration?parseInt(D.duration):500,direction:D.direction==="horiz"||D.type==="fade"||D.type==="scale"?"ltr":"ttb",pagination:!1,drag:ae.type==="drag"&&!Ne,perPage:1,width:"100%",height:"100%",type:D.type==="fade"||D.type==="scale"?"fade":"loop",padding:0,rewind:ae.repeat!=="close",start:0},style:{"--splide-speed":D.duration},children:n.map((g,Y)=>{const Z=Wr(Se.position,Se.offset,l),ee=`${$.scalingValue(Se.padding.top,l)} ${$.scalingValue(Se.padding.right,l)} ${$.scalingValue(Se.padding.bottom,l)} ${$.scalingValue(Se.padding.left,l)}`,ye=D.type==="scale"?(()=>{const{transform:G,...N}=Z;return{...N,position:"absolute",padding:ee,boxSizing:"border-box","--position-transform":G||"none"}})():{...Z,position:"absolute",padding:ee,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:ct.imgWrapper,onClick:be,children:a.jsx("img",{ref:Y===b?W:null,className:Tt(ct.imageStyle,{[ct.contain]:g.image.objectFit==="contain",[ct.cover]:g.image.objectFit==="cover",[ct.scaleSlide]:D.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},Y)})},f),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Tt(ct.arrow,{[ct.arrowVertical]:D.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:ct.arrowInner,style:{transform:`translate(${$.scalingValue(R.offset.x,l)}, ${$.scalingValue(R.offset.y*(D.direction==="horiz"?1:-1),l)}) scale(${R.scale}) rotate(${D.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=C.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&a.jsx(mn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Tt(ct.arrowImg,ct.mirror)}),!R.arrowsImgUrl&&a.jsx(bc,{color:R.color,className:Tt(ct.arrowIcon,ct.arrowImg,ct.mirror)})]})}),a.jsx("div",{className:Tt(ct.arrow,ct.nextArrow,{[ct.arrowVertical]:D.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:ct.arrowInner,style:{transform:`translate(${$.scalingValue(R.offset.x*(D.direction==="horiz"?-1:1),l)}, ${$.scalingValue(R.offset.y,l)}) scale(${R.scale}) rotate(${D.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=C.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&a.jsx(mn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:ct.arrowImg}),!R.arrowsImgUrl&&a.jsx(bc,{color:R.color,className:Tt(ct.arrowIcon,ct.arrowImg)})]})})]}),de.closeIconUrl&&(()=>{const g=Wr(de.closeIconAlign,de.closeIconOffset,l),Y=`scale(${de.closeIconScale})`,Z=g.transform?`${g.transform} ${Y}`:Y;return a.jsx("button",{className:ct.closeButton,style:{...g,transform:Z},onClick:fe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:de.closeIconUrl,fill:de.closeIconColor??"#000000",hoverFill:de.closeIconHover??"#cccccc"})})})(),te&&te.isActive&&i.imageCaption&&((ce=n[b])==null?void 0:ce.imageCaption)&&a.jsx("div",{className:ct.caption,style:{...Wr(te.alignment,te.offset,l),fontFamily:Oo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":$.scalingValue(d.width,l),letterSpacing:$.scalingValue(p,l),wordSpacing:$.scalingValue(x,l),textAlign:y,fontSize:$.scalingValue(m.fontSize,l),lineHeight:$.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:v},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:ct.captionTextInner,style:{"--link-color":te.linkColor,"--link-hover-color":te.linkHoverColor},children:a.jsx(Ki,{content:n[b].imageCaption})})}),se.isActive&&(()=>{const[g,Y]=se.position.split("-"),Z=D.direction==="horiz"?`${g}-left`:se.position,ee=Wr(Z,se.offset,l),ye=()=>{if(D.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:ct.thumbsWrapper,onClick:G=>Me(G),style:{position:l?"absolute":"fixed",...ee,...D.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Tt(ct.thumbsContainer,{[ct.thumbsContainerVertical]:D.direction==="vert",[ct.thumbsAlignStart]:se.align==="start",[ct.thumbsAlignCenter]:se.align==="center",[ct.thumbsAlignEnd]:se.align==="end"}),style:{gap:$.scalingValue(se.grid.gap,l),justifyContent:k?"flex-start":ye()},children:n.map((G,N)=>{const K=N===b,ne=_[N],U=se.grid.size*(K?se.activeState.scale:1),Pe=()=>{if(se.fit!=="fit")return{};if(!ne)return D.direction==="horiz"?{height:$.scalingValue(U,l)}:{width:$.scalingValue(U,l)};const le=ne.width/ne.height;if(D.direction==="horiz"){const J=U,De=J*le;return{width:$.scalingValue(De,l),height:$.scalingValue(J,l)}}else{const J=U,De=J/le;return{width:$.scalingValue(J,l),height:$.scalingValue(De,l)}}};return a.jsx("button",{className:ct.thumbItem,style:{...D.direction==="horiz"&&se.fit!=="fit"?{height:$.scalingValue(U,l)}:{},...D.direction==="vert"&&se.fit!=="fit"?{width:$.scalingValue(U,l)}:{},...se.fit==="cover"?{width:$.scalingValue(U,l),height:$.scalingValue(U,l)}:{},...Pe(),transition:K?"all 0.25s ease-out":"none",opacity:K?se.activeState.opacity/100:se.opacity/100,"--thumb-hover":se.activeState.opacity/100},onClick:le=>{var J;le.stopPropagation(),E(N),(J=C.current)==null||J.go(N)},onMouseEnter:()=>{var le;se.triggers==="hov"&&((le=C.current)==null||le.go(N))},children:a.jsx("img",{src:G.image.assetId,alt:G.image.name??"",onLoad:le=>{const J=le.currentTarget;J.naturalWidth&&J.naturalHeight&&j(De=>({...De,[N]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:se.fit==="cover"?"cover":"contain",...se.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...se.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${G.image.name}-${N}`)})})})})()]})]}),document.getElementById(r))};function bc({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 gf={element:pf,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 hf(e){return`
6
+ */const dh="RichTextRenderer-module__link___BWeZ2",uh={link:dh},ph=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=>ph(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:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(n,t),lineHeight:i!==void 0?w.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(w.LinkWrapper,{className:uh.link,link:i,children:t(i.children)},o):a.jsx("span",{style:mh(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 mh(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 gh="SvgImage-module__svg___q3xE-",hh="SvgImage-module__img___VsTm-",fc={svg:gh,img:hh},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Uu(e){if(yr(e))return Promise.resolve(e);const t=Za.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 Za.delete(e),i});return Za.set(e,n),n}const fh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({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(!fh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Uu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Pt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Pt(fc.svg,i),style:{"--svg":yh(c),"--fill":t,"--hover-fill":n,...o??{}}})},vh={"top-left":Lt.topLeftAlignment,"top-center":Lt.topCenterAlignment,"top-right":Lt.topRightAlignment,"middle-left":Lt.middleLeftAlignment,"middle-center":Lt.middleCenterAlignment,"middle-right":Lt.middleRightAlignment,"bottom-left":Lt.bottomLeftAlignment,"bottom-center":Lt.bottomCenterAlignment,"bottom-right":Lt.bottomRightAlignment};function xh({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:v,textAppearance:x,color:m}=n.imageCaption??{},[h,b]=s.useState(void 0),[S,R]=s.useState(null),[y,C]=s.useState(0),[E,G]=s.useState(0),{direction:H,transition:O,controls:F,pagination:D,imageCaption:I,triggers:L}=e,z=s.useRef(O.type),{x:k,y:$}=e.controls.offset,P=q=>{o&&o.go(q)};return s.useEffect(()=>{if(!S)return;const q=new ResizeObserver(_=>{if(!o)return;const[K]=_;b({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return q.observe(S),()=>q.unobserve(S)},[S]),s.useEffect(()=>{!o||z.current===O.type||(G(q=>q+1),z.current=O.type)},[O.type]),a.jsx("div",{className:Pt(Lt.wrapper,{[Lt.editor]:i}),ref:R,children:a.jsxs("div",{className:Lt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:O.backgroundColor&&O.type==="fade in"?O.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Pt(Lt.captionBlock),children:a.jsx("div",{className:Lt.captionTextWrapper,children:t.map((q,_)=>a.jsx("div",{className:Pt(Lt.captionText,vh[I.alignment],{[Lt.withPointerEvents]:_===y&&i,[Lt.active]:_===y}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":w.scalingValue(l.width,i),letterSpacing:w.scalingValue(d,i),wordSpacing:w.scalingValue(p,i),textAlign:u,fontSize:w.scalingValue(v.fontSize,i),lineHeight:w.scalingValue(v.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:O.duration?`${Math.round(parseInt(O.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Lt.captionTextInner,style:{"--link-hover-color":I.linkHoverColor,"--link-color":I.linkColor,position:"relative",top:w.scalingValue(I.offset.y,i),left:w.scalingValue(I.offset.x,i)},children:a.jsx(Zi,{content:q.imageCaption})})},_))})}),a.jsx(El,{onMove:q=>{C(q.index)},ref:r,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:H==="horiz"||O.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:O.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((q,_)=>a.jsx(kl,{children:a.jsx("div",{className:Lt.sliderItem,children:a.jsx("div",{className:Lt.imgWrapper,children:a.jsx("img",{className:Pt(Lt.sliderImage,{[Lt.contain]:q.image.objectFit==="contain",[Lt.cover]:q.image.objectFit==="cover"}),src:q.image.assetId,alt:q.image.name??""})})})},_))},E),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(Lt.arrow,{[Lt.arrowVertical]:H==="vert",[Lt.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{onClick:()=>{P("-1")},className:Lt.arrowInner,style:{transform:`translate(${w.scalingValue(k,i)}, ${w.scalingValue($*(H==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&a.jsx(gn,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:Pt(Lt.arrowImg,Lt.mirror)}),!F.arrowsImgUrl&&a.jsx(yc,{color:F.color,className:Pt(Lt.arrowIcon,Lt.arrowImg,Lt.mirror)})]})}),a.jsx("div",{className:Pt(Lt.arrow,Lt.nextArrow,{[Lt.arrowVertical]:H==="vert",[Lt.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:Lt.arrowInner,onClick:()=>P("+1"),style:{transform:`translate(${w.scalingValue(k*(H==="horiz"?-1:1),i)}, ${w.scalingValue($,i)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&a.jsx(gn,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:Lt.arrowImg}),!F.arrowsImgUrl&&a.jsx(yc,{color:F.color,className:Pt(Lt.arrowIcon,Lt.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:Lt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&a.jsx("div",{className:Pt(Lt.pagination,{[Lt.paginationInsideBottom]:D.position==="inside-1"&&H==="horiz",[Lt.paginationInsideTop]:D.position==="inside-2"&&H==="horiz",[Lt.paginationOutsideBottom]:D.position==="outside-1"&&H==="horiz",[Lt.paginationOutsideTop]:D.position==="outside-2"&&H==="horiz",[Lt.paginationInsideLeft]:D.position==="inside-1"&&H==="vert",[Lt.paginationInsideRight]:D.position==="inside-2"&&H==="vert",[Lt.paginationOutsideLeft]:D.position==="outside-1"&&H==="vert",[Lt.paginationOutsideRight]:D.position==="outside-2"&&H==="vert",[Lt.paginationVertical]:H==="vert"}),children:a.jsx("div",{className:Lt.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${w.scalingValue(D.offset.x,i)}, ${w.scalingValue(D.offset.y,i)}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:t.map((q,_)=>a.jsx("button",{onClick:()=>{o&&o.go(_)},className:Pt(Lt.paginationItem),children:a.jsx("div",{className:Pt(Lt.dot,{[Lt.activeDot]:_===y}),style:{backgroundColor:_===y?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},_))})})]})})}function yc({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 bh={element:xh,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"]}},Sh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wh="ImageRevealSlider-module__image___Qjt-e",$h="ImageRevealSlider-module__link___N-iLG",Ch="ImageRevealSlider-module__cursor___2U03d",qo={imageRevealSlider:Sh,image:wh,link:$h,cursor:Ch};function vc(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 Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Th(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Ih({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,v]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[h,b]=s.useState("none"),S=s.useRef({x:0,y:0}),[R,y]=s.useState(!1),{sizeType:C,imageWidth:E,randomRangeImageWidth:G}=e.imageSize,{revealPosition:H,visible:O}=e.position,{cursorType:F,target:D,defaultCursorScale:I,defaultCursor:L,hoverCursorScale:z,hoverCursor:k}=e.cursor;s.useEffect(()=>{if(!i)return;const q=(M,f)=>{const X=i.getBoundingClientRect(),oe=M-X.left,ue=f-X.top;if(v({x:oe,y:ue}),F==="system"){b("none"),m(1);return}const N=oe,se=ue,T=document.elementFromPoint(X.left+N,X.top+se);if(T&&T.closest("a")){b("none"),m(1);return}const me=vc(N,se,r)||D==="area"?{img:k??"none",scale:z}:{img:L??"none",scale:I};b(me.img),m(me.scale)},_=M=>{M.stopPropagation(),S.current={x:M.clientX,y:M.clientY},q(M.clientX,M.clientY)},K=()=>{R&&q(S.current.x,S.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",K,!0)}},[i,R,p,F,D,k,L,z,I,r]),s.useEffect(()=>{R||(b("none"),m(0))},[R]);const $=async(q,_,K,M={})=>{const{width:f,height:X,finalWidth:oe}=await Th(q.image.assetId,C,E,G);let ue=0,N=0;H==="same"?(ue=_/2,N=K/2):(ue=M.x??Math.random()*_,N=M.y??Math.random()*K);const se=Math.min(Math.max(ue,f/2),_-f/2),T=Math.min(Math.max(N,X/2),K-X/2);return{id:u.current++,assetId:q.image.assetId,link:q.link,name:q.image.name,x:se,y:T,width:oe}};s.useEffect(()=>{if(!i||t.length===0)return;const q=i.getBoundingClientRect(),_=q.width,K=q.height,M=[];(async()=>{const X=t[0],oe=await $(X,_,K);M.push(oe),l(M),d(1)})()},[C,E,G,H,i]),s.useEffect(()=>{O==="last One"&&l(q=>q.length>0?[q[q.length-1]]:[])},[O]);const P=async q=>{if(!i)return;const _=i.getBoundingClientRect(),K=q.clientX-_.left,M=q.clientY-_.top;if(D==="image"&&!vc(K,M,r))return;let f=0,X=0;H==="on Click"?(f=K,X=M):H==="same"?(f=_.width/2,X=_.height/2):(f=Math.random()*_.width,X=Math.random()*_.height);const oe=t[c],ue=await $(oe,_.width,_.height,{x:f,y:X});l(N=>O==="all"?[...N,ue]:[ue]),d(N=>N>=t.length-1?0:N+1)};return a.jsxs("div",{ref:o,onClick:P,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:qo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(q=>a.jsx("div",{className:qo.wrapper,style:{top:`${q.y}px`,left:`${q.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:q.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:a.jsx(w.LinkWrapper,{link:D==="area"?q.link:void 0,className:qo.link,children:a.jsx("img",{src:q.assetId,alt:q.name,className:qo.image},q.id)})},q.id)),R&&a.jsx("div",{className:qo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Lh={element:Ih,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",Mh="LightBox-module__heroImage___sTxNF",Rh="LightBox-module__background___rm9ml",Eh="LightBox-module__editor___4ACaY",kh="LightBox-module__contentStyle___Bgnsq",Ah="LightBox-module__imageStyle___tLIlB",Fh="LightBox-module__imgWrapper___LuFUp",Nh="LightBox-module__contain___8-yaS",_h="LightBox-module__cover___hNvOG",Hh="LightBox-module__caption___b6L2I",Wh="LightBox-module__captionTextInner___rCGNH",Oh="LightBox-module__lightboxSplide___XFuWC",Dh="LightBox-module__arrow___iz38X",zh="LightBox-module__arrowVertical___Zfz81",Bh="LightBox-module__nextArrow___zkAQN",jh="LightBox-module__arrowInner___p48sW",Vh="LightBox-module__arrowIcon___3VaFf",Gh="LightBox-module__arrowImg___pNV88",Xh="LightBox-module__mirror___pjeXc",qh="LightBox-module__thumbsWrapper___GB-nU",Uh="LightBox-module__thumbsContainerVertical___wttk5",Kh="LightBox-module__thumbsContainer___osSma",Yh="LightBox-module__thumbsAlignStart___MO6tY",Qh="LightBox-module__thumbsAlignCenter___Q4sUx",Zh="LightBox-module__thumbsAlignEnd___p4y9R",Jh="LightBox-module__thumbItem___HvnF3",ef="LightBox-module__closeButton___g2khP",tf="LightBox-module__fadeIn___0m5GW",nf="LightBox-module__slideInLeft___gPYwC",of="LightBox-module__slideInRight___S-pPp",rf="LightBox-module__slideInTop___DFdAj",af="LightBox-module__slideInBottom___m27kZ",sf="LightBox-module__fadeOut___55qBR",lf="LightBox-module__slideOutLeft___NvU7P",cf="LightBox-module__slideOutRight___SK7eC",df="LightBox-module__slideOutTop___Vgg0z",uf="LightBox-module__slideOutBottom___nJ0Ef",pf="LightBox-module__scaleSlide___vZriG",st={hidden:Ph,heroImage:Mh,background:Rh,editor:Eh,contentStyle:kh,imageStyle:Ah,imgWrapper:Fh,contain:Nh,cover:_h,caption:Hh,captionTextInner:Wh,lightboxSplide:Oh,arrow:Dh,arrowVertical:zh,nextArrow:Bh,arrowInner:jh,arrowIcon:Vh,arrowImg:Gh,mirror:Xh,thumbsWrapper:qh,thumbsContainerVertical:Uh,thumbsContainer:Kh,thumbsAlignStart:Yh,thumbsAlignCenter:Qh,thumbsAlignEnd:Zh,thumbItem:Jh,closeButton:ef,fadeIn:tf,slideInLeft:nf,slideInRight:of,slideInTop:rf,slideInBottom:af,fadeOut:sf,slideOutLeft:lf,slideOutRight:cf,slideOutTop:df,slideOutBottom:uf,scaleSlide:pf},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% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:i.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,i};function Ku(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 mf(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 Yu(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 gf(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 Qu(e,t,n,i,o){const{x:r,y:l}=mf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function hf(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"?gf:Yu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:v,offsetY:x}=Qu(n,i,u,p,c),m=(v+u/2)/n*100,h=(x+p/2)/i*100;return`${m}% ${h}%`}function ff(e){return hf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=Ku(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}=Yu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Qu(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:v+m,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=Ku(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function yf(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 vf=({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(xf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},xf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var le;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:x,fontSizeLineHeight:m,textAppearance:h,color:b}=i.imageCaption??{},[S,R]=s.useState(0),[y,C]=s.useState(0),[E,G]=s.useState(!1),[H,O]=s.useState(!1),[F,D]=s.useState({}),I=s.useRef(null),L=s.useRef(null),z=s.useRef(null),k=s.useRef(!1),$=s.useRef(null),P=s.useRef(null),q=s.useRef(null),_=s.useRef(null),K=s.useRef(!1),M=s.useRef(null),[f,X]=s.useState(!1),{appear:oe,triggers:ue,slider:N,thumbnail:se,controls:T,area:me,caption:J,layout:we}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:he,backdropDisappearClass:fe,disappearClass:ie}=yf(oe.type,oe.direction),re=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var Y,te;(te=(Y=I.current)==null?void 0:Y.splide)==null||te.refresh()},16)},V=()=>{C(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",V),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",V)}},[]),s.useEffect(()=>{if(!e||!se.isActive){X(!1);return}const g=M.current;if(!g)return;const V=()=>{N.direction==="horiz"?X(g.scrollWidth>g.clientWidth):X(g.scrollHeight>g.clientHeight)};V();const Y=new ResizeObserver(V);return Y.observe(g),()=>Y.disconnect()},[e,se.isActive,n.length,F,N.direction]);const ae=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,V=w.getColorAlpha(me.color);g&&!l&&V>.9&&(document.body.style.backgroundColor=""),G(!0),k.current=!0;const Y=te=>{te.target===$.current&&te.animationName&&($.current&&P.current&&$.current.removeEventListener("animationend",P.current),P.current=null,k.current&&(k.current=!1,t()),G(!1))};$.current&&(P.current=Y,$.current.addEventListener("animationend",Y))},[t,me.color,l]),pe=(g,V,Y)=>{var te,ge;if(g){if(ue.type==="click"&&ue.switch==="image")ue.repeat==="close"&&S===n.length-1?ae():(te=I.current)==null||te.go("+1");else if(ue.type==="click"&&ue.switch==="50/50"){const ee=g.getBoundingClientRect(),B=V-ee.left,Z=Y-ee.top,U=ee.width,de=ee.height;let j;N.direction==="horiz"?j=B<U/2?"-1":"+1":j=Z<de/2?"-1":"+1",(ge=I.current)==null||ge.go(j)}}},be=g=>{if(K.current){K.current=!1;return}const V=n[S],Y=(V==null?void 0:V.image.objectFit)==="cover";let te,ge;if("changedTouches"in g&&g.changedTouches.length>0)te=g.changedTouches[0].clientX,ge=g.changedTouches[0].clientY;else if("clientX"in g)te=g.clientX,ge=g.clientY;else return;let ee;if(Y&&z.current){const B=xc(z.current);ee=te>=B.left&&te<=B.right&&ge>=B.top&&ge<=B.bottom}else{const B=z.current?Sa(z.current):null;if(!B){g.target===g.currentTarget&&ae();return}ee=te>=B.x&&te<=B.x+B.width&&ge>=B.y&&ge<=B.y+B.height}ee?pe(z.current,te,ge):ae()},ke=g=>{const V=g.target;(V.classList.contains(st.thumbsWrapper)||V.classList.contains(st.thumbsContainer))&&be(g)};s.useEffect(()=>{if(!e)return;const g=V=>{var Y,te;if(V.key==="Escape"){ae();return}if(V.key==="ArrowRight"){R(ge=>(ge+1)%Math.max(n.length,1)),(Y=I.current)==null||Y.go("+1");return}V.key==="ArrowLeft"&&(R(ge=>(ge-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=I.current)==null||te.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,ae,n.length]),s.useEffect(()=>{if(e){if(R(0),C(V=>V+1),k.current=!1,G(!1),O(!1),D({}),!re)return;const g=new CustomEvent("page-overlay",{detail:{itemId:re}});window.dispatchEvent(g)}return()=>{$.current&&P.current&&($.current.removeEventListener("animationend",P.current),P.current=null),O(!1)}},[e,re]),s.useEffect(()=>{L.current!==null&&L.current!==N.type&&C(g=>g+1),L.current=N.type},[N.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,V=window.matchMedia("(max-width: 768px)").matches,Y=w.getColorAlpha(me.color);document.body.style.overflow="hidden",O(!1);const te=ee=>{ee.target===$.current&&!k.current&&ee.animationName&&(V&&!l&&Y>.9&&(document.body.style.backgroundColor=me.color),O(!0),$.current&&q.current&&$.current.removeEventListener("animationend",q.current),q.current=null)};$.current&&(q.current=te,$.current.addEventListener("animationend",te));const ge=ee=>{const B=ee.target;B&&(B.closest(`.${st.thumbsWrapper}`)||B.closest(`.${st.thumbsContainer}`))||N.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",ge,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ge),$.current&&q.current&&($.current.removeEventListener("animationend",q.current),q.current=null),O(!1)}},[e,l,me.color,N.type]),s.useEffect(()=>{if(!e)return;const g=V=>{var te,ge;if(k.current){V.stopPropagation();return}if(K.current){K.current=!1;return}const Y=V.target;if(!(Y&&(Y.closest(`.${st.thumbsContainer}`)||Y.closest(`.${st.thumbItem}`)||Y.closest(`.${st.arrow}`)||Y.closest(`.${st.closeButton}`)||Y.closest(`.${st.caption}`)))){if(N.type==="slide"&&ue.type==="drag"&&((ge=(te=I.current)==null?void 0:te.splide)!=null&&ge.root)){const ee=I.current.splide.root;if(Y&&(ee.contains(Y)||ee===Y))return}if(V.touches.length===0&&V.changedTouches.length>0){const ee=n[S],B=(ee==null?void 0:ee.image.objectFit)==="cover",Z=V.changedTouches[0];let U;if(B&&z.current){const de=xc(z.current);U=Z.clientX>=de.left&&Z.clientX<=de.right&&Z.clientY>=de.top&&Z.clientY<=de.bottom}else{const de=z.current?Sa(z.current):null;if(!de)return;U=Z.clientX>=de.x&&Z.clientX<=de.x+de.width&&Z.clientY>=de.y&&Z.clientY<=de.y+de.height}if(!U){V.stopPropagation(),k.current=!0;const de=j=>{j.stopPropagation(),j.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),ae()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,ae,S,n]);const Fe=(N.type==="scale"||N.type==="fade")&&N.direction==="vert"&&ue.type==="drag";s.useEffect(()=>{var j,Pe;if(!e||!Fe||!((Pe=(j=I.current)==null?void 0:j.splide)!=null&&Pe.root))return;const g=I.current.splide.root,V=30,Y=(ne,Q)=>{if(_.current){const _e=Math.abs(ne-_.current.x),Ge=Math.abs(Q-_.current.y);(_e>0||Ge>0)&&(K.current=!0)}},te=ne=>{_.current&&(ne.preventDefault(),Y(ne.clientX,ne.clientY))},ge=ne=>{_.current&&ne.touches.length>0&&(ne.preventDefault(),Y(ne.touches[0].clientX,ne.touches[0].clientY))},ee=(ne,Q)=>{if(!_.current||!I.current){_.current=null;return}const _e=Math.abs(ne-_.current.x),Ge=Math.abs(Q-_.current.y);Ge>V&&Ge>_e&&I.current.go(Q<_.current.y?"+1":"-1"),_.current=null},B=ne=>{_.current&&ee(ne.clientX,ne.clientY),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("pointermove",te)},Z=ne=>{if(_.current){if(ne.changedTouches.length>0){const Q=ne.changedTouches[0];ee(Q.clientX,Q.clientY)}document.removeEventListener("touchend",Z),document.removeEventListener("touchcancel",Z),document.removeEventListener("touchmove",ge)}},U=ne=>{_.current={x:ne.clientX,y:ne.clientY},K.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",B),document.addEventListener("pointercancel",B)},de=ne=>{ne.touches.length>0&&(_.current={x:ne.touches[0].clientX,y:ne.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ge,{passive:!1}),document.addEventListener("touchend",Z),document.addEventListener("touchcancel",Z))};return g.addEventListener("pointerdown",U),g.addEventListener("touchstart",de),()=>{g.removeEventListener("pointerdown",U),g.removeEventListener("touchstart",de),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("touchmove",ge),document.removeEventListener("touchend",Z),document.removeEventListener("touchcancel",Z),_.current=null,K.current=!1}},[e,Fe,y]);const xe={backgroundColor:me.color,backdropFilter:`blur(${me.blur}px)`,animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Un.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:$,className:Pt(st.background,E?fe:he,{[st.editor]:l},{[st.hidden]:!e}),style:{...xe,...H&&!l&&!E?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?$:null,className:Pt(st.contentStyle,E?ie:Le,{[st.editor]:l},{[st.hidden]:!e}),style:{animationDuration:`${parseInt(oe.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>R(g.index),ref:I,className:st.lightboxSplide,options:{arrows:!1,speed:N.duration?parseInt(N.duration):500,direction:N.direction==="horiz"||N.type==="fade"||N.type==="scale"?"ltr":"ttb",pagination:!1,drag:ue.type==="drag"&&!Fe,perPage:1,width:"100%",height:"100%",type:N.type==="fade"||N.type==="scale"?"fade":"loop",padding:0,rewind:ue.repeat!=="close",start:0},style:{"--splide-speed":N.duration},children:n.map((g,V)=>{const Y=Wr(we.position,we.offset,l),te=`${w.scalingValue(we.padding.top,l)} ${w.scalingValue(we.padding.right,l)} ${w.scalingValue(we.padding.bottom,l)} ${w.scalingValue(we.padding.left,l)}`,ge=N.type==="scale"?(()=>{const{transform:ee,...B}=Y;return{...B,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":ee||"none"}})():{...Y,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:st.imgWrapper,onClick:be,children:a.jsx("img",{ref:V===S?z:null,className:Pt(st.imageStyle,{[st.contain]:g.image.objectFit==="contain",[st.cover]:g.image.objectFit==="cover",[st.scaleSlide]:N.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ge,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},V)})},y),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(st.arrow,{[st.arrowVertical]:N.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${w.scalingValue(T.offset.x,l)}, ${w.scalingValue(T.offset.y*(N.direction==="horiz"?1:-1),l)}) scale(${T.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=I.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[T.arrowsImgUrl&&a.jsx(gn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:Pt(st.arrowImg,st.mirror)}),!T.arrowsImgUrl&&a.jsx(bc,{color:T.color,className:Pt(st.arrowIcon,st.arrowImg,st.mirror)})]})}),a.jsx("div",{className:Pt(st.arrow,st.nextArrow,{[st.arrowVertical]:N.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:st.arrowInner,style:{transform:`translate(${w.scalingValue(T.offset.x*(N.direction==="horiz"?-1:1),l)}, ${w.scalingValue(T.offset.y,l)}) scale(${T.scale}) rotate(${N.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=I.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[T.arrowsImgUrl&&a.jsx(gn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:st.arrowImg}),!T.arrowsImgUrl&&a.jsx(bc,{color:T.color,className:Pt(st.arrowIcon,st.arrowImg)})]})})]}),me.closeIconUrl&&(()=>{const g=Wr(me.closeIconAlign,me.closeIconOffset,l),V=`scale(${me.closeIconScale})`,Y=g.transform?`${g.transform} ${V}`:V;return a.jsx("button",{className:st.closeButton,style:{...g,transform:Y},onClick:ae,"aria-label":"Close lightbox",children:a.jsx(gn,{url:me.closeIconUrl,fill:me.closeIconColor??"#000000",hoverFill:me.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((le=n[S])==null?void 0:le.imageCaption)&&a.jsx("div",{className:st.caption,style:{...Wr(J.alignment,J.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":w.scalingValue(d.width,l),letterSpacing:w.scalingValue(p,l),wordSpacing:w.scalingValue(x,l),textAlign:v,fontSize:w.scalingValue(m.fontSize,l),lineHeight:w.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:b},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:st.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Zi,{content:n[S].imageCaption})})}),se.isActive&&(()=>{const[g,V]=se.position.split("-"),Y=N.direction==="horiz"?`${g}-left`:se.position,te=Wr(Y,se.offset,l),ge=()=>{if(N.direction==="horiz"){if(V==="left")return"flex-start";if(V==="center")return"center";if(V==="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:M,className:st.thumbsWrapper,onClick:ee=>ke(ee),style:{position:l?"absolute":"fixed",...te,...N.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pt(st.thumbsContainer,{[st.thumbsContainerVertical]:N.direction==="vert",[st.thumbsAlignStart]:se.align==="start",[st.thumbsAlignCenter]:se.align==="center",[st.thumbsAlignEnd]:se.align==="end"}),style:{gap:w.scalingValue(se.grid.gap,l),justifyContent:f?"flex-start":ge()},children:n.map((ee,B)=>{const Z=B===S,U=F[B],j=se.grid.size*(Z?se.activeState.scale:1),Pe=()=>{if(se.fit!=="fit")return{};if(!U)return N.direction==="horiz"?{height:w.scalingValue(j,l)}:{width:w.scalingValue(j,l)};const ne=U.width/U.height;if(N.direction==="horiz"){const Q=j,_e=Q*ne;return{width:w.scalingValue(_e,l),height:w.scalingValue(Q,l)}}else{const Q=j,_e=Q/ne;return{width:w.scalingValue(Q,l),height:w.scalingValue(_e,l)}}};return a.jsx("button",{className:st.thumbItem,style:{...N.direction==="horiz"&&se.fit!=="fit"?{height:w.scalingValue(j,l)}:{},...N.direction==="vert"&&se.fit!=="fit"?{width:w.scalingValue(j,l)}:{},...se.fit==="cover"?{width:w.scalingValue(j,l),height:w.scalingValue(j,l)}:{},...Pe(),transition:Z?"all 0.25s ease-out":"none",opacity:Z?se.activeState.opacity/100:se.opacity/100,"--thumb-hover":se.activeState.opacity/100},onClick:ne=>{var Q;ne.stopPropagation(),R(B),(Q=I.current)==null||Q.go(B)},onMouseEnter:()=>{var ne;se.triggers==="hov"&&((ne=I.current)==null||ne.go(B))},children:a.jsx("img",{src:ee.image.assetId,alt:ee.image.name??"",onLoad:ne=>{const Q=ne.currentTarget;Q.naturalWidth&&Q.naturalHeight&&D(_e=>({..._e,[B]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:se.fit==="cover"?"cover":"contain",...se.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...se.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${B}`)})})})})()]})]}),document.getElementById(r))};function bc({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 bf={element:vf,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 Sf(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 ff({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=$.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:m,gap:h,fieldsGap:v,buttonCorners:b,buttonStroke:E,buttonPadding:f,isButtonFullWidth:w,inputCorners:H,inputStroke:q,inputPadding:B,inputColor:M,inputTextColor:_,inputBorderColor:j,placeholderColor:C,buttonColor:L,buttonTextColor:W,buttonBorderColor:A,labelTextColor:I,successColor:T,errorColor:V,fontFamily:S,inputFontSettings:X,inputFontSize:P,inputLineHeight:k,inputLetterSpacing:O,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:D,buttonFontSize:se,buttonLineHeight:R,buttonLetterSpacing:de,buttonWordSpacing:te,buttonTextAppearance:Se,labelFontSettings:Ce,labelFontSize:ve,labelLineHeight:ue,labelLetterSpacing:Q,labelWordSpacing:re,labelTextAppearance:fe,statusFontSettings:he,statusFontSize:be,statusLineHeight:Me,statusLetterSpacing:Ne,statusWordSpacing:we,statusTextAppearance:ce,successMessage:g,errorMessage:Y,stateOverrides:Z}=e,ee=u==="B",ye=x.slice(0,Math.min(p,x.length)),G={fontSettings:{fontFamily:S,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:P??.01,lineHeight:k,letterSpacing:O??0,wordSpacing:ie??0,textAppearance:ae,color:_},N=un(nn(G,t)),K=$.scalingValue(q??0,t),ne=Te=>$.scalingValue((k??P??.01)*Te+((B==null?void 0:B.top)??0)+((B==null?void 0:B.bottom)??0)+(u==="C"?q??0:(q??0)*2),t),pe=ne(1),U=ne(Math.max(1,y)),Pe={...N,borderStyle:"solid",borderRadius:u==="C"?0:$.scalingValue(H??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:$.scalingValue((B==null?void 0:B.top)??0,t),paddingRight:$.scalingValue((B==null?void 0:B.right)??0,t),paddingBottom:$.scalingValue((B==null?void 0:B.bottom)??0,t),paddingLeft:$.scalingValue((B==null?void 0:B.left)??0,t),height:pe,minHeight:pe},le={fontSettings:{fontFamily:S,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:se??.01,lineHeight:R,letterSpacing:de??0,wordSpacing:te??0,textAppearance:Se,color:W},J=un(nn(le,t)),De=$.scalingValue(E??0,t),Xe={fontSettings:{fontFamily:S,fontWeight:(Ce==null?void 0:Ce.fontWeight)??400,fontStyle:(Ce==null?void 0:Ce.fontStyle)??"normal"},fontSize:ve??.01,lineHeight:ue,letterSpacing:Q??0,wordSpacing:re??0,textAppearance:fe,color:I},Ue=nn(Xe,t),Je={fontSettings:{fontFamily:S,fontWeight:(he==null?void 0:he.fontWeight)??400,fontStyle:(he==null?void 0:he.fontStyle)??"normal"},fontSize:be??.01,lineHeight:Me,letterSpacing:Ne??0,wordSpacing:we??0,textAppearance:ce,color:T},et=un(nn(Je,t)),Qe=$.buildColorVars(d,{inputColor:M,inputTextColor:_,inputBorderColor:j,placeholderColor:C!=null&&C.trim()?C:"#cccccc",buttonColor:L,buttonTextColor:W,buttonBorderColor:A,labelTextColor:I,successColor:T,errorColor:V},yf,vf,Z),[it,xe]=s.useState(()=>Object.fromEntries(ye.map(Te=>[Te.name,""]))),[Ie,We]=s.useState("idle"),[qe,je]=s.useState(null),ot=r==="success"?"success":r==="error"?"error":Ie,nt=r==="error"?Y:qe,Ee=r==="filled",Be=s.useMemo(()=>{if(!Ee)return it;let Te=null;for(const at of ye)(it[at.name]??"").trim().length>0||(Te=Te??{...it},Te[at.name]="Filled");return Te??it},[it,Ee,ye]),tt=ot==="error"?$.getFormFieldValidationError(ye,Be):null,He=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),xt=o==null?void 0:o.submitUrl,rt=(Te,at)=>{xe(me=>({...me,[Te]:at}))},ze=async Te=>{if(Te.preventDefault(),!c)return;const at=Object.fromEntries(ye.map(Fe=>{var Ze;return[Fe.name,((Ze=it[Fe.name])==null?void 0:Ze.trim())??""]}).filter(([,Fe])=>Fe));if(!xt){We("error"),je("No integrations were found for this form.");return}if(Object.keys(at).length===0)return;const me=$.getFormFieldValidationError(ye,it);if(me){We("error"),je(me);return}We("submitting"),je(null);try{const Fe=await fetch(xt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(at)});if(!Fe.ok){const Ze=await Fe.text();throw new Error(Ze||`Request failed: ${Fe.status}`)}We("success"),xe(Object.fromEntries(ye.map(Ze=>[Ze.name,""])))}catch(Fe){We("error"),je(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${He}`.trim(),style:Qe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(d)}}),a.jsxs("form",{onSubmit:ze,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ye.map((Te,at)=>a.jsxs(s.Fragment,{children:[at>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:$.scalingValue(v??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ee?` ${d}-labeled`:""}`,children:[ee&&a.jsx("span",{className:`${d}-field-label`,style:Ue?{...Ue,lineHeight:Ue.fontSize}:void 0,children:Te.label||Te.name}),Te.type==="textarea"?a.jsx("textarea",{name:Te.name,autoComplete:"off",value:Be[Te.name]??"",onChange:me=>rt(Te.name,me.target.value),placeholder:Te.placeholder,className:`${d}-input`,style:{...Pe,height:U,minHeight:U},rows:y,"data-filled":Ee||(Be[Te.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Te.type==="phone"?"tel":Te.type==="email"?"email":"text",name:Te.name,autoComplete:"off",value:Be[Te.name]??"",onChange:me=>rt(Te.name,me.target.value),placeholder:Te.placeholder,required:Te.isRequired??Te.type==="email",className:`${d}-input`,style:Pe,"data-filled":Ee||(Be[Te.name]??"").trim().length>0})]})]},at))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:$.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:$.scalingValue(b??0,t),borderWidth:De,paddingTop:$.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:$.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:$.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:$.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...J,...w?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:w?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ie==="submitting"?"...":m})})})]}),ot==="success"&&a.jsx("p",{className:`${d}-success`,style:{...et},children:g}),ot==="error"&&a.jsx("p",{className:`${d}-error`,style:{...et},role:"alert",children:tt??nt??Y})]})}const yf={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"},vf=["hover","focus","filled","success","error"],xf=`import React, { useMemo, useState } from 'react';
158
+ `}function wf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=w.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:v=1,fields:x=[],buttonLabel:m,gap:h,fieldsGap:b,buttonCorners:S,buttonStroke:R,buttonPadding:y,isButtonFullWidth:C,inputCorners:E,inputStroke:G,inputPadding:H,inputColor:O,inputTextColor:F,inputBorderColor:D,placeholderColor:I,buttonColor:L,buttonTextColor:z,buttonBorderColor:k,labelTextColor:$,successColor:P,errorColor:q,fontFamily:_,inputFontSettings:K,inputFontSize:M,inputLineHeight:f,inputLetterSpacing:X,inputWordSpacing:oe,inputTextAppearance:ue,buttonFontSettings:N,buttonFontSize:se,buttonLineHeight:T,buttonLetterSpacing:me,buttonWordSpacing:J,buttonTextAppearance:we,labelFontSettings:Le,labelFontSize:he,labelLineHeight:fe,labelLetterSpacing:ie,labelWordSpacing:re,labelTextAppearance:ae,statusFontSettings:pe,statusFontSize:be,statusLineHeight:ke,statusLetterSpacing:Fe,statusWordSpacing:xe,statusTextAppearance:le,successMessage:g,errorMessage:V,stateOverrides:Y}=e,te=u==="B",ge=x.slice(0,Math.min(p,x.length)),ee={fontSettings:{fontFamily:_,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:M??.01,lineHeight:f,letterSpacing:X??0,wordSpacing:oe??0,textAppearance:ue,color:F},B=pn(nn(ee,t)),Z=w.scalingValue(G??0,t),U=Ce=>w.scalingValue((f??M??.01)*Ce+((H==null?void 0:H.top)??0)+((H==null?void 0:H.bottom)??0)+(u==="C"?G??0:(G??0)*2),t),de=U(1),j=U(Math.max(1,v)),Pe={...B,borderStyle:"solid",borderRadius:u==="C"?0:w.scalingValue(E??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Z,borderLeftWidth:0}:{borderWidth:Z},paddingTop:w.scalingValue((H==null?void 0:H.top)??0,t),paddingRight:w.scalingValue((H==null?void 0:H.right)??0,t),paddingBottom:w.scalingValue((H==null?void 0:H.bottom)??0,t),paddingLeft:w.scalingValue((H==null?void 0:H.left)??0,t),height:de,minHeight:de},ne={fontSettings:{fontFamily:_,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:se??.01,lineHeight:T,letterSpacing:me??0,wordSpacing:J??0,textAppearance:we,color:z},Q=pn(nn(ne,t)),_e=w.scalingValue(R??0,t),Ge={fontSettings:{fontFamily:_,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:he??.01,lineHeight:fe,letterSpacing:ie??0,wordSpacing:re??0,textAppearance:ae,color:$},Be=nn(Ge,t),qe={fontSettings:{fontFamily:_,fontWeight:(pe==null?void 0:pe.fontWeight)??400,fontStyle:(pe==null?void 0:pe.fontStyle)??"normal"},fontSize:be??.01,lineHeight:ke,letterSpacing:Fe??0,wordSpacing:xe??0,textAppearance:le,color:P},Ye=pn(nn(qe,t)),nt=w.buildColorVars(d,{inputColor:O,inputTextColor:F,inputBorderColor:D,placeholderColor:I!=null&&I.trim()?I:"#cccccc",buttonColor:L,buttonTextColor:z,buttonBorderColor:k,labelTextColor:$,successColor:P,errorColor:q},$f,Cf,Y),[it,ve]=s.useState(()=>Object.fromEntries(ge.map(Ce=>[Ce.name,""]))),[Te,We]=s.useState("idle"),[Ke,Ze]=s.useState(null),lt=r==="success"?"success":r==="error"?"error":Te,ot=r==="error"?V:Ke,Me=r==="filled",ze=s.useMemo(()=>{if(!Me)return it;let Ce=null;for(const tt of ge)(it[tt.name]??"").trim().length>0||(Ce=Ce??{...it},Ce[tt.name]="Filled");return Ce??it},[it,Me,ge]),et=lt==="error"?w.getFormFieldValidationError(ge,ze):null,Ne=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),yt=o==null?void 0:o.submitUrl,je=(Ce,tt)=>{ve(Qe=>({...Qe,[Ce]:tt}))},He=async Ce=>{if(Ce.preventDefault(),!c)return;const tt=Object.fromEntries(ge.map(St=>{var Ct;return[St.name,((Ct=it[St.name])==null?void 0:Ct.trim())??""]}).filter(([,St])=>St));if(!yt){We("error"),Ze("No integrations were found for this form.");return}if(Object.keys(tt).length===0)return;const Qe=w.getFormFieldValidationError(ge,it);if(Qe){We("error"),Ze(Qe);return}We("submitting"),Ze(null);try{const St=await fetch(yt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt)});if(!St.ok){const Ct=await St.text();throw new Error(Ct||`Request failed: ${St.status}`)}We("success"),ve(Object.fromEntries(ge.map(Ct=>[Ct.name,""])))}catch(St){We("error"),Ze(St instanceof Error?St.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Ne}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(d)}}),a.jsxs("form",{onSubmit:He,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ge.map((Ce,tt)=>a.jsxs(s.Fragment,{children:[tt>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:w.scalingValue(b??0,t)}}),a.jsxs("div",{className:`${d}-field-group${te?` ${d}-labeled`:""}`,children:[te&&a.jsx("span",{className:`${d}-field-label`,style:Be?{...Be,lineHeight:Be.fontSize}:void 0,children:Ce.label||Ce.name}),Ce.type==="textarea"?a.jsx("textarea",{name:Ce.name,autoComplete:"off",value:ze[Ce.name]??"",onChange:Qe=>je(Ce.name,Qe.target.value),placeholder:Ce.placeholder,className:`${d}-input`,style:{...Pe,height:j,minHeight:j},rows:v,"data-filled":Me||(ze[Ce.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ce.type==="phone"?"tel":Ce.type==="email"?"email":"text",name:Ce.name,autoComplete:"off",value:ze[Ce.name]??"",onChange:Qe=>je(Ce.name,Qe.target.value),placeholder:Ce.placeholder,required:Ce.isRequired??Ce.type==="email",className:`${d}-input`,style:Pe,"data-filled":Me||(ze[Ce.name]??"").trim().length>0})]})]},tt))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:w.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:w.scalingValue(S??0,t),borderWidth:_e,paddingTop:w.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:w.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:w.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:w.scalingValue((y==null?void 0:y.left)??0,t),pointerEvents:c?"auto":void 0,...Q,...C?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:C?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Te==="submitting"?"...":m})})})]}),lt==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Ye},children:g}),lt==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Ye},role:"alert",children:et??ot??V})]})}const $f={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"},Cf=["hover","focus","filled","success","error"],Tf=`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
- `,bf=[{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"}}}},Sf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],wf={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:bf,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:[...Sf],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"]},$f={element:ff,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:wf,sourceCode:xf,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 Cf(e){return`
796
+ `,If=[{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"}}}},Lf=["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:If,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:[...Lf],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"]},Mf={element:wf,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:Tf,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 Tf=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=$.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:v,inputWordSpacing:b,inputTextAppearance:E,buttonFontSettings:f,buttonFontSize:w,buttonLineHeight:H,buttonLetterSpacing:q,buttonWordSpacing:B,buttonTextAppearance:M,statusFontSettings:_,statusFontSize:j,statusLineHeight:C,statusLetterSpacing:L,statusWordSpacing:W,statusTextAppearance:A,iconMaxWidth:I,minHeight:T,corners:V,stroke:S,stateOverrides:X,inputPadding:P,buttonPadding:k,successMessage:O="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,ae=c.slice(0,Math.min(p,c.length)),[D,se]=s.useState(()=>Object.fromEntries(ae.map(le=>[le.name,""]))),[R,de]=s.useState("idle"),[te,Se]=s.useState(null),Ce=o==="success"?"success":o==="error"?"error":R,ve=o==="error"?ie:te,ue=o==="filled",Q=s.useMemo(()=>{if(!ue)return D;let le=null;for(const J of ae)(D[J.name]??"").trim().length>0||(le=le??{...D},le[J.name]="Filled");return le??D},[ue,D,ae]),re=Ce==="error"?$.getFormFieldValidationError(ae,Q):null,fe=o&&o!=="default"?`${r}-state-${o}`:"",he=ae.some(le=>(Q[le.name]??"").trim().length>0),be=fe!==`${r}-state-filled`&&he?`${r}-state-filled`:"",Me=`${fe} ${be}`.trim(),Ne=i==null?void 0:i.submitUrl,we=u??"",ce=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",Y=we||"Submit",Z={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:v??0,wordSpacing:b??0,textAppearance:E,color:e.inputTextColor??"#111111"},ee={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:w??.01,lineHeight:H,letterSpacing:q??0,wordSpacing:B??0,textAppearance:M,color:e.buttonTextColor??"#ffffff"},ye={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:j??.01,lineHeight:C,letterSpacing:L??0,wordSpacing:W??0,textAppearance:A,color:e.successColor??"#22c55e"},G=un(nn(Z,t)),N=un(nn(ee,t)),K=un(nn(ye,t)),ne=$.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Z==null?void 0:Z.color)??"#111111",buttonTextColor:e.buttonTextColor??(ee==null?void 0:ee.color)??"#ffffff"},If,Lf,X),pe={borderRadius:$.scalingValue(V,t),borderWidth:$.scalingValue(S,t),borderStyle:"solid"},U={borderLeftWidth:$.scalingValue(S,t)},Pe=async le=>{if(le.preventDefault(),!l)return;const J=Object.fromEntries(ae.map(Xe=>{var Ue;return[Xe.name,((Ue=D[Xe.name])==null?void 0:Ue.trim())??""]}).filter(([,Xe])=>Xe));if(!Ne){de("error"),Se("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const De=$.getFormFieldValidationError(ae,D);if(De){de("error"),Se(De);return}de("submitting"),Se(null);try{const Xe=await fetch(Ne,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!Xe.ok){const Ue=await Xe.text();throw new Error(Ue||`Request failed: ${Xe.status}`)}de("success"),se(Object.fromEntries(ae.map(Ue=>[Ue.name,""])))}catch(Xe){de("error"),Se(Xe instanceof Error?Xe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Me}`.trim(),style:ne,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Cf(r)}}),a.jsxs("form",{onSubmit:Pe,className:`${r}-form`,style:{...pe,height:$.scalingValue(T,t),minHeight:$.scalingValue(T,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ae.map(le=>a.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:Q[le.name]??"",onChange:J=>se(De=>({...De,[le.name]:J.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${r}-input`,style:{...G,paddingRight:$.scalingValue(P.right,t),paddingLeft:$.scalingValue(P.left,t),paddingTop:$.scalingValue(P.top,t),paddingBottom:$.scalingValue(P.bottom,t)}},le.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":Y,style:{...N,...U,paddingRight:$.scalingValue(k.right,t),paddingLeft:$.scalingValue(k.left,t),paddingTop:$.scalingValue(k.top,t),paddingBottom:$.scalingValue(k.bottom,t),pointerEvents:l?"auto":void 0},children:R==="submitting"?"...":g?ce&&a.jsx(mn,{url:ce,className:`${r}-submitBtnIcon`,style:{maxWidth:$.scalingValue(I??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):we})})]}),Ce==="success"&&a.jsx("p",{className:`${r}-success`,style:{...K},children:O}),Ce==="error"&&a.jsx("p",{className:`${r}-error`,style:{...K},role:"alert",children:re??ve??ie})]})},If={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"},Lf=["hover","focus","filled","success","error"],Pf=`import React, { useMemo, useState } from 'react';
989
+ `}const Ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=w.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:x,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:b,inputWordSpacing:S,inputTextAppearance:R,buttonFontSettings:y,buttonFontSize:C,buttonLineHeight:E,buttonLetterSpacing:G,buttonWordSpacing:H,buttonTextAppearance:O,statusFontSettings:F,statusFontSize:D,statusLineHeight:I,statusLetterSpacing:L,statusWordSpacing:z,statusTextAppearance:k,iconMaxWidth:$,minHeight:P,corners:q,stroke:_,stateOverrides:K,inputPadding:M,buttonPadding:f,successMessage:X="Thanks for subscribing!",errorMessage:oe="Please, fill all required fields."}=e,ue=c.slice(0,Math.min(p,c.length)),[N,se]=s.useState(()=>Object.fromEntries(ue.map(ne=>[ne.name,""]))),[T,me]=s.useState("idle"),[J,we]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":T,he=o==="error"?oe:J,fe=o==="filled",ie=s.useMemo(()=>{if(!fe)return N;let ne=null;for(const Q of ue)(N[Q.name]??"").trim().length>0||(ne=ne??{...N},ne[Q.name]="Filled");return ne??N},[fe,N,ue]),re=Le==="error"?w.getFormFieldValidationError(ue,ie):null,ae=o&&o!=="default"?`${r}-state-${o}`:"",pe=ue.some(ne=>(ie[ne.name]??"").trim().length>0),be=ae!==`${r}-state-filled`&&pe?`${r}-state-filled`:"",ke=`${ae} ${be}`.trim(),Fe=i==null?void 0:i.submitUrl,xe=u??"",le=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",V=xe||"Submit",Y={fontSettings:{fontFamily:v,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:b??0,wordSpacing:S??0,textAppearance:R,color:e.inputTextColor??"#111111"},te={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:C??.01,lineHeight:E,letterSpacing:G??0,wordSpacing:H??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},ge={fontSettings:{fontFamily:v,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:D??.01,lineHeight:I,letterSpacing:L??0,wordSpacing:z??0,textAppearance:k,color:e.successColor??"#22c55e"},ee=pn(nn(Y,t)),B=pn(nn(te,t)),Z=pn(nn(ge,t)),U=w.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Y==null?void 0:Y.color)??"#111111",buttonTextColor:e.buttonTextColor??(te==null?void 0:te.color)??"#ffffff"},kf,Af,K),de={borderRadius:w.scalingValue(q,t),borderWidth:w.scalingValue(_,t),borderStyle:"solid"},j={borderLeftWidth:w.scalingValue(_,t)},Pe=async ne=>{if(ne.preventDefault(),!l)return;const Q=Object.fromEntries(ue.map(Ge=>{var Be;return[Ge.name,((Be=N[Ge.name])==null?void 0:Be.trim())??""]}).filter(([,Ge])=>Ge));if(!Fe){me("error"),we("No integrations were found for this form.");return}if(Object.keys(Q).length===0)return;const _e=w.getFormFieldValidationError(ue,N);if(_e){me("error"),we(_e);return}me("submitting"),we(null);try{const Ge=await fetch(Fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)});if(!Ge.ok){const Be=await Ge.text();throw new Error(Be||`Request failed: ${Ge.status}`)}me("success"),se(Object.fromEntries(ue.map(Be=>[Be.name,""])))}catch(Ge){me("error"),we(Ge instanceof Error?Ge.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${ke}`.trim(),style:U,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rf(r)}}),a.jsxs("form",{onSubmit:Pe,className:`${r}-form`,style:{...de,height:w.scalingValue(P,t),minHeight:w.scalingValue(P,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ue.map(ne=>a.jsx("input",{type:ne.type==="email"?"email":ne.type==="phone"?"tel":"text",name:ne.name,autoComplete:"off",value:ie[ne.name]??"",onChange:Q=>se(_e=>({..._e,[ne.name]:Q.target.value})),placeholder:ne.placeholder,required:ne.isRequired??ne.type==="email",className:`${r}-input`,style:{...ee,paddingRight:w.scalingValue(M.right,t),paddingLeft:w.scalingValue(M.left,t),paddingTop:w.scalingValue(M.top,t),paddingBottom:w.scalingValue(M.bottom,t)}},ne.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":V,style:{...B,...j,paddingRight:w.scalingValue(f.right,t),paddingLeft:w.scalingValue(f.left,t),paddingTop:w.scalingValue(f.top,t),paddingBottom:w.scalingValue(f.bottom,t),pointerEvents:l?"auto":void 0},children:T==="submitting"?"...":g?le&&a.jsx(gn,{url:le,className:`${r}-submitBtnIcon`,style:{maxWidth:w.scalingValue($??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):xe})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Z},children:X}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Z},role:"alert",children:re??he??oe})]})},kf={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"},Af=["hover","focus","filled","success","error"],Ff=`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';
@@ -1565,7 +1565,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1565
1565
  };
1566
1566
 
1567
1567
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1568
- `,Mf="01M46GNEM2XB41HP5K8WY5BHD2",Rf=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],es={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ef=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],kf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...es.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...es.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...es.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Rf,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Mf},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__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:["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:[...Ef],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Af={element:Tf,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:kf,sourceCode:Pf};function Ff(e,t){const n=t>0?`${t}px`:"0px";return`
1568
+ `,Nf="01M46GNEM2XB41HP5K8WY5BHD2",_f=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],es={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hf=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Wf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...es.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...es.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...es.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:_f,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nf},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:.0053,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__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:["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:[...Hf],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Of={element:Ef,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Wf,sourceCode:Ff};function Df(e,t){const n=t>0?`${t}px`:"0px";return`
1569
1569
  .${e}-marquee-wrapper {
1570
1570
  overflow: hidden;
1571
1571
  width: 100%;
@@ -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 Nf=30,_f=20,ts=3,Hf=12,Wf=32,Of=3,Df=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")},zf=(e,t)=>Array.from({length:t},()=>e).flat(),Bf=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},Xu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(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=Xu(c);return d<=0?0:d+r*Math.max(0,t-1)},jf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Xu(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},Vf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Gf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Vf(i,e))},Xf=e=>{if($.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??"")},Uf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,qf=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var T,V,S,X,P;const p=s.useRef(null),y=!!((T=e.image)!=null&&T.assetId&&Xf(e.image)),x=!!((V=e.image)!=null&&V.assetId&&$.isEmbedMedia(e.image));s.useLayoutEffect(()=>{c&&(x||Uf(p.current))&&(u==null||u())},[c,x,(S=e.image)==null?void 0:S.assetId,u]);const m=n.display==="cover",h=n.ratioValue??"1:1",v=n.reversed??!1,[b,E]=h.split(":").map(Number),H=(v?E:b)/(v?b:E),q=i/H,B=q>o?o:q,M=q>o?o*H:i,_=d(M),j=d(B),C={borderRadius:d(r)},L=m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...C}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...C},W=x&&e.image?$.getEmbedAspect(e.image):null,A=W===null?void 0:m?L:{...L,width:d(i/W>o?o*W:i),height:d(i/W>o?o:i/W)},I=((X=e.image)==null?void 0:X.assetId)&&(x?a.jsx($.EmbedMediaFrame,{media:e.image,mode:"background",fit:m?"cover":"contain",style:A}):y?a.jsx("video",{ref:k=>{p.current=k},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:k=>{p.current=k},src:e.image.assetId,alt:((P=e.image)==null?void 0:P.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:_}:{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:_,height:j,overflow:"hidden",...C}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:I&&a.jsx($.LinkWrapper,{link:e.link,className:Tt(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:I})})})},Kf=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=$.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Ff(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:m,imageMaxWidth:h,imageMaxHeight:v,hoverEffect:b,cornerRadius:E=0}=e,f=s.useMemo(()=>Bf(e.imageFit),[e.imageFit]),w=(t==null?void 0:t.length)??0,H=!!o,q=!n||!!i,B=q&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,M=n?!!i:!0,j=((t==null?void 0:t.length)??0)>0&&(M||!!n),C=Math.max(0,p)*Nf,L=be=>$.scalingValue(be,n??!1),W=s.useRef(null),A=s.useRef(null),I=s.useRef(null),[T,V]=s.useState(0),S=M&&x==="on",[X,P]=s.useState(!1),[k,O]=s.useState({}),ie=s.useRef(k);ie.current=k;const ae=s.useRef(null),D=s.useRef(0),se=s.useRef(null),R=s.useMemo(()=>(t??[]).map(be=>{var Me;return((Me=be.image)==null?void 0:Me.assetId)??""}).join("\0"),[t]),[de,te]=s.useState(ts),Se=s.useMemo(()=>{const be=t??[];return be.length===0||!(M||!!n)?be:zf(be,de)},[t,M,de,n]),Ce=s.useMemo(()=>(t??[]).filter(be=>{var Me;return!!((Me=be.image)!=null&&Me.assetId)}).length,[t]),ve=j?Of:1;s.useLayoutEffect(()=>{D.current=0,O({}),ae.current=null,te(ts),c(0)},[R]),s.useEffect(()=>{if(!q||b!=="randomize")return;const be=W.current;if(!be)return;const Me=g=>{O(Y=>{const Z=Array.from(g).filter(ye=>ye in Y&&!Gf(be,ye));if(Z.length===0)return Y;const ee={...Y};return Z.forEach(ye=>{delete ee[ye]}),ee})},Ne=new IntersectionObserver(g=>{const Y=new Set;for(const Z of g){const ee=Z.target.dataset.marqueeItemIndex,ye=ee!==void 0?Number(ee):NaN;Number.isNaN(ye)||Y.add(ye)}Y.size>0&&Me(Y)},{root:be,threshold:0});Object.keys(k).forEach(g=>{const Y=Number(g);be.querySelectorAll(`[data-marquee-item-index="${Y}"]`).forEach(Z=>Ne.observe(Z))});const we={current:0},ce=()=>{const g=Object.keys(ie.current);g.length!==0&&(Me(g.map(Number)),we.current=requestAnimationFrame(ce))};return Object.keys(ie.current).length>0&&(we.current=requestAnimationFrame(ce)),()=>{cancelAnimationFrame(we.current),Ne.disconnect()}},[b,k,q]),s.useEffect(()=>{const be=W.current;if(!be||typeof IntersectionObserver>"u")return;const Me=be.querySelectorAll("video");if(Me.length===0)return;const Ne=new IntersectionObserver(we=>{for(const ce of we){const g=ce.target;ce.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Me.forEach(we=>Ne.observe(we)),()=>Ne.disconnect()},[j,Se,ve,k]),s.useLayoutEffect(()=>{if(!j)return;const be=W.current,Me=I.current;if(!be||!Me)return;const Ne={current:0},we=()=>{const Y=be.getBoundingClientRect().width||be.offsetWidth,Z=jf(Me),ee=ae.current,ye=typeof ee=="number"&&Math.abs(ee-Z)<=.25;ae.current=Z;let G=de,N=0;if((M||n)&&w>0&&Y>0){const pe=Sc(Me,w);if(pe>=Wf){N=pe;const U=Math.min(Hf,Math.max(ts,Math.ceil(Y/pe)+1));G=U,U!==de&&te(U)}}const ne=G!==de&&N>0?N*G:Z>0?Z:N>0?N*G:(()=>{const pe=Sc(Me,w);return pe>0?pe*G:0})();ne>0?c(pe=>pe<=0?ne:!ye||Math.round(pe)===Math.round(ne)?pe:ne):!ye&&l<=0&&(cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(we))},ce=()=>{cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(we)};se.current=ce,ce();const g=new ResizeObserver(ce);return g.observe(be),g.observe(Me),()=>{se.current=null,cancelAnimationFrame(Ne.current),g.disconnect()}},[M,j,l,R,de,w,n]),s.useLayoutEffect(()=>{if(!j||d<=0)return;const be=A.current;be&&Df(be)},[j,d,y,C]),s.useLayoutEffect(()=>{if(!j||l<=0){V(0);return}const be=A.current,Me=I.current;if(!be||!Me)return;const Ne=()=>{const ce=be.offsetHeight||be.getBoundingClientRect().height,g=Array.from(Me.children).reduce((Z,ee)=>Math.max(Z,ee.offsetHeight||ee.getBoundingClientRect().height),0),Y=ce>0?ce:g;V(Y>0?Y:0)};Ne();const we=new ResizeObserver(Ne);return we.observe(be),we.observe(Me),()=>we.disconnect()},[j,ve,Se,n,m,h,v,l,f,k]),s.useLayoutEffect(()=>{if(!n||!H||!j||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,H,j,y,l,T,m,Se]);const ue=()=>{S&&P(!0)},Q=()=>{S&&P(!1)},re=s.useCallback(()=>{var be;D.current=Math.min(Ce,D.current+1),(be=se.current)==null||be.call(se)},[Ce]),fe=s.useCallback((be,Me)=>{O(Ne=>{const we=Ne[be]??Me,ce=(t??[]).filter(Y=>Y!==we);if(ce.length===0)return Ne;const g=ce[Math.floor(Math.random()*ce.length)];return{...Ne,[be]:g}})},[t]),he=(be,Me,Ne,we)=>{const ce=q&&b==="randomize"&&f.display==="cover"?k[Ne]??be:be,g=`max(${L(m)}, ${_f}px)`,Y=`calc(-0.5 * (${g} + ${L(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Ne,onMouseEnter:q&&b==="randomize"&&f.display==="cover"?()=>fe(Ne,be):void 0,children:[a.jsx(qf,{item:ce,prefix:r,imageFit:f,imageMaxWidth:h,imageMaxHeight:v,cornerRadius:E,imageHoverClass:B,isEditor:n,isFirstSet:we,scaled:L,onFirstSetImageDone:re}),H&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:Y,width:g,height:"100%"}})]},`${Me}-${Ne}`)};if(j){const be=M?S&&X?"paused":"running":"paused",Me=d>0&&C>0?d/C*1e3:0,Ne=`${Math.max(0,Me)/1e3}s`;return a.jsxs("div",{ref:W,className:Tt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:T>0?{height:T}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:A,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ue,onMouseLeave:Q,style:{WebkitAnimationDuration:Ne,animationDuration:Ne,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:ve},(we,ce)=>a.jsx("div",{ref:ce===0?I:void 0,className:Tt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(m),paddingRight:L(m)},"aria-hidden":ce>0,children:Se.map((g,Y)=>he(g,ce,Y,ce===0&&Y<w))},`set-${ce}`))})]})}return a.jsxs("div",{ref:W,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Tt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,Me)=>he(be,0,Me))},"marquee-static")]})},Yf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const zf=30,Bf=20,ts=3,jf=12,Vf=32,Gf=3,Xf=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(),Uf=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},Zu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(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=Zu(c);return d<=0?0:d+r*Math.max(0,t-1)},Kf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Zu(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},Yf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Yf(i,e))},Zf=e=>{if(w.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??"")},Jf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ey=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var P,q,_,K,M;const p=s.useRef(null),v=!!((P=e.image)!=null&&P.assetId&&Zf(e.image)),x=!!((q=e.image)!=null&&q.assetId&&w.isEmbedMedia(e.image));s.useLayoutEffect(()=>{c&&(x||Jf(p.current))&&(u==null||u())},[c,x,(_=e.image)==null?void 0:_.assetId,u]);const m=n.display==="cover",h=n.ratioValue??"1:1",b=n.reversed??!1,[S,R]=h.split(":").map(Number),E=(b?R:S)/(b?S:R),G=i/E,H=G>o?o:G,O=G>o?o*E:i,F=d(O),D=d(H),I={borderRadius:d(r)},L=m?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...I}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...I},z=x&&e.image?w.getEmbedAspect(e.image):null,k=z===null?void 0:m?L:{...L,width:d(i/z>o?o*z:i),height:d(i/z>o?o:i/z)},$=((K=e.image)==null?void 0:K.assetId)&&(x?a.jsx(w.EmbedMediaFrame,{media:e.image,mode:"background",fit:m?"cover":"contain",style:k}):v?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:((M=e.image)==null?void 0:M.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:F}:{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:F,height:D,overflow:"hidden",...I}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:$&&a.jsx(w.LinkWrapper,{link:e.link,className:Pt(`${t}-marquee-link`,!m&&`${t}-marquee-link-contain`),children:$})})})},ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=w.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Df(r,d),[r,d]),{speed:p,direction:v,pauseOnHover:x,gap:m,imageMaxWidth:h,imageMaxHeight:b,hoverEffect:S,cornerRadius:R=0}=e,y=s.useMemo(()=>Uf(e.imageFit),[e.imageFit]),C=(t==null?void 0:t.length)??0,E=!!o,G=!n||!!i,H=G&&S!=="off"&&S!=="randomize"?`${r}-image-hover-${S}`:void 0,O=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(O||!!n),I=Math.max(0,p)*zf,L=be=>w.scalingValue(be,n??!1),z=s.useRef(null),k=s.useRef(null),$=s.useRef(null),[P,q]=s.useState(0),_=O&&x==="on",[K,M]=s.useState(!1),[f,X]=s.useState({}),oe=s.useRef(f);oe.current=f;const ue=s.useRef(null),N=s.useRef(0),se=s.useRef(null),T=s.useMemo(()=>(t??[]).map(be=>{var ke;return((ke=be.image)==null?void 0:ke.assetId)??""}).join("\0"),[t]),[me,J]=s.useState(ts),we=s.useMemo(()=>{const be=t??[];return be.length===0||!(O||!!n)?be:qf(be,me)},[t,O,me,n]),Le=s.useMemo(()=>(t??[]).filter(be=>{var ke;return!!((ke=be.image)!=null&&ke.assetId)}).length,[t]),he=D?Gf:1;s.useLayoutEffect(()=>{N.current=0,X({}),ue.current=null,J(ts),c(0)},[T]),s.useEffect(()=>{if(!G||S!=="randomize")return;const be=z.current;if(!be)return;const ke=g=>{X(V=>{const Y=Array.from(g).filter(ge=>ge in V&&!Qf(be,ge));if(Y.length===0)return V;const te={...V};return Y.forEach(ge=>{delete te[ge]}),te})},Fe=new IntersectionObserver(g=>{const V=new Set;for(const Y of g){const te=Y.target.dataset.marqueeItemIndex,ge=te!==void 0?Number(te):NaN;Number.isNaN(ge)||V.add(ge)}V.size>0&&ke(V)},{root:be,threshold:0});Object.keys(f).forEach(g=>{const V=Number(g);be.querySelectorAll(`[data-marquee-item-index="${V}"]`).forEach(Y=>Fe.observe(Y))});const xe={current:0},le=()=>{const g=Object.keys(oe.current);g.length!==0&&(ke(g.map(Number)),xe.current=requestAnimationFrame(le))};return Object.keys(oe.current).length>0&&(xe.current=requestAnimationFrame(le)),()=>{cancelAnimationFrame(xe.current),Fe.disconnect()}},[S,f,G]),s.useEffect(()=>{const be=z.current;if(!be||typeof IntersectionObserver>"u")return;const ke=be.querySelectorAll("video");if(ke.length===0)return;const Fe=new IntersectionObserver(xe=>{for(const le of xe){const g=le.target;le.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return ke.forEach(xe=>Fe.observe(xe)),()=>Fe.disconnect()},[D,we,he,f]),s.useLayoutEffect(()=>{if(!D)return;const be=z.current,ke=$.current;if(!be||!ke)return;const Fe={current:0},xe=()=>{const V=be.getBoundingClientRect().width||be.offsetWidth,Y=Kf(ke),te=ue.current,ge=typeof te=="number"&&Math.abs(te-Y)<=.25;ue.current=Y;let ee=me,B=0;if((O||n)&&C>0&&V>0){const de=Sc(ke,C);if(de>=Vf){B=de;const j=Math.min(jf,Math.max(ts,Math.ceil(V/de)+1));ee=j,j!==me&&J(j)}}const U=ee!==me&&B>0?B*ee:Y>0?Y:B>0?B*ee:(()=>{const de=Sc(ke,C);return de>0?de*ee:0})();U>0?c(de=>de<=0?U:!ge||Math.round(de)===Math.round(U)?de:U):!ge&&l<=0&&(cancelAnimationFrame(Fe.current),Fe.current=requestAnimationFrame(xe))},le=()=>{cancelAnimationFrame(Fe.current),Fe.current=requestAnimationFrame(xe)};se.current=le,le();const g=new ResizeObserver(le);return g.observe(be),g.observe(ke),()=>{se.current=null,cancelAnimationFrame(Fe.current),g.disconnect()}},[O,D,l,T,me,C,n]),s.useLayoutEffect(()=>{if(!D||d<=0)return;const be=k.current;be&&Xf(be)},[D,d,v,I]),s.useLayoutEffect(()=>{if(!D||l<=0){q(0);return}const be=k.current,ke=$.current;if(!be||!ke)return;const Fe=()=>{const le=be.offsetHeight||be.getBoundingClientRect().height,g=Array.from(ke.children).reduce((Y,te)=>Math.max(Y,te.offsetHeight||te.getBoundingClientRect().height),0),V=le>0?le:g;q(V>0?V:0)};Fe();const xe=new ResizeObserver(Fe);return xe.observe(be),xe.observe(ke),()=>xe.disconnect()},[D,he,we,n,m,h,b,l,y,f]),s.useLayoutEffect(()=>{if(!n||!E||!D||typeof window>"u")return;const be=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(be)},[n,E,D,v,l,P,m,we]);const fe=()=>{_&&M(!0)},ie=()=>{_&&M(!1)},re=s.useCallback(()=>{var be;N.current=Math.min(Le,N.current+1),(be=se.current)==null||be.call(se)},[Le]),ae=s.useCallback((be,ke)=>{X(Fe=>{const xe=Fe[be]??ke,le=(t??[]).filter(V=>V!==xe);if(le.length===0)return Fe;const g=le[Math.floor(Math.random()*le.length)];return{...Fe,[be]:g}})},[t]),pe=(be,ke,Fe,xe)=>{const le=G&&S==="randomize"&&y.display==="cover"?f[Fe]??be:be,g=`max(${L(m)}, ${Bf}px)`,V=`calc(-0.5 * (${g} + ${L(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":Fe,onMouseEnter:G&&S==="randomize"&&y.display==="cover"?()=>ae(Fe,be):void 0,children:[a.jsx(ey,{item:le,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:b,cornerRadius:R,imageHoverClass:H,isEditor:n,isFirstSet:xe,scaled:L,onFirstSetImageDone:re}),E&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:V,width:g,height:"100%"}})]},`${ke}-${Fe}`)};if(D){const be=O?_&&K?"paused":"running":"paused",ke=d>0&&I>0?d/I*1e3:0,Fe=`${Math.max(0,ke)/1e3}s`;return a.jsxs("div",{ref:z,className:Pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:P>0?{height:P}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:k,className:`${r}-marquee-track`,"data-direction":v,onMouseEnter:fe,onMouseLeave:ie,style:{WebkitAnimationDuration:Fe,animationDuration:Fe,WebkitAnimationPlayState:be,animationPlayState:be},children:Array.from({length:he},(xe,le)=>a.jsx("div",{ref:le===0?$:void 0,className:Pt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(m),paddingRight:L(m)},"aria-hidden":le>0,children:we.map((g,V)=>pe(g,le,V,le===0&&V<C))},`set-${le}`))})]})}return a.jsxs("div",{ref:z,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Pt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((be,ke)=>pe(be,0,ke))},"marquee-static")]})},ny=`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';
@@ -2522,7 +2522,7 @@ type MarqueeProps = {
2522
2522
  isPreviewMode?: boolean;
2523
2523
  isEditMode?: boolean;
2524
2524
  } & CommonComponentProps;
2525
- `,Qf={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"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}},link:{type:"object",label:"URL",contentKey:"link",display:{type:"link-input"}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:{type:"url",value:"",target:"self"}}]}},Zf={element:Kf,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:Qf,sourceCode:Yf,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Jf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2525
+ `,iy={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"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video","vimeo","youtube"]}}},link:{type:"object",label:"URL",contentKey:"link",display:{type:"link-input"}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:{type:"url",value:"",target:"self"}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:{type:"url",value:"",target:"self"}}]}},oy={element:ty,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:iy,sourceCode:ny,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ry(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2526
2526
  .${e}-item-image-wrap {
2527
2527
  display: flex;
2528
2528
  flex: 0 0 auto;
@@ -2653,7 +2653,7 @@ ${o}
2653
2653
  left: -9999px;
2654
2654
  top: 0;
2655
2655
  }
2656
- `}const ey=30,ns=3,ty=12,ny=96,wc=3,ua=.72,iy=100,oy=10,ry=e=>e/iy,ay=e=>Math.max(0,e)/oy,sy=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")},ly=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),no={ctx:void 0},cy=()=>no.ctx!==void 0?no.ctx:typeof document>"u"?(no.ctx=null,no.ctx):(no.ctx=document.createElement("canvas").getContext("2d"),no.ctx),dy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},uy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},py=(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)},Uu=96,qu=(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}},my=(e,t)=>{const n=qu(e,t,Uu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},gy=(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 v=m+h>>1;return l[v]<=r?d(v,h):d(m,v)},[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)},hy=(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,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:x},(h,v)=>{const b=u+v/x*y,E=u+(v+1)/x*y,f=E-b,w=c(b),H=c(E),q=b+f/3,B=w+d(b)*f/3,M=E-f/3,_=H-d(E)*f/3;return`C${q.toFixed(2)} ${B.toFixed(2)} ${M.toFixed(2)} ${_.toFixed(2)} ${E.toFixed(2)} ${H.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},fy=({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:`${ua}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,v)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},v))}):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($.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},yy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=$.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:h,textFontFamily:v,textFontSettings:b,textFontSize:E,textLetterSpacing:f,textWordSpacing:w,textTextAppearance:H,textColor:q,backgroundColor:B,ribbonWidth:M}=e,_=M??E,j=x==="curve",C=ry(m),L=ay(h),W=s.useMemo(()=>Jf(o,c,j),[o,c,j]),A=s.useMemo(()=>nn({fontSettings:{fontFamily:v,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:f,wordSpacing:w,fontSize:E,lineHeight:E,textAppearance:H,color:q},n),[v,b,f,w,E,H,q,n]),I=_e=>$.scalingValue(_e,n??!1),T=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,S=T&&(V||!!n),X=Math.max(0,d)*ey,P=V&&p==="on",[k,O]=s.useState(!1),ie=V?P&&k?"paused":"running":"paused",ae=ie==="running"&&X>0&&c>0,D=c>0&&X>0?c/X*1e3:0,se=s.useRef(null),R=s.useRef(null),de=s.useRef(null),te=s.useRef(null),Se=s.useRef(null),Ce=s.useRef(null),ve=s.useRef(ae),ue=s.useRef(null),Q=s.useRef(null),re=s.useRef(C),fe=s.useRef(L);ve.current=ae,re.current=C,fe.current=L;const[he,be]=s.useState(0),[Me,Ne]=s.useState(0),[we,ce]=s.useState(0),[g,Y]=s.useState(0),[Z,ee]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(_e=>{var He,xt;return`${_e.text}\0${((He=_e.image)==null?void 0:He.assetId)??""}\0${((xt=_e.link)==null?void 0:xt.value)??""}`}).join("\0"),[t]),[G,N]=s.useState(ns),K=s.useMemo(()=>{const _e=t??[];return _e.length===0||!(V||n)?_e:ly(_e,G)},[t,V,G,n]),ne=S?wc:1;s.useLayoutEffect(()=>{N(ns),l(0)},[ye]),s.useLayoutEffect(()=>{var ze;const _e=Ce.current;if(!_e)return;const He=()=>{const Te=getComputedStyle(_e),at=parseFloat(Te.fontSize)||0;if(at<=0)return;const me=cy();if(!me){be(at*ua),Ne(0);return}me.font=`${Te.fontStyle} ${Te.fontWeight} ${at}px ${Te.fontFamily}`;const Fe=me.measureText("H"),Ze=Fe.actualBoundingBoxAscent>0?Fe.actualBoundingBoxAscent:at*ua,dt=Math.max(0,Fe.actualBoundingBoxDescent||0),Ve=Fe.fontBoundingBoxAscent||0,Lt=Fe.fontBoundingBoxDescent||0;be(kt=>Math.abs(kt-Ze)>.5?Ze:kt);const ht=Ve>0||Lt>0?(Lt-dt-(Ve-Ze))/2:0;Ne(kt=>Math.abs(kt-ht)>.25?ht:kt)};He();const xt=typeof document<"u"?document.fonts:void 0;(ze=xt==null?void 0:xt.ready)==null||ze.then(He).catch(()=>{});const rt=new ResizeObserver(He);return rt.observe(_e),()=>rt.disconnect()},[A.fontFamily,A.fontWeight,A.fontStyle,A.fontSize,A.lineHeight]),s.useLayoutEffect(()=>{if(!S)return;const _e=se.current,He=te.current;if(!_e||!He)return;const xt={id:0},rt=()=>{const me=_e.offsetWidth||_e.getBoundingClientRect().width,Fe=He.offsetWidth||He.getBoundingClientRect().width;if(T&&me>0&&Fe>0){const Ze=Fe/G;if(Ze>0){let dt=me,Ve=ty;if(j){const ht=me*re.current,kt=fe.current,Ot=kt>0?2*Math.PI*kt/me:0,It=my(ht,Ot);dt=Math.max(me,It*me/(wc-1)),Ve=ny}const Lt=Math.min(Ve,Math.max(ns,Math.ceil(dt/Ze)+1));if(Lt!==G){N(Lt);return}}}Fe>0&&l(Fe)},ze=()=>{cancelAnimationFrame(xt.id),xt.id=requestAnimationFrame(rt)};ze();const Te=new ResizeObserver(ze);Te.observe(_e),Te.observe(He);const at=()=>{document.hidden||ze()};return document.addEventListener("visibilitychange",at),window.addEventListener("pageshow",at),window.addEventListener("focus",at),()=>{cancelAnimationFrame(xt.id),Te.disconnect(),document.removeEventListener("visibilitychange",at),window.removeEventListener("pageshow",at),window.removeEventListener("focus",at)}},[S,ye,G,T,he,j,C,L]),s.useLayoutEffect(()=>{const _e=Se.current;if(!_e)return;const He={id:0},xt=()=>{const ze=_e.offsetHeight;ze>0&&ee(Te=>Math.abs(Te-ze)>.5?ze:Te)};He.id=requestAnimationFrame(xt);const rt=new ResizeObserver(()=>{cancelAnimationFrame(He.id),He.id=requestAnimationFrame(xt)});return rt.observe(_e),()=>{cancelAnimationFrame(He.id),rt.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!j){ce(0),Y(0);return}const _e=se.current,He=te.current;if(!_e||!He)return;const xt={id:0},rt=()=>{const Te=_e.offsetWidth,at=He.offsetHeight;Te>0&&Y(me=>Math.abs(me-Te)>.5?Te:me),at>0&&ce(me=>Math.abs(me-at)>.5?at:me)};xt.id=requestAnimationFrame(rt);const ze=new ResizeObserver(()=>{cancelAnimationFrame(xt.id),xt.id=requestAnimationFrame(rt)});return ze.observe(_e),ze.observe(He),()=>{cancelAnimationFrame(xt.id),ze.disconnect()}},[j,ye,he,E,S]),s.useLayoutEffect(()=>{if(!S||c<=0)return;const _e=de.current;_e&&sy(_e)},[S,c,u,X]),s.useLayoutEffect(()=>{if(!j||!T)return;const _e=se.current;if(!_e)return;const He={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},xt=()=>{for(const Ze of He.itemsCache)for(const dt of Ze.glyphs)$c(dt.inner)},rt=()=>{const Ze=R.current??_e;He.itemsCache=Array.from(_e.querySelectorAll("[data-marquee-text-item]"),dt=>{const Ve=[];return dt.querySelectorAll("[data-marquee-wave-node]").forEach(Lt=>{const ht=Lt.firstElementChild;ht&&Ve.push({inner:ht,layoutLocalX:py(Lt,Ze)})}),{item:dt,glyphs:Ve}}),He.cacheDirty=!1},ze=()=>{He.cacheDirty&&rt();const dt=(R.current??_e).offsetWidth||1,Ve=dt*re.current,Lt=fe.current,ht=2*Math.PI*Lt/dt,kt=`${dt}|${Ve}|${ht}`;if(kt!==He.lutKey&&(He.lutKey=kt,He.lut=qu(Ve,ht,Uu)),Math.abs(Ve)<=0||ht<=0){xt();return}const Ot=de.current,It=Ot?uy(getComputedStyle(Ot).transform):0,Yt=_e.getBoundingClientRect(),jt=Yt.left,Xt=Yt.right,Qt=He.lut&&He.lut.wavelength>0?Math.max(0,(He.lut.periodArc/He.lut.wavelength-1)*dt):0;for(const{item:St,glyphs:Zt}of He.itemsCache){const ft=St.getBoundingClientRect();if(ft.right<jt||ft.left>Xt+Qt){for(const wt of Zt)$c(wt.inner);continue}for(const wt of Zt){const Le=wt.layoutLocalX+It,Ye=He.lut?gy(He.lut,Le):Le,st=ht*Ye,Mt=Ve*Math.sin(st),ut=Ve*ht*Math.cos(st),gt=Math.atan(ut)*(180/Math.PI);dy(wt.inner,Ye-Le,Mt,gt)}}},Te=()=>{He.cancelled||(He.raf=0,ze(),ve.current&&!document.hidden&&(He.raf=requestAnimationFrame(Te)))},at=()=>{He.cancelled||He.raf||(He.raf=requestAnimationFrame(Te))},me=()=>{He.cacheDirty=!0,ze(),at()};ue.current=at,Q.current=me,ze(),at();const Fe=()=>{if(document.hidden){cancelAnimationFrame(He.raf),He.raf=0;return}cancelAnimationFrame(He.raf),He.raf=0,me()};return document.addEventListener("visibilitychange",Fe),window.addEventListener("pageshow",Fe),window.addEventListener("focus",Fe),()=>{He.cancelled=!0,ue.current=null,Q.current=null,cancelAnimationFrame(He.raf),document.removeEventListener("visibilitychange",Fe),window.removeEventListener("pageshow",Fe),window.removeEventListener("focus",Fe),xt()}},[j,T]),s.useLayoutEffect(()=>{var _e;!j||!T||(_e=Q.current)==null||_e.call(Q)},[j,T,r,ye,G,he,C,L,g]),s.useLayoutEffect(()=>{var _e;(_e=ue.current)==null||_e.call(ue)},[ae,u]);const pe=_e=>{P&&_e.pointerType==="mouse"&&O(!0)},U=()=>{P&&O(!1)},Pe=j?Math.abs(C)*100:0,le=I(_),J={minHeight:le,...j?{paddingTop:`${Pe}%`,paddingBottom:`${Pe}%`}:{}},De={height:le,...j?{visibility:"hidden"}:{backgroundColor:B}},Xe={gap:I(y),minHeight:le},Ue=g*C,Je=Math.abs(Ue),et=Z>0?Z:we,Qe=Math.max(we,et),it=Je+Qe/2,xe=Math.max(et,1),Ie=j&&g>0&&Qe>0?hy(g,Ue,L,it,xe):"",We=Je*2+Qe,qe=Ie?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${We}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Ie,fill:"none",stroke:B,strokeWidth:et,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,je=a.jsx("div",{ref:Se,className:`${o}-ribbon`,style:De,"aria-hidden":!0}),ot={...A,lineHeight:he>0?`${he}px`:`${ua}em`},nt=(_e,He,xt)=>a.jsx(fy,{item:_e,prefix:o,textCss:ot,capHeightPx:he,opticalOffsetY:Me,imageGapPx:I(y),isCurve:j},`${He}-${xt}`),Ee=a.jsx("span",{ref:Ce,"aria-hidden":!0,className:`${o}-cap-ref`,style:A,children:"H"}),Be=`${Math.max(0,D)/1e3}s`,tt=S?a.jsx("div",{ref:de,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:pe,onPointerLeave:U,style:{WebkitAnimationDuration:Be,animationDuration:Be,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:ne},(_e,He)=>a.jsx("div",{ref:He===0?te:void 0,className:`${o}-marquee-set`,style:{...Xe,paddingRight:I(y)},"aria-hidden":He>0,children:K.map((xt,rt)=>nt(xt,He,rt))},`set-${He}`))}):a.jsx("div",{ref:te,className:Tt(`${o}-marquee-set`,`${o}-marquee-static`),style:Xe,children:t==null?void 0:t.map((_e,He)=>nt(_e,0,He))});return a.jsxs("div",{ref:se,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:W}}),Ee,a.jsxs("div",{ref:R,className:`${o}-marquee-wrapper`,style:J,children:[je,qe,tt]})]})},vy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2656
+ `}const ay=30,ns=3,sy=12,ly=96,wc=3,ua=.72,cy=100,dy=10,uy=e=>e/cy,py=e=>Math.max(0,e)/dy,my=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")},gy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),oo={ctx:void 0},hy=()=>oo.ctx!==void 0?oo.ctx:typeof document>"u"?(oo.ctx=null,oo.ctx):(oo.ctx=document.createElement("canvas").getContext("2d"),oo.ctx),fy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},yy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vy=(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)},Ju=96,ep=(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 v=p*d,x=v+d;o[p+1]=x,r[p+1]=r[p]+(c(v)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},xy=(e,t)=>{const n=ep(e,t,Ju);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},by=(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 b=m+h>>1;return l[b]<=r?d(b,h):d(m,b)},[u,p]=d(0,l.length-1),v=l[p]-l[u],x=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},Sy=(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,v=e+o-u,x=Math.max(4,Math.ceil(r*4*(v/Math.max(e,1)))),m=Array.from({length:x},(h,b)=>{const S=u+b/x*v,R=u+(b+1)/x*v,y=R-S,C=c(S),E=c(R),G=S+y/3,H=C+d(S)*y/3,O=R-y/3,F=E-d(R)*y/3;return`C${G.toFixed(2)} ${H.toFixed(2)} ${O.toFixed(2)} ${F.toFixed(2)} ${R.toFixed(2)} ${E.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},wy=({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:`${ua}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),v=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,b)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},b))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(w.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},$y=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=w.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:v,layoutType:x,curveAmplitude:m,curveFrequency:h,textFontFamily:b,textFontSettings:S,textFontSize:R,textLetterSpacing:y,textWordSpacing:C,textTextAppearance:E,textColor:G,backgroundColor:H,ribbonWidth:O}=e,F=O??R,D=x==="curve",I=uy(m),L=py(h),z=s.useMemo(()=>ry(o,c,D),[o,c,D]),k=s.useMemo(()=>nn({fontSettings:{fontFamily:b,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:y,wordSpacing:C,fontSize:R,lineHeight:R,textAppearance:E,color:G},n),[b,S,y,C,R,E,G,n]),$=Oe=>w.scalingValue(Oe,n??!1),P=((t==null?void 0:t.length)??0)>0,q=n?!!i:!0,_=P&&(q||!!n),K=Math.max(0,d)*ay,M=q&&p==="on",[f,X]=s.useState(!1),oe=q?M&&f?"paused":"running":"paused",ue=oe==="running"&&K>0&&c>0,N=c>0&&K>0?c/K*1e3:0,se=s.useRef(null),T=s.useRef(null),me=s.useRef(null),J=s.useRef(null),we=s.useRef(null),Le=s.useRef(null),he=s.useRef(ue),fe=s.useRef(null),ie=s.useRef(null),re=s.useRef(I),ae=s.useRef(L);he.current=ue,re.current=I,ae.current=L;const[pe,be]=s.useState(0),[ke,Fe]=s.useState(0),[xe,le]=s.useState(0),[g,V]=s.useState(0),[Y,te]=s.useState(0),ge=s.useMemo(()=>(t??[]).map(Oe=>{var Ne,yt;return`${Oe.text}\0${((Ne=Oe.image)==null?void 0:Ne.assetId)??""}\0${((yt=Oe.link)==null?void 0:yt.value)??""}`}).join("\0"),[t]),[ee,B]=s.useState(ns),Z=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(q||n)?Oe:gy(Oe,ee)},[t,q,ee,n]),U=_?wc:1;s.useLayoutEffect(()=>{B(ns),l(0)},[ge]),s.useLayoutEffect(()=>{var He;const Oe=Le.current;if(!Oe)return;const Ne=()=>{const Ce=getComputedStyle(Oe),tt=parseFloat(Ce.fontSize)||0;if(tt<=0)return;const Qe=hy();if(!Qe){be(tt*ua),Fe(0);return}Qe.font=`${Ce.fontStyle} ${Ce.fontWeight} ${tt}px ${Ce.fontFamily}`;const St=Qe.measureText("H"),Ct=St.actualBoundingBoxAscent>0?St.actualBoundingBoxAscent:tt*ua,Wt=Math.max(0,St.actualBoundingBoxDescent||0),ht=St.fontBoundingBoxAscent||0,Xt=St.fontBoundingBoxDescent||0;be(Vt=>Math.abs(Vt-Ct)>.5?Ct:Vt);const wt=ht>0||Xt>0?(Xt-Wt-(ht-Ct))/2:0;Fe(Vt=>Math.abs(Vt-wt)>.25?wt:Vt)};Ne();const yt=typeof document<"u"?document.fonts:void 0;(He=yt==null?void 0:yt.ready)==null||He.then(Ne).catch(()=>{});const je=new ResizeObserver(Ne);return je.observe(Oe),()=>je.disconnect()},[k.fontFamily,k.fontWeight,k.fontStyle,k.fontSize,k.lineHeight]),s.useLayoutEffect(()=>{if(!_)return;const Oe=se.current,Ne=J.current;if(!Oe||!Ne)return;const yt={id:0},je=()=>{const Qe=Oe.offsetWidth||Oe.getBoundingClientRect().width,St=Ne.offsetWidth||Ne.getBoundingClientRect().width;if(P&&Qe>0&&St>0){const Ct=St/ee;if(Ct>0){let Wt=Qe,ht=sy;if(D){const wt=Qe*re.current,Vt=ae.current,Yt=Vt>0?2*Math.PI*Vt/Qe:0,$e=xy(wt,Yt);Wt=Math.max(Qe,$e*Qe/(wc-1)),ht=ly}const Xt=Math.min(ht,Math.max(ns,Math.ceil(Wt/Ct)+1));if(Xt!==ee){B(Xt);return}}}St>0&&l(St)},He=()=>{cancelAnimationFrame(yt.id),yt.id=requestAnimationFrame(je)};He();const Ce=new ResizeObserver(He);Ce.observe(Oe),Ce.observe(Ne);const tt=()=>{document.hidden||He()};return document.addEventListener("visibilitychange",tt),window.addEventListener("pageshow",tt),window.addEventListener("focus",tt),()=>{cancelAnimationFrame(yt.id),Ce.disconnect(),document.removeEventListener("visibilitychange",tt),window.removeEventListener("pageshow",tt),window.removeEventListener("focus",tt)}},[_,ge,ee,P,pe,D,I,L]),s.useLayoutEffect(()=>{const Oe=we.current;if(!Oe)return;const Ne={id:0},yt=()=>{const He=Oe.offsetHeight;He>0&&te(Ce=>Math.abs(Ce-He)>.5?He:Ce)};Ne.id=requestAnimationFrame(yt);const je=new ResizeObserver(()=>{cancelAnimationFrame(Ne.id),Ne.id=requestAnimationFrame(yt)});return je.observe(Oe),()=>{cancelAnimationFrame(Ne.id),je.disconnect()}},[F,n]),s.useLayoutEffect(()=>{if(!D){le(0),V(0);return}const Oe=se.current,Ne=J.current;if(!Oe||!Ne)return;const yt={id:0},je=()=>{const Ce=Oe.offsetWidth,tt=Ne.offsetHeight;Ce>0&&V(Qe=>Math.abs(Qe-Ce)>.5?Ce:Qe),tt>0&&le(Qe=>Math.abs(Qe-tt)>.5?tt:Qe)};yt.id=requestAnimationFrame(je);const He=new ResizeObserver(()=>{cancelAnimationFrame(yt.id),yt.id=requestAnimationFrame(je)});return He.observe(Oe),He.observe(Ne),()=>{cancelAnimationFrame(yt.id),He.disconnect()}},[D,ge,pe,R,_]),s.useLayoutEffect(()=>{if(!_||c<=0)return;const Oe=me.current;Oe&&my(Oe)},[_,c,u,K]),s.useLayoutEffect(()=>{if(!D||!P)return;const Oe=se.current;if(!Oe)return;const Ne={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},yt=()=>{for(const Ct of Ne.itemsCache)for(const Wt of Ct.glyphs)$c(Wt.inner)},je=()=>{const Ct=T.current??Oe;Ne.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),Wt=>{const ht=[];return Wt.querySelectorAll("[data-marquee-wave-node]").forEach(Xt=>{const wt=Xt.firstElementChild;wt&&ht.push({inner:wt,layoutLocalX:vy(Xt,Ct)})}),{item:Wt,glyphs:ht}}),Ne.cacheDirty=!1},He=()=>{Ne.cacheDirty&&je();const Wt=(T.current??Oe).offsetWidth||1,ht=Wt*re.current,Xt=ae.current,wt=2*Math.PI*Xt/Wt,Vt=`${Wt}|${ht}|${wt}`;if(Vt!==Ne.lutKey&&(Ne.lutKey=Vt,Ne.lut=ep(ht,wt,Ju)),Math.abs(ht)<=0||wt<=0){yt();return}const Yt=me.current,$e=Yt?yy(getComputedStyle(Yt).transform):0,Xe=Oe.getBoundingClientRect(),ut=Xe.left,$t=Xe.right,bt=Ne.lut&&Ne.lut.wavelength>0?Math.max(0,(Ne.lut.periodArc/Ne.lut.wavelength-1)*Wt):0;for(const{item:ct,glyphs:Ht}of Ne.itemsCache){const mt=ct.getBoundingClientRect();if(mt.right<ut||mt.left>$t+bt){for(const Tt of Ht)$c(Tt.inner);continue}for(const Tt of Ht){const Ie=Tt.layoutLocalX+$e,Je=Ne.lut?by(Ne.lut,Ie):Ie,rt=wt*Je,Mt=ht*Math.sin(rt),gt=ht*wt*Math.cos(rt),xt=Math.atan(gt)*(180/Math.PI);fy(Tt.inner,Je-Ie,Mt,xt)}}},Ce=()=>{Ne.cancelled||(Ne.raf=0,He(),he.current&&!document.hidden&&(Ne.raf=requestAnimationFrame(Ce)))},tt=()=>{Ne.cancelled||Ne.raf||(Ne.raf=requestAnimationFrame(Ce))},Qe=()=>{Ne.cacheDirty=!0,He(),tt()};fe.current=tt,ie.current=Qe,He(),tt();const St=()=>{if(document.hidden){cancelAnimationFrame(Ne.raf),Ne.raf=0;return}cancelAnimationFrame(Ne.raf),Ne.raf=0,Qe()};return document.addEventListener("visibilitychange",St),window.addEventListener("pageshow",St),window.addEventListener("focus",St),()=>{Ne.cancelled=!0,fe.current=null,ie.current=null,cancelAnimationFrame(Ne.raf),document.removeEventListener("visibilitychange",St),window.removeEventListener("pageshow",St),window.removeEventListener("focus",St),yt()}},[D,P]),s.useLayoutEffect(()=>{var Oe;!D||!P||(Oe=ie.current)==null||Oe.call(ie)},[D,P,r,ge,ee,pe,I,L,g]),s.useLayoutEffect(()=>{var Oe;(Oe=fe.current)==null||Oe.call(fe)},[ue,u]);const de=Oe=>{M&&Oe.pointerType==="mouse"&&X(!0)},j=()=>{M&&X(!1)},Pe=D?Math.abs(I)*100:0,ne=$(F),Q={minHeight:ne,...D?{paddingTop:`${Pe}%`,paddingBottom:`${Pe}%`}:{}},_e={height:ne,...D?{visibility:"hidden"}:{backgroundColor:H}},Ge={gap:$(v),minHeight:ne},Be=g*I,qe=Math.abs(Be),Ye=Y>0?Y:xe,nt=Math.max(xe,Ye),it=qe+nt/2,ve=Math.max(Ye,1),Te=D&&g>0&&nt>0?Sy(g,Be,L,it,ve):"",We=qe*2+nt,Ke=Te?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${We}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Te,fill:"none",stroke:H,strokeWidth:Ye,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Ze=a.jsx("div",{ref:we,className:`${o}-ribbon`,style:_e,"aria-hidden":!0}),lt={...k,lineHeight:pe>0?`${pe}px`:`${ua}em`},ot=(Oe,Ne,yt)=>a.jsx(wy,{item:Oe,prefix:o,textCss:lt,capHeightPx:pe,opticalOffsetY:ke,imageGapPx:$(v),isCurve:D},`${Ne}-${yt}`),Me=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:k,children:"H"}),ze=`${Math.max(0,N)/1e3}s`,et=_?a.jsx("div",{ref:me,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:de,onPointerLeave:j,style:{WebkitAnimationDuration:ze,animationDuration:ze,WebkitAnimationPlayState:oe,animationPlayState:oe},children:Array.from({length:U},(Oe,Ne)=>a.jsx("div",{ref:Ne===0?J:void 0,className:`${o}-marquee-set`,style:{...Ge,paddingRight:$(v)},"aria-hidden":Ne>0,children:Z.map((yt,je)=>ot(yt,Ne,je))},`set-${Ne}`))}):a.jsx("div",{ref:J,className:Pt(`${o}-marquee-set`,`${o}-marquee-static`),style:Ge,children:t==null?void 0:t.map((Oe,Ne)=>ot(Oe,0,Ne))});return a.jsxs("div",{ref:se,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:z}}),Me,a.jsxs("div",{ref:T,className:`${o}-marquee-wrapper`,style:Q,children:[Ze,Ke,et]})]})},Cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2657
2657
  import cn from 'classnames';
2658
2658
  import { CommonComponentProps } from '../props';
2659
2659
  import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -3585,7 +3585,7 @@ type MarqueeTextProps = {
3585
3585
  isPreviewMode?: boolean;
3586
3586
  isEditMode?: boolean;
3587
3587
  } & CommonComponentProps;
3588
- `,xy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},by={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:{...xy.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"}}]}},Sy={element:yy,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:by,sourceCode:vy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function wy(e,t){const n=t>0?`${t}px`:"0px";return`
3588
+ `,Ty={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Iy={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:{...Ty.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"}}]}},Ly={element:$y,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:Iy,sourceCode:Cy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Py(e,t){const n=t>0?`${t}px`:"0px";return`
3589
3589
  .${e}-marquee-wrapper {
3590
3590
  overflow: hidden;
3591
3591
  width: 100%;
@@ -3674,7 +3674,7 @@ type MarqueeTextProps = {
3674
3674
  pointer-events: auto;
3675
3675
  z-index: 10;
3676
3676
  }
3677
- `}const $y=30,Cc=2,Cy=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")},Ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=$.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:m,strokeColor:h,bgColor:v,padding:b,logoMarginTop:E,logoWidth:f,logoHeight:w,captionMarginTop:H}=e,q=!!o,B=((t==null?void 0:t.length)??0)>0,M=c>0&&(!n||i),_=B&&(M||n),j=Math.max(0,c)*$y,C=N=>$.scalingValue(N,n??!1),L=s.useRef(null),W=s.useRef(null),A=s.useRef(null),[I,T]=s.useState(0),[V,S]=s.useState(0),X=V>0?V:0,P=s.useMemo(()=>wy(r,X),[r,X]),[k,O]=s.useState(0),ie=M&&u==="on",[ae,D]=s.useState(!1),se=s.useRef(null),[R,de]=s.useState(0),[te,Se]=s.useState(0),Ce=s.useRef(null),ve=N=>{var ne,pe,U,Pe,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${N}FontFamily`])??"Arial",fontWeight:((ne=e==null?void 0:e[`${N}FontSettings`])==null?void 0:ne.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${N}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((U=e==null?void 0:e[`${N}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${N}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${N}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${N}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${N}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${N}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${N}LineHeight`])??.01,color:(e==null?void 0:e[`${N}Color`])??"#000000"}},ue=ve("text"),Q=ve("caption"),re=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(N=>{var K,ne;return(((K=N.text)==null?void 0:K.length)??0)>0||(((ne=N.caption)==null?void 0:ne.length)??0)>0}),[t]),fe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:V<=0||I<=0?Cc:Math.max(Cc,Math.ceil(I/V)+1),[_,t==null?void 0:t.length,V,I]);s.useLayoutEffect(()=>{if(!_)return;const N=L.current,K=A.current;if(!N||!K)return;let ne=0;const pe=()=>{const le=N.getBoundingClientRect().width,J=K.getBoundingClientRect().width,De=Ce.current,Xe=typeof De=="number"&&Math.abs(De-J)<=.25;if(Ce.current=J,T(le),typeof J=="number"&&J>0&&V<=0){S(J);return}Xe&&J!==V?S(J):!Xe&&V<=0&&(cancelAnimationFrame(ne),ne=requestAnimationFrame(pe))},U=()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame(pe)};U();const Pe=new ResizeObserver(U);return Pe.observe(N),Pe.observe(K),()=>{cancelAnimationFrame(ne),Pe.disconnect()}},[M,_,V]);const he=X>0&&j>0?X/j*1e3:0,be=`${Math.max(0,he)/1e3}s`;s.useLayoutEffect(()=>{if(!_||X<=0)return;const N=W.current;N&&Cy(N)},[_,X,d]),s.useLayoutEffect(()=>{if(!_){O(0);return}const N=A.current,K=W.current;if(!N||!K)return;const ne=()=>{let U=0;for(let Pe=0;Pe<N.children.length;Pe++){const J=N.children[Pe].firstElementChild;J&&(U=Math.max(U,J.offsetHeight))}U<=0&&(U=K.offsetHeight),O(U>0?U:0)};ne();const pe=new ResizeObserver(ne);return pe.observe(N),pe.observe(K),()=>{pe.disconnect()}},[_,fe,t,n,p,y,b,m,x,f,w,R,te]);const Me=()=>{ie&&D(!0)},Ne=()=>{ie&&D(!1)},we=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((N,K,ne,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:we,width:"100%"},children:[a.jsx("div",{"data-controls":q?pe==null?void 0:pe.controlsName:void 0,"data-controls-axis":q?"y":void 0,className:q?`${r}-control`:void 0,style:{height:C((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...nn(N,n),textAlign:ce,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Ki,{content:K})})]},ne),[we,ce,n,q,r,C]),Y=s.useCallback((N,K,ne)=>{var pe,U,Pe;return a.jsxs("div",{style:{padding:`${C(b.top)} ${C(b.right)} ${C(b.bottom)} ${C(b.left)}`,width:C(y+m*2),height:"100%",borderRadius:C(x),border:`${C(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:v}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:we,textAlign:ce},children:[N.text&&g(ue,N.text,"text",ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(ne==null?void 0:ne.textMinHeightPx)=="number"&&ne.textMinHeightPx>0?{minHeightPx:ne.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:we,width:"100%"},children:[a.jsx("div",{"data-controls":q&&!(ne!=null&&ne.dataMeasureAttrs)?"logoMarginTop":void 0,className:q&&!(ne!=null&&ne.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:C(E)}}),a.jsx("div",{style:{width:C(f),height:C(w)},children:((pe=N.logo)==null?void 0:pe.assetId)&&a.jsx("img",{src:N.logo.assetId,alt:((U=N.logo)==null?void 0:U.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Pe=N.logo)==null?void 0:Pe.objectFit)||"contain"}})})]}),N.caption&&g(Q,N.caption,"caption",{...ne!=null&&ne.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:H,...ne!=null&&ne.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(ne==null?void 0:ne.captionMinHeightPx)=="number"&&ne.captionMinHeightPx>0?{minHeightPx:ne.captionMinHeightPx}:{}})]})]},K)},[v,H,Q,y,x,w,E,f,we,ce,b.bottom,b.left,b.right,b.top,g,m,h,ue,n,q,r]),Z=s.useCallback(N=>{de(N.maxTextPx),Se(N.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!re){Z({maxTextPx:0,maxCaptionPx:0});return}const N=se.current;if(!N)return;const K=()=>{$.readTestimonialTextMeasure(N,Z)};K();const ne=new ResizeObserver(K);return ne.observe(N),()=>{ne.disconnect()}},[re,Z,t,Y]);const ee=re?{textMinHeightPx:R,captionMinHeightPx:te}:void 0,ye=re?a.jsx("div",{ref:se,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((N,K)=>Y(N,`measure-${K}`,{dataMeasureAttrs:!0}))}):null,G=(N,K)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(N,`card-${K}`,ee),q&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(p)})`,width:C(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},K);if(_){const N=M?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Tt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...k>0?{height:k}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{ref:W,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Me,onMouseLeave:Ne,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:be,WebkitAnimationDuration:be,animationPlayState:N,WebkitAnimationPlayState:N},children:Array.from({length:fe},(K,ne)=>a.jsx("div",{ref:ne===0?A:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(p),paddingRight:C(p)},"aria-hidden":ne>0,children:t==null?void 0:t.map((pe,U)=>G(pe,`${ne}-${U}`))},`set-${ne}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ye,a.jsx("div",{style:{gap:C(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((N,K)=>G(N,K))})]})},Iy=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3677
+ `}const My=30,Cc=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")},Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=w.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:v,corners:x,stroke:m,strokeColor:h,bgColor:b,padding:S,logoMarginTop:R,logoWidth:y,logoHeight:C,captionMarginTop:E}=e,G=!!o,H=((t==null?void 0:t.length)??0)>0,O=c>0&&(!n||i),F=H&&(O||n),D=Math.max(0,c)*My,I=B=>w.scalingValue(B,n??!1),L=s.useRef(null),z=s.useRef(null),k=s.useRef(null),[$,P]=s.useState(0),[q,_]=s.useState(0),K=q>0?q:0,M=s.useMemo(()=>Py(r,K),[r,K]),[f,X]=s.useState(0),oe=O&&u==="on",[ue,N]=s.useState(!1),se=s.useRef(null),[T,me]=s.useState(0),[J,we]=s.useState(0),Le=s.useRef(null),he=B=>{var U,de,j,Pe,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${B}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${B}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:ne.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"}},fe=he("text"),ie=he("caption"),re=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var Z,U;return(((Z=B.text)==null?void 0:Z.length)??0)>0||(((U=B.caption)==null?void 0:U.length)??0)>0}),[t]),ae=s.useMemo(()=>!F||(t==null?void 0:t.length)===0?1:q<=0||$<=0?Cc:Math.max(Cc,Math.ceil($/q)+1),[F,t==null?void 0:t.length,q,$]);s.useLayoutEffect(()=>{if(!F)return;const B=L.current,Z=k.current;if(!B||!Z)return;let U=0;const de=()=>{const ne=B.getBoundingClientRect().width,Q=Z.getBoundingClientRect().width,_e=Le.current,Ge=typeof _e=="number"&&Math.abs(_e-Q)<=.25;if(Le.current=Q,P(ne),typeof Q=="number"&&Q>0&&q<=0){_(Q);return}Ge&&Q!==q?_(Q):!Ge&&q<=0&&(cancelAnimationFrame(U),U=requestAnimationFrame(de))},j=()=>{cancelAnimationFrame(U),U=requestAnimationFrame(de)};j();const Pe=new ResizeObserver(j);return Pe.observe(B),Pe.observe(Z),()=>{cancelAnimationFrame(U),Pe.disconnect()}},[O,F,q]);const pe=K>0&&D>0?K/D*1e3:0,be=`${Math.max(0,pe)/1e3}s`;s.useLayoutEffect(()=>{if(!F||K<=0)return;const B=z.current;B&&Ry(B)},[F,K,d]),s.useLayoutEffect(()=>{if(!F){X(0);return}const B=k.current,Z=z.current;if(!B||!Z)return;const U=()=>{let j=0;for(let Pe=0;Pe<B.children.length;Pe++){const Q=B.children[Pe].firstElementChild;Q&&(j=Math.max(j,Q.offsetHeight))}j<=0&&(j=Z.offsetHeight),X(j>0?j:0)};U();const de=new ResizeObserver(U);return de.observe(B),de.observe(Z),()=>{de.disconnect()}},[F,ae,t,n,p,v,S,m,x,y,C,T,J]);const ke=()=>{oe&&N(!0)},Fe=()=>{oe&&N(!1)},xe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),le=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((B,Z,U,de)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":G?de==null?void 0:de.controlsName:void 0,"data-controls-axis":G?"y":void 0,className:G?`${r}-control`:void 0,style:{height:I((de==null?void 0:de.marginTop)??0)}}),a.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...nn(B,n),textAlign:le,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:a.jsx(Zi,{content:Z})})]},U),[xe,le,n,G,r,I]),V=s.useCallback((B,Z,U)=>{var de,j,Pe;return a.jsxs("div",{style:{padding:`${I(S.top)} ${I(S.right)} ${I(S.bottom)} ${I(S.left)}`,width:I(v+m*2),height:"100%",borderRadius:I(x),border:`${I(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:b}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:xe,textAlign:le},children:[B.text&&g(fe,B.text,"text",U!=null&&U.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(U==null?void 0:U.textMinHeightPx)=="number"&&U.textMinHeightPx>0?{minHeightPx:U.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":G&&!(U!=null&&U.dataMeasureAttrs)?"logoMarginTop":void 0,className:G&&!(U!=null&&U.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:I(R)}}),a.jsx("div",{style:{width:I(y),height:I(C)},children:((de=B.logo)==null?void 0:de.assetId)&&a.jsx("img",{src:B.logo.assetId,alt:((j=B.logo)==null?void 0:j.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Pe=B.logo)==null?void 0:Pe.objectFit)||"contain"}})})]}),B.caption&&g(ie,B.caption,"caption",{...U!=null&&U.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:E,...U!=null&&U.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(U==null?void 0:U.captionMinHeightPx)=="number"&&U.captionMinHeightPx>0?{minHeightPx:U.captionMinHeightPx}:{}})]})]},Z)},[b,E,ie,v,x,C,R,y,xe,le,S.bottom,S.left,S.right,S.top,g,m,h,fe,n,G,r]),Y=s.useCallback(B=>{me(B.maxTextPx),we(B.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!re){Y({maxTextPx:0,maxCaptionPx:0});return}const B=se.current;if(!B)return;const Z=()=>{w.readTestimonialTextMeasure(B,Y)};Z();const U=new ResizeObserver(Z);return U.observe(B),()=>{U.disconnect()}},[re,Y,t,V]);const te=re?{textMinHeightPx:T,captionMinHeightPx:J}:void 0,ge=re?a.jsx("div",{ref:se,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,Z)=>V(B,`measure-${Z}`,{dataMeasureAttrs:!0}))}):null,ee=(B,Z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[V(B,`card-${Z}`,te),G&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${I(p)})`,width:I(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},Z);if(F){const B=O?oe&&ue?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Pt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),ge,a.jsx("div",{ref:z,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:ke,onMouseLeave:Fe,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:be,WebkitAnimationDuration:be,animationPlayState:B,WebkitAnimationPlayState:B},children:Array.from({length:ae},(Z,U)=>a.jsx("div",{ref:U===0?k:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:I(p),paddingRight:I(p)},"aria-hidden":U>0,children:t==null?void 0:t.map((de,j)=>ee(de,`${U}-${j}`))},`set-${U}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),ge,a.jsx("div",{style:{gap:I(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,Z)=>ee(B,Z))})]})},ky=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3678
3678
  import cn from 'classnames';
3679
3679
  import { CommonComponentProps } from '../props';
3680
3680
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4305,7 +4305,7 @@ type TestimonialsSettings = {
4305
4305
  logoHeight: number;
4306
4306
  captionMarginTop: number;
4307
4307
  };
4308
- `,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},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:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__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:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",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"}]}]},{logo:{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"}]}]},{logo:{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"}]}]}]}},Py={element:Ty,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ly,sourceCode:Iy,assetsPaths:{content:[{path:"logo.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function My(e){return`
4308
+ `,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ay={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Tc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__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:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",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"}]}]},{logo:{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"}]}]},{logo:{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"}]}]}]}},Fy={element:Ey,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ay,sourceCode:ky,assetsPaths:{content:[{path:"logo.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Ny(e){return`
4309
4309
  .${e}-container {
4310
4310
  position: relative;
4311
4311
  overflow-x: clip;
@@ -4429,7 +4429,7 @@ type TestimonialsSettings = {
4429
4429
  width: 100%;
4430
4430
  height: 100%;
4431
4431
  }
4432
- `}const Ry=3e3,Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=$.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:m,imageHeight:h,controlsWidth:v,controlsColor:b,controlsHoverColor:E}=e,f=c>0&&(!n||!!i),[w,H]=s.useState(0),[q,B]=s.useState(null),[M,_]=s.useState(!1),j=s.useRef(null),C=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(()=>{H(0),B(null),_(!1)},[l.length]);const W=l[w],A=q===null?null:l[q],I=ve=>{var Q,re,fe,he,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ve}FontFamily`])??"Arial",fontWeight:((Q=e==null?void 0:e[`${ve}FontSettings`])==null?void 0:Q.fontWeight)??400,fontStyle:((re=e==null?void 0:e[`${ve}FontSettings`])==null?void 0:re.fontStyle)??"normal"},textAppearance:{textTransform:((fe=e==null?void 0:e[`${ve}TextAppearance`])==null?void 0:fe.textTransform)??"none",textDecoration:((he=e==null?void 0:e[`${ve}TextAppearance`])==null?void 0:he.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${ve}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ve}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ve}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ve}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ve}WordSpacing`])??0,color:(e==null?void 0:e[`${ve}Color`])??"#000000"}},T=I("text"),V=I("caption"),S=l.length>1&&l.some(ve=>{var ue,Q;return(((ue=ve.text)==null?void 0:ue.length)??0)>0||(((Q=ve.caption)==null?void 0:Q.length)??0)>0}),X=s.useRef(null),[P,k]=s.useState(0),[O,ie]=s.useState(0),ae=e.controls??{mode:"Off",icon:null},D=l.length>1,se=s.useCallback((ve,ue)=>!D||ue===ve?ve:(j.current&&window.clearTimeout(j.current),B(ve),_(!0),j.current=window.setTimeout(()=>{B(null),_(!1),j.current=null},300),ue),[D]),R=s.useCallback(()=>{D&&H(ve=>se(ve,(ve-1+l.length)%l.length))},[D,se,l.length]),de=s.useCallback(()=>{D&&H(ve=>se(ve,(ve+1)%l.length))},[D,se,l.length]);s.useEffect(()=>{if(!f||!D)return;const ve=Math.max(300,Ry/c),ue=window.setInterval(()=>{H(Q=>se(Q,(Q+1)%l.length))},ve);return()=>{window.clearInterval(ue)}},[f,D,se,l.length,c]),s.useEffect(()=>()=>{j.current&&window.clearTimeout(j.current)},[]);const te=(ve,ue)=>{var be,Me,Ne,we;const Q=ue==null?void 0:ue.textMinHeightPx,re=ue==null?void 0:ue.captionMinHeightPx,fe=ue==null?void 0:ue.dataMeasureAttrs,he=o&&!(ue!=null&&ue.dataMeasureAttrs)&&!(ue!=null&&ue.hideControls);return a.jsxs(a.Fragment,{children:[ve.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":he?"textMarginTop":void 0,className:he?`${r}-control`:void 0,style:{height:$.scalingValue(y??0,n??!1)}}),a.jsx("div",{...fe&&{"data-testimonial-measure":"text"},style:{...nn(T,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ve.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":he?"imageMarginTop":void 0,className:he?`${r}-control`:void 0,style:{height:$.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:$.scalingValue(m??0,n??!1),height:$.scalingValue(h??0,n??!1)},children:((be=ve.image)==null?void 0:be.assetId)&&a.jsx("img",{src:(Me=ve.image)==null?void 0:Me.assetId,alt:((Ne=ve.image)==null?void 0:Ne.name)??"",className:`${r}-icon`,style:{objectFit:((we=ve.image)==null?void 0:we.objectFit)||"contain"}})})]}),ve.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":he?"captionMarginTop":void 0,className:he?`${r}-control`:void 0,style:{height:$.scalingValue(x??0,n??!1)}}),a.jsx("div",{...fe?{"data-testimonial-measure":"caption"}:{},style:{...nn(V,n),...re&&re>0?{minHeight:re}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ve.caption})})]})]})},Se=s.useCallback(ve=>{k(ve.maxTextPx),ie(ve.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!S){Se({maxTextPx:0,maxCaptionPx:0});return}const ve=X.current;if(!ve)return;const ue=()=>{$.readTestimonialTextMeasure(ve,Se)};ue();const Q=new ResizeObserver(ue);return Q.observe(ve),()=>{Q.disconnect()}},[S,Se,t]),!W)return a.jsx(a.Fragment,{});const Ce=S?{textMinHeightPx:P,captionMinHeightPx:O}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:My(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:$.scalingValue(u??0,n??!1),alignItems:C},children:[S&&a.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ve,ue)=>a.jsx("div",{style:{width:"100%"},children:te(ve,{dataMeasureAttrs:!0})},ue))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[A&&M&&a.jsx("div",{className:Tt(`${r}-fade-item-prev`,`${r}-fade-out`),children:te(A,{...Ce,hideControls:!0})}),a.jsx("div",{className:Tt(`${r}-fade-item-current`,M?`${r}-fade-in`:void 0),children:te(W,Ce)})]})]}),ae.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:$.scalingValue(v??.02,n??!1),height:$.scalingValue(v??.02,n??!1),"--arrow-hover-color":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:R,disabled:!D,"aria-label":"Previous testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:E,className:Tt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Tt(`${r}-arrow`,`${r}-next-arrow`),style:{width:$.scalingValue(v??.02,n??!1),height:$.scalingValue(v??.02,n??!1),"--arrow-hover-color":E},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:de,disabled:!D,"aria-label":"Next testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:E,className:`${r}-arrow-img`})})})]})]})})},ky=`import cn from 'classnames';
4432
+ `}const _y=3e3,Hy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=w.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:x,imageWidth:m,imageHeight:h,controlsWidth:b,controlsColor:S,controlsHoverColor:R}=e,y=c>0&&(!n||!!i),[C,E]=s.useState(0),[G,H]=s.useState(null),[O,F]=s.useState(!1),D=s.useRef(null),I=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(()=>{E(0),H(null),F(!1)},[l.length]);const z=l[C],k=G===null?null:l[G],$=he=>{var ie,re,ae,pe,be;return{fontSettings:{fontFamily:(e==null?void 0:e[`${he}FontFamily`])??"Arial",fontWeight:((ie=e==null?void 0:e[`${he}FontSettings`])==null?void 0:ie.fontWeight)??400,fontStyle:((re=e==null?void 0:e[`${he}FontSettings`])==null?void 0:re.fontStyle)??"normal"},textAppearance:{textTransform:((ae=e==null?void 0:e[`${he}TextAppearance`])==null?void 0:ae.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${he}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((be=e==null?void 0:e[`${he}TextAppearance`])==null?void 0:be.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${he}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${he}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${he}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${he}WordSpacing`])??0,color:(e==null?void 0:e[`${he}Color`])??"#000000"}},P=$("text"),q=$("caption"),_=l.length>1&&l.some(he=>{var fe,ie;return(((fe=he.text)==null?void 0:fe.length)??0)>0||(((ie=he.caption)==null?void 0:ie.length)??0)>0}),K=s.useRef(null),[M,f]=s.useState(0),[X,oe]=s.useState(0),ue=e.controls??{mode:"Off",icon:null},N=l.length>1,se=s.useCallback((he,fe)=>!N||fe===he?he:(D.current&&window.clearTimeout(D.current),H(he),F(!0),D.current=window.setTimeout(()=>{H(null),F(!1),D.current=null},300),fe),[N]),T=s.useCallback(()=>{N&&E(he=>se(he,(he-1+l.length)%l.length))},[N,se,l.length]),me=s.useCallback(()=>{N&&E(he=>se(he,(he+1)%l.length))},[N,se,l.length]);s.useEffect(()=>{if(!y||!N)return;const he=Math.max(300,_y/c),fe=window.setInterval(()=>{E(ie=>se(ie,(ie+1)%l.length))},he);return()=>{window.clearInterval(fe)}},[y,N,se,l.length,c]),s.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const J=(he,fe)=>{var be,ke,Fe,xe;const ie=fe==null?void 0:fe.textMinHeightPx,re=fe==null?void 0:fe.captionMinHeightPx,ae=fe==null?void 0:fe.dataMeasureAttrs,pe=o&&!(fe!=null&&fe.dataMeasureAttrs)&&!(fe!=null&&fe.hideControls);return a.jsxs(a.Fragment,{children:[he.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:I,width:"100%"},children:[a.jsx("div",{"data-controls":pe?"textMarginTop":void 0,className:pe?`${r}-control`:void 0,style:{height:w.scalingValue(v??0,n??!1)}}),a.jsx("div",{...ae&&{"data-testimonial-measure":"text"},style:{...nn(P,n),...ie&&ie>0?{minHeight:ie}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Zi,{content:he.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:I,width:"100%"},children:[a.jsx("div",{"data-controls":pe?"imageMarginTop":void 0,className:pe?`${r}-control`:void 0,style:{height:w.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:w.scalingValue(m??0,n??!1),height:w.scalingValue(h??0,n??!1)},children:((be=he.image)==null?void 0:be.assetId)&&a.jsx("img",{src:(ke=he.image)==null?void 0:ke.assetId,alt:((Fe=he.image)==null?void 0:Fe.name)??"",className:`${r}-icon`,style:{objectFit:((xe=he.image)==null?void 0:xe.objectFit)||"contain"}})})]}),he.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:I,width:"100%"},children:[a.jsx("div",{"data-controls":pe?"captionMarginTop":void 0,className:pe?`${r}-control`:void 0,style:{height:w.scalingValue(x??0,n??!1)}}),a.jsx("div",{...ae?{"data-testimonial-measure":"caption"}:{},style:{...nn(q,n),...re&&re>0?{minHeight:re}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Zi,{content:he.caption})})]})]})},we=s.useCallback(he=>{f(he.maxTextPx),oe(he.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!_){we({maxTextPx:0,maxCaptionPx:0});return}const he=K.current;if(!he)return;const fe=()=>{w.readTestimonialTextMeasure(he,we)};fe();const ie=new ResizeObserver(fe);return ie.observe(he),()=>{ie.disconnect()}},[_,we,t]),!z)return a.jsx(a.Fragment,{});const Le=_?{textMinHeightPx:M,captionMinHeightPx:X}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ny(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:w.scalingValue(u??0,n??!1),alignItems:I},children:[_&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((he,fe)=>a.jsx("div",{style:{width:"100%"},children:J(he,{dataMeasureAttrs:!0})},fe))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[k&&O&&a.jsx("div",{className:Pt(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(k,{...Le,hideControls:!0})}),a.jsx("div",{className:Pt(`${r}-fade-item-current`,O?`${r}-fade-in`:void 0),children:J(z,Le)})]})]}),ue.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:w.scalingValue(b??.02,n??!1),height:w.scalingValue(b??.02,n??!1),"--arrow-hover-color":R},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:T,disabled:!N,"aria-label":"Previous testimonial",children:ue.icon&&a.jsx(gn,{url:ue.icon,fill:S,hoverFill:R,className:Pt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Pt(`${r}-arrow`,`${r}-next-arrow`),style:{width:w.scalingValue(b??.02,n??!1),height:w.scalingValue(b??.02,n??!1),"--arrow-hover-color":R},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:me,disabled:!N,"aria-label":"Next testimonial",children:ue.icon&&a.jsx(gn,{url:ue.icon,fill:S,hoverFill:R,className:`${r}-arrow-img`})})})]})]})})},Wy=`import cn from 'classnames';
4433
4433
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4434
4434
  import { CommonComponentProps } from '../props';
4435
4435
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4925,12 +4925,12 @@ type TestimonialsSettings = {
4925
4925
  icon?: string | null;
4926
4926
  };
4927
4927
  };
4928
- `,Ay="01M46GNEM3GEJ4HQSNJYYTA45T",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fy={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:{...Ic.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:{...Ic.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:Ay},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"}]}]}]}},Ny={element:Ey,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:Fy,sourceCode:ky,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function _y(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:$.scalingValue((o-t)/2,i)}}function Hy(e){return`
4928
+ `,Oy="01M46GNEM3GEJ4HQSNJYYTA45T",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dy={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:{...Ic.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:{...Ic.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:Oy},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"}]}]}]}},zy={element:Hy,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:Dy,sourceCode:Wy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function By(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((o-t)/2,i)}}function jy(e){return`
4929
4929
  .${e}-wrapper {
4930
4930
  display: grid;
4931
4931
  align-items: start;
4932
4932
  justify-content: center;
4933
- min-height: ${_y(48)};
4933
+ min-height: ${By(48)};
4934
4934
  }
4935
4935
  .${e}-item {
4936
4936
  display: flex;
@@ -5276,7 +5276,7 @@ type TestimonialsSettings = {
5276
5276
  z-index: 2;
5277
5277
  width: 100%;
5278
5278
  }
5279
- `}function Wy(){return Math.random()<.5?"ltr":"ttb"}function Oy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Dy(e){const t=Wy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Oy(e)})})}const Fn=500,zy=750,pi="cubic-bezier(0.22, 1, 0.36, 1)",By=72,jy=50;function Vy(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 Gy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Ku(e){return!Array.isArray(e)||e.length===0?[]:Vy(e)?e.flatMap(t=>{const n=Gy(t);if(!n)return[];const i=Xy(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 Xi(e){return!$.isEmbedMedia(e)&&e.type==="video"}function Uy(e){const t=new Set,n=[];for(const i of e){const o=Ku(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 qy({mediaList:e}){const t=e.filter(n=>!$.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=>Xi(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 Ky(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return $.isEmbedMedia(e)?a.jsx($.EmbedMediaFrame,{media:e,mode:"background",fit:n.objectFit==="contain"?"contain":"cover",className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i}):Xi(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 Mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Yy(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 Qy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Ky(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})}function Zy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",y=s.useRef(null),x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),v=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),H=s.useRef(null),q=s.useRef(0),B=s.useRef(null),M=s.useRef(!1),_=s.useRef(null),j=s.useRef(null),C=s.useRef(null),L=s.useRef(()=>{}),[W,A]=s.useState(null),[I,T]=s.useState(null),[V,S]=s.useState("opening"),[X,P]=s.useState(0),[k,O]=s.useState(0),[ie,ae]=s.useState(null),[D,se]=s.useState(!1),[R,de]=s.useState(!1),[te,Se]=s.useState(!1),[Ce,ve]=s.useState(null),ue=s.useRef(n),Q=s.useRef(void 0),re=t[n],fe=re?Xi(re):!1,he=re?$.isEmbedMedia(re):!1,be=k!==0||D,Me=ie!==null,Ne=s.useCallback(Ee=>{const Be=Ee.currentTarget,tt=Be instanceof HTMLVideoElement?{width:Be.videoWidth,height:Be.videoHeight}:{width:Be.naturalWidth,height:Be.naturalHeight};!tt.width||!tt.height||ve(tt)},[]);s.useEffect(()=>{H.current=I},[I]),s.useEffect(()=>{const Ee=y.current;if(!Ee)return;const Be=()=>T(Mc(Ee));Be();const tt=new ResizeObserver(Be);return tt.observe(Ee),()=>tt.disconnect()},[]);const we=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),ce=s.useCallback(()=>{const Ee=j.current;j.current=null,we(),B.current=null,M.current=!1,ae(null),se(!1),O(0),q.current=0,de(!1),f.current=!1,b.current=0,E.current="none",Ee===1?c():Ee===-1&&l()},[we,c,l]),g=s.useCallback(()=>{we(),j.current=null,B.current=null,M.current=!1,ae(null),se(!1),O(0),q.current=0},[we]),Y=s.useCallback(()=>{we(),_.current=window.setTimeout(()=>{j.current!==null&&ce()},Fn+32)},[we,ce]),Z=s.useCallback((Ee,Be)=>{var _e;const tt=((_e=H.current)==null?void 0:_e.width)??0;if(we(),B.current=Ee,ae(Ee),M.current=!0,se(!0),Be){j.current=Ee;const He=-Ee*tt;q.current=He,O(He),Y();return}q.current=0,O(0),_.current=window.setTimeout(()=>{_.current=null,g()},Fn+32)},[we,g,Y]),ee=s.useCallback(Ee=>{if(!(t.length<=1)){if(M.current){if(j.current===Ee){C.current=Ee,ce();return}g()}we(),B.current=Ee,ae(Ee),M.current=!1,se(!1),q.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Z(Ee,!0)})})}},[t.length,Z,ce,g,we]);L.current=ee;const ye=s.useCallback(Ee=>{Ee.propertyName!=="transform"||!M.current||j.current!==null&&ce()},[ce]),G=s.useCallback(()=>{const Ee=x.current;if(!Ee)return;const Be=Mc(Ee);!Be.width||!Be.height||A(Be)},[]);s.useEffect(()=>{G();const Ee=x.current;if(!Ee)return;const Be=new ResizeObserver(()=>G());return Be.observe(Ee),()=>Be.disconnect()},[G]),s.useEffect(()=>{V==="opening"&&W&&S("open")},[V,W]),s.useEffect(()=>{if(V!=="closing")return;const Ee=setTimeout(()=>r(),Fn);return()=>clearTimeout(Ee)},[V,r]),s.useEffect(()=>()=>{we()},[we]),s.useLayoutEffect(()=>{ue.current===n&&Q.current===(re==null?void 0:re.assetId)||(we(),j.current=null,ae(null),P(0),O(0),se(!1),Se(!1),de(!1),ve(null),v.current=0,b.current=0,E.current="none",f.current=!1,M.current=!1,q.current=0,B.current=null,h.current=null,w.current=!1,ue.current=n,Q.current=re==null?void 0:re.assetId)},[n,re==null?void 0:re.assetId,we]),s.useLayoutEffect(()=>{const Ee=C.current;Ee!==null&&(C.current=null,requestAnimationFrame(()=>{L.current(Ee)}))},[n,re==null?void 0:re.assetId]),s.useEffect(()=>{if(V!=="open")return;let Ee=null;const Be=()=>{Ee&&(document.removeEventListener("click",Ee,!0),Ee=null)},tt=()=>{Be(),Ee=ze=>{ze.stopPropagation(),ze.preventDefault(),Be()},document.addEventListener("click",Ee,!0)},_e=ze=>{const Te=ze<0?1:-1;if(Math.abs(ze)>jy&&t.length>1){Z(Te,!0);return}Z(Te,!1)},He=ze=>{if(ze.touches.length!==1||M.current)return;const Te=ze.touches[0];w.current=!0,h.current={x:Te.clientX,y:Te.clientY},E.current="none",b.current=0,f.current=!1},xt=ze=>{if(!h.current||ze.touches.length!==1||M.current)return;const Te=ze.touches[0],at=Te.clientX-h.current.x,me=Te.clientY-h.current.y;if(E.current==="none"){if(Math.abs(at)<10&&Math.abs(me)<10)return;if(Math.abs(at)>Math.abs(me)){if(t.length<=1)return;E.current="horizontal"}else if(me>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,de(!0),b.current=at;const Fe=at<0?1:-1;B.current!==Fe&&(B.current=Fe,ae(Fe)),q.current=at,O(at),ze.preventDefault();return}E.current==="vertical"&&(f.current=!0,de(!0),v.current=me,P(me),ze.preventDefault())},rt=()=>{if(!h.current)return;const ze=E.current,Te=f.current;if(Te&&ze==="horizontal")_e(b.current),tt();else if(Te&&ze==="vertical")if(v.current>By){const me=window.innerHeight;v.current=me,Se(!0),P(me),S("closing")}else v.current=0,P(0),tt();else ze==="horizontal"&&Math.abs(b.current)>0&&(_e(b.current),tt());h.current=null,E.current="none",b.current=0,f.current=!1,de(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",xt,{passive:!1}),document.addEventListener("touchend",rt),document.addEventListener("touchcancel",rt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",xt),document.removeEventListener("touchend",rt),document.removeEventListener("touchcancel",rt),Be()}},[V,t.length,Z]),s.useEffect(()=>{const Ee=Be=>{Be.key==="Escape"&&(Be.preventDefault(),Be.stopPropagation(),V!=="closing"&&S("closing"))};return window.addEventListener("keydown",Ee,!0),()=>window.removeEventListener("keydown",Ee,!0)},[V]);const N=()=>{V!=="closing"&&S("closing")},K=V==="open",ne=V==="closing",pe=X>0?Math.max(0,1-X/500):1,U=X>0?Math.max(.35,1-X/500):1,Pe=he&&re?{width:$.getEmbedAspect(re),height:1}:Ce,le=W?p?W:Yy(W,Pe):null,J=Ee=>{if(Ee.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const Be=le??Ee.currentTarget.getBoundingClientRect(),tt=Ee.clientY-Be.top,_e=Math.min(52,Be.height*.2);if(!(tt>Be.height-_e)){if(Ee.clientX-Be.left<Be.width/2){ee(-1);return}ee(1)}},De=Ee=>{if(t.length<=1)return;const Be=le??Ee.currentTarget.getBoundingClientRect(),tt=Ee.clientX-Be.left,_e=Ee.clientY-Be.top,He=Math.min(52,Be.height*.2);if(_e>Be.height-He){Ee.currentTarget.style.cursor="default";return}Ee.currentTarget.style.cursor=tt<Be.width/2?"w-resize":"e-resize"},Xe={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,zIndex:9998},Ue=p?"cover":"contain",Je=k!==0||X>0?`translate(${k}px, ${X}px)`:void 0,et=R&&!D?"none":D?`transform ${Fn}ms ${pi}`:te?`transform ${Fn}ms ${pi}, opacity ${Fn}ms ${pi}`:V==="opening"||ne?`opacity ${Fn}ms ${pi}`:"none",Qe={...Xe,transform:Je,opacity:X>0?U:V==="opening"||ne?0:1,transition:et,pointerEvents:"none"},it={position:"absolute",top:((le==null?void 0:le.top)??0)-((I==null?void 0:I.top)??0),left:((le==null?void 0:le.left)??0)-((I==null?void 0:I.left)??0),width:le==null?void 0:le.width,height:le==null?void 0:le.height,objectFit:Ue,pointerEvents:(fe||he)&&K&&!be?"auto":"none",touchAction:(fe||he)&&K?"none":void 0},xe=(I==null?void 0:I.width)??0,Ie=Me?(n+ie+t.length)%t.length:null,We=Ie!==null?t[Ie]:null,qe={...Xe,transform:Me?`translateX(${ie*xe+k}px)`:void 0,opacity:1,transition:D?`transform ${Fn}ms ${pi}`:"none",pointerEvents:"none"},je={position:"absolute",top:((W==null?void 0:W.top)??0)-((I==null?void 0:I.top)??0),left:((W==null?void 0:W.left)??0)-((I==null?void 0:I.left)??0),width:W==null?void 0:W.width,height:W==null?void 0:W.height,objectFit:Ue,pointerEvents:"none"},ot=he&&le?Math.min(52,le.height*.2):0,nt=le?{position:"fixed",top:le.top,height:le.height-ot,width:le.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:N,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:K?pe:0,transition:R?"none":`opacity ${Fn}ms ${pi}`,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:x,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:K?1:0,transition:`opacity ${Fn}ms ${pi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:K?1:0,transition:`opacity ${Fn}ms ${pi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),W&&I&&We&&a.jsx("div",{style:qe,onTransitionEnd:ye,children:$.isEmbedMedia(We)?a.jsx("img",{src:We.thumbnail,alt:We.name,style:je},`neighbor-${Ie}-${We.assetId}`):Xi(We)?a.jsx("video",{src:We.assetId,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Ie}-${We.assetId}`):a.jsx("img",{src:We.assetId,alt:We.name,style:je},`neighbor-${Ie}-${We.assetId}`)}),W&&I&&re&&a.jsx("div",{style:Qe,onTransitionEnd:ye,children:he?a.jsx($.EmbedMediaFrame,{media:re,mode:"player",fit:p?"cover":"contain",lazy:!1,interactive:K&&!be,style:it},`${n}-${re.assetId}`):fe?a.jsx(Qy,{src:re.assetId,phase:V,mediaRef:m,mediaStyle:it,onLoadedMetadata:Ne,onClick:J,onMouseMove:De},`${n}-${re.assetId}`):a.jsx("img",{ref:m,src:re.assetId,alt:re.name,onLoad:Ne,style:it},`${n}-${re.assetId}`)}),K&&nt&&t.length>1&&!fe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...nt,left:le.left,cursor:"w-resize",pointerEvents:R?"none":"auto"},onClick:Ee=>{if(w.current){w.current=!1;return}Ee.stopPropagation(),ee(-1)}}),a.jsx("div",{style:{...nt,left:le.left+le.width/2,cursor:"e-resize",pointerEvents:R?"none":"auto"},onClick:Ee=>{if(w.current){w.current=!1;return}Ee.stopPropagation(),ee(1)}})]})]})}function Jy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=$.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:m,entriesCount:h,lightbox:v,imageDisplay:b,imageCorners:E,lightboxImageDisplay:f,slider:w,sliderTiming:H,direction:q,transition:B,titleMarginTop:M,subtitleMarginTop:_,titleColor:j,subtitleColor:C,lightboxCounterColor:L,titleFontFamily:W,titleFontSettings:A,titleFontSize:I,titleLineHeight:T,titleLetterSpacing:V,titleWordSpacing:S,titleTextAppearance:X,subtitleFontFamily:P,subtitleFontSettings:k,subtitleFontSize:O,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:D,subtitleTextAppearance:se,lightboxCounterFontFamily:R,lightboxCounterFontSettings:de,lightboxCounterFontSize:te,lightboxCounterLineHeight:Se,lightboxCounterLetterSpacing:Ce,lightboxCounterWordSpacing:ve,lightboxCounterTextAppearance:ue,showText:Q="always",alignEntries:re="off",align:fe="top"}=e,he={fontSettings:{fontFamily:W,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:I??.01,lineHeight:T,letterSpacing:V??0,wordSpacing:S??0,textAppearance:X,color:j},Me={...un(nn(he,n))},Ne={fontSettings:{fontFamily:P,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ie,letterSpacing:ae??0,wordSpacing:D??0,textAppearance:se,color:C},ce={...un(nn(Ne,n))},g={fontSettings:{fontFamily:R,fontWeight:(de==null?void 0:de.fontWeight)??400,fontStyle:(de==null?void 0:de.fontStyle)??"normal"},fontSize:te??.01,lineHeight:Se,letterSpacing:Ce??0,wordSpacing:ve??0,textAppearance:ue,color:L},Z={...un(nn(g,n)),...os(te,Se,u,n)},ee=is(I,T,`${u}-item-title`,`${u}-text-tight-leading`),ye=is(O,ie,`${u}-item-subtitle`,`${u}-text-tight-leading`),G=os(I,T,u,n),N=os(O,ie,u,n),K=is(te,Se,`${u}-lightbox-counter`,`${u}-text-tight-leading`),ne=$.buildColorVars(u,{titleColor:j,subtitleColor:C,lightboxCounterColor:L},tv,nv),Pe=`${l&&l!=="default"?`${u}-state-${l}`:""}${Q==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),le=h===0?1/0:h,J=(t??[]).slice(0,le),De=s.useMemo(()=>v==="on"?Uy(J):[],[J,v]),Xe=y.entryWidth??.2,Ue=(b==null?void 0:b.display)==="cover",Je=(b==null?void 0:b.ratioValue)??"1:1",et=(b==null?void 0:b.reversed)??!1,[Qe,it]=Je.split(":").map(Number),We=`${et?it:Qe} / ${et?Qe:it}`,qe=y.columnsCount,je=$.scalingValue(Xe??0,n),ot=je,nt=!Ue&&w!=="off",Ee=J.length%qe||qe,Be=Ee<qe&&J.length>0,tt=J.length-Ee,_e=Be?Math.floor((qe-Ee)/2)+1:1,He=E?$.scalingValue(E,n):void 0,xt={width:ot,...Ue?{aspectRatio:We,height:"auto",overflow:"hidden"}:{height:"auto"},...He?{borderRadius:He,overflow:"hidden"}:{}},rt=`${u}-item-image-wrapper${nt?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),ze=p==="d"||p==="e"||p==="f",Te=re==="on",at=`calc(${$.scalingValue(Xe??0,n)} * (${x} / 100))`,me=$.scalingValue(Xe*x/100,n),Fe=Ue?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...He?{borderRadius:He}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...He?{borderRadius:He}:{}},[Ze,dt]=s.useState(0),Ve=s.useRef(null),Lt=B==="fade"||q==="horizontal"?"ltr":q==="vertical"?"ttb":"ltr";s.useEffect(()=>{const ft=Ve.current;if(!ft)return;const wt=new ResizeObserver(Le=>{dt(Math.round(Le[0].contentRect.width))});return wt.observe(ft),()=>wt.disconnect()},[]);const ht=(()=>{const ft={...ne},wt=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return wt&&(ft["--cntrl-article-width"]=wt),ft})(),[kt,Ot]=s.useState(!1),[It,Yt]=s.useState([]),[jt,Xt]=s.useState(0),Qt=v==="on"&&(!n||i),St=(ft,wt)=>{n&&!i||v!=="off"&&(Yt(ft),Xt(wt),Ot(!0))};s.useEffect(()=>{if(!kt||v!=="on"||typeof document>"u")return;const ft=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ft}},[kt,v]),s.useEffect(()=>{!n||i||Ot(!1)},[n,i]);const Zt=s.useMemo(()=>Hy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Zt}}),v==="on"&&a.jsx(qy,{mediaList:De}),a.jsx("div",{style:ne,children:a.jsx("div",{ref:Ve,className:`${u}-wrapper ${u}-type-${p}${Te?` ${u}-align-entries`:""} ${u}-image-align-${fe} ${Pe}`.trim(),style:{gridTemplateColumns:`repeat(${qe}, ${je})`,rowGap:Te?0:$.scalingValue(m??0,n),columnGap:$.scalingValue(y.horizontalGap??0,n),width:$.scalingValue(y.wrapperWidth??0,n),...Te?{[`--${u}-align-entries-row-gap`]:$.scalingValue(m??0,n)}:{}},children:J.map((ft,wt)=>{var Ct;const Le=Lc(ft.title),Ye=Lc(ft.subtitle),st=v==="off"&&((Ct=ft.link)!=null&&Ct.value)?ft.link:void 0,Mt=Math.floor(wt/qe)===Math.ceil(J.length/qe)-1,ut=Be&&wt>=tt?`${_e+(wt-tt)}`:void 0,gt=ze?a.jsxs("div",{className:`${u}-item-text-block`,children:[Le&&a.jsx("p",{className:ee,style:{width:at,...Me,...G},children:ft.title}),Le&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:$.scalingValue(M??0,n),width:me}}),Ye&&a.jsx("p",{className:ye,style:{width:at,...ce,...N},children:ft.subtitle}),Ye&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:$.scalingValue(_??0,n),width:me}})]}):null,At=Te?a.jsxs("div",{className:`${u}-item-title-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&Le?"titleMarginTop":void 0,className:o&&Le?`${u}-control`:void 0,style:{height:Le?$.scalingValue(M??0,n):0,width:me}}),Le&&a.jsx("p",{className:ee,style:{width:at,...Me,...G},children:ft.title}),ze&&Le&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:$.scalingValue(M??0,n),width:me}})]}):null,Ht=Te?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?$.scalingValue(_??0,n):0,width:me}}),Ye&&a.jsx("p",{className:ye,style:{width:at,...ce,...N},children:ft.subtitle}),ze&&Ye&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:$.scalingValue(_??0,n),width:me}})]}):null,mt=a.jsxs($.LinkWrapper,{link:st,className:`${u}-item-text-link`,children:[At,Ht]}),Nt=Ku(ft.gallery),Kt=Nt.filter(bt=>bt.lightboxMedia).map(bt=>bt.lightboxMedia),Ft=a.jsx("div",{className:rt,style:xt,children:Nt.length===0?null:w==="off"?(()=>{const{displayMedia:bt,lightboxMedia:z}=Nt[0],Re=z?Kt.findIndex(Ae=>Ae.assetId===z.assetId):-1;return a.jsx(Pc,{media:bt,className:`${u}-item-${Xi(bt)?"video":"image"}`.trim(),style:Fe,onMediaClick:Qt&&Re>=0?()=>St(Kt,Re):void 0})})():a.jsxs(a.Fragment,{children:[nt&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Nt.map(({displayMedia:bt})=>$.isEmbedMedia(bt)?a.jsx("div",{style:{aspectRatio:`${$.getEmbedAspect(bt)}`}},`sizer-${bt.assetId}`):Xi(bt)?a.jsx("video",{src:bt.assetId,muted:!0,playsInline:!0},`sizer-${bt.assetId}`):a.jsx("img",{src:bt.assetId,alt:""},`sizer-${bt.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:H*1e3,width:"100%",height:"100%",speed:zy,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Lt},onMoved:bt=>{q!=="random"||B==="fade"||Dy(bt)},children:Nt.map(({displayMedia:bt,lightboxMedia:z},Re)=>{const Ae=z?Kt.findIndex(Oe=>Oe.assetId===z.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:bt,className:`${u}-item-${Xi(bt)?"video":"image"}`.trim(),style:Fe,onMediaClick:Qt&&Ae>=0?()=>St(Kt,Ae):void 0})},Re)})},`${B}-${Xe}-${q}-${H}-${Ze}-${c}`)]})}),_t=ze?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Le?"titleMarginTop":void 0,className:o&&Le?`${u}-control`:void 0,style:{height:Le?$.scalingValue(M??0,n):0,width:me}}),a.jsx("p",{className:ee,style:{width:at,...Me,...G},children:ft.title}),a.jsx("div",{"data-controls":o&&Ye?"subtitleMarginTop":void 0,className:o&&Ye?`${u}-control`:void 0,style:{height:Ye?$.scalingValue(_??0,n):0,width:me}}),a.jsx("p",{className:ye,style:{width:at,...ce,...N},children:ft.subtitle})]}),Vt=st?a.jsx($.LinkWrapper,{link:st,className:`${u}-item-image-link`,children:Ft}):a.jsx("a",{className:`${u}-item-image-link`,children:Ft});return a.jsx("div",{className:`${u}-item`.trim(),style:ut&&!Te?{gridColumn:ut}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Te&&Mt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${je} * (${x} / 100))`:je,...ut&&Te?{gridColumn:ut}:{}},children:Te?a.jsx(a.Fragment,{children:ze?a.jsxs(a.Fragment,{children:[mt,Vt]}):a.jsxs(a.Fragment,{children:[Vt,mt]})}):st?a.jsxs(a.Fragment,{children:[a.jsxs($.LinkWrapper,{link:st,className:`${u}-item-image-link`,children:[gt,Ft]}),!ze&&a.jsx($.LinkWrapper,{link:st,className:`${u}-item-text-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[gt,Ft,_t]})})},wt)})})}),(!n||i)&&kt&&typeof document<"u"&&v==="on"&&(()=>{const ft=(d?document.getElementById(d):null)??document.body;return Un.createPortal(a.jsx("div",{style:ht,"data-selection":"none",children:a.jsx(Zy,{prefix:u,items:It,index:jt,imageDisplay:Jy(f),isEditor:n,onClose:()=>Ot(!1),onPrev:()=>Xt(wt=>(wt-1+It.length)%It.length),onNext:()=>Xt(wt=>(wt+1)%It.length),counterClassName:K,counterStyle:Z})}),ft)})()]})}const tv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},nv=["hover","focus","filled","success","error"],iv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5279
+ `}function Vy(){return Math.random()<.5?"ltr":"ttb"}function Gy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Xy(e){const t=Vy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Gy(e)})})}const Nn=500,qy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",Uy=72,Ky=50;function Yy(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 Qy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Zy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tp(e){return!Array.isArray(e)||e.length===0?[]:Yy(e)?e.flatMap(t=>{const n=Qy(t);if(!n)return[];const i=Zy(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!w.isEmbedMedia(e)&&e.type==="video"}function Jy(e){const t=new Set,n=[];for(const i of e){const o=tp(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 ev({mediaList:e}){const t=e.filter(n=>!w.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 tv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return w.isEmbedMedia(e)?a.jsx(w.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 Mc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nv(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 iv({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{tv(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})}function ov({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",v=s.useRef(null),x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),b=s.useRef(0),S=s.useRef(0),R=s.useRef("none"),y=s.useRef(!1),C=s.useRef(!1),E=s.useRef(null),G=s.useRef(0),H=s.useRef(null),O=s.useRef(!1),F=s.useRef(null),D=s.useRef(null),I=s.useRef(null),L=s.useRef(()=>{}),[z,k]=s.useState(null),[$,P]=s.useState(null),[q,_]=s.useState("opening"),[K,M]=s.useState(0),[f,X]=s.useState(0),[oe,ue]=s.useState(null),[N,se]=s.useState(!1),[T,me]=s.useState(!1),[J,we]=s.useState(!1),[Le,he]=s.useState(null),fe=s.useRef(n),ie=s.useRef(void 0),re=t[n],ae=re?Ki(re):!1,pe=re?w.isEmbedMedia(re):!1,be=f!==0||N,ke=oe!==null,Fe=s.useCallback(Me=>{const ze=Me.currentTarget,et=ze instanceof HTMLVideoElement?{width:ze.videoWidth,height:ze.videoHeight}:{width:ze.naturalWidth,height:ze.naturalHeight};!et.width||!et.height||he(et)},[]);s.useEffect(()=>{E.current=$},[$]),s.useEffect(()=>{const Me=v.current;if(!Me)return;const ze=()=>P(Mc(Me));ze();const et=new ResizeObserver(ze);return et.observe(Me),()=>et.disconnect()},[]);const xe=s.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),le=s.useCallback(()=>{const Me=D.current;D.current=null,xe(),H.current=null,O.current=!1,ue(null),se(!1),X(0),G.current=0,me(!1),y.current=!1,S.current=0,R.current="none",Me===1?c():Me===-1&&l()},[xe,c,l]),g=s.useCallback(()=>{xe(),D.current=null,H.current=null,O.current=!1,ue(null),se(!1),X(0),G.current=0},[xe]),V=s.useCallback(()=>{xe(),F.current=window.setTimeout(()=>{D.current!==null&&le()},Nn+32)},[xe,le]),Y=s.useCallback((Me,ze)=>{var Oe;const et=((Oe=E.current)==null?void 0:Oe.width)??0;if(xe(),H.current=Me,ue(Me),O.current=!0,se(!0),ze){D.current=Me;const Ne=-Me*et;G.current=Ne,X(Ne),V();return}G.current=0,X(0),F.current=window.setTimeout(()=>{F.current=null,g()},Nn+32)},[xe,g,V]),te=s.useCallback(Me=>{if(!(t.length<=1)){if(O.current){if(D.current===Me){I.current=Me,le();return}g()}xe(),H.current=Me,ue(Me),O.current=!1,se(!1),G.current=0,X(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(Me,!0)})})}},[t.length,Y,le,g,xe]);L.current=te;const ge=s.useCallback(Me=>{Me.propertyName!=="transform"||!O.current||D.current!==null&&le()},[le]),ee=s.useCallback(()=>{const Me=x.current;if(!Me)return;const ze=Mc(Me);!ze.width||!ze.height||k(ze)},[]);s.useEffect(()=>{ee();const Me=x.current;if(!Me)return;const ze=new ResizeObserver(()=>ee());return ze.observe(Me),()=>ze.disconnect()},[ee]),s.useEffect(()=>{q==="opening"&&z&&_("open")},[q,z]),s.useEffect(()=>{if(q!=="closing")return;const Me=setTimeout(()=>r(),Nn);return()=>clearTimeout(Me)},[q,r]),s.useEffect(()=>()=>{xe()},[xe]),s.useLayoutEffect(()=>{fe.current===n&&ie.current===(re==null?void 0:re.assetId)||(xe(),D.current=null,ue(null),M(0),X(0),se(!1),we(!1),me(!1),he(null),b.current=0,S.current=0,R.current="none",y.current=!1,O.current=!1,G.current=0,H.current=null,h.current=null,C.current=!1,fe.current=n,ie.current=re==null?void 0:re.assetId)},[n,re==null?void 0:re.assetId,xe]),s.useLayoutEffect(()=>{const Me=I.current;Me!==null&&(I.current=null,requestAnimationFrame(()=>{L.current(Me)}))},[n,re==null?void 0:re.assetId]),s.useEffect(()=>{if(q!=="open")return;let Me=null;const ze=()=>{Me&&(document.removeEventListener("click",Me,!0),Me=null)},et=()=>{ze(),Me=He=>{He.stopPropagation(),He.preventDefault(),ze()},document.addEventListener("click",Me,!0)},Oe=He=>{const Ce=He<0?1:-1;if(Math.abs(He)>Ky&&t.length>1){Y(Ce,!0);return}Y(Ce,!1)},Ne=He=>{if(He.touches.length!==1||O.current)return;const Ce=He.touches[0];C.current=!0,h.current={x:Ce.clientX,y:Ce.clientY},R.current="none",S.current=0,y.current=!1},yt=He=>{if(!h.current||He.touches.length!==1||O.current)return;const Ce=He.touches[0],tt=Ce.clientX-h.current.x,Qe=Ce.clientY-h.current.y;if(R.current==="none"){if(Math.abs(tt)<10&&Math.abs(Qe)<10)return;if(Math.abs(tt)>Math.abs(Qe)){if(t.length<=1)return;R.current="horizontal"}else if(Qe>0)R.current="vertical";else return}if(R.current==="horizontal"){y.current=!0,me(!0),S.current=tt;const St=tt<0?1:-1;H.current!==St&&(H.current=St,ue(St)),G.current=tt,X(tt),He.preventDefault();return}R.current==="vertical"&&(y.current=!0,me(!0),b.current=Qe,M(Qe),He.preventDefault())},je=()=>{if(!h.current)return;const He=R.current,Ce=y.current;if(Ce&&He==="horizontal")Oe(S.current),et();else if(Ce&&He==="vertical")if(b.current>Uy){const Qe=window.innerHeight;b.current=Qe,we(!0),M(Qe),_("closing")}else b.current=0,M(0),et();else He==="horizontal"&&Math.abs(S.current)>0&&(Oe(S.current),et());h.current=null,R.current="none",S.current=0,y.current=!1,me(!1)};return document.addEventListener("touchstart",Ne,{passive:!0}),document.addEventListener("touchmove",yt,{passive:!1}),document.addEventListener("touchend",je),document.addEventListener("touchcancel",je),()=>{document.removeEventListener("touchstart",Ne),document.removeEventListener("touchmove",yt),document.removeEventListener("touchend",je),document.removeEventListener("touchcancel",je),ze()}},[q,t.length,Y]),s.useEffect(()=>{const Me=ze=>{ze.key==="Escape"&&(ze.preventDefault(),ze.stopPropagation(),q!=="closing"&&_("closing"))};return window.addEventListener("keydown",Me,!0),()=>window.removeEventListener("keydown",Me,!0)},[q]);const B=()=>{q!=="closing"&&_("closing")},Z=q==="open",U=q==="closing",de=K>0?Math.max(0,1-K/500):1,j=K>0?Math.max(.35,1-K/500):1,Pe=pe&&re?{width:w.getEmbedAspect(re),height:1}:Le,ne=z?p?z:nv(z,Pe):null,Q=Me=>{if(Me.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const ze=ne??Me.currentTarget.getBoundingClientRect(),et=Me.clientY-ze.top,Oe=Math.min(52,ze.height*.2);if(!(et>ze.height-Oe)){if(Me.clientX-ze.left<ze.width/2){te(-1);return}te(1)}},_e=Me=>{if(t.length<=1)return;const ze=ne??Me.currentTarget.getBoundingClientRect(),et=Me.clientX-ze.left,Oe=Me.clientY-ze.top,Ne=Math.min(52,ze.height*.2);if(Oe>ze.height-Ne){Me.currentTarget.style.cursor="default";return}Me.currentTarget.style.cursor=et<ze.width/2?"w-resize":"e-resize"},Ge={position:"fixed",top:$==null?void 0:$.top,left:$==null?void 0:$.left,width:$==null?void 0:$.width,height:$==null?void 0:$.height,zIndex:9998},Be=p?"cover":"contain",qe=f!==0||K>0?`translate(${f}px, ${K}px)`:void 0,Ye=T&&!N?"none":N?`transform ${Nn}ms ${hi}`:J?`transform ${Nn}ms ${hi}, opacity ${Nn}ms ${hi}`:q==="opening"||U?`opacity ${Nn}ms ${hi}`:"none",nt={...Ge,transform:qe,opacity:K>0?j:q==="opening"||U?0:1,transition:Ye,pointerEvents:"none"},it={position:"absolute",top:((ne==null?void 0:ne.top)??0)-(($==null?void 0:$.top)??0),left:((ne==null?void 0:ne.left)??0)-(($==null?void 0:$.left)??0),width:ne==null?void 0:ne.width,height:ne==null?void 0:ne.height,objectFit:Be,pointerEvents:(ae||pe)&&Z&&!be?"auto":"none",touchAction:(ae||pe)&&Z?"none":void 0},ve=($==null?void 0:$.width)??0,Te=ke?(n+oe+t.length)%t.length:null,We=Te!==null?t[Te]:null,Ke={...Ge,transform:ke?`translateX(${oe*ve+f}px)`:void 0,opacity:1,transition:N?`transform ${Nn}ms ${hi}`:"none",pointerEvents:"none"},Ze={position:"absolute",top:((z==null?void 0:z.top)??0)-(($==null?void 0:$.top)??0),left:((z==null?void 0:z.left)??0)-(($==null?void 0:$.left)??0),width:z==null?void 0:z.width,height:z==null?void 0:z.height,objectFit:Be,pointerEvents:"none"},lt=pe&&ne?Math.min(52,ne.height*.2):0,ot=ne?{position:"fixed",top:ne.top,height:ne.height-lt,width:ne.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:q==="open"?"none":void 0},onClick:B,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Z?de:0,transition:T?"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:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,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:Z?1:0,transition:`opacity ${Nn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${Nn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),z&&$&&We&&a.jsx("div",{style:Ke,onTransitionEnd:ge,children:w.isEmbedMedia(We)?a.jsx("img",{src:We.thumbnail,alt:We.name,style:Ze},`neighbor-${Te}-${We.assetId}`):Ki(We)?a.jsx("video",{src:We.assetId,muted:!0,playsInline:!0,preload:"auto",style:Ze},`neighbor-${Te}-${We.assetId}`):a.jsx("img",{src:We.assetId,alt:We.name,style:Ze},`neighbor-${Te}-${We.assetId}`)}),z&&$&&re&&a.jsx("div",{style:nt,onTransitionEnd:ge,children:pe?a.jsx(w.EmbedMediaFrame,{media:re,mode:"player",fit:p?"cover":"contain",lazy:!1,interactive:Z&&!be,style:it},`${n}-${re.assetId}`):ae?a.jsx(iv,{src:re.assetId,phase:q,mediaRef:m,mediaStyle:it,onLoadedMetadata:Fe,onClick:Q,onMouseMove:_e},`${n}-${re.assetId}`):a.jsx("img",{ref:m,src:re.assetId,alt:re.name,onLoad:Fe,style:it},`${n}-${re.assetId}`)}),Z&&ot&&t.length>1&&!ae&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...ot,left:ne.left,cursor:"w-resize",pointerEvents:T?"none":"auto"},onClick:Me=>{if(C.current){C.current=!1;return}Me.stopPropagation(),te(-1)}}),a.jsx("div",{style:{...ot,left:ne.left+ne.width/2,cursor:"e-resize",pointerEvents:T?"none":"auto"},onClick:Me=>{if(C.current){C.current=!1;return}Me.stopPropagation(),te(1)}})]})]})}function rv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function av({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=w.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:x=100,verticalGap:m,entriesCount:h,lightbox:b,imageDisplay:S,imageCorners:R,lightboxImageDisplay:y,slider:C,sliderTiming:E,direction:G,transition:H,titleMarginTop:O,subtitleMarginTop:F,titleColor:D,subtitleColor:I,lightboxCounterColor:L,titleFontFamily:z,titleFontSettings:k,titleFontSize:$,titleLineHeight:P,titleLetterSpacing:q,titleWordSpacing:_,titleTextAppearance:K,subtitleFontFamily:M,subtitleFontSettings:f,subtitleFontSize:X,subtitleLineHeight:oe,subtitleLetterSpacing:ue,subtitleWordSpacing:N,subtitleTextAppearance:se,lightboxCounterFontFamily:T,lightboxCounterFontSettings:me,lightboxCounterFontSize:J,lightboxCounterLineHeight:we,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:he,lightboxCounterTextAppearance:fe,showText:ie="always",alignEntries:re="off",align:ae="top"}=e,pe={fontSettings:{fontFamily:z,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:$??.01,lineHeight:P,letterSpacing:q??0,wordSpacing:_??0,textAppearance:K,color:D},ke={...pn(nn(pe,n))},Fe={fontSettings:{fontFamily:M,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:X??.01,lineHeight:oe,letterSpacing:ue??0,wordSpacing:N??0,textAppearance:se,color:I},le={...pn(nn(Fe,n))},g={fontSettings:{fontFamily:T,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:J??.01,lineHeight:we,letterSpacing:Le??0,wordSpacing:he??0,textAppearance:fe,color:L},Y={...pn(nn(g,n)),...os(J,we,u,n)},te=is($,P,`${u}-item-title`,`${u}-text-tight-leading`),ge=is(X,oe,`${u}-item-subtitle`,`${u}-text-tight-leading`),ee=os($,P,u,n),B=os(X,oe,u,n),Z=is(J,we,`${u}-lightbox-counter`,`${u}-text-tight-leading`),U=w.buildColorVars(u,{titleColor:D,subtitleColor:I,lightboxCounterColor:L},sv,lv),Pe=`${l&&l!=="default"?`${u}-state-${l}`:""}${ie==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ne=h===0?1/0:h,Q=(t??[]).slice(0,ne),_e=s.useMemo(()=>b==="on"?Jy(Q):[],[Q,b]),Ge=v.entryWidth??.2,Be=(S==null?void 0:S.display)==="cover",qe=(S==null?void 0:S.ratioValue)??"1:1",Ye=(S==null?void 0:S.reversed)??!1,[nt,it]=qe.split(":").map(Number),We=`${Ye?it:nt} / ${Ye?nt:it}`,Ke=v.columnsCount,Ze=w.scalingValue(Ge??0,n),lt=Ze,ot=!Be&&C!=="off",Me=Q.length%Ke||Ke,ze=Me<Ke&&Q.length>0,et=Q.length-Me,Oe=ze?Math.floor((Ke-Me)/2)+1:1,Ne=R?w.scalingValue(R,n):void 0,yt={width:lt,...Be?{aspectRatio:We,height:"auto",overflow:"hidden"}:{height:"auto"},...Ne?{borderRadius:Ne,overflow:"hidden"}:{}},je=`${u}-item-image-wrapper${ot?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),He=p==="d"||p==="e"||p==="f",Ce=re==="on",tt=`calc(${w.scalingValue(Ge??0,n)} * (${x} / 100))`,Qe=w.scalingValue(Ge*x/100,n),St=Be?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ne?{borderRadius:Ne}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ne?{borderRadius:Ne}:{}},[Ct,Wt]=s.useState(0),ht=s.useRef(null),Xt=H==="fade"||G==="horizontal"?"ltr":G==="vertical"?"ttb":"ltr";s.useEffect(()=>{const mt=ht.current;if(!mt)return;const Tt=new ResizeObserver(Ie=>{Wt(Math.round(Ie[0].contentRect.width))});return Tt.observe(mt),()=>Tt.disconnect()},[]);const wt=(()=>{const mt={...U},Tt=ht.current?getComputedStyle(ht.current).getPropertyValue("--cntrl-article-width").trim():"";return Tt&&(mt["--cntrl-article-width"]=Tt),mt})(),[Vt,Yt]=s.useState(!1),[$e,Xe]=s.useState([]),[ut,$t]=s.useState(0),bt=b==="on"&&(!n||i),ct=(mt,Tt)=>{n&&!i||b!=="off"&&(Xe(mt),$t(Tt),Yt(!0))};s.useEffect(()=>{if(!Vt||b!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[Vt,b]),s.useEffect(()=>{!n||i||Yt(!1)},[n,i]);const Ht=s.useMemo(()=>jy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ht}}),b==="on"&&a.jsx(ev,{mediaList:_e}),a.jsx("div",{style:U,children:a.jsx("div",{ref:ht,className:`${u}-wrapper ${u}-type-${p}${Ce?` ${u}-align-entries`:""} ${u}-image-align-${ae} ${Pe}`.trim(),style:{gridTemplateColumns:`repeat(${Ke}, ${Ze})`,rowGap:Ce?0:w.scalingValue(m??0,n),columnGap:w.scalingValue(v.horizontalGap??0,n),width:w.scalingValue(v.wrapperWidth??0,n),...Ce?{[`--${u}-align-entries-row-gap`]:w.scalingValue(m??0,n)}:{}},children:Q.map((mt,Tt)=>{var Bt;const Ie=Lc(mt.title),Je=Lc(mt.subtitle),rt=b==="off"&&((Bt=mt.link)!=null&&Bt.value)?mt.link:void 0,Mt=Math.floor(Tt/Ke)===Math.ceil(Q.length/Ke)-1,gt=ze&&Tt>=et?`${Oe+(Tt-et)}`:void 0,xt=He?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ie&&a.jsx("p",{className:te,style:{width:tt,...ke,...ee},children:mt.title}),Ie&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(O??0,n),width:Qe}}),Je&&a.jsx("p",{className:ge,style:{width:tt,...le,...B},children:mt.subtitle}),Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Qe}})]}):null,Ft=Ce?a.jsxs("div",{className:`${u}-item-title-row`,children:[!He&&a.jsx("div",{"data-controls":o&&Ie?"titleMarginTop":void 0,className:o&&Ie?`${u}-control`:void 0,style:{height:Ie?w.scalingValue(O??0,n):0,width:Qe}}),Ie&&a.jsx("p",{className:te,style:{width:tt,...ke,...ee},children:mt.title}),He&&Ie&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(O??0,n),width:Qe}})]}):null,Ot=Ce?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!He&&a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?w.scalingValue(F??0,n):0,width:Qe}}),Je&&a.jsx("p",{className:ge,style:{width:tt,...le,...B},children:mt.subtitle}),He&&Je&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Qe}})]}):null,pt=a.jsxs(w.LinkWrapper,{link:rt,className:`${u}-item-text-link`,children:[Ft,Ot]}),Dt=tp(mt.gallery),qt=Dt.filter(Rt=>Rt.lightboxMedia).map(Rt=>Rt.lightboxMedia),Nt=a.jsx("div",{className:je,style:yt,children:Dt.length===0?null:C==="off"?(()=>{const{displayMedia:Rt,lightboxMedia:W}=Dt[0],Re=W?qt.findIndex(Ae=>Ae.assetId===W.assetId):-1;return a.jsx(Pc,{media:Rt,className:`${u}-item-${Ki(Rt)?"video":"image"}`.trim(),style:St,onMediaClick:bt&&Re>=0?()=>ct(qt,Re):void 0})})():a.jsxs(a.Fragment,{children:[ot&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Dt.map(({displayMedia:Rt})=>w.isEmbedMedia(Rt)?a.jsx("div",{style:{aspectRatio:`${w.getEmbedAspect(Rt)}`}},`sizer-${Rt.assetId}`):Ki(Rt)?a.jsx("video",{src:Rt.assetId,muted:!0,playsInline:!0},`sizer-${Rt.assetId}`):a.jsx("img",{src:Rt.assetId,alt:""},`sizer-${Rt.assetId}`))}),a.jsx(El,{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:H==="fade"?"fade":"loop",rewind:H==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Xt},onMoved:Rt=>{G!=="random"||H==="fade"||Xy(Rt)},children:Dt.map(({displayMedia:Rt,lightboxMedia:W},Re)=>{const Ae=W?qt.findIndex(De=>De.assetId===W.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:Rt,className:`${u}-item-${Ki(Rt)?"video":"image"}`.trim(),style:St,onMediaClick:bt&&Ae>=0?()=>ct(qt,Ae):void 0})},Re)})},`${H}-${Ge}-${G}-${E}-${Ct}-${c}`)]})}),zt=He?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ie?"titleMarginTop":void 0,className:o&&Ie?`${u}-control`:void 0,style:{height:Ie?w.scalingValue(O??0,n):0,width:Qe}}),a.jsx("p",{className:te,style:{width:tt,...ke,...ee},children:mt.title}),a.jsx("div",{"data-controls":o&&Je?"subtitleMarginTop":void 0,className:o&&Je?`${u}-control`:void 0,style:{height:Je?w.scalingValue(F??0,n):0,width:Qe}}),a.jsx("p",{className:ge,style:{width:tt,...le,...B},children:mt.subtitle})]}),jt=rt?a.jsx(w.LinkWrapper,{link:rt,className:`${u}-item-image-link`,children:Nt}):a.jsx("a",{className:`${u}-item-image-link`,children:Nt});return a.jsx("div",{className:`${u}-item`.trim(),style:gt&&!Ce?{gridColumn:gt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ce&&Mt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ze} * (${x} / 100))`:Ze,...gt&&Ce?{gridColumn:gt}:{}},children:Ce?a.jsx(a.Fragment,{children:He?a.jsxs(a.Fragment,{children:[pt,jt]}):a.jsxs(a.Fragment,{children:[jt,pt]})}):rt?a.jsxs(a.Fragment,{children:[a.jsxs(w.LinkWrapper,{link:rt,className:`${u}-item-image-link`,children:[xt,Nt]}),!He&&a.jsx(w.LinkWrapper,{link:rt,className:`${u}-item-text-link`,children:zt})]}):a.jsxs(a.Fragment,{children:[xt,Nt,zt]})})},Tt)})})}),(!n||i)&&Vt&&typeof document<"u"&&b==="on"&&(()=>{const mt=(d?document.getElementById(d):null)??document.body;return Un.createPortal(a.jsx("div",{style:wt,"data-selection":"none",children:a.jsx(ov,{prefix:u,items:$e,index:ut,imageDisplay:rv(y),isEditor:n,onClose:()=>Yt(!1),onPrev:()=>$t(Tt=>(Tt-1+$e.length)%$e.length),onNext:()=>$t(Tt=>(Tt+1)%$e.length),counterClassName:Z,counterStyle:Y})}),mt)})()]})}const sv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},lv=["hover","focus","filled","success","error"],cv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5280
5280
  import '@splidejs/react-splide/css/core';
5281
5281
  import { CommonComponentProps } from '../props';
5282
5282
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia } from '../utils/index';
@@ -7381,12 +7381,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7381
7381
  };
7382
7382
 
7383
7383
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7384
- `,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ov=["titleColor","subtitleColor","lightboxCounterColor"],rv={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"]}},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:{...rs.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:{...rs.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:{...rs.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",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},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},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}},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:"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","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:"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:[...ov],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},av={element:ev,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:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:rv,sourceCode:iv},sv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Gs=`${Al}-`,za=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Gs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(za(e)));if(i)return i}const n=Ec(t.get(Da));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},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Yu=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(za(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},lv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===za(e)||i===Da:Fl(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)}},Qu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(za(e)):[...t.keys()].some(n=>Fl(n))},cv=(e,t)=>{if(Qu(t)){if(e){window.history.back();return}lv(t)}},dv=20,uv=2,as=e=>`max(${e}, ${dv}px)`,To=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+To(n).length,0),pv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+To(r).length,1),i=To(e[t]).length;return{start:n,end:n+i-1}},mv=(e,t)=>{const n=Zu(e),{start:i,end:o}=pv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>To(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:To(n)})),gv=(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 mv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",hv=(e,t,n)=>e==="B"?t.length>1:Zu(n)>1,Pn=.004,ni=.004,xo={title1Width:.13,title2Width:.13,title3Width:.14},wi=(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},Io=(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)=>Io(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},$i=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Io(e.length,n),effective:vr(e.length,n)}},Ju=(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),ep=(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),Li=["title1","title2","title3","count"],yt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[yt(e,"fontFamily"),yt(e,"fontSettings"),{type:"row",items:[yt(e,"fontSize"),yt(e,"lineHeight"),yt(e,"letterSpacing"),yt(e,"wordSpacing")]},yt(e,"textAlign"),yt(e,"textAppearance")],fv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[Nl[e],_l(e)]))}),yv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},vv={title1:.02,title2:.02,title3:.02,count:.017},zi=(e,t)=>{const n=i=>{const o=yt(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[yv[t]]}},Bi=(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??vv[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 tp({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:h="desktop",contentMarginTop:v=0,iconMarginRight:b=0,closeIcon:E=null,closeIconMaxWidth:f=0,closeIconColor:w="#000000",closeIconHoverColor:H="#cccccc"}=n,q=$.scalingValue(v,i),B=$.scalingValue(Math.max(v,ni),i),M=$.scalingValue(b,i),_=$.scalingValue(m,i),j=h==="mobile",C=Bi("title1",zi(n,"title1"),i),L=Bi("title2",zi(n,"title2"),i),W=Bi("title3",zi(n,"title3"),i),A=s.useMemo(()=>({title1Width:c??xo.title1Width,title2Width:d??xo.title2Width,title3Width:u??xo.title3Width}),[c,d,u]),I=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),T=s.useMemo(()=>wi(e,t,C,L,W),[e,t,C,L,W]),V=s.useMemo(()=>T.map(U=>A[U.widthKey]),[T,A]),S=s.useMemo(()=>Io(T.length,V),[T.length,V]),X=s.useMemo(()=>vr(T.length,V),[T.length,V]),P=s.useMemo(()=>T.filter(U=>U.prefix==="title1"),[T]),k=s.useMemo(()=>T.filter(U=>U.prefix==="title2"||U.prefix==="title3"),[T]),O=s.useMemo(()=>$i(P,A),[P,A]),ie=s.useMemo(()=>$i(k,A),[k,A]),ae=!!(t.title1||t.title2||t.title3),D=E!==null;if(!(ae||D))return null;const R=(p??0)>0||o,de=(U,Pe)=>{const le=T.findIndex(De=>De.prefix===U.prefix);if(!j||Pe==="single-row")return{effectiveWidth:X[le]??0,resolvedWidth:S[le]??0,maxWidth:yn(le,S)};if(Pe==="two-row-top"){const De=P.findIndex(Xe=>Xe.prefix===U.prefix);return{effectiveWidth:O.effective[De]??0,resolvedWidth:O.resolved[De]??0,maxWidth:yn(De,O.resolved)}}const J=k.findIndex(De=>De.prefix===U.prefix);return{effectiveWidth:ie.effective[J]??0,resolvedWidth:ie.resolved[J]??0,maxWidth:yn(J,ie.resolved)}},te=(U,Pe,le)=>{if(!j||le==="single-row"){const Je=U.findIndex(xe=>xe.prefix===Pe.prefix),et=U.map(xe=>A[xe.widthKey]),Qe=Io(U.length,et);return{effectiveWidth:vr(U.length,et)[Je]??0,resolvedWidth:Qe[Je]??0,maxWidth:yn(Je,Qe)}}if(le==="two-row-top"){const Je=U.filter(xe=>xe.prefix==="title1"),et=Je.findIndex(xe=>xe.prefix===Pe.prefix),{resolved:Qe,effective:it}=$i(Je,A);return{effectiveWidth:it[et]??0,resolvedWidth:Qe[et]??0,maxWidth:yn(et,Qe)}}const J=U.filter(Je=>Je.prefix==="title2"||Je.prefix==="title3"),De=J.findIndex(Je=>Je.prefix===Pe.prefix),{resolved:Xe,effective:Ue}=$i(J,A);return{effectiveWidth:Ue[De]??0,resolvedWidth:Xe[De]??0,maxWidth:yn(De,Xe)}},Se=U=>ep(T,S,I,U)+(j?0:p??0),Ce=()=>j?0:p??0,ve=U=>k.slice(0,U).reduce((Pe,le,J)=>Pe+(le.marginLeftKey?I[le.marginLeftKey]??0:0)+(ie.resolved[J]??0),0),ue=U=>{const Pe=k[U];return ve(U)+(Pe.marginLeftKey?I[Pe.marginLeftKey]??0:0)+(ie.resolved[U]??0)},Q=(U,Pe,le)=>{const J=U.marginLeftKey?I[U.marginLeftKey]??0:0,{effectiveWidth:De,resolvedWidth:Xe,maxWidth:Ue}=le??de(U,Pe),Je=Math.max(J,ni),et=o&&Pe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":U.prefix,style:{width:$.scalingValue(De,i),...J>0?{marginLeft:$.scalingValue(J,i)}:{}},children:[a.jsx("p",{className:U.className,style:U.style,children:U.text}),et&&U.marginLeftKey?a.jsx("div",{"data-controls":U.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:$.scalingValue(-J,i),width:$.scalingValue(Je,i),height:"100%",pointerEvents:"auto"}}):null,et?a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:$.scalingValue(-Pn/2,i),width:$.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},U.className)},re=(U="two-row")=>{const Pe=T.findIndex(De=>De.prefix==="title1"),le=Pe>=0?S[Pe]:A.title1Width,J=U==="two-row"&&o;return a.jsx("div",{...J?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(le)}:{},style:{width:$.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...J?{pointerEvents:"auto"}:{}}})},fe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:C,"aria-hidden":"true",children:" "}),he=U=>{const Pe=wi(e,U,C,L,W);return a.jsx(a.Fragment,{children:Pe.map(le=>Q(le,"single-row",te(Pe,le,"single-row")))})},be=U=>{const Pe=wi(e,U,C,L,W),le=Pe.find(J=>J.prefix==="title1");return le?Q(le,"two-row-top",te(Pe,le,"two-row-top")):null},Me=(U,Pe=!1)=>{const le=wi(e,U,C,L,W),J=le.filter(Ue=>Ue.prefix==="title2"||Ue.prefix==="title3"),De=o&&Pe;return J.length>0||De||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[J.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:J.map(Ue=>Q(Ue,"two-row-bottom",te(le,Ue,"two-row-bottom")))}),Pe&&o?a.jsxs(a.Fragment,{children:[ye(),G()]}):null]}):null,(m??0)>0||De?a.jsx("div",{"data-controls":De?"titleRowMarginBottom":void 0,"data-controls-axis":De?"y":void 0,"data-controls-reverse":De?"":void 0,className:De?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:De?"auto":"none"}}):null]}):null},Ne=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:$.scalingValue(f??0,i),height:$.scalingValue(f??0,i),marginRight:M,"--close-icon-hover-color":H},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:U=>{U.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:E??"",fill:w,hoverFill:i&&!r?w:H,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:M,height:"100%",pointerEvents:"auto"}})]}),we=()=>D?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Ne()}):null,ce=U=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:U})}),g=U=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[D||ae?fe():null,R?re("two-row"):null,ce(U),we()]}),Y=(U,Pe=!1)=>a.jsxs(a.Fragment,{children:[g(be(U)),Me(U,Pe)]}),Z=()=>{const U=j?-1:T.findIndex(J=>J.prefix==="title1"),Pe=!j&&(o||(p??0)>0)?(()=>{const J=p??0,De=U>=0?S[U]:A.title1Width,Xe=Math.max(J,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(De),style:{position:"absolute",top:0,left:0,width:$.scalingValue(Xe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,le=T.flatMap((J,De)=>{if(!J.marginLeftKey)return[];const Xe=I[J.marginLeftKey]??0,Ue=Ju(T,S,I,De)+Ce(),Je=Math.max(Xe,ni);return a.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(S[De]),style:{position:"absolute",top:0,left:$.scalingValue(Ue,i),width:$.scalingValue(Je,i),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)});return Pe?[Pe,...le]:le},ee=()=>T.map((U,Pe)=>{const le=yn(Pe,S),De=Se(Pe)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:$.scalingValue(De,i),width:$.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${U.widthKey}-junction`)}),ye=()=>k.flatMap((U,Pe)=>{if(!U.marginLeftKey)return[];const le=I[U.marginLeftKey]??0,J=ve(Pe),De=Math.max(le,ni),{resolvedWidth:Xe}=de(U,"two-row-bottom");return a.jsx("div",{"data-controls":U.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Xe),style:{position:"absolute",top:0,left:$.scalingValue(J,i),width:$.scalingValue(De,i),height:"100%",pointerEvents:"auto"}},U.marginLeftKey)}),G=()=>k.map((U,Pe)=>{const{maxWidth:le}=de(U,"two-row-bottom"),De=ue(Pe)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":U.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:$.scalingValue(De,i),width:$.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${U.widthKey}-junction`)}),N=()=>!o||j?null:a.jsxs(a.Fragment,{children:[Z(),ee()]}),K=!!(t.title2||t.title3||(m??0)>0||o),ne=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[D||ae?fe():null,R?re("single-row"):null,ae?ce(he(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),we(),N()]}),pe=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...K?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:K?void 0:{flex:"0 0 auto",height:"auto"},children:Y(t,!0)}),N()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:q,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:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...j?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${j?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${j?` ${e}-text-bar-cell-stacked`:""}`,style:j?void 0:{flex:1,minWidth:0,width:"100%"},children:j?pe():ne()})})})]})}function xv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bv(e){return`
7384
+ `,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},dv=["titleColor","subtitleColor","lightboxCounterColor"],uv={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"]}},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:{...rs.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:{...rs.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:{...rs.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",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},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},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}},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:"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","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:"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:[...dv],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},pv={element:av,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:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:uv,sourceCode:cv},mv=50,Rc=10,Al="cntrl-lightbox-journal",Da=Al,Vs=`${Al}-`,za=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Vs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(za(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Vs))continue;const o=i.slice(Vs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},np=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(za(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},gv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===za(e)||i===Da:Fl(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)}},ip=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(za(e)):[...t.keys()].some(n=>Fl(n))},hv=(e,t)=>{if(ip(t)){if(e){window.history.back();return}gv(t)}},fv=20,yv=2,as=e=>`max(${e}, ${fv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,yv),op=e=>e.reduce((t,n)=>t+Lo(n).length,0),vv=(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}},xv=(e,t)=>{const n=op(e),{start:i,end:o}=vv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(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)})),bv=(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 xv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sv=(e,t,n)=>e==="B"?t.length>1:op(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)}},rp=(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),ap=(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),Ri=["title1","title2","title3","count"],vt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[vt(e,"fontFamily"),vt(e,"fontSettings"),{type:"row",items:[vt(e,"fontSize"),vt(e,"lineHeight"),vt(e,"letterSpacing"),vt(e,"wordSpacing")]},vt(e,"textAlign"),vt(e,"textAppearance")],wv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ri.map(e=>[Nl[e],_l(e)]))}),$v={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Cv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=vt(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[$v[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??Cv[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 sp({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:v=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:b=0,iconMarginRight:S=0,closeIcon:R=null,closeIconMaxWidth:y=0,closeIconColor:C="#000000",closeIconHoverColor:E="#cccccc"}=n,G=w.scalingValue(b,i),H=w.scalingValue(Math.max(b,ii),i),O=w.scalingValue(S,i),F=w.scalingValue(m,i),D=h==="mobile",I=Gi("title1",Vi(n,"title1"),i),L=Gi("title2",Vi(n,"title2"),i),z=Gi("title3",Vi(n,"title3"),i),k=s.useMemo(()=>({title1Width:c??So.title1Width,title2Width:d??So.title2Width,title3Width:u??So.title3Width}),[c,d,u]),$=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:x}),[v,x]),P=s.useMemo(()=>Ti(e,t,I,L,z),[e,t,I,L,z]),q=s.useMemo(()=>P.map(j=>k[j.widthKey]),[P,k]),_=s.useMemo(()=>Po(P.length,q),[P.length,q]),K=s.useMemo(()=>vr(P.length,q),[P.length,q]),M=s.useMemo(()=>P.filter(j=>j.prefix==="title1"),[P]),f=s.useMemo(()=>P.filter(j=>j.prefix==="title2"||j.prefix==="title3"),[P]),X=s.useMemo(()=>Ii(M,k),[M,k]),oe=s.useMemo(()=>Ii(f,k),[f,k]),ue=!!(t.title1||t.title2||t.title3),N=R!==null;if(!(ue||N))return null;const T=(p??0)>0||o,me=(j,Pe)=>{const ne=P.findIndex(_e=>_e.prefix===j.prefix);if(!D||Pe==="single-row")return{effectiveWidth:K[ne]??0,resolvedWidth:_[ne]??0,maxWidth:vn(ne,_)};if(Pe==="two-row-top"){const _e=M.findIndex(Ge=>Ge.prefix===j.prefix);return{effectiveWidth:X.effective[_e]??0,resolvedWidth:X.resolved[_e]??0,maxWidth:vn(_e,X.resolved)}}const Q=f.findIndex(_e=>_e.prefix===j.prefix);return{effectiveWidth:oe.effective[Q]??0,resolvedWidth:oe.resolved[Q]??0,maxWidth:vn(Q,oe.resolved)}},J=(j,Pe,ne)=>{if(!D||ne==="single-row"){const qe=j.findIndex(ve=>ve.prefix===Pe.prefix),Ye=j.map(ve=>k[ve.widthKey]),nt=Po(j.length,Ye);return{effectiveWidth:vr(j.length,Ye)[qe]??0,resolvedWidth:nt[qe]??0,maxWidth:vn(qe,nt)}}if(ne==="two-row-top"){const qe=j.filter(ve=>ve.prefix==="title1"),Ye=qe.findIndex(ve=>ve.prefix===Pe.prefix),{resolved:nt,effective:it}=Ii(qe,k);return{effectiveWidth:it[Ye]??0,resolvedWidth:nt[Ye]??0,maxWidth:vn(Ye,nt)}}const Q=j.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),_e=Q.findIndex(qe=>qe.prefix===Pe.prefix),{resolved:Ge,effective:Be}=Ii(Q,k);return{effectiveWidth:Be[_e]??0,resolvedWidth:Ge[_e]??0,maxWidth:vn(_e,Ge)}},we=j=>ap(P,_,$,j)+(D?0:p??0),Le=()=>D?0:p??0,he=j=>f.slice(0,j).reduce((Pe,ne,Q)=>Pe+(ne.marginLeftKey?$[ne.marginLeftKey]??0:0)+(oe.resolved[Q]??0),0),fe=j=>{const Pe=f[j];return he(j)+(Pe.marginLeftKey?$[Pe.marginLeftKey]??0:0)+(oe.resolved[j]??0)},ie=(j,Pe,ne)=>{const Q=j.marginLeftKey?$[j.marginLeftKey]??0:0,{effectiveWidth:_e,resolvedWidth:Ge,maxWidth:Be}=ne??me(j,Pe),qe=Math.max(Q,ii),Ye=o&&Pe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":j.prefix,style:{width:w.scalingValue(_e,i),...Q>0?{marginLeft:w.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:j.className,style:j.style,children:j.text}),Ye&&j.marginLeftKey?a.jsx("div",{"data-controls":j.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:w.scalingValue(-Q,i),width:w.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,Ye?a.jsx("div",{"data-controls":j.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:w.scalingValue(-Mn/2,i),width:w.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}}):null]},j.className)},re=(j="two-row")=>{const Pe=P.findIndex(_e=>_e.prefix==="title1"),ne=Pe>=0?_[Pe]:k.title1Width,Q=j==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne)}:{},style:{width:w.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},ae=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:I,"aria-hidden":"true",children:" "}),pe=j=>{const Pe=Ti(e,j,I,L,z);return a.jsx(a.Fragment,{children:Pe.map(ne=>ie(ne,"single-row",J(Pe,ne,"single-row")))})},be=j=>{const Pe=Ti(e,j,I,L,z),ne=Pe.find(Q=>Q.prefix==="title1");return ne?ie(ne,"two-row-top",J(Pe,ne,"two-row-top")):null},ke=(j,Pe=!1)=>{const ne=Ti(e,j,I,L,z),Q=ne.filter(Be=>Be.prefix==="title2"||Be.prefix==="title3"),_e=o&&Pe;return Q.length>0||_e||(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(Be=>ie(Be,"two-row-bottom",J(ne,Be,"two-row-bottom")))}),Pe&&o?a.jsxs(a.Fragment,{children:[ge(),ee()]}):null]}):null,(m??0)>0||_e?a.jsx("div",{"data-controls":_e?"titleRowMarginBottom":void 0,"data-controls-axis":_e?"y":void 0,"data-controls-reverse":_e?"":void 0,className:_e?`${e}-control`:void 0,style:{height:F,width:"100%",flexShrink:0,pointerEvents:_e?"auto":"none"}}):null]}):null},Fe=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:w.scalingValue(y??0,i),height:w.scalingValue(y??0,i),marginRight:O,"--close-icon-hover-color":E},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:j=>{j.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:R??"",fill:C,hoverFill:i&&!r?C: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:O,height:"100%",pointerEvents:"auto"}})]}),xe=()=>N?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:Fe()}):null,le=j=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:j})}),g=j=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[N||ue?ae():null,T?re("two-row"):null,le(j),xe()]}),V=(j,Pe=!1)=>a.jsxs(a.Fragment,{children:[g(be(j)),ke(j,Pe)]}),Y=()=>{const j=D?-1:P.findIndex(Q=>Q.prefix==="title1"),Pe=!D&&(o||(p??0)>0)?(()=>{const Q=p??0,_e=j>=0?_[j]:k.title1Width,Ge=Math.max(Q,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_e),style:{position:"absolute",top:0,left:0,width:w.scalingValue(Ge,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ne=P.flatMap((Q,_e)=>{if(!Q.marginLeftKey)return[];const Ge=$[Q.marginLeftKey]??0,Be=rp(P,_,$,_e)+Le(),qe=Math.max(Ge,ii);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_[_e]),style:{position:"absolute",top:0,left:w.scalingValue(Be,i),width:w.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return Pe?[Pe,...ne]:ne},te=()=>P.map((j,Pe)=>{const ne=vn(Pe,_),_e=we(Pe)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":j.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w.scalingValue(_e,i),width:w.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}})},`${j.widthKey}-junction`)}),ge=()=>f.flatMap((j,Pe)=>{if(!j.marginLeftKey)return[];const ne=$[j.marginLeftKey]??0,Q=he(Pe),_e=Math.max(ne,ii),{resolvedWidth:Ge}=me(j,"two-row-bottom");return a.jsx("div",{"data-controls":j.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:w.scalingValue(Q,i),width:w.scalingValue(_e,i),height:"100%",pointerEvents:"auto"}},j.marginLeftKey)}),ee=()=>f.map((j,Pe)=>{const{maxWidth:ne}=me(j,"two-row-bottom"),_e=fe(Pe)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":j.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w.scalingValue(_e,i),width:w.scalingValue(Mn,i),height:"100%",pointerEvents:"auto"}})},`${j.widthKey}-junction`)}),B=()=>!o||D?null:a.jsxs(a.Fragment,{children:[Y(),te()]}),Z=!!(t.title2||t.title3||(m??0)>0||o),U=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[N||ue?ae():null,T?re("single-row"):null,ue?le(pe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),xe(),B()]}),de=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Z?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Z?void 0:{flex:"0 0 auto",height:"auto"},children:V(t,!0)}),B()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:G,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:H,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...D?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${D?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${D?` ${e}-text-bar-cell-stacked`:""}`,style:D?void 0:{flex:1,minWidth:0,width:"100%"},children:D?de():U()})})})]})}function Tv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Iv(e){return`
7385
7385
  .${e}-wrapper {
7386
7386
  display: grid;
7387
7387
  align-items: start;
7388
7388
  justify-content: center;
7389
- min-height: ${xv(48)};
7389
+ min-height: ${Tv(48)};
7390
7390
  }
7391
7391
  .${e}-item {
7392
7392
  display: flex;
@@ -7701,7 +7701,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7701
7701
  pointer-events: auto;
7702
7702
  flex-shrink: 0;
7703
7703
  }
7704
- `}const Nc={assetId:"",name:"",objectFit:"cover"},Wn=500,qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Sv=72,wv=50,$v=1e4,Cv=650,Tv=500;function Iv(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 np(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(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 Lv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Pv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(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 _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Mv=.03;function ip(e){return e.width*Mv}const ss={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 Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Rv(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 Ev(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function kv(e,t){if($.isEmbedMedia(e)){t(e.assetId,$.getEmbedAspect(e),1);return}if(Do(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 Av(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(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 Fv({mediaList:e}){const t=e.filter(n=>!$.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=>Do(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 Lo(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 wa(e,t,n){const i=Lo(e,t,n);return{...i,left:2*i.left-e.left}}function Nv(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 op(e,t,n,i){const o=Lo(e,"left",i),r=Lo(e,"right",i),l=wa(e,"left",i),c=wa(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 _v(e,t,n,i){const{start:o,end:r}=op(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Hv(e,t,n){const i=Lo(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function rp(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 Hl(e){if(!e)return;if(rp(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??Nc,i??o??Nc]}]}function Wv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(rp(e)){const t=[];for(const n of e){const i=Wv(n);if(!i)continue;const o=Ov(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 Do(e){return $.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return $.isEmbedMedia(e)?a.jsx($.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}):Do(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 $.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Do(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 Bv({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:h,onPrev:v,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),H=s.useRef(new Map),[q,B]=s.useState(0),M=s.useRef(null),_=s.useRef(0),j=s.useRef(0),C=s.useRef("none"),L=s.useRef(!1),W=s.useRef(!1),A=s.useRef(!1),I=s.useRef(null),T=s.useRef(null),V=s.useRef(null),S=s.useRef(()=>{}),X=s.useRef(null),P=s.useRef(null),k=s.useRef(null),O=s.useRef(!1),[ie,ae]=s.useState(null),[D,se]=s.useState(ss),[R,de]=s.useState(0),[te,Se]=s.useState("opening"),[Ce,ve]=s.useState(0),[ue,Q]=s.useState(0),[re,fe]=s.useState(!1),[he,be]=s.useState(null),[Me,Ne]=s.useState(null),[we,ce]=s.useState(null),[g,Y]=s.useState(!1),[Z,ee]=s.useState(null),[ye,G]=s.useState(!1),N=s.useRef(!1),[K,ne]=s.useState(!1),[pe,U]=s.useState(!1),Pe=s.useRef(n),le=s.useRef(void 0),J=t[n],De=J?Do(J):!1,Xe=J?$.isEmbedMedia(J):!1,Ue=ue!==0||re,Je=!l&&(!r||!!c),et=d&&!l,Qe=u.length>1,it=s.useCallback((z,Re)=>t.length<=1?null:t[(z+Re+t.length)%t.length]??null,[t]),xe=Qe?ir(u,p,-1):it(n,-1),Ie=Qe?ir(u,p,1):it(n,1),We=he===-1&&Ue?Qe&&Me!==null?ir(u,Me,-1):we!==null?it(we,-1):null:null,qe=he===1&&Ue?Qe&&Me!==null?ir(u,Me,1):we!==null?it(we,1):null:null,je=We&&We.assetId!==(xe==null?void 0:xe.assetId)?We:null,ot=qe&&qe.assetId!==(Ie==null?void 0:Ie.assetId)?qe:null,nt=xe&&et?(()=>{const z=Qe?_c(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return z&&z.assetId!==xe.assetId?z:null})():null,Ee=Ie&&et?(()=>{const z=Qe?_c(u,p,1):t.length>2?it((n+1)%t.length,1):null;return z&&z.assetId!==Ie.assetId?z:null})():null,Be=je??nt,tt=ot??Ee,_e=s.useCallback((z,Re,Ae)=>{if(!z||!Re||!Ae)return;const Oe=H.current,vt=Oe.get(z);(vt==null?void 0:vt.width)===Re&&(vt==null?void 0:vt.height)===Ae||(Oe.set(z,{width:Re,height:Ae}),B(Gt=>Gt+1))},[]),He=s.useCallback(z=>{if(!(z!=null&&z.assetId))return null;const Re=H.current.get(z.assetId);return Ev(f.current,Re)},[q,R]),xt=s.useCallback(()=>{if(!J)return;const z=He(J);if(z){ae(z);return}const Re=f.current;Re&&ae(Hc(Re))},[J,He]),rt=s.useCallback(z=>{if(Qe){const Re=u.length;Ne((p+z+Re)%Re),ce(null);return}t.length>1&&(ce((n+z+t.length)%t.length),Ne(null))},[Qe,u.length,p,t.length,n]),ze=s.useCallback(z=>{A.current=z,fe(z)},[]),Te=s.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),at=s.useCallback(()=>{Te(),I.current=window.setTimeout(()=>{Te(),ze(!1)},qo+32)},[Te,ze]),me=s.useCallback(()=>{const z=E.current;if(!z){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Re=z.getBoundingClientRect();se({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),Fe=s.useCallback((z,Re)=>{if(Ue){if(K&&!re)return`translate(${ue}px, 0px)`;if(re&&he!==null){const Ae=He(z);if(!Ae)return;const{x:Oe,y:vt}=_v(Ae,Re,he,D);return`translate(${Oe}px, ${vt}px)`}if(re)return"translate(0px, 0px)"}},[Ue,K,re,ue,he,D,He]),Ze=s.useCallback(()=>{const z=T.current;T.current=null,Te(),ze(!1),be(null),Ne(null),ce(null),Q(0),ne(!1),L.current=!1,j.current=0,C.current="none",z===-1?v():z===1&&b()},[Te,ze,v,b]),dt=s.useCallback(()=>{Te(),I.current=window.setTimeout(()=>{T.current!==null&&Ze()},qo+32)},[Te,Ze]),Ve=s.useCallback(()=>{Te(),T.current=null,ze(!1),be(null),Ne(null),ce(null),Q(0),ne(!1),L.current=!1,j.current=0,C.current="none"},[Te,ze]),Lt=s.useCallback(z=>{if(!(!et||!ie)){if(A.current){if(T.current===z){V.current=z,Ze();return}Ve()}Te(),rt(z),T.current=z,be(z),ze(!0),dt()}},[et,ie,Ze,Ve,Te,rt,ze,dt]);S.current=Lt;const ht=s.useCallback(()=>{X.current=null,O.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),kt=s.useCallback(z=>{P.current!==null&&window.clearInterval(P.current);const Re=O.current?Tv:Cv;P.current=window.setInterval(()=>{S.current(z)},Re)},[]),Ot=s.useCallback(z=>{X.current!==z&&(ht(),X.current=z,O.current=!1,S.current(z),kt(z),k.current=window.setTimeout(()=>{k.current=null,X.current===z&&(O.current=!0,kt(z))},$v))},[ht,kt]),It=s.useCallback(()=>{const z=f.current;if(!z)return;const Re=J==null?void 0:J.assetId,Ae=Re?H.current.get(Re):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){ae(Xs(z,Ae.width,Ae.height));return}const Oe=w.current;if(Oe&&Re&&(Oe.src===Re||Oe.currentSrc===Re)){const{width:Gt,height:lt}=Rv(Oe);if(Gt&&lt){_e(Re,Gt,lt),ae(Xs(z,Gt,lt));return}}const vt=Hc(z);!vt.width||!vt.height||ae(vt)},[J==null?void 0:J.assetId,_e]),Yt=s.useCallback(z=>{if(w.current=z,!!z){if(z instanceof HTMLVideoElement){z.readyState>=1&&z.videoWidth>0&&It();return}z.complete&&z.naturalWidth>0&&It()}},[It]),jt=s.useCallback(()=>{me(),It(),de(z=>z+1)},[me,It]);s.useEffect(()=>{jt();const z=f.current,Re=E.current,Ae=new ResizeObserver(()=>jt());return z&&Ae.observe(z),Re&&Ae.observe(Re),window.addEventListener("resize",jt),()=>{Ae.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const z=w.current;if(z){if(z instanceof HTMLImageElement&&z.complete&&z.naturalWidth>0){It();return}z instanceof HTMLVideoElement&&z.readyState>=1&&z.videoWidth>0&&It()}},[J==null?void 0:J.assetId,n,It]),s.useEffect(()=>{xt()},[xt,q]),s.useEffect(()=>{const z=new Set,Re=[],Ae=Oe=>{!(Oe!=null&&Oe.assetId)||z.has(Oe.assetId)||(z.add(Oe.assetId),Re.push(Oe))};t.forEach(Ae),u.forEach(Oe=>Oe.items.forEach(Ae)),Re.forEach(Oe=>{H.current.has(Oe.assetId)||kv(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!ie)return;if(!x){Se("open");return}Y(!1);const z=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),Se("open")})});return()=>cancelAnimationFrame(z)},[te,ie,x]),s.useEffect(()=>{if(te!=="closing")return;const z=setTimeout(()=>h(),Wn);return()=>clearTimeout(z)},[te,h]),s.useEffect(()=>()=>{Te()},[Te]),s.useLayoutEffect(()=>{Pe.current===n&&le.current===(J==null?void 0:J.assetId)||(Te(),T.current=null,be(null),Ne(null),ce(null),ve(0),Q(0),ze(!1),U(!1),ne(!1),_.current=0,j.current=0,C.current="none",L.current=!1,M.current=null,W.current=!1,w.current=null,xt(),Pe.current=n,le.current=J==null?void 0:J.assetId)},[n,J==null?void 0:J.assetId,ze,Te,xt]),s.useLayoutEffect(()=>{const z=V.current;z!==null&&(V.current=null,requestAnimationFrame(()=>{S.current(z)}))},[n,p,J==null?void 0:J.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){N.current=!1,G(!1);return}if(te!=="open"||N.current)return;if(!xe&&!Ie){N.current=!0;return}G(!1);const z=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),N.current=!0})});return()=>cancelAnimationFrame(z)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const z=()=>{const lt=Rt=>{Rt.stopPropagation(),Rt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Re=lt=>{const Rt=lt<0?1:-1;Te(),rt(Rt),T.current=Rt,be(Rt),ze(!0),dt()},Ae=lt=>{if(Math.abs(lt)>wv&&et){Re(lt);return}T.current=null,be(null),Ne(null),ce(null),ze(!0),Q(0),at()},Oe=lt=>{if(lt.touches.length!==1||A.current)return;const Rt=lt.touches[0];W.current=!0,M.current={x:Rt.clientX,y:Rt.clientY},C.current="none",j.current=0,L.current=!1},vt=lt=>{if(!M.current||lt.touches.length!==1||A.current)return;const Rt=lt.touches[0],Dt=Rt.clientX-M.current.x,zt=Rt.clientY-M.current.y;if(C.current==="none"){if(Math.abs(Dt)<10&&Math.abs(zt)<10)return;if(Math.abs(Dt)>Math.abs(zt)){if(!et)return;C.current="horizontal"}else if(zt>0){if(!Je)return;C.current="vertical"}else return}if(C.current==="horizontal"){L.current=!0,ne(!0),j.current=Dt,Q(Dt),lt.preventDefault();return}C.current==="vertical"&&(L.current=!0,ne(!0),_.current=zt,ve(zt),lt.preventDefault())},Gt=()=>{if(!M.current)return;const lt=C.current,Rt=L.current;if(Rt&&lt==="horizontal")Ae(j.current),z();else if(Rt&&lt==="vertical"){const Dt=_.current;if(Je&&Dt>Sv){const zt=window.innerHeight;_.current=zt,U(!0),ve(zt),Se("closing")}else _.current=0,ve(0);z()}else lt==="horizontal"&&Math.abs(j.current)>0&&(Ae(j.current),z());M.current=null,C.current="none",j.current=0,L.current=!1,ne(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Gt),document.addEventListener("touchcancel",Gt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Gt),document.removeEventListener("touchcancel",Gt)}},[te,et,ze,at,Te,Je,dt,rt]);const Xt=s.useCallback(()=>{const z=(m==null?void 0:m())??x??null;z&&ie&&(ee(z),Y(!0)),Se("closing")},[m,x,ie]);s.useEffect(()=>{const z=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;ht(),Xt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!et)return;Oe.preventDefault();const vt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&X.current===vt||Ot(vt)},Re=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const vt=Oe.key==="ArrowLeft"?-1:1;X.current===vt&&ht()},Ae=()=>{ht()};return window.addEventListener("keydown",z),window.addEventListener("keyup",Re),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",z),window.removeEventListener("keyup",Re),window.removeEventListener("blur",Ae),ht()}},[te,r,c,Xt,et,Ot,ht]),s.useEffect(()=>{te!=="open"&&ht()},[te,ht]);const Qt=()=>{te==="closing"||l||Xt()},St=te==="open",Zt=te==="closing",ft=Ce>0?Math.max(0,1-Ce/500):1,wt=Ce>0?Math.max(.35,1-Ce/500):1,Le=s.useCallback(z=>{if(!(z.propertyName!=="transform"||!A.current)){if(T.current!==null){Ze();return}Te(),ze(!1)}},[Te,ze,Ze]),Ye=te==="closing"?Z??x:x,st=Ye&&ie&&(te==="opening"||Zt)?Iv(Ye,ie):void 0,Mt=Ue&&J?Fe(J,"center"):Ce>0?`translateY(${Ce}px)`:st,ut=ie?Br(ie,D):null,gt=!!(Ye&&ie),At=gt&&(te==="closing"||te==="open"&&g),Ht={position:"absolute",top:ut==null?void 0:ut.top,left:ut==null?void 0:ut.left,width:ut==null?void 0:ut.width,height:ut==null?void 0:ut.height,objectFit:"contain",transformOrigin:"top left",transform:Mt,opacity:Ce>0?wt:gt?1:te==="opening"||Zt?0:1,transition:K&&!re?"none":re?`transform ${qo}ms ${$n}`:pe?`transform ${Wn}ms ${$n}, opacity ${Wn}ms ${$n}`:At?`transform ${Wn}ms ${$n}`:te==="opening"||Zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:(De||Xe)&&St&&!Ue?"auto":"none",touchAction:(De||Xe)&&St?"none":void 0,zIndex:1,overflow:De||Xe?"hidden":void 0},mt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:St&&!Ue?"auto":"none"},Nt=(z,Re,Ae="adjacent")=>{const Oe=He(z);if(!Oe)return{display:"none"};const vt=Ae==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:Gt}=he!==null?op(Oe,vt,he,D):{start:Ae==="far"?wa(Oe,Re,D):Lo(Oe,Re,D)},lt=Br(Gt,D),Rt=Fe(z,vt),Dt=!Ue&&Ae==="adjacent"&&St&&!ye?Hv(Oe,Re,D):null,zt=Ae==="far"&&Ue&&he===(Re==="left"?-1:1),cn=K&&!re?!1:re,xn=Ae==="adjacent"&&St&&ye&&!Ue;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:Rt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Ae==="far"?St&&zt?1:0:St?1:0,transition:cn?Ae==="far"?`transform ${qo}ms ${$n}`:`transform ${qo}ms ${$n}, opacity ${Wn}ms ${$n}`:xn?`transform ${Wn}ms ${$n}`:te==="opening"||Zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Kt=(z,Re)=>{const Ae=He(z);return Ae?Nv(Lo(Ae,Re,D),Re,D):null},Ft=z=>Re=>{if(!l){if(W.current){W.current=!1;return}Re.stopPropagation(),Lt(z)}},_t=xe?Kt(xe,"left"):null,Vt=Ie?Kt(Ie,"right"):null,Ct=_t?Br(_t,D):null,bt=Vt?Br(Vt,D):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:Qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:St?ft:0,transition:K?"none":`opacity ${Wn}ms ${$n}`,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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:St?1:0,transition:K?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Qt})})]}),St&&Be&&a.jsx(jr,{media:Be,style:Nt(Be,"left","far"),onMeasure:_e,onTransitionEnd:Le},`far-prev-${Be.assetId}`),St&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:xe,style:Nt(xe,"left"),onMeasure:_e,onTransitionEnd:Le},`prev-${xe.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||K?"default":"pointer",pointerEvents:l||K?"none":"auto",zIndex:3},onClick:Ft(-1)})]}),St&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ie,style:Nt(Ie,"right"),onMeasure:_e,onTransitionEnd:Le},`next-${Ie.assetId}`),bt&&a.jsx("div",{style:{position:"absolute",top:bt.top,left:bt.left,width:bt.width,height:bt.height,cursor:l||K?"default":"pointer",pointerEvents:l||K?"none":"auto",zIndex:3},onClick:Ft(1)})]}),St&&tt&&a.jsx(jr,{media:tt,style:Nt(tt,"right","far"),onMeasure:_e,onTransitionEnd:Le},`far-next-${tt.assetId}`),ie&&J&&(Xe?a.jsx("div",{style:Ht,onTransitionEnd:Le,children:a.jsx($.EmbedMediaFrame,{media:J,mode:"player",fit:"contain",lazy:!1,interactive:St&&!Ue,style:mt})},`${n}-${J.assetId}`):De?a.jsx(zv,{src:J.assetId,phase:te,onMediaElement:Yt,wrapperStyle:Ht,videoStyle:mt,onLoadedMetadata:It,onTransitionEnd:Le},`${n}-${J.assetId}`):a.jsx("img",{ref:Yt,src:J.assetId,alt:J.name,onLoad:It,onTransitionEnd:Le,style:Ht},`${n}-${J.assetId}`))]})}function jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=$.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",h=(y==null?void 0:y.reversed)??!1,[v,b]=m.split(":").map(Number),w=`${h?b:v} / ${h?v:b}`,H=d.entryWidth??.2,q=d.columnsCount,B=$.scalingValue(H,n),M=$.scalingValue(d.horizontalGap??0,n),_=B,j=B,C={width:_,...x?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},L=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},W=s.useRef(null),[A,I]=s.useState(!1),[T,V]=s.useState([]),[S,X]=s.useState(0),[P,k]=s.useState(0),[O,ie]=s.useState(null),[ae,D]=s.useState({title1:"",title2:"",title3:""}),se=(()=>{const we={},ce=W.current?getComputedStyle(W.current).getPropertyValue("--cntrl-article-width").trim():"";return ce&&(we["--cntrl-article-width"]=ce),we})(),R=!n||i||o,de=s.useMemo(()=>bv(c),[c]),te=t??[],Se=te.length%q||q,Ce=Se<q&&te.length>0,ve=te.length-Se,ue=Ce?Math.floor((q-Se)/2)+1:1,Q=s.useMemo(()=>Pv(te),[te]),re=s.useMemo(()=>Av(te),[te]),fe=(we,ce,g)=>{if(n&&!o&&!i)return;const Y=Q.findIndex(ee=>ee.gridIndex===we);if(Y<0)return;const Z=Q[Y];k(Y),V(Z.items),X(ce),D(Z.entry),ie(g??null),I(!0)},he=s.useCallback(()=>{I(!1),ie(null)},[]),be=s.useCallback(()=>{const we=Q[P];return!we||!W.current?O:Lv(W.current,we.gridIndex,x?"cover":"contain")??O},[Q,P,O,x]),Me=s.useCallback(we=>{if(Q.length>1){const ce=Q.length,g=(P+we+ce)%ce,Y=Q[g],Z=Math.min(S,Y.items.length-1);k(g),V(Y.items),X(Z),D(Y.entry);return}X(ce=>(ce+we+T.length)%T.length)},[Q,P,S,T.length]),Ne=Q.length>1||T.length>1;return s.useEffect(()=>{if(!A||typeof document>"u")return;const we=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=we}},[A]),s.useEffect(()=>{!n||o||i||I(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:de}}),a.jsx(Fv,{mediaList:re}),a.jsx("div",{ref:W,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${q}, ${B})`,rowGap:0,columnGap:M,width:$.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:$.scalingValue(u??0,n)},children:te.map((we,ce)=>{const g=Hl(we.gallery),Y=Wl(g),Z=Y.filter(ne=>ne.lightboxMedia).map(ne=>ne.lightboxMedia),ee=Math.floor(ce/q)===Math.ceil(te.length/q)-1,ye=Ce&&ce>=ve?`${ue+(ce-ve)}`:void 0,G=Y[0],N=G!=null&&G.lightboxMedia?Z.findIndex(ne=>ne.assetId===G.lightboxMedia.assetId):-1,K=a.jsx("div",{className:`${c}-item-image-wrapper`,style:C,children:Y.length>0&&a.jsx(Dv,{media:G.displayMedia,gridIndex:ce,className:`${c}-item-${Do(G.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:R&&N>=0?ne=>fe(ce,N,np(ne.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`,ee?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:j}})}),a.jsx("a",{className:`${c}-item-image-link`,children:K}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:j}})})]})},ce)})}),A&&typeof document<"u"&&(()=>{const we=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(Bv,{prefix:c,items:T,index:S,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Ne,lightboxEntries:Q,entryIdx:P,layoutId:r,sourceRect:O,resolveCloseSourceRect:be,onClose:he,onPrev:()=>Me(-1),onNext:()=>Me(1)})}),we)})()]})}const Vv=`import { CommonComponentProps } from '../props';
7704
+ `}const Nc={assetId:"",name:"",objectFit:"cover"},On=500,Uo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",Lv=72,Pv=50,Mv=1e4,Rv=650,Ev=500;function kv(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 lp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(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 Av(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?lp(i,n):null}function Fv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(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 _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Nv=.03;function cp(e){return e.width*Nv}const ss={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 Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function _v(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(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 Hv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Wv(e,t){if(w.isEmbedMedia(e)){t(e.assetId,w.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 Ov(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(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 Dv({mediaList:e}){const t=e.filter(n=>!w.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=cp(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 wa(e,t,n){const i=Mo(e,t,n);return{...i,left:2*i.left-e.left}}function zv(e,t,n){const{left:i,width:o}=n,r=cp(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 dp(e,t,n,i){const o=Mo(e,"left",i),r=Mo(e,"right",i),l=wa(e,"left",i),c=wa(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 Bv(e,t,n,i){const{start:o,end:r}=dp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function jv(e,t,n){const i=Mo(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function up(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 Hl(e){if(!e)return;if(up(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??Nc,i??o??Nc]}]}function Vv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Gv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(up(e)){const t=[];for(const n of e){const i=Vv(n);if(!i)continue;const o=Gv(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 w.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Xv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return w.isEmbedMedia(e)?a.jsx(w.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 qv({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 w.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 Uv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:m,onClose:h,onPrev:b,onNext:S}){const R=s.useRef(null),y=s.useRef(null),C=s.useRef(null),E=s.useRef(new Map),[G,H]=s.useState(0),O=s.useRef(null),F=s.useRef(0),D=s.useRef(0),I=s.useRef("none"),L=s.useRef(!1),z=s.useRef(!1),k=s.useRef(!1),$=s.useRef(null),P=s.useRef(null),q=s.useRef(null),_=s.useRef(()=>{}),K=s.useRef(null),M=s.useRef(null),f=s.useRef(null),X=s.useRef(!1),[oe,ue]=s.useState(null),[N,se]=s.useState(ss),[T,me]=s.useState(0),[J,we]=s.useState("opening"),[Le,he]=s.useState(0),[fe,ie]=s.useState(0),[re,ae]=s.useState(!1),[pe,be]=s.useState(null),[ke,Fe]=s.useState(null),[xe,le]=s.useState(null),[g,V]=s.useState(!1),[Y,te]=s.useState(null),[ge,ee]=s.useState(!1),B=s.useRef(!1),[Z,U]=s.useState(!1),[de,j]=s.useState(!1),Pe=s.useRef(n),ne=s.useRef(void 0),Q=t[n],_e=Q?Bo(Q):!1,Ge=Q?w.isEmbedMedia(Q):!1,Be=fe!==0||re,qe=!l&&(!r||!!c),Ye=d&&!l,nt=u.length>1,it=s.useCallback((W,Re)=>t.length<=1?null:t[(W+Re+t.length)%t.length]??null,[t]),ve=nt?ir(u,p,-1):it(n,-1),Te=nt?ir(u,p,1):it(n,1),We=pe===-1&&Be?nt&&ke!==null?ir(u,ke,-1):xe!==null?it(xe,-1):null:null,Ke=pe===1&&Be?nt&&ke!==null?ir(u,ke,1):xe!==null?it(xe,1):null:null,Ze=We&&We.assetId!==(ve==null?void 0:ve.assetId)?We:null,lt=Ke&&Ke.assetId!==(Te==null?void 0:Te.assetId)?Ke:null,ot=ve&&Ye?(()=>{const W=nt?_c(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return W&&W.assetId!==ve.assetId?W:null})():null,Me=Te&&Ye?(()=>{const W=nt?_c(u,p,1):t.length>2?it((n+1)%t.length,1):null;return W&&W.assetId!==Te.assetId?W:null})():null,ze=Ze??ot,et=lt??Me,Oe=s.useCallback((W,Re,Ae)=>{if(!W||!Re||!Ae)return;const De=E.current,ft=De.get(W);(ft==null?void 0:ft.width)===Re&&(ft==null?void 0:ft.height)===Ae||(De.set(W,{width:Re,height:Ae}),H(Ut=>Ut+1))},[]),Ne=s.useCallback(W=>{if(!(W!=null&&W.assetId))return null;const Re=E.current.get(W.assetId);return Hv(y.current,Re)},[G,T]),yt=s.useCallback(()=>{if(!Q)return;const W=Ne(Q);if(W){ue(W);return}const Re=y.current;Re&&ue(Hc(Re))},[Q,Ne]),je=s.useCallback(W=>{if(nt){const Re=u.length;Fe((p+W+Re)%Re),le(null);return}t.length>1&&(le((n+W+t.length)%t.length),Fe(null))},[nt,u.length,p,t.length,n]),He=s.useCallback(W=>{k.current=W,ae(W)},[]),Ce=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),tt=s.useCallback(()=>{Ce(),$.current=window.setTimeout(()=>{Ce(),He(!1)},Uo+32)},[Ce,He]),Qe=s.useCallback(()=>{const W=R.current;if(!W){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Re=W.getBoundingClientRect();se({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),St=s.useCallback((W,Re)=>{if(Be){if(Z&&!re)return`translate(${fe}px, 0px)`;if(re&&pe!==null){const Ae=Ne(W);if(!Ae)return;const{x:De,y:ft}=Bv(Ae,Re,pe,N);return`translate(${De}px, ${ft}px)`}if(re)return"translate(0px, 0px)"}},[Be,Z,re,fe,pe,N,Ne]),Ct=s.useCallback(()=>{const W=P.current;P.current=null,Ce(),He(!1),be(null),Fe(null),le(null),ie(0),U(!1),L.current=!1,D.current=0,I.current="none",W===-1?b():W===1&&S()},[Ce,He,b,S]),Wt=s.useCallback(()=>{Ce(),$.current=window.setTimeout(()=>{P.current!==null&&Ct()},Uo+32)},[Ce,Ct]),ht=s.useCallback(()=>{Ce(),P.current=null,He(!1),be(null),Fe(null),le(null),ie(0),U(!1),L.current=!1,D.current=0,I.current="none"},[Ce,He]),Xt=s.useCallback(W=>{if(!(!Ye||!oe)){if(k.current){if(P.current===W){q.current=W,Ct();return}ht()}Ce(),je(W),P.current=W,be(W),He(!0),Wt()}},[Ye,oe,Ct,ht,Ce,je,He,Wt]);_.current=Xt;const wt=s.useCallback(()=>{K.current=null,X.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Vt=s.useCallback(W=>{M.current!==null&&window.clearInterval(M.current);const Re=X.current?Ev:Rv;M.current=window.setInterval(()=>{_.current(W)},Re)},[]),Yt=s.useCallback(W=>{K.current!==W&&(wt(),K.current=W,X.current=!1,_.current(W),Vt(W),f.current=window.setTimeout(()=>{f.current=null,K.current===W&&(X.current=!0,Vt(W))},Mv))},[wt,Vt]),$e=s.useCallback(()=>{const W=y.current;if(!W)return;const Re=Q==null?void 0:Q.assetId,Ae=Re?E.current.get(Re):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){ue(Gs(W,Ae.width,Ae.height));return}const De=C.current;if(De&&Re&&(De.src===Re||De.currentSrc===Re)){const{width:Ut,height:at}=_v(De);if(Ut&&at){Oe(Re,Ut,at),ue(Gs(W,Ut,at));return}}const ft=Hc(W);!ft.width||!ft.height||ue(ft)},[Q==null?void 0:Q.assetId,Oe]),Xe=s.useCallback(W=>{if(C.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&$e();return}W.complete&&W.naturalWidth>0&&$e()}},[$e]),ut=s.useCallback(()=>{Qe(),$e(),me(W=>W+1)},[Qe,$e]);s.useEffect(()=>{ut();const W=y.current,Re=R.current,Ae=new ResizeObserver(()=>ut());return W&&Ae.observe(W),Re&&Ae.observe(Re),window.addEventListener("resize",ut),()=>{Ae.disconnect(),window.removeEventListener("resize",ut)}},[ut,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const W=C.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){$e();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{yt()},[yt,G]),s.useEffect(()=>{const W=new Set,Re=[],Ae=De=>{!(De!=null&&De.assetId)||W.has(De.assetId)||(W.add(De.assetId),Re.push(De))};t.forEach(Ae),u.forEach(De=>De.items.forEach(Ae)),Re.forEach(De=>{E.current.has(De.assetId)||Wv(De,Oe)})},[t,u,Oe]),s.useEffect(()=>{if(J!=="opening"||!oe)return;if(!x){we("open");return}V(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{V(!0),we("open")})});return()=>cancelAnimationFrame(W)},[J,oe,x]),s.useEffect(()=>{if(J!=="closing")return;const W=setTimeout(()=>h(),On);return()=>clearTimeout(W)},[J,h]),s.useEffect(()=>()=>{Ce()},[Ce]),s.useLayoutEffect(()=>{Pe.current===n&&ne.current===(Q==null?void 0:Q.assetId)||(Ce(),P.current=null,be(null),Fe(null),le(null),he(0),ie(0),He(!1),j(!1),U(!1),F.current=0,D.current=0,I.current="none",L.current=!1,O.current=null,z.current=!1,C.current=null,yt(),Pe.current=n,ne.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,He,Ce,yt]),s.useLayoutEffect(()=>{const W=q.current;W!==null&&(q.current=null,requestAnimationFrame(()=>{_.current(W)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){B.current=!1,ee(!1);return}if(J!=="open"||B.current)return;if(!ve&&!Te){B.current=!0;return}ee(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ee(!0),B.current=!0})});return()=>cancelAnimationFrame(W)},[J,ve==null?void 0:ve.assetId,Te==null?void 0:Te.assetId]),s.useEffect(()=>{if(J!=="open")return;const W=()=>{const at=Et=>{Et.stopPropagation(),Et.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Re=at=>{const Et=at<0?1:-1;Ce(),je(Et),P.current=Et,be(Et),He(!0),Wt()},Ae=at=>{if(Math.abs(at)>Pv&&Ye){Re(at);return}P.current=null,be(null),Fe(null),le(null),He(!0),ie(0),tt()},De=at=>{if(at.touches.length!==1||k.current)return;const Et=at.touches[0];z.current=!0,O.current={x:Et.clientX,y:Et.clientY},I.current="none",D.current=0,L.current=!1},ft=at=>{if(!O.current||at.touches.length!==1||k.current)return;const Et=at.touches[0],It=Et.clientX-O.current.x,_t=Et.clientY-O.current.y;if(I.current==="none"){if(Math.abs(It)<10&&Math.abs(_t)<10)return;if(Math.abs(It)>Math.abs(_t)){if(!Ye)return;I.current="horizontal"}else if(_t>0){if(!qe)return;I.current="vertical"}else return}if(I.current==="horizontal"){L.current=!0,U(!0),D.current=It,ie(It),at.preventDefault();return}I.current==="vertical"&&(L.current=!0,U(!0),F.current=_t,he(_t),at.preventDefault())},Ut=()=>{if(!O.current)return;const at=I.current,Et=L.current;if(Et&&at==="horizontal")Ae(D.current),W();else if(Et&&at==="vertical"){const It=F.current;if(qe&&It>Lv){const _t=window.innerHeight;F.current=_t,j(!0),he(_t),we("closing")}else F.current=0,he(0);W()}else at==="horizontal"&&Math.abs(D.current)>0&&(Ae(D.current),W());O.current=null,I.current="none",D.current=0,L.current=!1,U(!1)};return document.addEventListener("touchstart",De,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ut),document.addEventListener("touchcancel",Ut),()=>{document.removeEventListener("touchstart",De),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ut),document.removeEventListener("touchcancel",Ut)}},[J,Ye,He,tt,Ce,qe,Wt,je]);const $t=s.useCallback(()=>{const W=(m==null?void 0:m())??x??null;W&&oe&&(te(W),V(!0)),we("closing")},[m,x,oe]);s.useEffect(()=>{const W=De=>{if(De.key==="Escape"){if(r&&c||J==="closing")return;wt(),$t();return}if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight"||J!=="open"||!Ye)return;De.preventDefault();const ft=De.key==="ArrowLeft"?-1:1;De.repeat&&K.current===ft||Yt(ft)},Re=De=>{if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight")return;const ft=De.key==="ArrowLeft"?-1:1;K.current===ft&&wt()},Ae=()=>{wt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Re),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Re),window.removeEventListener("blur",Ae),wt()}},[J,r,c,$t,Ye,Yt,wt]),s.useEffect(()=>{J!=="open"&&wt()},[J,wt]);const bt=()=>{J==="closing"||l||$t()},ct=J==="open",Ht=J==="closing",mt=Le>0?Math.max(0,1-Le/500):1,Tt=Le>0?Math.max(.35,1-Le/500):1,Ie=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!k.current)){if(P.current!==null){Ct();return}Ce(),He(!1)}},[Ce,He,Ct]),Je=J==="closing"?Y??x:x,rt=Je&&oe&&(J==="opening"||Ht)?kv(Je,oe):void 0,Mt=Be&&Q?St(Q,"center"):Le>0?`translateY(${Le}px)`:rt,gt=oe?Br(oe,N):null,xt=!!(Je&&oe),Ft=xt&&(J==="closing"||J==="open"&&g),Ot={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:Mt,opacity:Le>0?Tt:xt?1:J==="opening"||Ht?0:1,transition:Z&&!re?"none":re?`transform ${Uo}ms ${Cn}`:de?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:Ft?`transform ${On}ms ${Cn}`:J==="opening"||Ht?`opacity ${On}ms ${Cn}`:"none",pointerEvents:(_e||Ge)&&ct&&!Be?"auto":"none",touchAction:(_e||Ge)&&ct?"none":void 0,zIndex:1,overflow:_e||Ge?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ct&&!Be?"auto":"none"},Dt=(W,Re,Ae="adjacent")=>{const De=Ne(W);if(!De)return{display:"none"};const ft=Ae==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:Ut}=pe!==null?dp(De,ft,pe,N):{start:Ae==="far"?wa(De,Re,N):Mo(De,Re,N)},at=Br(Ut,N),Et=St(W,ft),It=!Be&&Ae==="adjacent"&&ct&&!ge?jv(De,Re,N):null,_t=Ae==="far"&&Be&&pe===(Re==="left"?-1:1),on=Z&&!re?!1:re,fn=Ae==="adjacent"&&ct&&ge&&!Be;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Et??(It?`translate(${It.x}px, ${It.y}px)`:void 0),opacity:Ae==="far"?ct&&_t?1:0:ct?1:0,transition:on?Ae==="far"?`transform ${Uo}ms ${Cn}`:`transform ${Uo}ms ${Cn}, opacity ${On}ms ${Cn}`:fn?`transform ${On}ms ${Cn}`:J==="opening"||Ht?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},qt=(W,Re)=>{const Ae=Ne(W);return Ae?zv(Mo(Ae,Re,N),Re,N):null},Nt=W=>Re=>{if(!l){if(z.current){z.current=!1;return}Re.stopPropagation(),Xt(W)}},zt=ve?qt(ve,"left"):null,jt=Te?qt(Te,"right"):null,Bt=zt?Br(zt,N):null,Rt=jt?Br(jt,N):null;return a.jsxs("div",{ref:R,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:bt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ct?mt:0,transition:Z?"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:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:ct?1:0,transition:Z?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:bt})})]}),ct&&ze&&a.jsx(jr,{media:ze,style:Dt(ze,"left","far"),onMeasure:Oe,onTransitionEnd:Ie},`far-prev-${ze.assetId}`),ct&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ve,style:Dt(ve,"left"),onMeasure:Oe,onTransitionEnd:Ie},`prev-${ve.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||Z?"default":"pointer",pointerEvents:l||Z?"none":"auto",zIndex:3},onClick:Nt(-1)})]}),ct&&Te&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Te,style:Dt(Te,"right"),onMeasure:Oe,onTransitionEnd:Ie},`next-${Te.assetId}`),Rt&&a.jsx("div",{style:{position:"absolute",top:Rt.top,left:Rt.left,width:Rt.width,height:Rt.height,cursor:l||Z?"default":"pointer",pointerEvents:l||Z?"none":"auto",zIndex:3},onClick:Nt(1)})]}),ct&&et&&a.jsx(jr,{media:et,style:Dt(et,"right","far"),onMeasure:Oe,onTransitionEnd:Ie},`far-next-${et.assetId}`),oe&&Q&&(Ge?a.jsx("div",{style:Ot,onTransitionEnd:Ie,children:a.jsx(w.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:ct&&!Be,style:pt})},`${n}-${Q.assetId}`):_e?a.jsx(qv,{src:Q.assetId,phase:J,onMediaElement:Xe,wrapperStyle:Ot,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ie},`${n}-${Q.assetId}`):a.jsx("img",{ref:Xe,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ie,style:Ot},`${n}-${Q.assetId}`))]})}function Kv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=w.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:v}=e,x=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[b,S]=m.split(":").map(Number),C=`${h?S:b} / ${h?b:S}`,E=d.entryWidth??.2,G=d.columnsCount,H=w.scalingValue(E,n),O=w.scalingValue(d.horizontalGap??0,n),F=H,D=H,I={width:F,...x?{aspectRatio:C,height:"auto",overflow:"hidden"}:{height:"auto"}},L=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},z=s.useRef(null),[k,$]=s.useState(!1),[P,q]=s.useState([]),[_,K]=s.useState(0),[M,f]=s.useState(0),[X,oe]=s.useState(null),[ue,N]=s.useState({title1:"",title2:"",title3:""}),se=(()=>{const xe={},le=z.current?getComputedStyle(z.current).getPropertyValue("--cntrl-article-width").trim():"";return le&&(xe["--cntrl-article-width"]=le),xe})(),T=!n||i||o,me=s.useMemo(()=>Iv(c),[c]),J=t??[],we=J.length%G||G,Le=we<G&&J.length>0,he=J.length-we,fe=Le?Math.floor((G-we)/2)+1:1,ie=s.useMemo(()=>Fv(J),[J]),re=s.useMemo(()=>Ov(J),[J]),ae=(xe,le,g)=>{if(n&&!o&&!i)return;const V=ie.findIndex(te=>te.gridIndex===xe);if(V<0)return;const Y=ie[V];f(V),q(Y.items),K(le),N(Y.entry),oe(g??null),$(!0)},pe=s.useCallback(()=>{$(!1),oe(null)},[]),be=s.useCallback(()=>{const xe=ie[M];return!xe||!z.current?X:Av(z.current,xe.gridIndex,x?"cover":"contain")??X},[ie,M,X,x]),ke=s.useCallback(xe=>{if(ie.length>1){const le=ie.length,g=(M+xe+le)%le,V=ie[g],Y=Math.min(_,V.items.length-1);f(g),q(V.items),K(Y),N(V.entry);return}K(le=>(le+xe+P.length)%P.length)},[ie,M,_,P.length]),Fe=ie.length>1||P.length>1;return s.useEffect(()=>{if(!k||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[k]),s.useEffect(()=>{!n||o||i||$(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:me}}),a.jsx(Dv,{mediaList:re}),a.jsx("div",{ref:z,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${G}, ${H})`,rowGap:0,columnGap:O,width:w.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:w.scalingValue(u??0,n)},children:J.map((xe,le)=>{const g=Hl(xe.gallery),V=Wl(g),Y=V.filter(U=>U.lightboxMedia).map(U=>U.lightboxMedia),te=Math.floor(le/G)===Math.ceil(J.length/G)-1,ge=Le&&le>=he?`${fe+(le-he)}`:void 0,ee=V[0],B=ee!=null&&ee.lightboxMedia?Y.findIndex(U=>U.assetId===ee.lightboxMedia.assetId):-1,Z=a.jsx("div",{className:`${c}-item-image-wrapper`,style:I,children:V.length>0&&a.jsx(Xv,{media:ee.displayMedia,gridIndex:le,className:`${c}-item-${Bo(ee.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:T&&B>=0?U=>ae(le,B,lp(U.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`,te?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:H,...ge?{gridColumn:ge}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:D}})}),a.jsx("a",{className:`${c}-item-image-link`,children:Z}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:D}})})]})},le)})}),k&&typeof document<"u"&&(()=>{const xe=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:se,"data-selection":"none",children:a.jsx(Uv,{prefix:c,items:P,index:_,entry:ue,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:Fe,lightboxEntries:ie,entryIdx:M,layoutId:r,sourceRect:X,resolveCloseSourceRect:be,onClose:pe,onPrev:()=>ke(-1),onNext:()=>ke(1)})}),xe)})()]})}const Yv=`import { CommonComponentProps } from '../props';
7705
7705
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, scalingValue, useScopedStyles } from '../utils/index';
7706
7706
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7707
7707
  import { createPortal } from 'react-dom';
@@ -10088,7 +10088,7 @@ export function Hive({
10088
10088
  </>
10089
10089
  );
10090
10090
  }
10091
- `,Gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Fi={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 Xv(e){const t={};return t[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Po=Li.filter(e=>e!=="count"),Uv=Po.reduce((e,t)=>({...e,...Xv(t)}),{}),qv=Po.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Arial",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Po.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const Kv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Po.map(e=>[Nl[e],_l(e)]))},Yv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Qv=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],Zv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Yv,gallery:[{media:[{assetId:Qv[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),Jv={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:Zv},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"}},...Uv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Gv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...qv},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,...ls({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,...ls({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,...ls({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:[Kv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},e0={element:jv,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:[...Po.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{...Po.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})},schema:Jv,sourceCode:Vv};function t0(e){if($.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 n0({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($.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 cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function i0(e){return String(e??"").trim().length>0}function Wc(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 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,n,i,o,r,l){const c=$.scalingValue(r,l),d=$.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function o0(e,t,n){const i=$.scalingValue(t,n),o=$.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const zc=10,Bc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function r0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function a0(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+zc,y:n.clientY+zc};switch(e){case"left":return{x:o.left+Bc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Bc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function s0(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=ds(m.x,m.targetX,Ko.positionEase),m.y=ds(m.y,m.targetY,Ko.positionEase),m.rotation=ds(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,v=Math.abs(m.rotation-m.targetRotation)<.08;!h||!v?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 v=i.current;v.targetX=m,v.targetY=h,v.targetRotation=0,v.x=m,v.y=h,v.rotation=0,v.lastX=m,v.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const v=i.current;if(t&&v.hasLastX){const b=m-v.lastX;v.targetRotation=r0(b*Ko.rotationFactor,-20,Ko.maxRotation)}else v.targetRotation=0;if(v.lastX=m,v.hasLastX=!0,v.targetX=m,v.targetY=h,t){d();return}v.x=m,v.y=h,v.rotation=v.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 l0(e){return`
10091
+ `,Qv="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 Zv(e){const t={};return t[vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Ri.filter(e=>e!=="count"),Jv=Ro.reduce((e,t)=>({...e,...Zv(t)}),{}),e0=Ro.reduce((e,t)=>({...e,[vt(t,"fontFamily")]:"Arial",[vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[vt(t,"letterSpacing")]:0,[vt(t,"wordSpacing")]:0,[vt(t,"textAlign")]:"left",[vt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[vt(n,"fontSize")]=i),o!==void 0&&(t[vt(n,"lineHeight")]=o),t},{})}const t0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[Nl[e],_l(e)]))},n0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},i0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],o0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...n0,gallery:[{media:[{assetId:i0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),r0={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:o0},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"}},...Jv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Qv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...e0},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,...ls({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,...ls({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,...ls({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:[t0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},a0={element:Kv,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:[...Ro.map(e=>({path:`${vt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${vt(t,"fontFamily")}`}),{})},schema:r0,sourceCode:Yv};function s0(e){if(w.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 l0({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(w.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 cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function c0(e){return String(e??"").trim().length>0}function Wc(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 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,n,i,o,r,l){const c=w.scalingValue(r,l),d=w.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function d0(e,t,n){const i=w.scalingValue(t,n),o=w.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const zc=10,Bc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function u0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function p0(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+zc,y:n.clientY+zc};switch(e){case"left":return{x:o.left+Bc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Bc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function m0(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=ds(m.x,m.targetX,Ko.positionEase),m.y=ds(m.y,m.targetY,Ko.positionEase),m.rotation=ds(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,b=Math.abs(m.rotation-m.targetRotation)<.08;!h||!b?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 b=i.current;b.targetX=m,b.targetY=h,b.targetRotation=0,b.x=m,b.y=h,b.rotation=0,b.lastX=m,b.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const b=i.current;if(t&&b.hasLastX){const S=m-b.lastX;b.targetRotation=u0(S*Ko.rotationFactor,-20,Ko.maxRotation)}else b.targetRotation=0;if(b.lastX=m,b.hasLastX=!0,b.targetX=m,b.targetY=h,t){d();return}b.x=m,b.y=h,b.rotation=b.targetRotation,r()},[e,r,t,d]),v=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:v,reset:x}}function g0(e){return`
10092
10092
  .${e}-wrapper {
10093
10093
  display: grid;
10094
10094
  align-items: start;
@@ -10464,7 +10464,7 @@ a.${e}-list-item {
10464
10464
  overflow-wrap: anywhere;
10465
10465
  word-break: break-word;
10466
10466
  }
10467
- `}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],ai="cutLabel",xr=[...Ol,ai],Ba=["A","B","C","D","E"];function ap(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ba.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function c0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function d0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ba.includes(n)?n:null}function sp(e,t,n){const i=d0(e);return i?i===t?!1:c0(n[ap(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ba.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function u0(e,t,n){if(lp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function p0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function lp(e,t,n){return sp(e,n,t)?br(e).kind==="baseline":!1}function m0(e){const t={};let n=!1;for(const i of Ba){const o=ap(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}sp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function g0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function h0(e){const t=br(e).kind;return t==="baseline"?"center":t}function f0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function y0(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 us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=y0(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 v0(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 x0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const b0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function qt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const S0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function w0(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 $0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[S0[e],w0(e)]))}}function $a(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===ai?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(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 un(nn(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:$.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ro=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Eo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],C0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},T0=["hover","focus","filled","success","error"],Uc=.004,co=.004,ps=co,zl=50,Sr=1440,wr=zl/Sr;function cp(e){const t=typeof e=="number"&&e>0?e:Sr;return zl/t}function I0(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 dp={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 L0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function P0(){return Object.fromEntries([...Mo.map(e=>[e,0]),...Ro.map(e=>[e,0])])}function M0(){return Object.fromEntries(Eo.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function up(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 ma(e,t,n){const i=Bl(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 R0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Mo[o],l=Ro[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=up(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Bl(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 E0(e,t,n){if(e<=1)return{};const i=Bl(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 qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function k0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function A0(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=Mo[d],y=Ro[d],x=Eo[d],m=Rn[l],h=Mo[l],v=Ro[l],b=Eo[l],E=n[u],f=n[p],w=n[y],H=n[x];typeof E=="number"&&(r[m]=E),typeof f=="number"&&(r[h]=f),typeof w=="number"&&(r[v]=w),typeof H=="number"&&(r[b]=H)}return r}function pp(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 F0(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,...L0(n,o),...P0()};if(r)for(const c of Eo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,M0());return pp(e,l)?l:e}function N0(e,t,n){const i=m0(e);i&&(e={...e,...i});const o=cp(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:Pi.length,y=w=>{if(u)return w;const H=Vr({...t,...w}),q=lr(w),B=ma(p,q,H),M=R0(p,B,{...t,...w});return Object.keys(M).length===0?w:{...w,...M}};if(typeof r=="number"&&r!==l)return e;const x=qc(e),m=qc(t);if(!k0(x,m))return y({...e,...A0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const w=Vr({...t,...e});return y({...e,...E0(p,c,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(c-o)/2);return w>H?{...e,textPaddingLR:H}:e}const h=Vr({...t,...e}),v=ma(p,d,Vr(t)),E=ma(p,c,h).some((w,H)=>w<(v[H]??w)),f=Rn.some(w=>{const H=e[w],q=t[w];return typeof H=="number"&&typeof q=="number"&&H!==q});return E||f?y(e):e}function _0(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 H0(e,t){return Math.random()*(t-e)+e}function W0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function ms(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function O0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Mo[c],u=Ro[c],p=Eo[c];return{key:l,textPrefix:b0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function D0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=$.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:m,entriesCount:h,cellMinHeight:v,dividerWidth:b,showVisibility:E,cut:f,showCut:w,cutCellMinHeight:H,cutLabel:q,imageSize:B,imageOnHover:M,imagePosition:_="cursor",imageInterpolation:j="on",entryHoverEffect:C,entryHoverShowOption:L,rowPaddingTop:W,rowPaddingBottom:A,rowPaddingTopB:I,columnsOrder:T,textPaddingLR:V,textColor:S,backgroundColor:X,dividerColor:P,textHoverColor:k,backgroundHoverColor:O,dividerHoverColor:ie}=e,[ae,D]=s.useState(void 0),[se,R]=s.useState(null),de=s.useRef(null),te=M==="on"&&(!n||i),Se=_==="cursor",Ce=Se&&j==="on",{anchorRef:ve,onShow:ue,onCursorMove:Q,exit:re}=s0(!!(te&&se!==null),Ce),fe=(f??0)>0,he=x==="b",be=s.useRef(null),Me=s.useRef(null),[Ne,we]=s.useState(null),[ce,g]=s.useState(Sr),Y=cp(ce),Z=Math.max(0,((m??0)-Y)/2),ee=Math.min(V??0,Z),ye=Math.max(ee,co),G=((m??0)+Y)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Le=()=>{g(I0(be.current))};Le();const Ye=be.current;if(!Ye)return;const st=new ResizeObserver(Le);st.observe(Ye);let Mt=Ye;for(;Mt&&!Mt.style.getPropertyValue("--cntrl-article-width");)Mt=Mt.parentElement;return Mt&&st.observe(Mt),()=>st.disconnect()},[n,l]),s.useEffect(()=>{D(void 0)},[f,w,t,h]),s.useEffect(()=>{n&&!i&&D(void 0)},[n,i]);const N=$.buildColorVars(u,{textColor:S,backgroundColor:X,dividerColor:P,textHoverColor:k,backgroundHoverColor:O,dividerHoverColor:ie},C0,T0),K=r&&r!=="default"?`${u}-state-${r}`:"",pe=`${!n||i?C==="default"?`${u}-entry-hover-default`:C==="blinds"?`${u}-entry-hover-blinds`:C==="reveal"?`${u}-entry-hover-reveal`:"":""} ${K}`.trim(),U=C==="reveal"&&(!n||i),Pe=(E==null?void 0:E[0])??!1,le=(E==null?void 0:E[1])??!1,J=s.useRef(e),De=s.useRef(l);s.useEffect(()=>{if(!d||!n){J.current=e,De.current=l;return}if(De.current!==l){J.current=e,De.current=l;return}const Le=J.current;if(!(Le!==e))return;if(typeof Le.columns=="number"&&typeof e.columns=="number"&&Le.columns!==e.columns){J.current=e;return}const st=N0(e,Le,{designWidth:ce});J.current=e,pp(e,st)&&d(st)},[e,d,n,l,ce]);const Xe=s.useMemo(()=>W0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Ue=s.useMemo(()=>ms(e,Mo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Je=s.useMemo(()=>ms(e,Ro),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),et=s.useMemo(()=>ms(e,Eo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Qe=s.useMemo(()=>Array.isArray(T)&&T.length>0?T:[...Pi],[T]),it=s.useMemo(()=>O0(Qe,y,Xe,Ue,Je,et),[Qe,y,Xe,Ue,Je,et]),xe=lr(e),Ie=s.useMemo(()=>Rn.slice(0,y).map(Le=>Xe[Le]),[y,Xe]),We=s.useMemo(()=>Bl(y,xe,Xe),[y,xe,Xe]),qe=s.useMemo(()=>ma(y,xe,Xe),[y,xe,Xe]),je=s.useMemo(()=>it.map((Le,Ye)=>up(qe[Ye]??0,Le.paddingLeft,Le.paddingRight)),[it,qe]),ot=s.useMemo(()=>{const Le=h===0?1/0:h;return(t??[]).slice(0,Le).map((st,Mt)=>({id:Mt,cells:Object.fromEntries(Pi.map(ut=>[ut,st[ut]??""])),image:st.image,link:st.link}))},[t,h]),nt=fe?ae??f:ot.length,Ee=s.useMemo(()=>fe?ot.slice(0,nt):ot,[ot,fe,nt]),Be=fe&&nt<ot.length,tt=Ee.length>1||Be,_e=[Pe?`${u}-divider-top`:"",le||tt?`${u}-divider-bottom`:""].filter(Boolean).join(" "),He=!n||i,xt=()=>{if(!He)return;const Le=ae??f;if(!w){D(ot.length);return}D(Math.min(Le+w,ot.length))},rt=Le=>$.scalingValue(Le,n??!1),ze=he?I??0:W??0,Te=A??0,at=v??0,me=Math.max(Te,ps),Fe=Dc(0,Ee.length,Pe,le,Be,b??0,n??!1).borderTopWidth,Ze=he?"rowPaddingTopB":"rowPaddingTop",dt=it[0],Ve=it[it.length-1],Lt=je[0],ht=je[je.length-1],kt=dt&&Lt?Math.max(Lt.paddingLeft,co):0,Ot=Ve&&ht?Math.max(ht.paddingRight,co):0,It=xe,Yt=(Le,Ye)=>a0(_,be.current,Se?Le:null,Ye),jt=(Le,Ye)=>{if(!te)return;const st=Le.image;if(!(st!=null&&st.assetId)){re(()=>R(null));return}const Mt=(B==null?void 0:B.min)??80,ut=(B==null?void 0:B.max)??320,gt=(se==null?void 0:se.rowId)===Le.id,At=gt?se.widthPx:H0(Mt,ut),{x:Ht,y:mt}=Yt(Ye,At);if(gt&&Se){Q(Ht,mt);return}R({rowId:Le.id,assetId:st.assetId,objectFit:"contain",isVideo:t0(st),embed:$.isEmbedMedia(st)?st:void 0,widthPx:At}),de.current={x:Ht,y:mt}},Xt=Le=>{if(!te||!se||!Se)return;const{x:Ye,y:st}=Yt(Le,se.widthPx);Q(Ye,st)},Qt=()=>{se&&re(()=>R(null))},St=Le=>{U&&Wc(Le,u),!(!te||!se)&&re(()=>R(null))},Zt=Le=>{U&&Oc(Le,u)};s.useLayoutEffect(()=>{if(!se||!de.current)return;const{x:Le,y:Ye}=de.current;de.current=null,ue(Le,Ye)},[se==null?void 0:se.rowId,se==null?void 0:se.assetId,ue]),s.useLayoutEffect(()=>{if(!p||he){we(null);return}const Le=Me.current,Ye=Le==null?void 0:Le.parentElement;if(!Le||!Ye){we(null);return}const st=()=>{const ut=Le.querySelector("[data-list-row]");if(!ut){we(null);return}const gt=Ye.getBoundingClientRect(),At=ut.getBoundingClientRect();we(At.top-gt.top+At.height/2)};st();const Mt=new ResizeObserver(st);return Mt.observe(Le),Mt.observe(Ye),()=>Mt.disconnect()},[p,he,Ee,ze,Te,at,t,e,it,qe,ce,b,Pe,le,Be]);const ft=s.useMemo(()=>!he&&Ol.some(Le=>{const Ye=Le.charAt(0),st=e[`${Le}VerticalAlign`];return lp(st,e,Ye)}),[he,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Ht;const Le=be.current;if(!Le)return;const Ye=()=>{Le.querySelectorAll("[data-list-col]").forEach(mt=>{mt.style.transform="";const Nt=mt.querySelector(`.${u}-list-col`);Nt&&(Nt.style.minHeight="",Nt.style.height="");const Kt=mt.querySelector(`.${u}-list-col-title`);Kt&&(Kt.style.transform="")})};if(he||!ft){Ye();return}const st=()=>{const mt=Array.from(Le.querySelectorAll("[data-list-row]")),Nt=`${u}-list-col`,Kt=`${u}-baseline-probe`;mt.forEach(Ft=>{Ft.querySelectorAll("[data-list-col]").forEach(_t=>{_t.style.transform="";const Vt=_t.querySelector(`.${Nt}`);Vt&&(Vt.style.minHeight="",Vt.style.height="");const Ct=_t.querySelector(`.${u}-list-col-title`);Ct&&(Ct.style.transform="")})}),mt.forEach(Ft=>{const _t=Array.from(Ft.querySelectorAll("[data-list-col]"));v0(Ft,_t,Nt)}),Le.offsetHeight,mt.forEach(Ft=>{const _t=Array.from(Ft.querySelectorAll("[data-list-col]")),Vt=Ft.getBoundingClientRect().top,Ct=new Map,bt=_t.map(Ae=>{const Oe=Ae.querySelector(`.${u}-list-col-title`),vt={el:Ae,titleEl:Oe,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return Ct.set(vt.letter,vt),vt}),z=new Map,Re=(Ae,Oe)=>{const vt=z.get(Ae.letter);if(vt!==void 0)return vt;const Gt=Ae.anchor?Ct.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!Gt||Oe.has(Ae.letter)){const cn=us(Ae,Vt,Nt,Kt);return z.set(Ae.letter,cn),cn}Oe.add(Ae.letter);const lt=Re(Gt,Oe);Oe.delete(Ae.letter);const Rt=us(Ae,Vt,Nt,Kt),Dt=lt-Rt;x0(Ae.titleEl,Dt);const zt=us(Ae,Vt,Nt,Kt);return z.set(Ae.letter,zt),zt};bt.forEach(Ae=>Re(Ae,new Set))})};let Mt=null;const ut=()=>{Mt===null&&(Mt=requestAnimationFrame(()=>{Mt=null,st()}))};st();const gt=new ResizeObserver(()=>ut());gt.observe(Le);let At=!1;return typeof document<"u"&&((Ht=document.fonts)!=null&&Ht.ready)&&document.fonts.ready.then(()=>{At||ut()}),()=>{At=!0,Mt!==null&&(cancelAnimationFrame(Mt),Mt=null),gt.disconnect(),Ye()}},[ft,he,e,t,ce,Ee,qe]);const wt=s.useMemo(()=>l0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:wt}}),a.jsx("div",{style:N,children:a.jsxs("div",{ref:be,className:`${u}-wrapper ${pe}${_e?` ${_e}`:""}${he?` ${u}-type-b`:""}`.trim(),style:{width:$.scalingValue(m??0,n)},onMouseMove:te?Xt:void 0,onMouseLeave:te?Qt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ee.map((Le,Ye)=>{var gt,At,Ht;const st=(((gt=Le.link)==null?void 0:gt.value.length)??0)>0,Mt=st&&(!n||i)?"a":"div",ut=Dc(Ye,Ee.length,Pe,le,Be,b??0,n??!1);return a.jsxs(Mt,{ref:Ye===0?mt=>{Me.current=mt}:void 0,className:`${u}-list-item${st||L==="always"?` ${u}-list-item-has-link`:""}${Be&&Ye===Ee.length-1?` ${u}-list-item-before-cut`:""}`,...st?{href:(At=Le.link)==null?void 0:At.value,target:((Ht=Le.link)==null?void 0:Ht.target)==="blank"?"_blank":"_self"}:{},style:ut,onMouseEnter:mt=>{U&&(st||L==="always")&&Wc(mt,u),te&&jt(Le,mt)},onMouseLeave:mt=>{U&&(st||L==="always")&&Oc(mt,u)},children:[ze>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:rt(ze)}}),a.jsxs("div",{className:`${u}-list-cols-row${he?"":` ${u}-list-cols-row-h`}${p&&Ye===0&&he?` ${u}-list-cols-row-controls`:""}`,...he?{}:{"data-list-row":""},style:he?void 0:{minHeight:rt(at)},children:[it.map((mt,Nt)=>{const Kt=Nt===it.length-1,Ft=je[Nt],_t=mt.paddingBottom,Vt=i0(Le.cells[mt.key]),Ct=he&&Vt&&_t>0,bt=he?{minHeight:rt(at)}:{width:rt(qe[Nt])},z=he?{paddingLeft:rt(ee),paddingRight:rt(ee)}:{paddingLeft:rt(Ft.paddingLeft),paddingRight:rt(Ft.paddingRight)},Re=mt.textPrefix.charAt(0),Ae=he?p0(e[`${mt.textPrefix}VerticalAlign`]):u0(e[`${mt.textPrefix}VerticalAlign`],e,Re),Oe=he&&Vt&&p&&Ye===0;return he&&!Vt?null:a.jsxs("div",{className:he?`${u}-list-col-wrap`:void 0,...he?{}:{"data-list-col":"","data-col-letter":Re,"data-valign":Ae.kind,...Ae.kind==="baseline"?{"data-valign-anchor":Ae.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Kt?` ${u}-list-col-last`:""}`,style:{...z,...bt,...he?{justifyContent:jc(Ae.kind)}:{}},"data-test":mt.width,children:a.jsx("span",{className:Gc(e,mt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,mt.textPrefix),n),...Xc(e,mt.textPrefix,u,n),...he?{}:g0(Ae.kind)},children:Le.cells[mt.key]??null})}),Ct&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:rt(_t)}}),Oe&&a.jsx("div",{"data-controls":mt.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:rt(Math.max(_t,ps))}})]},mt.key)}),p&&Ye===0&&he&&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(G),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:rt(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(G),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:rt(Math.max(ye,xe-ye)),width:rt(ye),height:"100%"}})]})]}),!he&&Te>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:rt(Te)}}),p&&Ye===0&&!he&&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:rt(me)}})]},Le.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ze,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":he?"center":"left-y",className:`${u}-control-anchor`,style:{top:Fe,left:0,width:"100%",height:rt(Math.max(ze,ps))}})},"row-padding-handles"),p&&!he&&dt&&Ve&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[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(qe[0]-((Lt==null?void 0:Lt.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:rt(kt),height:"100%"}}),a.jsx("div",{"data-controls":Ve.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(qe[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":Ne??void 0,className:`${u}-control-anchor`,style:{top:0,left:rt(It-Ot),width:rt(Ot),height:"100%"}})]},"column-edge-padding-handles"),p&&!he&&it.slice(0,-1).map((Le,Ye)=>{const st=it[Ye+1],Mt=We.slice(0,Ye+1).reduce((mt,Nt)=>mt+Nt,0),ut=je[Ye],gt=je[Ye+1],At=Math.max(ut.paddingRight,co),Ht=Math.max(gt.paddingLeft,co);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Le.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(qe[Ye]-ut.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:rt(Mt-At),width:rt(At),height:"100%"}}),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(qe[Ye+1]-gt.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:rt(Mt),width:rt(Ht),height:"100%"}})]},`${Le.paddingRightKey}-padding`)}),p&&!he&&it.slice(0,-1).map((Le,Ye)=>{const st=_0(Ye,We,Ie,xe),ut=We.slice(0,Ye+1).reduce((gt,At)=>gt+At,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Le.widthKey,"data-controls-axis":"x","data-controls-min":String(zl),"data-controls-max-fraction":String(st),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:rt(ut),width:rt(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Le.widthKey}-junction`)})]}),Be&&(()=>{const Le=$a(e,ai),Ye=h0(e.cutLabelVerticalAlign),st=Le.textTextAlign==="justify"||he;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:rt(H??0),cursor:He?"pointer":"default",...o0(le,b??0,n??!1)},onClick:He?xt:void 0,onMouseEnter:U||te?St:void 0,onMouseLeave:U?Zt:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...he?{paddingLeft:rt(ee),paddingRight:rt(ee)}:{},justifyContent:f0(Le.textTextAlign),alignItems:jc(Ye)},children:a.jsx("span",{className:Gc(e,ai,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Le,n),...Xc(e,ai,u,n),...st?{width:"100%"}:{}},children:q})})})})(),te&&se&&typeof document<"u"&&(()=>{const Le=`${se.widthPx}px`,Ye={width:Le,height:"auto",maxHeight:Le,objectFit:"contain"},st=(c?document.getElementById(c):null)??document.body;return Un.createPortal(a.jsx("div",{ref:ve,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(n0,{media:se,className:se.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Ye},`${se.rowId}-${se.assetId}`)}),st)})()]})})]})}const z0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10467
+ `}const Ei=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Ol,si],Ba=["A","B","C","D","E"];function pp(e){return`${e}ColumnVerticalAlign`}const Xs=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ba.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function h0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function f0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ba.includes(n)?n:null}function mp(e,t,n){const i=f0(e);return i?i===t?!1:h0(n[pp(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ba.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function y0(e,t,n){if(gp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function v0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function gp(e,t,n){return mp(e,n,t)?br(e).kind==="baseline":!1}function x0(e){const t={};let n=!1;for(const i of Ba){const o=pp(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}mp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function b0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function S0(e){const t=br(e).kind;return t==="baseline"?"center":t}function w0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function $0(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 us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=$0(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 C0(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 T0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const I0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Zt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const L0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function P0(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 M0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[L0[e],P0(e)]))}}function $a(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 Vc(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 Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:w.scalingValue((r-l)/2,i)}}const En=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Eo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ao=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],R0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},E0=["hover","focus","filled","success","error"],qc=.004,po=.004,ps=po,zl=50,Sr=1440,wr=zl/Sr;function hp(e){const t=typeof e=="number"&&e>0?e:Sr;return zl/t}function k0(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 fp={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 A0(e,t=1){const n=t/e;return Object.fromEntries(En.map(i=>[i,n]))}function F0(){return Object.fromEntries([...Eo.map(e=>[e,0]),...ko.map(e=>[e,0])])}function N0(){return Object.fromEntries(Ao.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(En.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function yp(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 ma(e,t,n){const i=Bl(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 _0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Eo[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=yp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Bl(e,t,n){if(e<=0)return[];const i=En.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 v=Math.min(d,p);c[u]-=v,d-=v}return[...c,i[e-1]]}function H0(e,t,n){if(e<=1)return{};const i=Bl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=En[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Uc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ei]}function W0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function O0(e,t,n,i){const o=Math.min(i,e.length,En.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=En[d],p=Eo[d],v=ko[d],x=Ao[d],m=En[l],h=Eo[l],b=ko[l],S=Ao[l],R=n[u],y=n[p],C=n[v],E=n[x];typeof R=="number"&&(r[m]=R),typeof y=="number"&&(r[h]=y),typeof C=="number"&&(r[b]=C),typeof E=="number"&&(r[S]=E)}return r}function vp(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 D0(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,...A0(n,o),...F0()};if(r)for(const c of Ao)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,N0());return vp(e,l)?l:e}function z0(e,t,n){const i=x0(e);i&&(e={...e,...i});const o=hp(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:Ei.length,v=C=>{if(u)return C;const E=Vr({...t,...C}),G=lr(C),H=ma(p,G,E),O=_0(p,H,{...t,...C});return Object.keys(O).length===0?C:{...C,...O}};if(typeof r=="number"&&r!==l)return e;const x=Uc(e),m=Uc(t);if(!W0(x,m))return v({...e,...O0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const C=Vr({...t,...e});return v({...e,...H0(p,c,C)})}if(u){const C=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,E=Math.max(0,(c-o)/2);return C>E?{...e,textPaddingLR:E}:e}const h=Vr({...t,...e}),b=ma(p,d,Vr(t)),R=ma(p,c,h).some((C,E)=>C<(b[E]??C)),y=En.some(C=>{const E=e[C],G=t[C];return typeof E=="number"&&typeof G=="number"&&E!==G});return R||y?v(e):e}function B0(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 j0(e,t){return Math.random()*(t-e)+e}function V0(e){return Object.fromEntries(En.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function ms(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function G0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Eo[c],u=ko[c],p=Ao[c];return{key:l,textPrefix:I0[l],widthKey:En[c],width:n[En[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function X0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=w.useScopedStyles(),p=!!o,{columns:v,type:x,wrapperWidth:m,entriesCount:h,cellMinHeight:b,dividerWidth:S,showVisibility:R,cut:y,showCut:C,cutCellMinHeight:E,cutLabel:G,imageSize:H,imageOnHover:O,imagePosition:F="cursor",imageInterpolation:D="on",entryHoverEffect:I,entryHoverShowOption:L,rowPaddingTop:z,rowPaddingBottom:k,rowPaddingTopB:$,columnsOrder:P,textPaddingLR:q,textColor:_,backgroundColor:K,dividerColor:M,textHoverColor:f,backgroundHoverColor:X,dividerHoverColor:oe}=e,[ue,N]=s.useState(void 0),[se,T]=s.useState(null),me=s.useRef(null),J=O==="on"&&(!n||i),we=F==="cursor",Le=we&&D==="on",{anchorRef:he,onShow:fe,onCursorMove:ie,exit:re}=m0(!!(J&&se!==null),Le),ae=(y??0)>0,pe=x==="b",be=s.useRef(null),ke=s.useRef(null),[Fe,xe]=s.useState(null),[le,g]=s.useState(Sr),V=hp(le),Y=Math.max(0,((m??0)-V)/2),te=Math.min(q??0,Y),ge=Math.max(te,po),ee=((m??0)+V)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Ie=()=>{g(k0(be.current))};Ie();const Je=be.current;if(!Je)return;const rt=new ResizeObserver(Ie);rt.observe(Je);let Mt=Je;for(;Mt&&!Mt.style.getPropertyValue("--cntrl-article-width");)Mt=Mt.parentElement;return Mt&&rt.observe(Mt),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{N(void 0)},[y,C,t,h]),s.useEffect(()=>{n&&!i&&N(void 0)},[n,i]);const B=w.buildColorVars(u,{textColor:_,backgroundColor:K,dividerColor:M,textHoverColor:f,backgroundHoverColor:X,dividerHoverColor:oe},R0,E0),Z=r&&r!=="default"?`${u}-state-${r}`:"",de=`${!n||i?I==="default"?`${u}-entry-hover-default`:I==="blinds"?`${u}-entry-hover-blinds`:I==="reveal"?`${u}-entry-hover-reveal`:"":""} ${Z}`.trim(),j=I==="reveal"&&(!n||i),Pe=(R==null?void 0:R[0])??!1,ne=(R==null?void 0:R[1])??!1,Q=s.useRef(e),_e=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,_e.current=l;return}if(_e.current!==l){Q.current=e,_e.current=l;return}const Ie=Q.current;if(!(Ie!==e))return;if(typeof Ie.columns=="number"&&typeof e.columns=="number"&&Ie.columns!==e.columns){Q.current=e;return}const rt=z0(e,Ie,{designWidth:le});Q.current=e,vp(e,rt)&&d(rt)},[e,d,n,l,le]);const Ge=s.useMemo(()=>V0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Be=s.useMemo(()=>ms(e,Eo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>ms(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ye=s.useMemo(()=>ms(e,Ao),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),nt=s.useMemo(()=>Array.isArray(P)&&P.length>0?P:[...Ei],[P]),it=s.useMemo(()=>G0(nt,v,Ge,Be,qe,Ye),[nt,v,Ge,Be,qe,Ye]),ve=lr(e),Te=s.useMemo(()=>En.slice(0,v).map(Ie=>Ge[Ie]),[v,Ge]),We=s.useMemo(()=>Bl(v,ve,Ge),[v,ve,Ge]),Ke=s.useMemo(()=>ma(v,ve,Ge),[v,ve,Ge]),Ze=s.useMemo(()=>it.map((Ie,Je)=>yp(Ke[Je]??0,Ie.paddingLeft,Ie.paddingRight)),[it,Ke]),lt=s.useMemo(()=>{const Ie=h===0?1/0:h;return(t??[]).slice(0,Ie).map((rt,Mt)=>({id:Mt,cells:Object.fromEntries(Ei.map(gt=>[gt,rt[gt]??""])),image:rt.image,link:rt.link}))},[t,h]),ot=ae?ue??y:lt.length,Me=s.useMemo(()=>ae?lt.slice(0,ot):lt,[lt,ae,ot]),ze=ae&&ot<lt.length,et=Me.length>1||ze,Oe=[Pe?`${u}-divider-top`:"",ne||et?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Ne=!n||i,yt=()=>{if(!Ne)return;const Ie=ue??y;if(!C){N(lt.length);return}N(Math.min(Ie+C,lt.length))},je=Ie=>w.scalingValue(Ie,n??!1),He=pe?$??0:z??0,Ce=k??0,tt=b??0,Qe=Math.max(Ce,ps),St=Dc(0,Me.length,Pe,ne,ze,S??0,n??!1).borderTopWidth,Ct=pe?"rowPaddingTopB":"rowPaddingTop",Wt=it[0],ht=it[it.length-1],Xt=Ze[0],wt=Ze[Ze.length-1],Vt=Wt&&Xt?Math.max(Xt.paddingLeft,po):0,Yt=ht&&wt?Math.max(wt.paddingRight,po):0,$e=ve,Xe=(Ie,Je)=>p0(F,be.current,we?Ie:null,Je),ut=(Ie,Je)=>{if(!J)return;const rt=Ie.image;if(!(rt!=null&&rt.assetId)){re(()=>T(null));return}const Mt=(H==null?void 0:H.min)??80,gt=(H==null?void 0:H.max)??320,xt=(se==null?void 0:se.rowId)===Ie.id,Ft=xt?se.widthPx:j0(Mt,gt),{x:Ot,y:pt}=Xe(Je,Ft);if(xt&&we){ie(Ot,pt);return}T({rowId:Ie.id,assetId:rt.assetId,objectFit:"contain",isVideo:s0(rt),embed:w.isEmbedMedia(rt)?rt:void 0,widthPx:Ft}),me.current={x:Ot,y:pt}},$t=Ie=>{if(!J||!se||!we)return;const{x:Je,y:rt}=Xe(Ie,se.widthPx);ie(Je,rt)},bt=()=>{se&&re(()=>T(null))},ct=Ie=>{j&&Wc(Ie,u),!(!J||!se)&&re(()=>T(null))},Ht=Ie=>{j&&Oc(Ie,u)};s.useLayoutEffect(()=>{if(!se||!me.current)return;const{x:Ie,y:Je}=me.current;me.current=null,fe(Ie,Je)},[se==null?void 0:se.rowId,se==null?void 0:se.assetId,fe]),s.useLayoutEffect(()=>{if(!p||pe){xe(null);return}const Ie=ke.current,Je=Ie==null?void 0:Ie.parentElement;if(!Ie||!Je){xe(null);return}const rt=()=>{const gt=Ie.querySelector("[data-list-row]");if(!gt){xe(null);return}const xt=Je.getBoundingClientRect(),Ft=gt.getBoundingClientRect();xe(Ft.top-xt.top+Ft.height/2)};rt();const Mt=new ResizeObserver(rt);return Mt.observe(Ie),Mt.observe(Je),()=>Mt.disconnect()},[p,pe,Me,He,Ce,tt,t,e,it,Ke,le,S,Pe,ne,ze]);const mt=s.useMemo(()=>!pe&&Ol.some(Ie=>{const Je=Ie.charAt(0),rt=e[`${Ie}VerticalAlign`];return gp(rt,e,Je)}),[pe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Ot;const Ie=be.current;if(!Ie)return;const Je=()=>{Ie.querySelectorAll("[data-list-col]").forEach(pt=>{pt.style.transform="";const Dt=pt.querySelector(`.${u}-list-col`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const qt=pt.querySelector(`.${u}-list-col-title`);qt&&(qt.style.transform="")})};if(pe||!mt){Je();return}const rt=()=>{const pt=Array.from(Ie.querySelectorAll("[data-list-row]")),Dt=`${u}-list-col`,qt=`${u}-baseline-probe`;pt.forEach(Nt=>{Nt.querySelectorAll("[data-list-col]").forEach(zt=>{zt.style.transform="";const jt=zt.querySelector(`.${Dt}`);jt&&(jt.style.minHeight="",jt.style.height="");const Bt=zt.querySelector(`.${u}-list-col-title`);Bt&&(Bt.style.transform="")})}),pt.forEach(Nt=>{const zt=Array.from(Nt.querySelectorAll("[data-list-col]"));C0(Nt,zt,Dt)}),Ie.offsetHeight,pt.forEach(Nt=>{const zt=Array.from(Nt.querySelectorAll("[data-list-col]")),jt=Nt.getBoundingClientRect().top,Bt=new Map,Rt=zt.map(Ae=>{const De=Ae.querySelector(`.${u}-list-col-title`),ft={el:Ae,titleEl:De,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return Bt.set(ft.letter,ft),ft}),W=new Map,Re=(Ae,De)=>{const ft=W.get(Ae.letter);if(ft!==void 0)return ft;const Ut=Ae.anchor?Bt.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!Ut||De.has(Ae.letter)){const on=us(Ae,jt,Dt,qt);return W.set(Ae.letter,on),on}De.add(Ae.letter);const at=Re(Ut,De);De.delete(Ae.letter);const Et=us(Ae,jt,Dt,qt),It=at-Et;T0(Ae.titleEl,It);const _t=us(Ae,jt,Dt,qt);return W.set(Ae.letter,_t),_t};Rt.forEach(Ae=>Re(Ae,new Set))})};let Mt=null;const gt=()=>{Mt===null&&(Mt=requestAnimationFrame(()=>{Mt=null,rt()}))};rt();const xt=new ResizeObserver(()=>gt());xt.observe(Ie);let Ft=!1;return typeof document<"u"&&((Ot=document.fonts)!=null&&Ot.ready)&&document.fonts.ready.then(()=>{Ft||gt()}),()=>{Ft=!0,Mt!==null&&(cancelAnimationFrame(Mt),Mt=null),xt.disconnect(),Je()}},[mt,pe,e,t,le,Me,Ke]);const Tt=s.useMemo(()=>g0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Tt}}),a.jsx("div",{style:B,children:a.jsxs("div",{ref:be,className:`${u}-wrapper ${de}${Oe?` ${Oe}`:""}${pe?` ${u}-type-b`:""}`.trim(),style:{width:w.scalingValue(m??0,n)},onMouseMove:J?$t:void 0,onMouseLeave:J?bt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Me.map((Ie,Je)=>{var xt,Ft,Ot;const rt=(((xt=Ie.link)==null?void 0:xt.value.length)??0)>0,Mt=rt&&(!n||i)?"a":"div",gt=Dc(Je,Me.length,Pe,ne,ze,S??0,n??!1);return a.jsxs(Mt,{ref:Je===0?pt=>{ke.current=pt}:void 0,className:`${u}-list-item${rt||L==="always"?` ${u}-list-item-has-link`:""}${ze&&Je===Me.length-1?` ${u}-list-item-before-cut`:""}`,...rt?{href:(Ft=Ie.link)==null?void 0:Ft.value,target:((Ot=Ie.link)==null?void 0:Ot.target)==="blank"?"_blank":"_self"}:{},style:gt,onMouseEnter:pt=>{j&&(rt||L==="always")&&Wc(pt,u),J&&ut(Ie,pt)},onMouseLeave:pt=>{j&&(rt||L==="always")&&Oc(pt,u)},children:[He>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:je(He)}}),a.jsxs("div",{className:`${u}-list-cols-row${pe?"":` ${u}-list-cols-row-h`}${p&&Je===0&&pe?` ${u}-list-cols-row-controls`:""}`,...pe?{}:{"data-list-row":""},style:pe?void 0:{minHeight:je(tt)},children:[it.map((pt,Dt)=>{const qt=Dt===it.length-1,Nt=Ze[Dt],zt=pt.paddingBottom,jt=c0(Ie.cells[pt.key]),Bt=pe&&jt&&zt>0,Rt=pe?{minHeight:je(tt)}:{width:je(Ke[Dt])},W=pe?{paddingLeft:je(te),paddingRight:je(te)}:{paddingLeft:je(Nt.paddingLeft),paddingRight:je(Nt.paddingRight)},Re=pt.textPrefix.charAt(0),Ae=pe?v0(e[`${pt.textPrefix}VerticalAlign`]):y0(e[`${pt.textPrefix}VerticalAlign`],e,Re),De=pe&&jt&&p&&Je===0;return pe&&!jt?null:a.jsxs("div",{className:pe?`${u}-list-col-wrap`:void 0,...pe?{}:{"data-list-col":"","data-col-letter":Re,"data-valign":Ae.kind,...Ae.kind==="baseline"?{"data-valign-anchor":Ae.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${qt?` ${u}-list-col-last`:""}`,style:{...W,...Rt,...pe?{justifyContent:jc(Ae.kind)}:{}},"data-test":pt.width,children:a.jsx("span",{className:Gc(e,pt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,pt.textPrefix),n),...Xc(e,pt.textPrefix,u,n),...pe?{}:b0(Ae.kind)},children:Ie.cells[pt.key]??null})}),Bt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:je(zt)}}),De&&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:je(Math.max(zt,ps))}})]},pt.key)}),p&&Je===0&&pe&&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(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:je(ge),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(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:je(Math.max(ge,ve-ge)),width:je(ge),height:"100%"}})]})]}),!pe&&Ce>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:je(Ce)}}),p&&Je===0&&!pe&&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:je(Qe)}})]},Ie.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ct,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":pe?"center":"left-y",className:`${u}-control-anchor`,style:{top:St,left:0,width:"100%",height:je(Math.max(He,ps))}})},"row-padding-handles"),p&&!pe&&Wt&&ht&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Wt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ke[0]-((Xt==null?void 0:Xt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:je(Vt),height:"100%"}}),a.jsx("div",{"data-controls":ht.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ke[it.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:je($e-Yt),width:je(Yt),height:"100%"}})]},"column-edge-padding-handles"),p&&!pe&&it.slice(0,-1).map((Ie,Je)=>{const rt=it[Je+1],Mt=We.slice(0,Je+1).reduce((pt,Dt)=>pt+Dt,0),gt=Ze[Je],xt=Ze[Je+1],Ft=Math.max(gt.paddingRight,po),Ot=Math.max(xt.paddingLeft,po);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ie.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ke[Je]-gt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:je(Mt-Ft),width:je(Ft),height:"100%"}}),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(Ke[Je+1]-xt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:je(Mt),width:je(Ot),height:"100%"}})]},`${Ie.paddingRightKey}-padding`)}),p&&!pe&&it.slice(0,-1).map((Ie,Je)=>{const rt=B0(Je,We,Te,ve),gt=We.slice(0,Je+1).reduce((xt,Ft)=>xt+Ft,0)-qc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ie.widthKey,"data-controls-axis":"x","data-controls-min":String(zl),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:je(gt),width:je(qc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ie.widthKey}-junction`)})]}),ze&&(()=>{const Ie=$a(e,si),Je=S0(e.cutLabelVerticalAlign),rt=Ie.textTextAlign==="justify"||pe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:je(E??0),cursor:Ne?"pointer":"default",...d0(ne,S??0,n??!1)},onClick:Ne?yt:void 0,onMouseEnter:j||J?ct:void 0,onMouseLeave:j?Ht:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...pe?{paddingLeft:je(te),paddingRight:je(te)}:{},justifyContent:w0(Ie.textTextAlign),alignItems:jc(Je)},children:a.jsx("span",{className:Gc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Ie,n),...Xc(e,si,u,n),...rt?{width:"100%"}:{}},children:G})})})})(),J&&se&&typeof document<"u"&&(()=>{const Ie=`${se.widthPx}px`,Je={width:Ie,height:"auto",maxHeight:Ie,objectFit:"contain"},rt=(c?document.getElementById(c):null)??document.body;return Un.createPortal(a.jsx("div",{ref:he,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(l0,{media:se,className:se.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Je},`${se.rowId}-${se.assetId}`)}),rt)})()]})})]})}const q0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10468
10468
  import { createPortal } from 'react-dom';
10469
10469
  import { CommonComponentProps } from '../props';
10470
10470
  import { buildColorVars, EmbedMediaFrame, isEmbedMedia, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -13573,7 +13573,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13573
13573
  </>
13574
13574
  );
13575
13575
  }
13576
- `,zo=["A","B","C","D","E"],Kc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={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 B0(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 j0={A:"title",B:"subtitle",C:"date"};function V0(){return Object.fromEntries(zo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,B0(i,j0[e])]}))}function G0(){const e={};for(const t of zo)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 Yc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of zo)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 X0(e){const t={};if(e===ai)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:[...Kc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Kc]}}return t[qt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[qt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[qt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[qt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[qt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[qt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[qt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[qt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const U0=xr.reduce((e,t)=>({...e,...X0(t)}),{});function q0(e){return{verticalAlign:e===ai?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ai?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function K0(e,t={}){var n;return{...q0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function Y0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Qc.has(r):!Qc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Dl(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 ga(e={},t){return xr.reduce((n,i)=>({...n,...Y0(i,K0(i,e),t)}),{})}const Q0=ga(),Z0=$0();function mp(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 J0(){const e=[];return Ol.forEach((t,n)=>{const i=Pi[n],o=mp(t);for(let r=1;r<Pi.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 ex=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];mp(ai);const tx=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{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"}],nx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:{type:"url",value:"",target:"blank"}}],ix=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ox={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:{...V0(),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:nx},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"}},...G0(),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"}},...U0,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",...Q0,...ga({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Yc({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},...ga({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Yc({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},...ga({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...J0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...tx.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}},...zo.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",...ix]},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__",Z0]}],paletteBookmark:{items:[...ex],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},rx={element:D0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>F0(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:ox,sourceCode:z0},Zc=300,mi=.004,ax={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"},sx=["hover","focus","filled","success","error"];function lx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ed(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:$.scalingValue((o-t)/2,i)}}function cx(e){return`
13576
+ `,jo=["A","B","C","D","E"],Kc=[...Xs,"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 U0(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 K0={A:"title",B:"subtitle",C:"date"};function Y0(){return Object.fromEntries(jo.map((e,t)=>{const n=Ei[t],i=`${e} column`;return[n,U0(i,K0[e])]}))}function Q0(){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 Yc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ei]};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 Z0(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Xs]},enum:[...Xs]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Kc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Kc]}}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 J0=xr.reduce((e,t)=>({...e,...Z0(t)}),{});function ex(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 tx(e,t={}){var n;return{...ex(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function nx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Qc.has(r):!Qc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Dl(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 ga(e={},t){return xr.reduce((n,i)=>({...n,...nx(i,tx(i,e),t)}),{})}const ix=ga(),ox=M0();function xp(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 rx(){const e=[];return Ol.forEach((t,n)=>{const i=Ei[n],o=xp(t);for(let r=1;r<Ei.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 ax=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xp(si);const sx=[...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"}],lx=[{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"}}],cx=[...jo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],dx={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:{...Y0(),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:lx},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"}},...Q0(),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"}},...J0,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",...ix,...ga({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Yc({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},...ga({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Yc({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},...ga({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...rx(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...sx.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",...cx]},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__",ox]}],paletteBookmark:{items:[...ax],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ux={element:X0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>D0(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:dx,sourceCode:q0},Zc=300,fi=.004,px={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"},mx=["hover","focus","filled","success","error"];function gx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ed(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:w.scalingValue((o-t)/2,i)}}function hx(e){return`
13577
13577
  .${e}-wrapper {
13578
13578
  box-sizing: border-box;
13579
13579
  display: flex;
@@ -13635,7 +13635,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13635
13635
  display: flex;
13636
13636
  align-items: center;
13637
13637
  justify-content: space-between;
13638
- gap: ${lx(20)};
13638
+ gap: ${gx(20)};
13639
13639
  width: 100%;
13640
13640
  min-width: 0;
13641
13641
  min-height: var(--${e}-question-min-height, unset);
@@ -13738,7 +13738,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13738
13738
  pointer-events: none;
13739
13739
  z-index: 2;
13740
13740
  }
13741
- `}function td(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 dx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=$.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:m="off",icon:h,iconMaxWidth:v=.00833,iconPaddingRight:b=0,iconAnimation:E="rotate 45",questionColor:f="#000000",answerColor:w="#000000",dividerColor:H="#0000001F",iconColor:q="#000000",questionHoverColor:B="#666666",iconHoverColor:M="#666666",iconActiveColor:_="#000000",dividerHoverColor:j="#000000",questionFontFamily:C,questionFontSettings:L,questionFontSize:W,questionLineHeight:A,questionLetterSpacing:I,questionWordSpacing:T,questionTextAppearance:V,answerFontFamily:S,answerFontSettings:X,answerFontSize:P,answerLineHeight:k,answerLetterSpacing:O,answerWordSpacing:ie,answerTextAppearance:ae,questionPaddingLeft:D=0,questionPaddingTop:se=0,questionPaddingBottom:R=0,answerPaddingLeft:de=0,answerPaddingRight:te=0,answerPaddingTop:Se=0,answerPaddingBottom:Ce=0}=e,ve=t??[],[ue,Q]=s.useState(()=>new Set),re=!n||i;s.useEffect(()=>{Q(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Q(new Set)},[n,o,i]);const fe=qe=>$.scalingValue(qe,n??!1),he=Math.max(D,mi),be=Math.max(se,mi),Me=Math.max(R,mi),Ne=Math.max(de,mi),we=Math.max(te,mi),ce=Math.max(Se,mi),g=Math.max(Ce,mi),Y=Math.max(0,(d??1)-b-v),Z=Math.max(0,(d??1)-te),ee=Math.max(0,(d??1)-de),ye=Math.max(b,mi),G=Math.max(0,(d??1)-D-v),N=s.useMemo(()=>ue.size===0?0:Math.min(...ue),[ue]),K=s.useCallback(qe=>ue.has(qe),[ue]),ne=re&&x==="default"?`${l}-entry-hover-default`:"",pe=h??"",U=pe!=="",Pe=E.replace(/^rotate /,""),le=`${l}-icon-anim-${Pe}`,J=un(nn(td(C,L,W,A,I,T,V,f),n)),De=un(nn(td(S,X,P,k,O,ie,ae,w),n)),Xe=Jc(W,A,`${l}-question`,`${l}-text-tight-leading`),Ue=Jc(P,k,`${l}-answer-text`,`${l}-text-tight-leading`),Je=ed(W,A,l,n),et=ed(P,k,l,n),Qe=$.buildColorVars(l,{questionColor:f,answerColor:w,dividerColor:H,iconColor:q,questionHoverColor:B,iconHoverColor:M,iconActiveColor:_,dividerHoverColor:j},ax,sx),it=r&&r!=="default"?`${l}-state-${r}`:"",xe=s.useCallback(qe=>{re&&Q(je=>{if(je.has(qe)){const nt=new Set(je);return nt.delete(qe),nt}if(m==="on")return new Set([qe]);const ot=new Set(je);return ot.add(qe),ot})},[re,m]),Ie=s.useMemo(()=>cx(l),[l]),We={[`--${l}-divider-width`]:$.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:$.scalingValue(v,n??!1),...u>0?{[`--${l}-question-min-height`]:$.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ie}}),a.jsx("div",{style:Qe,children:a.jsx("div",{className:Tt(`${l}-wrapper`,n&&!i&&`${l}-editor`,ne,it),style:{width:$.scalingValue(d,n??!1),maxWidth:"100%",...We},children:ve.map((qe,je)=>{var _e;const ot=K(je),nt=((_e=qe.question)==null?void 0:_e.trim())??"",Ee=qe.answer,Be=((Ee==null?void 0:Ee.length)??0)>0,tt=c&&je===N;return a.jsxs("div",{className:Tt(`${l}-item`,ot&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[tt&&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:fe(be)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:fe(he),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(G),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:fe(ye),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":ot,style:{...J,...Je,paddingLeft:fe(D),paddingRight:fe(b)},onClick:()=>xe(je),children:[se>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:fe(se)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Xe,children:nt}),Be&&(U?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:a.jsx(mn,{url:pe,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 ${le}`,"aria-hidden":"true"}))]}),R>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:fe(R)},"aria-hidden":"true"})]}),tt&&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:fe(Me)}})]}),Be&&Ee&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!ot,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[tt&&ot&&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:fe(ce)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","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:fe(Ne),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(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:fe(we),height:"100%"}})]}),Se>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:fe(Se)}}),a.jsx("div",{className:`${l}-answer`,style:{...De,...et,paddingLeft:fe(de),paddingRight:fe(te)},children:a.jsx("div",{className:Ue,children:a.jsx(Ki,{content:Ee})})}),Ce>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:fe(Ce)}}),tt&&ot&&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:fe(g)}})]})})})]},je)})})})]})}const ux=`import { useCallback, useEffect, useMemo, useState } from 'react';
13741
+ `}function td(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 fx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=w.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:x="default",autoclose:m="off",icon:h,iconMaxWidth:b=.00833,iconPaddingRight:S=0,iconAnimation:R="rotate 45",questionColor:y="#000000",answerColor:C="#000000",dividerColor:E="#0000001F",iconColor:G="#000000",questionHoverColor:H="#666666",iconHoverColor:O="#666666",iconActiveColor:F="#000000",dividerHoverColor:D="#000000",questionFontFamily:I,questionFontSettings:L,questionFontSize:z,questionLineHeight:k,questionLetterSpacing:$,questionWordSpacing:P,questionTextAppearance:q,answerFontFamily:_,answerFontSettings:K,answerFontSize:M,answerLineHeight:f,answerLetterSpacing:X,answerWordSpacing:oe,answerTextAppearance:ue,questionPaddingLeft:N=0,questionPaddingTop:se=0,questionPaddingBottom:T=0,answerPaddingLeft:me=0,answerPaddingRight:J=0,answerPaddingTop:we=0,answerPaddingBottom:Le=0}=e,he=t??[],[fe,ie]=s.useState(()=>new Set),re=!n||i;s.useEffect(()=>{ie(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&ie(new Set)},[n,o,i]);const ae=Ke=>w.scalingValue(Ke,n??!1),pe=Math.max(N,fi),be=Math.max(se,fi),ke=Math.max(T,fi),Fe=Math.max(me,fi),xe=Math.max(J,fi),le=Math.max(we,fi),g=Math.max(Le,fi),V=Math.max(0,(d??1)-S-b),Y=Math.max(0,(d??1)-J),te=Math.max(0,(d??1)-me),ge=Math.max(S,fi),ee=Math.max(0,(d??1)-N-b),B=s.useMemo(()=>fe.size===0?0:Math.min(...fe),[fe]),Z=s.useCallback(Ke=>fe.has(Ke),[fe]),U=re&&x==="default"?`${l}-entry-hover-default`:"",de=h??"",j=de!=="",Pe=R.replace(/^rotate /,""),ne=`${l}-icon-anim-${Pe}`,Q=pn(nn(td(I,L,z,k,$,P,q,y),n)),_e=pn(nn(td(_,K,M,f,X,oe,ue,C),n)),Ge=Jc(z,k,`${l}-question`,`${l}-text-tight-leading`),Be=Jc(M,f,`${l}-answer-text`,`${l}-text-tight-leading`),qe=ed(z,k,l,n),Ye=ed(M,f,l,n),nt=w.buildColorVars(l,{questionColor:y,answerColor:C,dividerColor:E,iconColor:G,questionHoverColor:H,iconHoverColor:O,iconActiveColor:F,dividerHoverColor:D},px,mx),it=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Ke=>{re&&ie(Ze=>{if(Ze.has(Ke)){const ot=new Set(Ze);return ot.delete(Ke),ot}if(m==="on")return new Set([Ke]);const lt=new Set(Ze);return lt.add(Ke),lt})},[re,m]),Te=s.useMemo(()=>hx(l),[l]),We={[`--${l}-divider-width`]:w.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:w.scalingValue(b,n??!1),...u>0?{[`--${l}-question-min-height`]:w.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Te}}),a.jsx("div",{style:nt,children:a.jsx("div",{className:Pt(`${l}-wrapper`,n&&!i&&`${l}-editor`,U,it),style:{width:w.scalingValue(d,n??!1),maxWidth:"100%",...We},children:he.map((Ke,Ze)=>{var Oe;const lt=Z(Ze),ot=((Oe=Ke.question)==null?void 0:Oe.trim())??"",Me=Ke.answer,ze=((Me==null?void 0:Me.length)??0)>0,et=c&&Ze===B;return a.jsxs("div",{className:Pt(`${l}-item`,lt&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[et&&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:ae(be)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(V),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ae(pe),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(ee),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ae(ge),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":lt,style:{...Q,...qe,paddingLeft:ae(N),paddingRight:ae(S)},onClick:()=>ve(Ze),children:[se>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ae(se)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Ge,children:ot}),ze&&(j?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${ne}`,"aria-hidden":"true",children:a.jsx(gn,{url:de,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 ${ne}`,"aria-hidden":"true"}))]}),T>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:ae(T)},"aria-hidden":"true"})]}),et&&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:ae(ke)}})]}),ze&&Me&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!lt,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[et&&lt&&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:ae(le)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Y),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:ae(Fe),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(te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:ae(xe),height:"100%"}})]}),we>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ae(we)}}),a.jsx("div",{className:`${l}-answer`,style:{..._e,...Ye,paddingLeft:ae(me),paddingRight:ae(J)},children:a.jsx("div",{className:Be,children:a.jsx(Zi,{content:Me})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:ae(Le)}}),et&&lt&&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:ae(g)}})]})})})]},Ze)})})})]})}const yx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13742
13742
  import cn from 'classnames';
13743
13743
  import { CommonComponentProps } from '../props';
13744
13744
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14486,7 +14486,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14486
14486
  </>
14487
14487
  );
14488
14488
  }
14489
- `;function gi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},px=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],mx={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:gi("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:{...nd.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:{...nd.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:gi("Question Padding Left"),questionPaddingTop:gi("Question Padding Top"),questionPaddingBottom:gi("Question Padding Bottom"),answerPaddingLeft:gi("Answer Padding Left"),answerPaddingRight:gi("Answer Padding Right"),answerPaddingTop:gi("Answer Padding Top"),answerPaddingBottom:gi("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:[...px],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},gx={element:dx,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:mx,sourceCode:ux},si=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,hx=.2,od=8,gp=({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"?id:Math.max(id,window.innerHeight*hx),[]),y=s.useCallback(C=>Math.max(0,1-C/(p*1.5)),[p]),x=s.useCallback(C=>Math.max(0,1-C/(p*.45)),[p]),m=s.useCallback(C=>{const L=typeof window<"u"?window.innerHeight:800,W=Math.max(.88,1-C/L*.12);return`translateY(${C}px) scale(${W})`},[]),h=s.useCallback(()=>{d.current=null},[]),v=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),b=s.useCallback(()=>{const C=typeof window<"u"?window.innerHeight:800;c(!0),r(C),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),E=s.useCallback(C=>{!e||l||C.pointerType==="touch"&&(i!=null&&i(C.target)||(d.current={startX:C.clientX,startY:C.clientY,isLocked:null,pointerId:C.pointerId}))},[e,l,i]),f=s.useCallback(C=>{const L=d.current;if(!e||!L||C.pointerType!=="touch"||L.pointerId!==C.pointerId)return;const W=C.clientX-L.startX,A=C.clientY-L.startY;if(L.isLocked===null){if(Math.abs(W)<od&&Math.abs(A)<od)return;if(A>0&&A>Math.abs(W))L.isLocked=!0,C.currentTarget.setPointerCapture(C.pointerId);else{L.isLocked=!1,h();return}}if(!L.isLocked)return;C.preventDefault();const I=Math.max(0,A);u.current=I,r(I)},[e,h]),w=s.useCallback(C=>{const L=d.current;if(!e||!L||C.pointerType!=="touch"||L.pointerId!==C.pointerId)return;const W=L.isLocked===!0;if(C.currentTarget.hasPointerCapture(C.pointerId)&&C.currentTarget.releasePointerCapture(C.pointerId),!W){h();return}C.clientY-L.startY>=p?b():v()},[p,b,e,h,v]),H=s.useCallback(C=>{w(C)},[w]),q=s.useCallback(C=>{w(C)},[w]),B=o>0,M=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",j=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:m(o),transition:M,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:j?{opacity:x(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:E,onPointerMove:f,onPointerUp:H,onPointerCancel:q}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},fx="[data-lightbox-scrollable]",jl=(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(fx)||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])},yx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},vx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},xx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},bx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,v)=>{vx(t),e.scrollLeft=h,v&&(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=h=>{h.target!==t||h.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-xx(t),!1))}},cr=300,Sx=900,wx=1500,$x="cubic-bezier(0.16, 1, 0.3, 1)",Cx=3e3,Tx=2,Ix=16,Lx=.05,Px=1,Xr=.3,Mx=50,Rx=20,io=.004,ko=["title1","title2","title3"],Ex={title1:"1",title2:"2",title3:"3"},kx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ax={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Rx}px)`,Fx=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]}},Nx=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=Fx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_x=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")],Hx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(ko.map(e=>[Ex[e],_x(e)]))}),Vl=(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},hp=(e,t)=>Vl(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)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:hp(e.length,n)}},Wx=(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},gs=(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[kx[t]]}},Ox=(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),hs=(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??Ax[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Dx=({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:h,closeIconHoverColor:v,thumbnailTrigger:b,thumbnailVisibility:E,thumbnailObjectFit:f,thumbnailActive:w,thumbnailActiveColor:H,title1Width:q,title2Width:B,title3Width:M,title1MarginLeft:_=0,title2MarginLeft:j=0,title3MarginLeft:C=0,titleRowMarginBottom:L=0,titleHeaderLayout:W="desktop",contentMarginTop:A,iconMarginLeft:I}=n,T=F=>$.scalingValue(F,i??!1),V=d??n.thumnailSize??.03,S=T(V),X=T(u),P=T(p??.02),k=T(y??0),O=T(A??0),ie=Ur(O),ae=T(I??0),[D,se]=s.useState(0),R=s.useRef(D);R.current=D;const de=t[D],{title1:te,title2:Se,title3:Ce}=Nx(de),ve=hs("title1",gs(n,"title1"),i),ue=hs("title2",gs(n,"title2"),i),Q=hs("title3",gs(n,"title3"),i),re=W==="mobile",fe=!o&&(!i||r),he=fe,be=fe,Me=fe,Ne=si(f),we=Ne?{"--image-aspect-ratio":ja(f)}:void 0,ce=!!(te||Se||Ce),g=s.useMemo(()=>Wx(e,te,Se,Ce,ve,ue,Q),[e,D,te,Se,Ce,ve,ue,Q]),Y=s.useMemo(()=>({title1Width:q,title2Width:B,title3Width:M}),[q,B,M]),Z=s.useMemo(()=>g.map(F=>Y[F.widthKey]),[g,Y]),ee=s.useMemo(()=>Vl(g.length,Z),[g.length,Z]),ye=s.useMemo(()=>hp(g.length,Z),[g.length,Z]),G=s.useMemo(()=>g.filter(F=>F.prefix==="title1"),[g]),N=s.useMemo(()=>g.filter(F=>F.prefix==="title2"||F.prefix==="title3"),[g]),K=s.useMemo(()=>rd(G,Y),[G,Y]),ne=s.useMemo(()=>rd(N,Y),[N,Y]),pe=s.useCallback((F,oe)=>{const ge=g.indexOf(F);if(!re||oe==="single-row")return{effectiveWidth:ye[ge]??0,resolvedWidth:ee[ge]??0,maxWidth:qr(ge,ee)};if(oe==="two-row-top"){const Ge=G.indexOf(F);return{effectiveWidth:K.effective[Ge]??0,resolvedWidth:K.resolved[Ge]??0,maxWidth:qr(Ge,K.resolved)}}const ke=N.indexOf(F);return{effectiveWidth:ne.effective[ke]??0,resolvedWidth:ne.resolved[ke]??0,maxWidth:qr(ke,ne.resolved)}},[N,ne,ye,ee,g,G,K,re]),U=s.useCallback(F=>$.scalingValue(F,i??!1),[i]),Pe=U(L??0),le=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:j,title3MarginLeft:C}),[_,j,C]),J=s.useCallback(F=>g.slice(0,F+1).reduce((oe,ge,ke)=>oe+(ge!=null&&ge.marginLeftKey?le[ge.marginLeftKey]??0:0)+(ee[ke]??0),0)+(re?0:_??0),[g,le,ee,re,_]),De=s.useCallback(()=>re?0:_??0,[re,_]),Xe=s.useCallback(F=>N.slice(0,F).reduce((oe,ge,ke)=>oe+(ge.marginLeftKey?le[ge.marginLeftKey]??0:0)+(ne.resolved[ke]??0),0),[N,ne.resolved,le]),Ue=s.useCallback(F=>{const oe=N[F];return Xe(F)+(oe.marginLeftKey?le[oe.marginLeftKey]??0:0)+(ne.resolved[F]??0)},[N,ne.resolved,Xe,le]),Je=(F,oe)=>{const ge=F.marginLeftKey?le[F.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ge,maxWidth:pt}=pe(F,oe),Et=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":F.prefix,style:{...oe==="single-row"?{gridArea:F.prefix}:{},width:U(ke),...ge>0?{marginLeft:U(ge)}:{}},children:[a.jsx("p",{className:F.className,style:F.style,children:F.text}),Et&&F.marginLeftKey&&a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:U(-ge),width:`max(${U(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Et&&a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:U(-io/2),width:U(io),height:"100%",pointerEvents:"auto"}})]},F.className)},et=()=>{const F=re?-1:g.findIndex(ke=>ke.prefix==="title1"),oe=!re&&(o||(_??0)>0)?(()=>{const ke=_??0,Ge=F>=0?ee[F]:q??0;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:`max(${U(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ge=g.flatMap((ke,Ge)=>{if(!ke.marginLeftKey)return[];const pt=le[ke.marginLeftKey]??0,Et=Ox(g,ee,le,Ge)+De();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ee[Ge]),style:{position:"absolute",top:0,left:U(Et),width:`max(${U(pt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return oe?[oe,...ge]:ge},Qe=()=>g.map((F,oe)=>{const ge=qr(oe,ee),Ge=J(oe)-io/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.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:U(Ge),width:U(io),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),it=()=>N.flatMap((F,oe)=>{if(!F.marginLeftKey)return[];const ge=le[F.marginLeftKey]??0,ke=Xe(oe),{resolvedWidth:Ge}=pe(F,"two-row-bottom");return a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:U(ke),width:`max(${U(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},F.marginLeftKey)}),xe=()=>N.map((F,oe)=>{const{maxWidth:ge}=pe(F,"two-row-bottom"),Ge=Ue(oe)-io/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.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:U(Ge),width:U(io),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),Ie=s.useRef(null),We=s.useRef(null),qe=s.useRef(null),je=s.useRef(null),ot=s.useRef([]),nt=s.useRef([]),Ee=s.useRef(0),Be=s.useRef(null),tt=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),_e=s.useRef(null),He=s.useRef(null),xt=s.useRef(0),rt=s.useRef("forward"),ze=s.useRef(0),Te=s.useRef(null),at=s.useRef(!1),me=t.length>1&&(!o||!!r),Fe=me?3:1,Ze=s.useMemo(()=>Array.from({length:Fe},()=>t).flat(),[t,Fe]),[dt,Ve]=s.useState(!1),[Lt,ht]=s.useState(!1),[kt,Ot]=s.useState(!0),It=s.useRef(null),Yt=s.useRef(null),jt=s.useRef(!1),Xt=s.useRef(!1),Qt=s.useRef(null),St=s.useRef(null),Zt=he&&!kt,ft=s.useCallback(()=>{he&&(Ot(!0),St.current&&clearTimeout(St.current),St.current=setTimeout(()=>{tt.current.isActive||Ot(!1)},Cx))},[he]),wt=s.useCallback(()=>{o||Xt.current||(Xt.current=!0,ht(!1),Qt.current=setTimeout(()=>{l()},cr))},[o,l]),Le=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Zt?"true":"false",style:{width:$.scalingValue(m??0,i),height:$.scalingValue(m??0,i),marginRight:ae,"--close-icon-hover-color":v},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:wt,"aria-label":"Close",children:a.jsx(mn,{url:x,fill:h,hoverFill:i&&!r?h:v,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:ae,height:"100%",pointerEvents:"auto"}})]}),Ye=(F="two-row")=>a.jsx("div",{...F==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:U(_??0),flexShrink:0,...F==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...F==="two-row"&&o?{pointerEvents:"auto"}:{}}}),st=()=>{const F=g.find(ke=>ke.prefix==="title1"),oe=g.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),ge=oe.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?Ye():null,F&&Je(F,"two-row-top"),x&&Le()]}),ge?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[oe.map(ke=>Je(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[it(),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:Pe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Mt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?Ye("single-row"):null,g.map(F=>Je(F,"single-row")),o?a.jsxs(a.Fragment,{children:[et(),Qe()]}):null,x?Le():null]}),ut=s.useCallback(F=>!!(F.closest("[data-controls]")||F.closest(`.${e}-thumbnails`)||F.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:gt,backdropStyle:At,mediaAreaStyle:Ht,overlayContentStyle:mt,swipeHandlers:Nt,dismissAreaStyle:Kt}=gp({enabled:fe??!1,onClose:wt,animMs:cr,isBlockedTarget:ut}),Ft=()=>{if(!me||t.length===0)return Ee.current=0,0;const F=nt.current[0],oe=nt.current[t.length];if(!F||!oe)return Ee.current;const ge=oe.offsetLeft-F.offsetLeft;return ge>0&&(Ee.current=ge),Ee.current},_t=(F=!1)=>{if(!me)return;const oe=We.current,ge=Ft();!oe||ge<=0||ge<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=ge,F&&(tt.current.scrollLeft+=ge),at.current&&(ze.current+=ge)):oe.scrollLeft>=ge*2&&(oe.scrollLeft-=ge,F&&(tt.current.scrollLeft-=ge),at.current&&(ze.current-=ge)))},Vt=(F,oe=(ge=>(ge=We.current)==null?void 0:ge.scrollLeft)()??0)=>{if(!me)return F;let ke=t.length+F,Ge=1/0;for(let pt=0;pt<Fe;pt++){const Et=pt*t.length+F,Bt=nt.current[Et];if(!Bt)continue;const an=Math.abs(Bt.offsetLeft-oe);an<Ge&&(Ge=an,ke=Et)}return ke},Ct=F=>{const oe=We.current;return!F||!oe?!1:F.offsetWidth>oe.clientWidth+1},bt=F=>{const oe=We.current;if(!F||!oe||!Ct(F))return!1;const ge=F.offsetLeft,ke=ge+F.offsetWidth;return oe.scrollLeft>=ge-1&&oe.scrollLeft+oe.clientWidth<=ke+1},z=(F=(oe=>(oe=We.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let ke=0;ke<nt.current.length;ke+=1){const Ge=nt.current[ke];if(Ge&&bt(Ge))return ke}let ge={flatIndex:0,distance:1/0};return nt.current.forEach((ke,Ge)=>{if(!ke)return;const pt=Math.abs(ke.offsetLeft-F);pt<ge.distance&&(ge={flatIndex:Ge,distance:pt})}),ge.flatIndex},Re=F=>{We.current&&nt.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=Ct(oe)&&F==="backward"?"end":"start")})},Ae=(F,oe,ge)=>{const ke=F-oe,Ge=z(oe),pt=nt.current[Ge];if(bt(pt))return z(F)%t.length;const Et=nt.current[Ge+1],Bt=pt?Et?Et.offsetLeft-pt.offsetLeft:pt.offsetWidth:0,an=Bt>0?ke>Bt*Xr?1:ke<-Bt*Xr?-1:0:0;return an===0?ge:me?(ge+an+t.length)%t.length:Math.max(0,Math.min(t.length-1,ge+an))},Oe=s.useCallback((F=!1)=>{if(E!=="on"||o)return;const oe=je.current,ge=R.current,ke=ot.current[ge];if(!oe||!ke||oe.scrollWidth<=oe.clientWidth)return;const Ge=oe.scrollLeft,pt=Ge+oe.clientWidth,Et=ke.offsetLeft,Bt=Et+ke.offsetWidth;if(Et>=Ge&&Bt<=pt)return;const an=oe.scrollWidth-oe.clientWidth;let en=Ge;if(!F&&It.current===null){const ui=ot.current[ge-1],kn=ot.current[ge+1],Qn=ui?ke.offsetLeft-ui.offsetLeft:kn?kn.offsetLeft-ke.offsetLeft:ke.offsetWidth;Bt>pt?en+=Qn:Et<Ge&&(en-=Qn)}else Bt>pt?en=Bt-oe.clientWidth:en=Et;oe.scrollLeft=Math.max(0,Math.min(an,en))},[o,E]),vt=s.useCallback((F=!1)=>{F&&(jt.current=!0),Yt.current===null&&(Yt.current=requestAnimationFrame(()=>{Yt.current=null;const oe=jt.current;jt.current=!1,Oe(oe)}))},[Oe]),Gt=s.useCallback(F=>{if(F===R.current)return;const oe=R.current;R.current=F;const ge=Math.abs(F-oe)>1,ke=me&&t.length>1&&(oe===t.length-1&&F===0||oe===0&&F===t.length-1);se(F),vt(ge||ke)},[t.length,me,vt]),lt=()=>{if(!We.current||t.length===0||It.current!==null||tt.current.isActive&&tt.current.hasMoved)return;const F=We.current.scrollLeft,oe=z(F)%t.length;oe!==R.current&&Gt(oe)},Rt=()=>{It.current=null},Dt=F=>{const oe=We.current;oe&&(oe.style.scrollSnapType=F?"":"none")},zt=()=>{var F;(F=He.current)==null||F.call(He),He.current=null},cn=()=>{Te.current!==null&&(cancelAnimationFrame(Te.current),Te.current=null),at.current=!1},xn=()=>{const F=We.current;if(!F){Te.current=null,at.current=!1;return}const oe=ze.current-F.scrollLeft;if(Math.abs(oe)<.5){F.scrollLeft=ze.current,_t(),lt(),Te.current=null,at.current=!1;return}F.scrollLeft+=oe*Lx,_t(),lt(),ft(),Te.current=requestAnimationFrame(xn)},Kn=()=>{const F=qe.current;F&&(F.style.transition="",F.style.transform="",F.style.willChange="")},Qi=(F,oe,ge,ke)=>{Kn(),F.scrollLeft=oe,xt.current=F.scrollLeft,_t(),ge!==void 0?(R.current=ge,se(ge)):lt(),Dt(!0),ke==null||ke()},hn=(F,{behavior:oe="smooth",activeIndex:ge,onComplete:ke}={})=>{const Ge=We.current,pt=qe.current;if(!Ge||!pt)return;if(cn(),zt(),Dt(!1),oe==="auto"){Qi(Ge,F,ge,ke);return}const Et=Math.abs(F-Ge.scrollLeft),Bt=yx(Et,Sx,wx,Ge.clientWidth*.55);He.current=bx(Ge,pt,F,{duration:Bt,easing:$x,onComplete:()=>{He.current=null,Qi(Ge,F,ge,ke)}})},jo=(F="smooth")=>{const oe=We.current;if(!oe||t.length===0)return;const ge=z()%t.length,ke=Vt(ge,oe.scrollLeft),Ge=nt.current[ke];Ge&&hn(Ge.offsetLeft,{behavior:F,activeIndex:ge})},Vo=(F,oe="smooth",ge,ke)=>{const Ge=We.current;if(!Ge||t.length===0)return;const pt=(ke??Ge.scrollLeft)-F,Et=z(F),Bt=nt.current[Et];if(bt(Bt)){Dt(!0),lt();return}const an=nt.current[Et+1],en=Bt?an?an.offsetLeft-Bt.offsetLeft:Bt.offsetWidth:0;if((en>0?pt>en*Xr?1:pt<-en*Xr?-1:0:0)!==0){const Yl=ge??Et%t.length,Go=Ae(ke??Ge.scrollLeft,F,Yl);bn(Go,oe);return}const kn=ke??Ge.scrollLeft,Qn=z(kn),kr=nt.current[Qn];if(kr&&Math.abs(kr.offsetLeft-kn)<1){Dt(!0),lt();return}jo("auto")},bn=(F,oe="smooth")=>{const ge=We.current;if(!ge||t.length===0)return;const ke=Vt(F,ge.scrollLeft),Ge=nt.current[ke];Ge&&(oe==="smooth"?It.current=F:It.current=null,R.current=F,se(F),vt(!0),hn(Ge.offsetLeft,{behavior:oe,activeIndex:F,onComplete:oe==="smooth"?Rt:void 0}))},di=()=>{_e.current&&(window.removeEventListener("pointerup",_e.current),window.removeEventListener("pointercancel",_e.current),_e.current=null)},Zi=(F,oe,ge,ke,Ge)=>{const pt=ge-F,Et=ke-oe,Bt=Math.abs(pt),an=Math.abs(Et);if(Bt<Mx||Bt<=an)return!1;const en=pt<0?1:-1,ui=me?(Ge+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ge+en));return ui===Ge?!1:(bn(ui),!0)},Sn=F=>{if(!tt.current.isActive)return;di();const oe=We.current;if(!oe)return;const{scrollLeft:ge,startActiveIndex:ke,hasMoved:Ge}=tt.current,pt=oe.scrollLeft;_t(!0),tt.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ve(!1),F!==void 0&&oe.hasPointerCapture(F)&&oe.releasePointerCapture(F),Ge?Vo(ge,"smooth",ke,pt):(Dt(!0),lt()),ft()},Yn=(F,oe)=>{const ge=Be.current;Be.current=null,ge&&(Zi(ge.startX,ge.startY,F,oe,ge.startActiveIndex),ft())},Ji=F=>{if(!be)return;if(F.pointerType==="touch"){if(cn(),Dt(!0),ut(F.target))return;Be.current={startX:F.clientX,startY:F.clientY,startActiveIndex:R.current};return}if(F.pointerType!=="mouse"||F.button!==0||ut(F.target))return;const oe=We.current;if(!oe)return;cn(),zt(),Kn(),It.current=null,tt.current={isActive:!0,startX:F.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:R.current,hasMoved:!1},Dt(!1),ft(),oe.setPointerCapture(F.pointerId),di();const ge=ke=>{ke.pointerType==="mouse"&&Sn(ke.pointerId)};_e.current=ge,window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge)},eo=F=>{if(!be||F.pointerType!=="mouse")return;const oe=We.current;if(!oe||!tt.current.isActive)return;if(F.buttons===0){Sn(F.pointerId);return}const ge=F.clientX-tt.current.startX;Math.abs(ge)>Px&&(tt.current.hasMoved=!0,Ve(!0)),tt.current.hasMoved&&(F.preventDefault(),oe.scrollLeft=tt.current.scrollLeft-ge,_t(!0),lt(),ft())},$e=F=>{if(be){if(F.pointerType==="touch"){F.type==="pointerup"?Yn(F.clientX,F.clientY):Be.current=null;return}F.pointerType==="mouse"&&Sn(F.pointerId)}},Ke=F=>{!be||F.pointerType!=="mouse"||Sn(F.pointerId)};return jl(),s.useEffect(()=>{const F=requestAnimationFrame(()=>ht(!0));return()=>{cancelAnimationFrame(F),zt(),di(),Yt.current!==null&&(cancelAnimationFrame(Yt.current),Yt.current=null),Qt.current&&clearTimeout(Qt.current),St.current&&clearTimeout(St.current)}},[]),s.useEffect(()=>{if(!he){Ot(!0);return}ft();const F=()=>ft();return document.addEventListener("pointermove",F,{passive:!0}),document.addEventListener("pointerdown",F,{passive:!0}),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerdown",F),St.current&&clearTimeout(St.current)}},[he,ft]),s.useEffect(()=>{const F=oe=>{oe.key==="Escape"&&wt()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[wt]),s.useLayoutEffect(()=>{Ft()},[k,t.length,me]),s.useLayoutEffect(()=>{o||bn(R.current,"auto")},[k,o]),s.useLayoutEffect(()=>{bn(0,"auto")},[t.length,me]),s.useEffect(()=>{const F=We.current;if(!F||o||!fe)return;const oe=ge=>{if(ge.preventDefault(),Math.abs(ge.deltaY)<=Math.abs(ge.deltaX))return;const ke=ge.deltaMode===1?Ix:ge.deltaMode===2?F.clientHeight:1,Ge=ge.deltaY*ke*Tx;if(Ge!==0){if(zt(),at.current||(at.current=!0,ze.current=F.scrollLeft,It.current=null,Dt(!1)),ze.current+=Ge,!me){const pt=F.scrollWidth-F.clientWidth;ze.current=Math.max(0,Math.min(pt,ze.current))}ft(),Te.current===null&&(Te.current=requestAnimationFrame(xn))}};return F.addEventListener("wheel",oe,{passive:!1}),()=>{F.removeEventListener("wheel",oe),cn()}},[o,fe,me]),s.useEffect(()=>{const F=We.current;if(!F)return;const oe=()=>{_t(tt.current.isActive);const ke=F.scrollLeft,Ge=ke-xt.current;xt.current=ke;const pt=Ee.current>0?Ee.current*.5:1/0;if(Ge!==0&&Math.abs(Ge)<pt){const Et=Ge>0?"forward":"backward";Et!==rt.current&&(rt.current=Et,Re(Et))}tt.current.isActive&&tt.current.hasMoved||lt()};F.addEventListener("scroll",oe,{passive:!0});const ge=new ResizeObserver(()=>{Ft(),_t(tt.current.isActive),Re(rt.current),lt()});return ge.observe(F),()=>{zt(),F.removeEventListener("scroll",oe),ge.disconnect()}},[t.length,me]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{gt||wt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Lt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Lt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...At}}),a.jsxs("div",{ref:Ie,className:`${e}-lightbox-dismiss-area`,style:Kt,...Nt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ht,onClick:F=>F.stopPropagation(),children:a.jsx("div",{ref:We,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":dt?"true":"false",onPointerDown:Ji,onPointerMove:eo,onPointerUp:$e,onPointerCancel:$e,onLostPointerCapture:Ke,children:a.jsx("div",{ref:qe,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Ze.map((F,oe)=>{const ge=F.image.objectFit??"contain",ke=oe%t.length,Ge=Math.floor(oe/t.length),pt=Ur(k),Et=`calc(-0.5 * (${pt} + ${k}))`;return a.jsxs("div",{ref:Bt=>nt.current[oe]=Bt,className:`${e}-strip-item`,style:{height:W==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:F.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ge}}),o&&ke<t.length-1&&Ge===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Et,width:pt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ge}-${F.image.assetId}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Zt?"true":"false",style:mt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:O,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:ie,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${re?` ${e}-lightbox-content-area-stacked`:""}`,children:(ce||x)&&a.jsx("div",{className:`${e}-header ${re?`${e}-header-two-row`:`${e}-header-single-row`}`,children:re?st():ce||x?Mt():null})})})]}),t.length>1&&E==="on"&&(()=>{const F=Ur(P),oe=`calc(-0.5 * (${P} + ${F}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:je,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ge=>ge.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:X,"--thumbnail-active-color":H},children:[t.map((ge,ke)=>{const Ge=Ur(X),pt=`calc(-0.5 * (${Ge} + ${X}))`;return a.jsxs("div",{ref:Et=>{ot.current[ke]=Et},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":D===ke?"true":"false",onClick:()=>fe&&b==="click"&&bn(ke),onMouseEnter:()=>Me&&b==="hover"&&bn(ke),"aria-label":ge.image.name?`View ${ge.image.name}`:`View image ${ke+1}`,"aria-current":D===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Ne?` ${e}-thumb-image-cover`:""}`,src:ge.image.assetId,alt:"",draggable:!1,style:{...we,maxWidth:S,maxHeight:S,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.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:pt,width:Ge,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ge.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:oe,height:F,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function zx(e){return`
14489
+ `;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],xx={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:{...nd.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:{...nd.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:[...vx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},bx={element:fx,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:xx,sourceCode:yx},li=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,Sx=.2,od=8,bp=({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"?id:Math.max(id,window.innerHeight*Sx),[]),v=s.useCallback(I=>Math.max(0,1-I/(p*1.5)),[p]),x=s.useCallback(I=>Math.max(0,1-I/(p*.45)),[p]),m=s.useCallback(I=>{const L=typeof window<"u"?window.innerHeight:800,z=Math.max(.88,1-I/L*.12);return`translateY(${I}px) scale(${z})`},[]),h=s.useCallback(()=>{d.current=null},[]),b=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),S=s.useCallback(()=>{const I=typeof window<"u"?window.innerHeight:800;c(!0),r(I),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),R=s.useCallback(I=>{!e||l||I.pointerType==="touch"&&(i!=null&&i(I.target)||(d.current={startX:I.clientX,startY:I.clientY,isLocked:null,pointerId:I.pointerId}))},[e,l,i]),y=s.useCallback(I=>{const L=d.current;if(!e||!L||I.pointerType!=="touch"||L.pointerId!==I.pointerId)return;const z=I.clientX-L.startX,k=I.clientY-L.startY;if(L.isLocked===null){if(Math.abs(z)<od&&Math.abs(k)<od)return;if(k>0&&k>Math.abs(z))L.isLocked=!0,I.currentTarget.setPointerCapture(I.pointerId);else{L.isLocked=!1,h();return}}if(!L.isLocked)return;I.preventDefault();const $=Math.max(0,k);u.current=$,r($)},[e,h]),C=s.useCallback(I=>{const L=d.current;if(!e||!L||I.pointerType!=="touch"||L.pointerId!==I.pointerId)return;const z=L.isLocked===!0;if(I.currentTarget.hasPointerCapture(I.pointerId)&&I.currentTarget.releasePointerCapture(I.pointerId),!z){h();return}I.clientY-L.startY>=p?S():b()},[p,S,e,h,b]),E=s.useCallback(I=>{C(I)},[C]),G=s.useCallback(I=>{C(I)},[C]),H=o>0,O=l?`transform ${n}ms ease`:"none",F=l?`opacity ${n}ms ease`:"none",D=o>0||l;return{isSwipeDragging:H,backdropStyle:{opacity:v(o),transition:F},mediaAreaStyle:{transform:m(o),transition:O,touchAction:H?"none":void 0,willChange:H?"transform":void 0},overlayContentStyle:D?{opacity:x(o),transition:F}:void 0,swipeHandlers:e?{onPointerDown:R,onPointerMove:y,onPointerUp:E,onPointerCancel:G}:{},dismissAreaStyle:e?{touchAction:H?"none":"pan-x"}:void 0}},wx="[data-lightbox-scrollable]",jl=(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(wx)||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])},$x=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Cx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Tx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ix=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,b)=>{Cx(t),e.scrollLeft=h,b&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,v=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.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)`,v=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Tx(t),!1))}},cr=300,Lx=900,Px=1500,Mx="cubic-bezier(0.16, 1, 0.3, 1)",Rx=3e3,Ex=2,kx=16,Ax=.05,Fx=1,Xr=.3,Nx=50,_x=20,ro=.004,Fo=["title1","title2","title3"],Hx={title1:"1",title2:"2",title3:"3"},Wx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ox={title1:.02,title2:.02,title3:.02},qr=e=>`max(${e}, ${_x}px)`,Dx=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]}},zx=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=Dx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Bx=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")],jx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Fo.map(e=>[Hx[e],Bx(e)]))}),Vl=(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},Sp=(e,t)=>Vl(e,t),Ur=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:Sp(e.length,n)}},Vx=(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},gs=(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[Wx[t]]}},Gx=(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),hs=(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??Ox[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Xx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:x,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:b,thumbnailTrigger:S,thumbnailVisibility:R,thumbnailObjectFit:y,thumbnailActive:C,thumbnailActiveColor:E,title1Width:G,title2Width:H,title3Width:O,title1MarginLeft:F=0,title2MarginLeft:D=0,title3MarginLeft:I=0,titleRowMarginBottom:L=0,titleHeaderLayout:z="desktop",contentMarginTop:k,iconMarginLeft:$}=n,P=A=>w.scalingValue(A,i??!1),q=d??n.thumnailSize??.03,_=P(q),K=P(u),M=P(p??.02),f=P(v??0),X=P(k??0),oe=qr(X),ue=P($??0),[N,se]=s.useState(0),T=s.useRef(N);T.current=N;const me=t[N],{title1:J,title2:we,title3:Le}=zx(me),he=hs("title1",gs(n,"title1"),i),fe=hs("title2",gs(n,"title2"),i),ie=hs("title3",gs(n,"title3"),i),re=z==="mobile",ae=!o&&(!i||r),pe=ae,be=ae,ke=ae,Fe=li(y),xe=Fe?{"--image-aspect-ratio":ja(y)}:void 0,le=!!(J||we||Le),g=s.useMemo(()=>Vx(e,J,we,Le,he,fe,ie),[e,N,J,we,Le,he,fe,ie]),V=s.useMemo(()=>({title1Width:G,title2Width:H,title3Width:O}),[G,H,O]),Y=s.useMemo(()=>g.map(A=>V[A.widthKey]),[g,V]),te=s.useMemo(()=>Vl(g.length,Y),[g.length,Y]),ge=s.useMemo(()=>Sp(g.length,Y),[g.length,Y]),ee=s.useMemo(()=>g.filter(A=>A.prefix==="title1"),[g]),B=s.useMemo(()=>g.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[g]),Z=s.useMemo(()=>rd(ee,V),[ee,V]),U=s.useMemo(()=>rd(B,V),[B,V]),de=s.useCallback((A,ce)=>{const ye=g.indexOf(A);if(!re||ce==="single-row")return{effectiveWidth:ge[ye]??0,resolvedWidth:te[ye]??0,maxWidth:Ur(ye,te)};if(ce==="two-row-top"){const Ve=ee.indexOf(A);return{effectiveWidth:Z.effective[Ve]??0,resolvedWidth:Z.resolved[Ve]??0,maxWidth:Ur(Ve,Z.resolved)}}const Ee=B.indexOf(A);return{effectiveWidth:U.effective[Ee]??0,resolvedWidth:U.resolved[Ee]??0,maxWidth:Ur(Ee,U.resolved)}},[B,U,ge,te,g,ee,Z,re]),j=s.useCallback(A=>w.scalingValue(A,i??!1),[i]),Pe=j(L??0),ne=s.useMemo(()=>({title1MarginLeft:F,title2MarginLeft:D,title3MarginLeft:I}),[F,D,I]),Q=s.useCallback(A=>g.slice(0,A+1).reduce((ce,ye,Ee)=>ce+(ye!=null&&ye.marginLeftKey?ne[ye.marginLeftKey]??0:0)+(te[Ee]??0),0)+(re?0:F??0),[g,ne,te,re,F]),_e=s.useCallback(()=>re?0:F??0,[re,F]),Ge=s.useCallback(A=>B.slice(0,A).reduce((ce,ye,Ee)=>ce+(ye.marginLeftKey?ne[ye.marginLeftKey]??0:0)+(U.resolved[Ee]??0),0),[B,U.resolved,ne]),Be=s.useCallback(A=>{const ce=B[A];return Ge(A)+(ce.marginLeftKey?ne[ce.marginLeftKey]??0:0)+(U.resolved[A]??0)},[B,U.resolved,Ge,ne]),qe=(A,ce)=>{const ye=A.marginLeftKey?ne[A.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Ve,maxWidth:dt}=de(A,ce),At=o&&ce==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{...ce==="single-row"?{gridArea:A.prefix}:{},width:j(Ee),...ye>0?{marginLeft:j(ye)}:{}},children:[a.jsx("p",{className:A.className,style:A.style,children:A.text}),At&&A.marginLeftKey&&a.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ve),style:{position:"absolute",top:0,left:j(-ye),width:`max(${j(ye)}, 10px)`,height:"100%",pointerEvents:"auto"}}),At&&a.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:j(-ro/2),width:j(ro),height:"100%",pointerEvents:"auto"}})]},A.className)},Ye=()=>{const A=re?-1:g.findIndex(Ee=>Ee.prefix==="title1"),ce=!re&&(o||(F??0)>0)?(()=>{const Ee=F??0,Ve=A>=0?te[A]:G??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ve),style:{position:"absolute",top:0,left:0,width:`max(${j(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ye=g.flatMap((Ee,Ve)=>{if(!Ee.marginLeftKey)return[];const dt=ne[Ee.marginLeftKey]??0,At=Gx(g,te,ne,Ve)+_e();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(te[Ve]),style:{position:"absolute",top:0,left:j(At),width:`max(${j(dt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return ce?[ce,...ye]:ye},nt=()=>g.map((A,ce)=>{const ye=Ur(ce,te),Ve=Q(ce)-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(ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(Ve),width:j(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),it=()=>B.flatMap((A,ce)=>{if(!A.marginLeftKey)return[];const ye=ne[A.marginLeftKey]??0,Ee=Ge(ce),{resolvedWidth:Ve}=de(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(Ve),style:{position:"absolute",top:0,left:j(Ee),width:`max(${j(ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),ve=()=>B.map((A,ce)=>{const{maxWidth:ye}=de(A,"two-row-bottom"),Ve=Be(ce)-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(ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:j(Ve),width:j(ro),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Te=s.useRef(null),We=s.useRef(null),Ke=s.useRef(null),Ze=s.useRef(null),lt=s.useRef([]),ot=s.useRef([]),Me=s.useRef(0),ze=s.useRef(null),et=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Ne=s.useRef(null),yt=s.useRef(0),je=s.useRef("forward"),He=s.useRef(0),Ce=s.useRef(null),tt=s.useRef(!1),Qe=t.length>1&&(!o||!!r),St=Qe?3:1,Ct=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[Wt,ht]=s.useState(!1),[Xt,wt]=s.useState(!1),[Vt,Yt]=s.useState(!0),$e=s.useRef(null),Xe=s.useRef(null),ut=s.useRef(!1),$t=s.useRef(!1),bt=s.useRef(null),ct=s.useRef(null),Ht=pe&&!Vt,mt=s.useCallback(()=>{pe&&(Yt(!0),ct.current&&clearTimeout(ct.current),ct.current=setTimeout(()=>{et.current.isActive||Yt(!1)},Rx))},[pe]),Tt=s.useCallback(()=>{o||$t.current||($t.current=!0,wt(!1),bt.current=setTimeout(()=>{l()},cr))},[o,l]),Ie=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Ht?"true":"false",style:{width:w.scalingValue(m??0,i),height:w.scalingValue(m??0,i),marginRight:ue,"--close-icon-hover-color":b},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Tt,"aria-label":"Close",children:a.jsx(gn,{url:x,fill:h,hoverFill:i&&!r?h:b,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:ue,height:"100%",pointerEvents:"auto"}})]}),Je=(A="two-row")=>a.jsx("div",{...A==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:j(F??0),flexShrink:0,...A==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...A==="two-row"&&o?{pointerEvents:"auto"}:{}}}),rt=()=>{const A=g.find(Ee=>Ee.prefix==="title1"),ce=g.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),ye=ce.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(F??0)>0||o?Je():null,A&&qe(A,"two-row-top"),x&&Ie()]}),ye?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ce.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ce.map(Ee=>qe(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[it(),ve()]})]}):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:Pe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Mt=()=>a.jsxs(a.Fragment,{children:[(F??0)>0||o?Je("single-row"):null,g.map(A=>qe(A,"single-row")),o?a.jsxs(a.Fragment,{children:[Ye(),nt()]}):null,x?Ie():null]}),gt=s.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-thumbnails`)||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:xt,backdropStyle:Ft,mediaAreaStyle:Ot,overlayContentStyle:pt,swipeHandlers:Dt,dismissAreaStyle:qt}=bp({enabled:ae??!1,onClose:Tt,animMs:cr,isBlockedTarget:gt}),Nt=()=>{if(!Qe||t.length===0)return Me.current=0,0;const A=ot.current[0],ce=ot.current[t.length];if(!A||!ce)return Me.current;const ye=ce.offsetLeft-A.offsetLeft;return ye>0&&(Me.current=ye),Me.current},zt=(A=!1)=>{if(!Qe)return;const ce=We.current,ye=Nt();!ce||ye<=0||ye<ce.clientWidth*.25||(ce.scrollLeft<=0?(ce.scrollLeft+=ye,A&&(et.current.scrollLeft+=ye),tt.current&&(He.current+=ye)):ce.scrollLeft>=ye*2&&(ce.scrollLeft-=ye,A&&(et.current.scrollLeft-=ye),tt.current&&(He.current-=ye)))},jt=(A,ce=(ye=>(ye=We.current)==null?void 0:ye.scrollLeft)()??0)=>{if(!Qe)return A;let Ee=t.length+A,Ve=1/0;for(let dt=0;dt<St;dt++){const At=dt*t.length+A,Kt=ot.current[At];if(!Kt)continue;const sn=Math.abs(Kt.offsetLeft-ce);sn<Ve&&(Ve=sn,Ee=At)}return Ee},Bt=A=>{const ce=We.current;return!A||!ce?!1:A.offsetWidth>ce.clientWidth+1},Rt=A=>{const ce=We.current;if(!A||!ce||!Bt(A))return!1;const ye=A.offsetLeft,Ee=ye+A.offsetWidth;return ce.scrollLeft>=ye-1&&ce.scrollLeft+ce.clientWidth<=Ee+1},W=(A=(ce=>(ce=We.current)==null?void 0:ce.scrollLeft)()??0)=>{for(let Ee=0;Ee<ot.current.length;Ee+=1){const Ve=ot.current[Ee];if(Ve&&Rt(Ve))return Ee}let ye={flatIndex:0,distance:1/0};return ot.current.forEach((Ee,Ve)=>{if(!Ee)return;const dt=Math.abs(Ee.offsetLeft-A);dt<ye.distance&&(ye={flatIndex:Ve,distance:dt})}),ye.flatIndex},Re=A=>{We.current&&ot.current.forEach(ce=>{ce&&(ce.style.scrollSnapAlign=Bt(ce)&&A==="backward"?"end":"start")})},Ae=(A,ce,ye)=>{const Ee=A-ce,Ve=W(ce),dt=ot.current[Ve];if(Rt(dt))return W(A)%t.length;const At=ot.current[Ve+1],Kt=dt?At?At.offsetLeft-dt.offsetLeft:dt.offsetWidth:0,sn=Kt>0?Ee>Kt*Xr?1:Ee<-Kt*Xr?-1:0:0;return sn===0?ye:Qe?(ye+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ye+sn))},De=s.useCallback((A=!1)=>{if(R!=="on"||o)return;const ce=Ze.current,ye=T.current,Ee=lt.current[ye];if(!ce||!Ee||ce.scrollWidth<=ce.clientWidth)return;const Ve=ce.scrollLeft,dt=Ve+ce.clientWidth,At=Ee.offsetLeft,Kt=At+Ee.offsetWidth;if(At>=Ve&&Kt<=dt)return;const sn=ce.scrollWidth-ce.clientWidth;let en=Ve;if(!A&&$e.current===null){const gi=lt.current[ye-1],An=lt.current[ye+1],Zn=gi?Ee.offsetLeft-gi.offsetLeft:An?An.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Kt>dt?en+=Zn:At<Ve&&(en-=Zn)}else Kt>dt?en=Kt-ce.clientWidth:en=At;ce.scrollLeft=Math.max(0,Math.min(sn,en))},[o,R]),ft=s.useCallback((A=!1)=>{A&&(ut.current=!0),Xe.current===null&&(Xe.current=requestAnimationFrame(()=>{Xe.current=null;const ce=ut.current;ut.current=!1,De(ce)}))},[De]),Ut=s.useCallback(A=>{if(A===T.current)return;const ce=T.current;T.current=A;const ye=Math.abs(A-ce)>1,Ee=Qe&&t.length>1&&(ce===t.length-1&&A===0||ce===0&&A===t.length-1);se(A),ft(ye||Ee)},[t.length,Qe,ft]),at=()=>{if(!We.current||t.length===0||$e.current!==null||et.current.isActive&&et.current.hasMoved)return;const A=We.current.scrollLeft,ce=W(A)%t.length;ce!==T.current&&Ut(ce)},Et=()=>{$e.current=null},It=A=>{const ce=We.current;ce&&(ce.style.scrollSnapType=A?"":"none")},_t=()=>{var A;(A=Ne.current)==null||A.call(Ne),Ne.current=null},on=()=>{Ce.current!==null&&(cancelAnimationFrame(Ce.current),Ce.current=null),tt.current=!1},fn=()=>{const A=We.current;if(!A){Ce.current=null,tt.current=!1;return}const ce=He.current-A.scrollLeft;if(Math.abs(ce)<.5){A.scrollLeft=He.current,zt(),at(),Ce.current=null,tt.current=!1;return}A.scrollLeft+=ce*Ax,zt(),at(),mt(),Ce.current=requestAnimationFrame(fn)},bn=()=>{const A=Ke.current;A&&(A.style.transition="",A.style.transform="",A.style.willChange="")},ui=(A,ce,ye,Ee)=>{bn(),A.scrollLeft=ce,yt.current=A.scrollLeft,zt(),ye!==void 0?(T.current=ye,se(ye)):at(),It(!0),Ee==null||Ee()},dn=(A,{behavior:ce="smooth",activeIndex:ye,onComplete:Ee}={})=>{const Ve=We.current,dt=Ke.current;if(!Ve||!dt)return;if(on(),_t(),It(!1),ce==="auto"){ui(Ve,A,ye,Ee);return}const At=Math.abs(A-Ve.scrollLeft),Kt=$x(At,Lx,Px,Ve.clientWidth*.55);Ne.current=Ix(Ve,dt,A,{duration:Kt,easing:Mx,onComplete:()=>{Ne.current=null,ui(Ve,A,ye,Ee)}})},pi=(A="smooth")=>{const ce=We.current;if(!ce||t.length===0)return;const ye=W()%t.length,Ee=jt(ye,ce.scrollLeft),Ve=ot.current[Ee];Ve&&dn(Ve.offsetLeft,{behavior:A,activeIndex:ye})},Yn=(A,ce="smooth",ye,Ee)=>{const Ve=We.current;if(!Ve||t.length===0)return;const dt=(Ee??Ve.scrollLeft)-A,At=W(A),Kt=ot.current[At];if(Rt(Kt)){It(!0),at();return}const sn=ot.current[At+1],en=Kt?sn?sn.offsetLeft-Kt.offsetLeft:Kt.offsetWidth:0;if((en>0?dt>en*Xr?1:dt<-en*Xr?-1:0:0)!==0){const Yl=ye??At%t.length,Go=Ae(Ee??Ve.scrollLeft,A,Yl);Sn(Go,ce);return}const An=Ee??Ve.scrollLeft,Zn=W(An),kr=ot.current[Zn];if(kr&&Math.abs(kr.offsetLeft-An)<1){It(!0),at();return}pi("auto")},Sn=(A,ce="smooth")=>{const ye=We.current;if(!ye||t.length===0)return;const Ee=jt(A,ye.scrollLeft),Ve=ot.current[Ee];Ve&&(ce==="smooth"?$e.current=A:$e.current=null,T.current=A,se(A),ft(!0),dn(Ve.offsetLeft,{behavior:ce,activeIndex:A,onComplete:ce==="smooth"?Et:void 0}))},mi=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},eo=(A,ce,ye,Ee,Ve)=>{const dt=ye-A,At=Ee-ce,Kt=Math.abs(dt),sn=Math.abs(At);if(Kt<Nx||Kt<=sn)return!1;const en=dt<0?1:-1,gi=Qe?(Ve+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ve+en));return gi===Ve?!1:(Sn(gi),!0)},wn=A=>{if(!et.current.isActive)return;mi();const ce=We.current;if(!ce)return;const{scrollLeft:ye,startActiveIndex:Ee,hasMoved:Ve}=et.current,dt=ce.scrollLeft;zt(!0),et.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ht(!1),A!==void 0&&ce.hasPointerCapture(A)&&ce.releasePointerCapture(A),Ve?Yn(ye,"smooth",Ee,dt):(It(!0),at()),mt()},Qn=(A,ce)=>{const ye=ze.current;ze.current=null,ye&&(eo(ye.startX,ye.startY,A,ce,ye.startActiveIndex),mt())},to=A=>{if(!be)return;if(A.pointerType==="touch"){if(on(),It(!0),gt(A.target))return;ze.current={startX:A.clientX,startY:A.clientY,startActiveIndex:T.current};return}if(A.pointerType!=="mouse"||A.button!==0||gt(A.target))return;const ce=We.current;if(!ce)return;on(),_t(),bn(),$e.current=null,et.current={isActive:!0,startX:A.clientX,scrollLeft:ce.scrollLeft,startActiveIndex:T.current,hasMoved:!1},It(!1),mt(),ce.setPointerCapture(A.pointerId),mi();const ye=Ee=>{Ee.pointerType==="mouse"&&wn(Ee.pointerId)};Oe.current=ye,window.addEventListener("pointerup",ye),window.addEventListener("pointercancel",ye)},no=A=>{if(!be||A.pointerType!=="mouse")return;const ce=We.current;if(!ce||!et.current.isActive)return;if(A.buttons===0){wn(A.pointerId);return}const ye=A.clientX-et.current.startX;Math.abs(ye)>Fx&&(et.current.hasMoved=!0,ht(!0)),et.current.hasMoved&&(A.preventDefault(),ce.scrollLeft=et.current.scrollLeft-ye,zt(!0),at(),mt())},Se=A=>{if(be){if(A.pointerType==="touch"){A.type==="pointerup"?Qn(A.clientX,A.clientY):ze.current=null;return}A.pointerType==="mouse"&&wn(A.pointerId)}},Ue=A=>{!be||A.pointerType!=="mouse"||wn(A.pointerId)};return jl(),s.useEffect(()=>{const A=requestAnimationFrame(()=>wt(!0));return()=>{cancelAnimationFrame(A),_t(),mi(),Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),bt.current&&clearTimeout(bt.current),ct.current&&clearTimeout(ct.current)}},[]),s.useEffect(()=>{if(!pe){Yt(!0);return}mt();const A=()=>mt();return document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerdown",A,{passive:!0}),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerdown",A),ct.current&&clearTimeout(ct.current)}},[pe,mt]),s.useEffect(()=>{const A=ce=>{ce.key==="Escape"&&Tt()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[Tt]),s.useLayoutEffect(()=>{Nt()},[f,t.length,Qe]),s.useLayoutEffect(()=>{o||Sn(T.current,"auto")},[f,o]),s.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,Qe]),s.useEffect(()=>{const A=We.current;if(!A||o||!ae)return;const ce=ye=>{if(ye.preventDefault(),Math.abs(ye.deltaY)<=Math.abs(ye.deltaX))return;const Ee=ye.deltaMode===1?kx:ye.deltaMode===2?A.clientHeight:1,Ve=ye.deltaY*Ee*Ex;if(Ve!==0){if(_t(),tt.current||(tt.current=!0,He.current=A.scrollLeft,$e.current=null,It(!1)),He.current+=Ve,!Qe){const dt=A.scrollWidth-A.clientWidth;He.current=Math.max(0,Math.min(dt,He.current))}mt(),Ce.current===null&&(Ce.current=requestAnimationFrame(fn))}};return A.addEventListener("wheel",ce,{passive:!1}),()=>{A.removeEventListener("wheel",ce),on()}},[o,ae,Qe]),s.useEffect(()=>{const A=We.current;if(!A)return;const ce=()=>{zt(et.current.isActive);const Ee=A.scrollLeft,Ve=Ee-yt.current;yt.current=Ee;const dt=Me.current>0?Me.current*.5:1/0;if(Ve!==0&&Math.abs(Ve)<dt){const At=Ve>0?"forward":"backward";At!==je.current&&(je.current=At,Re(At))}et.current.isActive&&et.current.hasMoved||at()};A.addEventListener("scroll",ce,{passive:!0});const ye=new ResizeObserver(()=>{Nt(),zt(et.current.isActive),Re(je.current),at()});return ye.observe(A),()=>{_t(),A.removeEventListener("scroll",ce),ye.disconnect()}},[t.length,Qe]),a.jsxs("div",{"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":"Image gallery",style:{opacity:Xt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Xt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...Ft}}),a.jsxs("div",{ref:Te,className:`${e}-lightbox-dismiss-area`,style:qt,...Dt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ot,onClick:A=>A.stopPropagation(),children:a.jsx("div",{ref:We,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":be&&t.length>0?"true":"false","data-mouse-dragging":Wt?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:Se,onPointerCancel:Se,onLostPointerCapture:Ue,children:a.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:f},children:Ct.map((A,ce)=>{const ye=A.image.objectFit??"contain",Ee=ce%t.length,Ve=Math.floor(ce/t.length),dt=qr(f),At=`calc(-0.5 * (${dt} + ${f}))`;return a.jsxs("div",{ref:Kt=>ot.current[ce]=Kt,className:`${e}-strip-item`,style:{height:z==="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:ye}}),o&&Ee<t.length-1&&Ve===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:At,width:dt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ve}-${A.image.assetId}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Ht?"true":"false",style:pt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:X,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:oe,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${re?` ${e}-lightbox-content-area-stacked`:""}`,children:(le||x)&&a.jsx("div",{className:`${e}-header ${re?`${e}-header-two-row`:`${e}-header-single-row`}`,children:re?rt():le||x?Mt():null})})})]}),t.length>1&&R==="on"&&(()=>{const A=qr(M),ce=`calc(-0.5 * (${M} + ${A}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:M},children:a.jsx("div",{ref:Ze,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ye=>ye.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":C,style:{gap:K,"--thumbnail-active-color":E},children:[t.map((ye,Ee)=>{const Ve=qr(K),dt=`calc(-0.5 * (${Ve} + ${K}))`;return a.jsxs("div",{ref:At=>{lt.current[Ee]=At},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":N===Ee?"true":"false",onClick:()=>ae&&S==="click"&&Sn(Ee),onMouseEnter:()=>ke&&S==="hover"&&Sn(Ee),"aria-label":ye.image.name?`View ${ye.image.name}`:`View image ${Ee+1}`,"aria-current":N===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${Fe?` ${e}-thumb-image-cover`:""}`,src:ye.image.assetId,alt:"",draggable:!1,style:{...xe,maxWidth:_,maxHeight:_,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Ee<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:dt,width:Ve,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ye.image.assetId}-${Ee}`)}),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:ce,height:A,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function qx(e){return`
14490
14490
  .${e}-wrapper {
14491
14491
  position: relative;
14492
14492
  width: 100%;
@@ -14871,7 +14871,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14871
14871
  pointer-events: auto;
14872
14872
  z-index: 10;
14873
14873
  }
14874
- `}const Bx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=$.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],m=p&&x.length>0,h=()=>{x.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 ${si(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...si(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${si(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const v=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(Dx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),v)})()]})},jx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14874
+ `}const Ux=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=w.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,v]=s.useState(!1),x=t??[],m=p&&x.length>0,h=()=>{x.length!==0&&v(!0)};return s.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:qx(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":ja(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 b=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(Xx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),b)})()]})},Kx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14875
14875
  import { createPortal } from 'react-dom';
14876
14876
  import { CommonComponentProps } from '../props';
14877
14877
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15417,7 +15417,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15417
15417
  </>
15418
15418
  );
15419
15419
  };
15420
- `,Vx="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 Gx(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")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xx=ko.reduce((e,t)=>({...e,...Gx(t)}),{}),Ux=ko.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 fs(e){return ko.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 qx=Hx(),Kx={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"}},...Xx,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:Vx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Ux},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,...fs({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,...fs({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,...fs({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:[qx]}],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"}]}},Yx={element:Bx,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:Kx,sourceCode:jx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...ko.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...ko.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},Qx=({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:h,maxWidth:v,maxHeight:b,textTransition:E,title1Width:f,title2Width:w,title3Width:H,title1MarginLeft:q=0,title2MarginLeft:B=0,title3MarginLeft:M=0,titleRowMarginBottom:_=0,titleHeaderLayout:j="single-row",countCloseGap:C=0,closeIcon:L,closeIconMaxWidth:W,closeIconColor:A,closeIconHoverColor:I,contentMarginTop:T=0,iconMarginRight:V=0}=n,S=s.useCallback($e=>$.scalingValue($e,i??!1),[i]),X=S(h??0),P=`${v}%`,k=`${b}%`,O=S(C),ie=S(T),ae=S(V),D=Bi("title1",zi(n,"title1"),i),se=Bi("title2",zi(n,"title2"),i),R=Bi("title3",zi(n,"title3"),i),de=Bi("count",zi(n,"count"),i),te=j==="mobile",Se=!i||!!r,Ce=!o&&(!i||!!r),ve=s.useMemo(()=>pa(t,y),[t,y]),[ue,Q]=s.useState(l),re=ve[ue],fe=re==null?void 0:re.entry,[he,be]=s.useState(!1),[Me,Ne]=s.useState(null),[we,ce]=s.useState(!1),[g,Y]=s.useState(null),[Z,ee]=s.useState(!1),[ye,G]=s.useState(0),[N,K]=s.useState(),[ne,pe]=s.useState(),[U,Pe]=s.useState(null),le=s.useRef(null),J=s.useRef(0),De=s.useRef(0),Xe=s.useRef(0),Ue=s.useRef(!1),Je=s.useRef(null),et=s.useRef(null),Qe=s.useRef(null),it=s.useRef(null),xe=s.useRef(null),Ie=s.useRef(null),We=s.useRef(null),qe=s.useCallback(()=>{const $e=et.current;if(!$e)return;const Ke=$e.closest(`.${e}-lightbox-content-area`);if(!Ke)return $e.getBoundingClientRect().width;const F=Array.from(Ke.children).reduce((oe,ge)=>!(ge instanceof HTMLElement)||ge.contains($e)?oe:oe+ge.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-F},[e]),je=s.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),ot=s.useCallback($e=>{$e===J.current&&(Y(null),ee(!1))},[]),nt=s.useCallback(()=>{o||Ue.current||(Ue.current=!0,u==null||u(),be(!1),Je.current=setTimeout(()=>{p()},300))},[o,u,p]),Ee=s.useCallback($e=>!!($e.closest("[data-controls]")||$e.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Be,backdropStyle:tt,mediaAreaStyle:_e,overlayContentStyle:He,swipeHandlers:xt,dismissAreaStyle:rt}=gp({enabled:Ce,onClose:nt,animMs:300,isBlockedTarget:Ee}),ze=s.useCallback($e=>{c&&Yu($e+1,d,!0)},[c,d]),Te=s.useCallback($e=>{if($e)return $e.getBoundingClientRect().height},[]),at=s.useCallback($e=>{if(ve.length===0)return;const Ke=($e%ve.length+ve.length)%ve.length;if(Ke===ue)return;const F=ve[ue],oe=ve[Ke];J.current+=1;const ge=J.current,ke=E==="fade"&&Fc(F==null?void 0:F.entry)!==Fc(oe==null?void 0:oe.entry),Ge=Te(Qe.current),pt=ke?(()=>{const Bt=qe();Un.flushSync(()=>{Pe(oe.entry)}),Qe.current&&Bt&&(Qe.current.style.width=`${Bt}px`);const an=Te(Qe.current);return Qe.current&&(Qe.current.style.width=""),{measuredIncomingTitlesHeight:an,incomingTitlesMeasureWidth:Bt}})():void 0,Et=Math.max(Ge??0,(pt==null?void 0:pt.measuredIncomingTitlesHeight)??0)||void 0;G(ge),Y(ue),ee(!0),Q(Ke),ze(Ke),Xe.current=Ke,ke?(je(),Et&&K(Et),pt!=null&&pt.incomingTitlesMeasureWidth&&pe(pt.incomingTitlesMeasureWidth),Ne((F==null?void 0:F.entryIndex)??null),ce(!0),De.current=oe.entryIndex,le.current=setTimeout(()=>{Ne(null),ce(!1),K(void 0),pe(void 0),Pe(null),le.current=null},400)):(je(),Ne(null),ce(!1),K(void 0),pe(void 0),Pe(null),De.current=oe.entryIndex)},[ue,je,qe,Te,ve,ze,E]),me=s.useCallback(()=>{We.current=null},[]),Fe=s.useCallback($e=>{!Se||ve.length<=1||$e.pointerType==="mouse"&&$e.button!==0||$e.target.closest("[data-controls]")||(We.current={startX:$e.clientX,startY:$e.clientY,pointerId:$e.pointerId})},[Se,ve.length]),Ze=s.useCallback($e=>{var Bt;if(!Se||ve.length<=1||$e.pointerType==="mouse"&&$e.button!==0)return;if(Be){me();return}const Ke=We.current;if(!Ke||Ke.pointerId!==$e.pointerId||(me(),$e.target.closest("[data-controls]")))return;const oe=$e.clientX-Ke.startX,ge=$e.clientY-Ke.startY,ke=Math.abs(oe),Ge=Math.abs(ge);if(ke>=sv&&ke>Ge){at(oe>0?ue-1:ue+1);return}if(ke>Rc||Ge>Rc)return;const pt=(Bt=it.current)==null?void 0:Bt.getBoundingClientRect(),Et=pt?pt.left+pt.width/2:window.innerWidth/2;at($e.clientX<Et?ue-1:ue+1)},[ue,Se,at,Be,me,ve.length]),dt=s.useCallback($e=>{const Ke=We.current;(Ke==null?void 0:Ke.pointerId)===$e.pointerId&&me()},[me]);jl(),s.useEffect(()=>{Ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $e=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{xe.current?xe.current.focus():it.current&&it.current.focus()})});return()=>{cancelAnimationFrame($e),Je.current&&clearTimeout(Je.current),le.current&&clearTimeout(le.current);const Ke=Ie.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var $e;E!=="fade"&&(De.current=(($e=ve[ue])==null?void 0:$e.entryIndex)??0,je(),Ne(null),ce(!1),K(void 0),pe(void 0))},[ue,je,ve,E]),s.useEffect(()=>{const $e=Ke=>{if(Ke.key==="Escape"){nt();return}if(Ke.key==="ArrowLeft"&&ve.length>1){at(ue-1);return}if(Ke.key==="ArrowRight"&&ve.length>1){at(ue+1);return}if(Ke.key==="Tab"&&it.current){const F=it.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(F).filter(pt=>!pt.closest('[aria-hidden="true"]'));if(oe.length===0)return;const ge=oe[0],ke=oe[oe.length-1],Ge=document.activeElement;Ke.shiftKey?(Ge===ge||!it.current.contains(Ge))&&(Ke.preventDefault(),ke.focus()):(Ge===ke||!it.current.contains(Ge))&&(Ke.preventDefault(),ge.focus())}};return window.addEventListener("keydown",$e),()=>window.removeEventListener("keydown",$e)},[at,nt,ue,ve.length]),s.useLayoutEffect(()=>{je(),J.current=0,G(0),Y(null),ee(!1),Ne(null),ce(!1),K(void 0),pe(void 0),Pe(null),Q($e=>{const Ke=Math.max(0,ve.length-1);return Math.min($e,Ke)})},[je,t.length,y,ve.length]),s.useLayoutEffect(()=>{var F;const $e=Math.max(0,ve.length-1),Ke=Math.min(Math.max(0,l),$e);Xe.current=Ke,De.current=((F=ve[Ke])==null?void 0:F.entryIndex)??0,Q(Ke)},[l]);const Ve=Me!==null?t[Me]:null,Lt=g!==null?ve[g]:null,ht=(fe==null?void 0:fe.title1)||(fe==null?void 0:fe.title2)||(fe==null?void 0:fe.title3)||(Ve==null?void 0:Ve.title1)||(Ve==null?void 0:Ve.title2)||(Ve==null?void 0:Ve.title3),kt=hv(y,ve,t),Ot=L!==null,It=ht||kt||Ot,Yt=kt&&Ot?{gap:O}:void 0,jt=`${e}-titles-stack${te?` ${e}-titles-stack-stacked`:""}`,Xt=`${e}-titles-layer-out${te?` ${e}-titles-layer-out-stacked`:""}`,Qt=`${e}-titles-layer-out`,St=(q??0)>0||o,Zt=S(_),ft=s.useMemo(()=>({title1Width:f??xo.title1Width,title2Width:w??xo.title2Width,title3Width:H??xo.title3Width}),[f,w,H]),wt=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:M}),[B,M]),Le=s.useMemo(()=>fe?wi(e,fe,D,se,R):[],[e,fe,D,se,R]),Ye=s.useMemo(()=>Le.map($e=>ft[$e.widthKey]),[Le,ft]),st=s.useMemo(()=>Io(Le.length,Ye),[Le.length,Ye]),Mt=s.useMemo(()=>vr(Le.length,Ye),[Le.length,Ye]),ut=s.useMemo(()=>Le.filter($e=>$e.prefix==="title1"),[Le]),gt=s.useMemo(()=>Le.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),[Le]),At=s.useMemo(()=>$i(ut,ft),[ut,ft]),Ht=s.useMemo(()=>$i(gt,ft),[gt,ft]),mt=s.useCallback(($e,Ke)=>{const F=Le.findIndex(ge=>ge.prefix===$e.prefix);if(!te||Ke==="single-row")return{effectiveWidth:Mt[F]??0,resolvedWidth:st[F]??0,maxWidth:yn(F,st)};if(Ke==="two-row-top"){const ge=ut.findIndex(ke=>ke.prefix===$e.prefix);return{effectiveWidth:At.effective[ge]??0,resolvedWidth:At.resolved[ge]??0,maxWidth:yn(ge,At.resolved)}}const oe=gt.findIndex(ge=>ge.prefix===$e.prefix);return{effectiveWidth:Ht.effective[oe]??0,resolvedWidth:Ht.resolved[oe]??0,maxWidth:yn(oe,Ht.resolved)}},[Le,gt,Ht,Mt,st,ut,At,te]),Nt=s.useCallback($e=>ep(Le,st,wt,$e)+(te?0:q??0),[Le,st,wt,te,q]),Kt=s.useCallback(()=>te?0:q??0,[te,q]),Ft=s.useCallback($e=>gt.slice(0,$e).reduce((Ke,F,oe)=>Ke+(F.marginLeftKey?wt[F.marginLeftKey]??0:0)+(Ht.resolved[oe]??0),0),[gt,Ht.resolved,wt]),_t=s.useCallback($e=>{const Ke=gt[$e];return Ft($e)+(Ke.marginLeftKey?wt[Ke.marginLeftKey]??0:0)+(Ht.resolved[$e]??0)},[gt,Ht.resolved,Ft,wt]),Vt=s.useCallback(($e,Ke,F)=>{if(!te||F==="single-row"){const pt=$e.findIndex(en=>en.prefix===Ke.prefix),Et=$e.map(en=>ft[en.widthKey]),Bt=Io($e.length,Et);return{effectiveWidth:vr($e.length,Et)[pt]??0,resolvedWidth:Bt[pt]??0,maxWidth:yn(pt,Bt)}}if(F==="two-row-top"){const pt=$e.filter(en=>en.prefix==="title1"),Et=pt.findIndex(en=>en.prefix===Ke.prefix),{resolved:Bt,effective:an}=$i(pt,ft);return{effectiveWidth:an[Et]??0,resolvedWidth:Bt[Et]??0,maxWidth:yn(Et,Bt)}}const oe=$e.filter(pt=>pt.prefix==="title2"||pt.prefix==="title3"),ge=oe.findIndex(pt=>pt.prefix===Ke.prefix),{resolved:ke,effective:Ge}=$i(oe,ft);return{effectiveWidth:Ge[ge]??0,resolvedWidth:ke[ge]??0,maxWidth:yn(ge,ke)}},[ft,te]),Ct=($e,Ke,F)=>{const oe=$e.marginLeftKey?wt[$e.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:ke,maxWidth:Ge}=F??mt($e,Ke),pt=Math.max(oe,ni),Et=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":$e.prefix,style:{width:S(ge),...oe>0?{marginLeft:S(oe)}:{}},children:[a.jsx("p",{className:$e.className,style:$e.style,children:$e.text}),Et&&$e.marginLeftKey?a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:S(-oe),width:S(pt),height:"100%",pointerEvents:"auto"}}):null,Et?a.jsx("div",{"data-controls":$e.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,right:S(-Pn/2),width:S(Pn),height:"100%",pointerEvents:"auto"}}):null]},$e.className)},bt=($e="two-row")=>{const Ke=Le.findIndex(ge=>ge.prefix==="title1"),F=Ke>=0?st[Ke]:ft.title1Width,oe=$e==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F)}:{},style:{width:S(q??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},z=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Re=()=>a.jsx("span",{className:`${e}-entry-counter`,style:de,"aria-live":"polite","aria-atomic":"true",children:gv(ve,ue,y,t)}),Ae=()=>kt?o&&Ot?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${as(O)} + ${O}))`,width:as(O),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,Oe=()=>!kt&&!Ot?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Yt,children:[Ae(),Ot?lt():null]}),vt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||ht?z():null,St?bt("single-row"):null,Dt(fe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Oe(),bn()]}),Gt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[kt||ht?z():null,St?bt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:we&&N?{minHeight:N}:void 0,children:[a.jsx("div",{ref:Qe,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Kn(U||fe)}),a.jsxs("div",{ref:et,className:jt,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%",...we&&ne?{width:ne,maxWidth:"100%"}:void 0},children:[Ve&&we?a.jsx("div",{className:`${Xt} ${e}-titles-fade-out`,children:Kn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Kn(fe)})]})]}),Oe(),bn()]}),lt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:$.scalingValue(W??0,i),height:$.scalingValue(W??0,i),marginRight:ae,"--close-icon-hover-color":I},children:[a.jsx("button",{ref:xe,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:a.jsx(mn,{url:L??"",fill:A,hoverFill:i&&!r?A: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:ae,height:"100%",pointerEvents:"auto"}})]}),Rt=($e,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[kt||ht?z():null,St?bt("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:$e}):a.jsxs(a.Fragment,{children:[$e,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Oe()]}),Dt=$e=>{if(!$e)return null;const Ke=wi(e,$e,D,se,R);return a.jsx(a.Fragment,{children:Ke.map(F=>Ct(F,"single-row",Vt(Ke,F,"single-row")))})},zt=$e=>{if(!$e)return null;const Ke=wi(e,$e,D,se,R),F=Ke.find(oe=>oe.prefix==="title1");return F?Ct(F,"two-row-top",Vt(Ke,F,"two-row-top")):null},cn=($e,Ke=!1)=>{const F=$e?wi(e,$e,D,se,R):[],oe=F.filter(Ge=>Ge.prefix==="title2"||Ge.prefix==="title3"),ge=o&&Ke;return oe.length>0||ge||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[oe.map(Ge=>Ct(Ge,"two-row-bottom",Vt(F,Ge,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[jo(),Vo()]}):null]}):null,(_??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:Zt,width:"100%",flexShrink:0,pointerEvents:ge?"auto":"none"}}):null]}):null},xn=($e,Ke=!1)=>a.jsxs(a.Fragment,{children:[Rt(zt($e)),cn($e,Ke)]}),Kn=$e=>te?a.jsx("div",{className:`${e}-titles-row-two-row`,children:xn($e)}):$e?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Dt($e)}):null,Qi=()=>{const $e=te?-1:Le.findIndex(oe=>oe.prefix==="title1"),Ke=!te&&(o||(q??0)>0)?(()=>{const oe=q??0,ge=$e>=0?st[$e]:ft.title1Width,ke=Math.max(oe,ni);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:S(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=Le.flatMap((oe,ge)=>{if(!oe.marginLeftKey)return[];const ke=wt[oe.marginLeftKey]??0,Ge=Ju(Le,st,wt,ge)+Kt(),pt=Math.max(ke,ni);return a.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(st[ge]),style:{position:"absolute",top:0,left:S(Ge),width:S(pt),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return Ke?[Ke,...F]:F},hn=()=>Le.map(($e,Ke)=>{const F=yn(Ke,st),ge=Nt(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S(ge),width:S(Pn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),jo=()=>gt.flatMap(($e,Ke)=>{if(!$e.marginLeftKey)return[];const F=wt[$e.marginLeftKey]??0,oe=Ft(Ke),ge=Math.max(F,ni),{resolvedWidth:ke}=mt($e,"two-row-bottom");return a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:S(oe),width:S(ge),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)}),Vo=()=>gt.map(($e,Ke)=>{const{maxWidth:F}=mt($e,"two-row-bottom"),ge=_t(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:S(ge),width:S(Pn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),bn=()=>!o||te?null:a.jsxs(a.Fragment,{children:[Qi(),hn()]}),di=$e=>{const Ke=!$e.objectFit&&si(x);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:k,...Ke?{"--image-aspect-ratio":ja(x)}:{}}}},Zi=$e=>$e.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":$e.objectFit}}:si(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Sn=$e=>{if($e.length===0)return null;const Ke=$e.length>1,F=as(X),oe=`calc(-0.5 * (${F} + ${X}))`;if($e.length===1){const ge=$e[0];return a.jsx("div",{...di(ge),children:a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:X}:void 0,children:$e.map((ge,ke)=>a.jsxs("div",{...di(ge),children:[a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1}),o&&Ke&&ke<$e.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:F,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ge.assetId}-${ke}`))})},Yn=!!(fe!=null&&fe.title2||fe!=null&&fe.title3||Ve!=null&&Ve.title2||Ve!=null&&Ve.title3||(_??0)>0||o),Ji=()=>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:Qe,className:jt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:xn(U||fe)}),a.jsxs("div",{ref:et,className:`${e}-titles-row-two-row`,style:{...we&&N?{minHeight:N}:void 0,...we&&ne?{width:ne,maxWidth:"100%"}:void 0},children:[Rt(a.jsxs("div",{className:jt,style:{position:we?"absolute":"relative",inset:we?0:void 0,width:"100%"},children:[Ve&&we?a.jsx("div",{className:`${Qt} ${e}-titles-fade-out`,children:zt(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:zt(fe)})]}),we&&N?N:void 0),Yn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ve&&we?a.jsx("div",{className:`${Xt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${we?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${te?` ${e}-titles-layer-in-stacked`:""}`,children:cn(fe,!0)})]}):null]})]}),eo=()=>{const $e=Yn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...$e?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:$e?void 0:{flex:"0 0 auto",height:"auto"},children:xn(fe,!0)}),bn()]})};return a.jsxs("div",{ref:it,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Be||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Ot?void 0:-1,style:{opacity:he?1:0,transition:"opacity 300ms ease",pointerEvents:he?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...tt}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:rt,...xt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:_e,onClick:$e=>$e.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":Se&&ve.length>1?"true":"false",onPointerDown:Se?Fe:void 0,onPointerUp:Se?Ze:void 0,onPointerCancel:Se?dt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Lt&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:$e=>{$e.target===$e.currentTarget&&ot(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:Sn(Lt.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:re?Sn(re.images):null})},`slide-in-${ye}-${ue}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:He,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,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:It&&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?E==="fade"?Ji():eo():E==="fade"?Gt():vt()})})})]})]})]})};function Zx(e){return`
15420
+ `,Yx="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 Qx(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 Zx=Fo.reduce((e,t)=>({...e,...Qx(t)}),{}),Jx=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 fs(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 eb=jx(),tb={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"}},...Zx,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:Yx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Jx},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,...fs({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,...fs({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,...fs({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:[eb]}],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"}]}},nb={element:Ux,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:tb,sourceCode:Kx,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")}`}),{})}},ib=({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:v,coverFit:x,backgroundColor:m,imageGap:h,maxWidth:b,maxHeight:S,textTransition:R,title1Width:y,title2Width:C,title3Width:E,title1MarginLeft:G=0,title2MarginLeft:H=0,title3MarginLeft:O=0,titleRowMarginBottom:F=0,titleHeaderLayout:D="single-row",countCloseGap:I=0,closeIcon:L,closeIconMaxWidth:z,closeIconColor:k,closeIconHoverColor:$,contentMarginTop:P=0,iconMarginRight:q=0}=n,_=s.useCallback(Se=>w.scalingValue(Se,i??!1),[i]),K=_(h??0),M=`${b}%`,f=`${S}%`,X=_(I),oe=_(P),ue=_(q),N=Gi("title1",Vi(n,"title1"),i),se=Gi("title2",Vi(n,"title2"),i),T=Gi("title3",Vi(n,"title3"),i),me=Gi("count",Vi(n,"count"),i),J=D==="mobile",we=!i||!!r,Le=!o&&(!i||!!r),he=s.useMemo(()=>pa(t,v),[t,v]),[fe,ie]=s.useState(l),re=he[fe],ae=re==null?void 0:re.entry,[pe,be]=s.useState(!1),[ke,Fe]=s.useState(null),[xe,le]=s.useState(!1),[g,V]=s.useState(null),[Y,te]=s.useState(!1),[ge,ee]=s.useState(0),[B,Z]=s.useState(),[U,de]=s.useState(),[j,Pe]=s.useState(null),ne=s.useRef(null),Q=s.useRef(0),_e=s.useRef(0),Ge=s.useRef(0),Be=s.useRef(!1),qe=s.useRef(null),Ye=s.useRef(null),nt=s.useRef(null),it=s.useRef(null),ve=s.useRef(null),Te=s.useRef(null),We=s.useRef(null),Ke=s.useCallback(()=>{const Se=Ye.current;if(!Se)return;const Ue=Se.closest(`.${e}-lightbox-content-area`);if(!Ue)return Se.getBoundingClientRect().width;const A=Array.from(Ue.children).reduce((ce,ye)=>!(ye instanceof HTMLElement)||ye.contains(Se)?ce:ce+ye.getBoundingClientRect().width,0);return Ue.getBoundingClientRect().width-A},[e]),Ze=s.useCallback(()=>{ne.current&&(clearTimeout(ne.current),ne.current=null)},[]),lt=s.useCallback(Se=>{Se===Q.current&&(V(null),te(!1))},[]),ot=s.useCallback(()=>{o||Be.current||(Be.current=!0,u==null||u(),be(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Me=s.useCallback(Se=>!!(Se.closest("[data-controls]")||Se.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ze,backdropStyle:et,mediaAreaStyle:Oe,overlayContentStyle:Ne,swipeHandlers:yt,dismissAreaStyle:je}=bp({enabled:Le,onClose:ot,animMs:300,isBlockedTarget:Me}),He=s.useCallback(Se=>{c&&np(Se+1,d,!0)},[c,d]),Ce=s.useCallback(Se=>{if(Se)return Se.getBoundingClientRect().height},[]),tt=s.useCallback(Se=>{if(he.length===0)return;const Ue=(Se%he.length+he.length)%he.length;if(Ue===fe)return;const A=he[fe],ce=he[Ue];Q.current+=1;const ye=Q.current,Ee=R==="fade"&&Fc(A==null?void 0:A.entry)!==Fc(ce==null?void 0:ce.entry),Ve=Ce(nt.current),dt=Ee?(()=>{const Kt=Ke();Un.flushSync(()=>{Pe(ce.entry)}),nt.current&&Kt&&(nt.current.style.width=`${Kt}px`);const sn=Ce(nt.current);return nt.current&&(nt.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:Kt}})():void 0,At=Math.max(Ve??0,(dt==null?void 0:dt.measuredIncomingTitlesHeight)??0)||void 0;ee(ye),V(fe),te(!0),ie(Ue),He(Ue),Ge.current=Ue,Ee?(Ze(),At&&Z(At),dt!=null&&dt.incomingTitlesMeasureWidth&&de(dt.incomingTitlesMeasureWidth),Fe((A==null?void 0:A.entryIndex)??null),le(!0),_e.current=ce.entryIndex,ne.current=setTimeout(()=>{Fe(null),le(!1),Z(void 0),de(void 0),Pe(null),ne.current=null},400)):(Ze(),Fe(null),le(!1),Z(void 0),de(void 0),Pe(null),_e.current=ce.entryIndex)},[fe,Ze,Ke,Ce,he,He,R]),Qe=s.useCallback(()=>{We.current=null},[]),St=s.useCallback(Se=>{!we||he.length<=1||Se.pointerType==="mouse"&&Se.button!==0||Se.target.closest("[data-controls]")||(We.current={startX:Se.clientX,startY:Se.clientY,pointerId:Se.pointerId})},[we,he.length]),Ct=s.useCallback(Se=>{var Kt;if(!we||he.length<=1||Se.pointerType==="mouse"&&Se.button!==0)return;if(ze){Qe();return}const Ue=We.current;if(!Ue||Ue.pointerId!==Se.pointerId||(Qe(),Se.target.closest("[data-controls]")))return;const ce=Se.clientX-Ue.startX,ye=Se.clientY-Ue.startY,Ee=Math.abs(ce),Ve=Math.abs(ye);if(Ee>=mv&&Ee>Ve){tt(ce>0?fe-1:fe+1);return}if(Ee>Rc||Ve>Rc)return;const dt=(Kt=it.current)==null?void 0:Kt.getBoundingClientRect(),At=dt?dt.left+dt.width/2:window.innerWidth/2;tt(Se.clientX<At?fe-1:fe+1)},[fe,we,tt,ze,Qe,he.length]),Wt=s.useCallback(Se=>{const Ue=We.current;(Ue==null?void 0:Ue.pointerId)===Se.pointerId&&Qe()},[Qe]);jl(),s.useEffect(()=>{Te.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Se=requestAnimationFrame(()=>{be(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():it.current&&it.current.focus()})});return()=>{cancelAnimationFrame(Se),qe.current&&clearTimeout(qe.current),ne.current&&clearTimeout(ne.current);const Ue=Te.current;Ue&&document.contains(Ue)&&Ue.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Se;R!=="fade"&&(_e.current=((Se=he[fe])==null?void 0:Se.entryIndex)??0,Ze(),Fe(null),le(!1),Z(void 0),de(void 0))},[fe,Ze,he,R]),s.useEffect(()=>{const Se=Ue=>{if(Ue.key==="Escape"){ot();return}if(Ue.key==="ArrowLeft"&&he.length>1){tt(fe-1);return}if(Ue.key==="ArrowRight"&&he.length>1){tt(fe+1);return}if(Ue.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"])'),ce=Array.from(A).filter(dt=>!dt.closest('[aria-hidden="true"]'));if(ce.length===0)return;const ye=ce[0],Ee=ce[ce.length-1],Ve=document.activeElement;Ue.shiftKey?(Ve===ye||!it.current.contains(Ve))&&(Ue.preventDefault(),Ee.focus()):(Ve===Ee||!it.current.contains(Ve))&&(Ue.preventDefault(),ye.focus())}};return window.addEventListener("keydown",Se),()=>window.removeEventListener("keydown",Se)},[tt,ot,fe,he.length]),s.useLayoutEffect(()=>{Ze(),Q.current=0,ee(0),V(null),te(!1),Fe(null),le(!1),Z(void 0),de(void 0),Pe(null),ie(Se=>{const Ue=Math.max(0,he.length-1);return Math.min(Se,Ue)})},[Ze,t.length,v,he.length]),s.useLayoutEffect(()=>{var A;const Se=Math.max(0,he.length-1),Ue=Math.min(Math.max(0,l),Se);Ge.current=Ue,_e.current=((A=he[Ue])==null?void 0:A.entryIndex)??0,ie(Ue)},[l]);const ht=ke!==null?t[ke]:null,Xt=g!==null?he[g]:null,wt=(ae==null?void 0:ae.title1)||(ae==null?void 0:ae.title2)||(ae==null?void 0:ae.title3)||(ht==null?void 0:ht.title1)||(ht==null?void 0:ht.title2)||(ht==null?void 0:ht.title3),Vt=Sv(v,he,t),Yt=L!==null,$e=wt||Vt||Yt,Xe=Vt&&Yt?{gap:X}:void 0,ut=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,$t=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,bt=`${e}-titles-layer-out`,ct=(G??0)>0||o,Ht=_(F),mt=s.useMemo(()=>({title1Width:y??So.title1Width,title2Width:C??So.title2Width,title3Width:E??So.title3Width}),[y,C,E]),Tt=s.useMemo(()=>({title2MarginLeft:H,title3MarginLeft:O}),[H,O]),Ie=s.useMemo(()=>ae?Ti(e,ae,N,se,T):[],[e,ae,N,se,T]),Je=s.useMemo(()=>Ie.map(Se=>mt[Se.widthKey]),[Ie,mt]),rt=s.useMemo(()=>Po(Ie.length,Je),[Ie.length,Je]),Mt=s.useMemo(()=>vr(Ie.length,Je),[Ie.length,Je]),gt=s.useMemo(()=>Ie.filter(Se=>Se.prefix==="title1"),[Ie]),xt=s.useMemo(()=>Ie.filter(Se=>Se.prefix==="title2"||Se.prefix==="title3"),[Ie]),Ft=s.useMemo(()=>Ii(gt,mt),[gt,mt]),Ot=s.useMemo(()=>Ii(xt,mt),[xt,mt]),pt=s.useCallback((Se,Ue)=>{const A=Ie.findIndex(ye=>ye.prefix===Se.prefix);if(!J||Ue==="single-row")return{effectiveWidth:Mt[A]??0,resolvedWidth:rt[A]??0,maxWidth:vn(A,rt)};if(Ue==="two-row-top"){const ye=gt.findIndex(Ee=>Ee.prefix===Se.prefix);return{effectiveWidth:Ft.effective[ye]??0,resolvedWidth:Ft.resolved[ye]??0,maxWidth:vn(ye,Ft.resolved)}}const ce=xt.findIndex(ye=>ye.prefix===Se.prefix);return{effectiveWidth:Ot.effective[ce]??0,resolvedWidth:Ot.resolved[ce]??0,maxWidth:vn(ce,Ot.resolved)}},[Ie,xt,Ot,Mt,rt,gt,Ft,J]),Dt=s.useCallback(Se=>ap(Ie,rt,Tt,Se)+(J?0:G??0),[Ie,rt,Tt,J,G]),qt=s.useCallback(()=>J?0:G??0,[J,G]),Nt=s.useCallback(Se=>xt.slice(0,Se).reduce((Ue,A,ce)=>Ue+(A.marginLeftKey?Tt[A.marginLeftKey]??0:0)+(Ot.resolved[ce]??0),0),[xt,Ot.resolved,Tt]),zt=s.useCallback(Se=>{const Ue=xt[Se];return Nt(Se)+(Ue.marginLeftKey?Tt[Ue.marginLeftKey]??0:0)+(Ot.resolved[Se]??0)},[xt,Ot.resolved,Nt,Tt]),jt=s.useCallback((Se,Ue,A)=>{if(!J||A==="single-row"){const dt=Se.findIndex(en=>en.prefix===Ue.prefix),At=Se.map(en=>mt[en.widthKey]),Kt=Po(Se.length,At);return{effectiveWidth:vr(Se.length,At)[dt]??0,resolvedWidth:Kt[dt]??0,maxWidth:vn(dt,Kt)}}if(A==="two-row-top"){const dt=Se.filter(en=>en.prefix==="title1"),At=dt.findIndex(en=>en.prefix===Ue.prefix),{resolved:Kt,effective:sn}=Ii(dt,mt);return{effectiveWidth:sn[At]??0,resolvedWidth:Kt[At]??0,maxWidth:vn(At,Kt)}}const ce=Se.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),ye=ce.findIndex(dt=>dt.prefix===Ue.prefix),{resolved:Ee,effective:Ve}=Ii(ce,mt);return{effectiveWidth:Ve[ye]??0,resolvedWidth:Ee[ye]??0,maxWidth:vn(ye,Ee)}},[mt,J]),Bt=(Se,Ue,A)=>{const ce=Se.marginLeftKey?Tt[Se.marginLeftKey]??0:0,{effectiveWidth:ye,resolvedWidth:Ee,maxWidth:Ve}=A??pt(Se,Ue),dt=Math.max(ce,ii),At=o&&Ue==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Se.prefix,style:{width:_(ye),...ce>0?{marginLeft:_(ce)}:{}},children:[a.jsx("p",{className:Se.className,style:Se.style,children:Se.text}),At&&Se.marginLeftKey?a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:_(-ce),width:_(dt),height:"100%",pointerEvents:"auto"}}):null,At?a.jsx("div",{"data-controls":Se.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ve),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-Mn/2),width:_(Mn),height:"100%",pointerEvents:"auto"}}):null]},Se.className)},Rt=(Se="two-row")=>{const Ue=Ie.findIndex(ye=>ye.prefix==="title1"),A=Ue>=0?rt[Ue]:mt.title1Width,ce=Se==="two-row"&&o;return a.jsx("div",{...ce?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A)}:{},style:{width:_(G??0),flexShrink:0,alignSelf:"stretch",...ce?{pointerEvents:"auto"}:{}}})},W=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:N,"aria-hidden":"true",children:" "}),Re=()=>a.jsx("span",{className:`${e}-entry-counter`,style:me,"aria-live":"polite","aria-atomic":"true",children:bv(he,fe,v,t)}),Ae=()=>Vt?o&&Yt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${as(X)} + ${X}))`,width:as(X),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,De=()=>!Vt&&!Yt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Xe,children:[Ae(),Yt?at():null]}),ft=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Vt||wt?W():null,ct?Rt("single-row"):null,It(ae),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),De(),Sn()]}),Ut=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Vt||wt?W():null,ct?Rt("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&B?{minHeight:B}:void 0,children:[a.jsx("div",{ref:nt,className:ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:bn(j||ae)}),a.jsxs("div",{ref:Ye,className:ut,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&U?{width:U,maxWidth:"100%"}:void 0},children:[ht&&xe?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:bn(ht)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:bn(ae)})]})]}),De(),Sn()]}),at=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:w.scalingValue(z??0,i),height:w.scalingValue(z??0,i),marginRight:ue,"--close-icon-hover-color":$},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:ot,"aria-label":"Close",children:a.jsx(gn,{url:L??"",fill:k,hoverFill:i&&!r?k:$,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:ue,height:"100%",pointerEvents:"auto"}})]}),Et=(Se,Ue)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Vt||wt?W():null,ct?Rt("two-row"):null,Ue!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ue},children:Se}):a.jsxs(a.Fragment,{children:[Se,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),De()]}),It=Se=>{if(!Se)return null;const Ue=Ti(e,Se,N,se,T);return a.jsx(a.Fragment,{children:Ue.map(A=>Bt(A,"single-row",jt(Ue,A,"single-row")))})},_t=Se=>{if(!Se)return null;const Ue=Ti(e,Se,N,se,T),A=Ue.find(ce=>ce.prefix==="title1");return A?Bt(A,"two-row-top",jt(Ue,A,"two-row-top")):null},on=(Se,Ue=!1)=>{const A=Se?Ti(e,Se,N,se,T):[],ce=A.filter(Ve=>Ve.prefix==="title2"||Ve.prefix==="title3"),ye=o&&Ue;return ce.length>0||ye||(F??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ce.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ce.map(Ve=>Bt(Ve,"two-row-bottom",jt(A,Ve,"two-row-bottom"))),Ue&&o?a.jsxs(a.Fragment,{children:[pi(),Yn()]}):null]}):null,(F??0)>0||ye?a.jsx("div",{"data-controls":ye?"titleRowMarginBottom":void 0,"data-controls-axis":ye?"y":void 0,"data-controls-reverse":ye?"":void 0,className:ye?`${e}-control`:void 0,style:{height:Ht,width:"100%",flexShrink:0,pointerEvents:ye?"auto":"none"}}):null]}):null},fn=(Se,Ue=!1)=>a.jsxs(a.Fragment,{children:[Et(_t(Se)),on(Se,Ue)]}),bn=Se=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:fn(Se)}):Se?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It(Se)}):null,ui=()=>{const Se=J?-1:Ie.findIndex(ce=>ce.prefix==="title1"),Ue=!J&&(o||(G??0)>0)?(()=>{const ce=G??0,ye=Se>=0?rt[Se]:mt.title1Width,Ee=Math.max(ce,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:_(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,A=Ie.flatMap((ce,ye)=>{if(!ce.marginLeftKey)return[];const Ee=Tt[ce.marginLeftKey]??0,Ve=rp(Ie,rt,Tt,ye)+qt(),dt=Math.max(Ee,ii);return a.jsx("div",{"data-controls":ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(rt[ye]),style:{position:"absolute",top:0,left:_(Ve),width:_(dt),height:"100%",pointerEvents:"auto"}},ce.marginLeftKey)});return Ue?[Ue,...A]:A},dn=()=>Ie.map((Se,Ue)=>{const A=vn(Ue,rt),ye=Dt(Ue)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.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:_(ye),width:_(Mn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),pi=()=>xt.flatMap((Se,Ue)=>{if(!Se.marginLeftKey)return[];const A=Tt[Se.marginLeftKey]??0,ce=Nt(Ue),ye=Math.max(A,ii),{resolvedWidth:Ee}=pt(Se,"two-row-bottom");return a.jsx("div",{"data-controls":Se.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:_(ce),width:_(ye),height:"100%",pointerEvents:"auto"}},Se.marginLeftKey)}),Yn=()=>xt.map((Se,Ue)=>{const{maxWidth:A}=pt(Se,"two-row-bottom"),ye=zt(Ue)-Mn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Se.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:_(ye),width:_(Mn),height:"100%",pointerEvents:"auto"}})},`${Se.widthKey}-junction`)}),Sn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=Se=>{const Ue=!Se.objectFit&&li(x);return{className:`${e}-slide-image-cell${Ue?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:M,maxHeight:f,...Ue?{"--image-aspect-ratio":ja(x)}:{}}}},eo=Se=>Se.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Se.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},wn=Se=>{if(Se.length===0)return null;const Ue=Se.length>1,A=as(K),ce=`calc(-0.5 * (${A} + ${K}))`;if(Se.length===1){const ye=Se[0];return a.jsx("div",{...mi(ye),children:a.jsx("img",{...eo(ye),src:ye.assetId,alt:ye.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ue?{gap:K}:void 0,children:Se.map((ye,Ee)=>a.jsxs("div",{...mi(ye),children:[a.jsx("img",{...eo(ye),src:ye.assetId,alt:ye.name??"",draggable:!1}),o&&Ue&&Ee<Se.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ce,width:A,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye.assetId}-${Ee}`))})},Qn=!!(ae!=null&&ae.title2||ae!=null&&ae.title3||ht!=null&&ht.title2||ht!=null&&ht.title3||(F??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:nt,className:ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:fn(j||ae)}),a.jsxs("div",{ref:Ye,className:`${e}-titles-row-two-row`,style:{...xe&&B?{minHeight:B}:void 0,...xe&&U?{width:U,maxWidth:"100%"}:void 0},children:[Et(a.jsxs("div",{className:ut,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[ht&&xe?a.jsx("div",{className:`${bt} ${e}-titles-fade-out`,children:_t(ht)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:_t(ae)})]}),xe&&B?B:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ht&&xe?a.jsx("div",{className:`${$t} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(ht)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:on(ae,!0)})]}):null]})]}),no=()=>{const Se=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Se?void 0:{flex:"0 0 auto",height:"auto"},children:fn(ae,!0)}),Sn()]})};return a.jsxs("div",{ref:it,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ze||ot()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:Yt?void 0:-1,style:{opacity:pe?1:0,transition:"opacity 300ms ease",pointerEvents:pe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...et}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:je,...yt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Se=>Se.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":we&&he.length>1?"true":"false",onPointerDown:we?St:void 0,onPointerUp:we?Ct:void 0,onPointerCancel:we?Wt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Xt&&Y?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Se=>{Se.target===Se.currentTarget&&lt(ge)},children:a.jsx("div",{className:`${e}-slide-area`,children:wn(Xt.images)})},`slide-out-${ge}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Y?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:re?wn(re.images):null})},`slide-in-${ge}-${fe}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ne,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:oe,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:$e&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?R==="fade"?to():no():R==="fade"?Ut():ft()})})})]})]})]})};function ob(e){return`
15421
15421
  .${e}-wrapper {
15422
15422
  position: relative;
15423
15423
  width: 100%;
@@ -15939,7 +15939,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15939
15939
  pointer-events: auto;
15940
15940
  z-index: 10;
15941
15941
  }
15942
- `}const Jx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=$.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[m,h]=s.useState(!1),[v,b]=s.useState(0),E=s.useRef(!1),f=s.useRef(!1),w=s.useRef(!1),H=s.useMemo(()=>(t??[]).filter(C=>To(C).length>0),[t]),q=m&&H.length>0,B=!n,M=s.useCallback(()=>{B&&(w.current=!0,cv(f.current,d),f.current=!1)},[B,d]),_=(C=0)=>{if(H.length===0||n&&!i&&!o)return;const L=pa(H,y),W=Math.max(0,Math.min(C,L.length-1));if(b(W),B){const A=Qu();Yu(W+1,d,A),f.current=!A}h(!0)},j=s.useCallback(()=>{h(!1),w.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!B||typeof window>"u")return;const C=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=C}},[B]),s.useEffect(()=>{if(!B||E.current)return;E.current=!0;const C=kc(d);if(!C)return;const L=Ac(C,pa(H,y).length);L<0||(b(L),h(!0))},[H,d,B,y]),s.useEffect(()=>{if(!B)return;const C=()=>{if(w.current){w.current=!1,h(!1);return}const L=kc(d);if(!L){h(!1);return}const W=Ac(L,pa(H,y).length);if(W<0){h(!1);return}f.current=!1,b(W),h(!0)};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[H,d,B,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Zx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${si(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>_(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...si(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${si(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),q&&typeof document<"u"&&(()=>{const C=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(Qx,{prefix:c,entries:H,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:B,journalItemId:d,onBeforeClose:M,onClose:j}),C)})()]})},eb=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15942
+ `}const rb=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=w.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,x=s.useRef(null),[m,h]=s.useState(!1),[b,S]=s.useState(0),R=s.useRef(!1),y=s.useRef(!1),C=s.useRef(!1),E=s.useMemo(()=>(t??[]).filter(I=>Lo(I).length>0),[t]),G=m&&E.length>0,H=!n,O=s.useCallback(()=>{H&&(C.current=!0,hv(y.current,d),y.current=!1)},[H,d]),F=(I=0)=>{if(E.length===0||n&&!i&&!o)return;const L=pa(E,v),z=Math.max(0,Math.min(I,L.length-1));if(S(z),H){const k=ip();np(z+1,d,k),y.current=!k}h(!0)},D=s.useCallback(()=>{h(!1),C.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!H||typeof window>"u")return;const I=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=I}},[H]),s.useEffect(()=>{if(!H||R.current)return;R.current=!0;const I=kc(d);if(!I)return;const L=Ac(I,pa(E,v).length);L<0||(S(L),h(!0))},[E,d,H,v]),s.useEffect(()=>{if(!H)return;const I=()=>{if(C.current){C.current=!1,h(!1);return}const L=kc(d);if(!L){h(!1);return}const z=Ac(L,pa(E,v).length);if(z<0){h(!1);return}y.current=!1,S(z),h(!0)};return window.addEventListener("popstate",I),()=>window.removeEventListener("popstate",I)},[E,d,H,v]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ob(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>F(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":ja(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]}),G&&typeof document<"u"&&(()=>{const I=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(ib,{prefix:c,entries:E,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:b,enableUrlSync:H,journalItemId:d,onBeforeClose:O,onClose:D}),I)})()]})},ab=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15943
15943
  import { createPortal } from 'react-dom';
15944
15944
  import { CommonComponentProps } from '../props';
15945
15945
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16704,7 +16704,7 @@ export type LightboxJournalSettings = {
16704
16704
  closeIconColor: string;
16705
16705
  closeIconHoverColor: string;
16706
16706
  };
16707
- `,tb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",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",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[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const ib=Li.reduce((e,t)=>({...e,...nb(t)}),{}),ob=Li.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Goudy Bookletter 1911",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Li.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const rb=fv(),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"}}},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"}},...ib,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:tb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...ob,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,...ys({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,...ys({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,...ys({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:[rb]}],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"}]}]}},sb={element:Jx,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:ab,sourceCode:eb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})}},lb={sizeType:"custom",value:700,min:400,max:700};function Ca(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 ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function fp(e,t,n){for(const i of n){const{heightPx:o}=Ca(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 cb(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":fp(e,t,n)||r==="area"?l??"none":c??"none"}function sd(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 db(e){return`
16707
+ `,sb="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 lb(e){const t={};return t[vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSettings")]={...zi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSize")]={...zi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"lineHeight")]={...zi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"letterSpacing")]={...zi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"wordSpacing")]={...zi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textAlign")]={...zi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textAppearance")]={...zi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cb=Ri.reduce((e,t)=>({...e,...lb(t)}),{}),db=Ri.reduce((e,t)=>({...e,[vt(t,"fontFamily")]:"Goudy Bookletter 1911",[vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[vt(t,"letterSpacing")]:0,[vt(t,"wordSpacing")]:0,[vt(t,"textAlign")]:"left",[vt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Ri.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[vt(n,"fontSize")]=i),o!==void 0&&(t[vt(n,"lineHeight")]=o),t},{})}const ub=wv(),pb={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"}},...cb,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:sb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...db,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,...ys({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,...ys({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,...ys({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:[ub]}],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"}]}]}},mb={element:rb,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:pb,sourceCode:ab,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ri.map(e=>({path:`${vt(e,"fontFamily")}`}))]},fontRelations:{...Ri.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${vt(t,"fontFamily")}`}),{})}},gb={sizeType:"custom",value:700,min:400,max:700};function Ca(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 ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function wp(e,t,n){for(const i of n){const{heightPx:o}=Ca(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 hb(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":wp(e,t,n)||r==="area"?l??"none":c??"none"}function sd(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 fb(e){return`
16708
16708
  .${e}-root {
16709
16709
  position: absolute;
16710
16710
  top: 0;
@@ -16739,7 +16739,7 @@ export type LightboxJournalSettings = {
16739
16739
  width: 32px;
16740
16740
  height: 32px;
16741
16741
  }
16742
- `}function ub(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 pb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await ub(i)]));return new Map(n)}function mb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=$.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),v=s.useRef({x:0,y:0}),[b,E]=s.useState(!1),[f,w]=s.useState(!1),H=s.useRef(new Map),{imageSize:q=lb,cursor:B="system",target:M="area",position:_="random",visible:j="all",defaultCursor:C=null,hoverCursor:L=null}=e,W=t.filter(P=>{var k;return!!((k=P==null?void 0:P.image)!=null&&k.assetId)}),A=s.useMemo(()=>db(i),[i]),I=s.useCallback((P,k,O=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=P-ie.left,D=k-ie.top;x({x:ae,y:D}),h(cb(ae,D,O,o,B,M,L,C))},[o,l,B,M,L,C]);s.useEffect(()=>{const P=[...W.map(O=>O.image.assetId),C,L].filter(O=>!!O);if(P.length===0){H.current=new Map,w(!0);return}let k=!1;return w(!1),pb(P).then(O=>{k||(H.current=O,w(!0))}),()=>{k=!0}},[t,C,L]),s.useEffect(()=>{if(!o)return;const P=O=>{O.stopPropagation(),v.current={x:O.clientX,y:O.clientY},I(O.clientX,O.clientY)},k=()=>{b&&I(v.current.x,v.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",k,!0)}},[o,b,I]),s.useEffect(()=>{!o||!b||I(v.current.x,v.current.y)},[l,o,b,I]),s.useEffect(()=>{b||h("none")},[b]);const T=(P,k,O,ie={})=>{var te,Se;if(!((te=P==null?void 0:P.image)!=null&&te.assetId))return null;const ae=((Se=H.current.get(P.image.assetId))==null?void 0:Se.aspectRatio)??1,D=sd(P.image.assetId,q,H.current),{heightPx:se}=Ca(D,ae);let R=0,de=0;return _==="same"?{x:R,y:de}=ad(k,O,D,ae):(R=ie.x??Math.random()*k,de=ie.y??Math.random()*O,{x:R,y:de}=qs(R,de,k,O,D,se)),{id:p.current++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:R,y:de,xRatio:R/k,yRatio:de/O,aspectRatio:ae,widthPx:D}},V=()=>{if(!o)return;const P=o.getBoundingClientRect(),k=P.width,O=P.height;k===0||O===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const D=q.sizeType==="random"?ae.widthPx:sd(ae.assetId,q,H.current),{heightPx:se}=Ca(D,ae.aspectRatio);if(_==="same"){const{x:te,y:Se}=ad(k,O,D,ae.aspectRatio);return{...ae,x:te,y:Se,widthPx:D}}const{x:R,y:de}=qs(ae.xRatio*k,ae.yRatio*O,k,O,D,se);return{...ae,x:R,y:de,widthPx:D}}))};s.useEffect(()=>{if(!o||W.length===0||!f)return;const P=o.getBoundingClientRect(),k=P.width,O=P.height,ie=T(W[0],k,O);ie&&(c([ie]),u(W.length>1?1:0))},[q,_,o,t,f]),s.useEffect(()=>{if(!o)return;V();const P=new ResizeObserver(V);return P.observe(o),window.addEventListener("resize",V),()=>{P.disconnect(),window.removeEventListener("resize",V)}},[o,_,q,l.length]),s.useEffect(()=>{j==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[j]);const S=P=>{if(!o||W.length===0||!f)return;const k=o.getBoundingClientRect(),O=P.clientX-k.left,ie=P.clientY-k.top;if(M==="image"&&!fp(O,ie,l))return;let ae=0,D=0;_==="on Click"?(ae=O,D=ie):_==="same"?(ae=k.width/2,D=k.height/2):(ae=Math.random()*k.width,D=Math.random()*k.height);const se=W[d%W.length],R=T(se,k.width,k.height,{x:ae,y:D});if(!R)return;const de=j==="all"?[...l,R]:[R];c(de),u(te=>(te+1)%W.length),I(P.clientX,P.clientY,de)},X=B==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),a.jsxs("div",{ref:r,onClick:S,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),className:`${i}-root`,style:{cursor:X?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:X?"none":"default"},children:a.jsx($.LinkWrapper,{link:M==="area"?P.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})})},P.id)),b&&X&&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 gb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16742
+ `}function yb(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 vb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yb(i)]));return new Map(n)}function xb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=w.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[v,x]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),b=s.useRef({x:0,y:0}),[S,R]=s.useState(!1),[y,C]=s.useState(!1),E=s.useRef(new Map),{imageSize:G=gb,cursor:H="system",target:O="area",position:F="random",visible:D="all",defaultCursor:I=null,hoverCursor:L=null}=e,z=t.filter(M=>{var f;return!!((f=M==null?void 0:M.image)!=null&&f.assetId)}),k=s.useMemo(()=>fb(i),[i]),$=s.useCallback((M,f,X=l)=>{if(!o)return;const oe=o.getBoundingClientRect(),ue=M-oe.left,N=f-oe.top;x({x:ue,y:N}),h(hb(ue,N,X,o,H,O,L,I))},[o,l,H,O,L,I]);s.useEffect(()=>{const M=[...z.map(X=>X.image.assetId),I,L].filter(X=>!!X);if(M.length===0){E.current=new Map,C(!0);return}let f=!1;return C(!1),vb(M).then(X=>{f||(E.current=X,C(!0))}),()=>{f=!0}},[t,I,L]),s.useEffect(()=>{if(!o)return;const M=X=>{X.stopPropagation(),b.current={x:X.clientX,y:X.clientY},$(X.clientX,X.clientY)},f=()=>{S&&$(b.current.x,b.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",f,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",f,!0)}},[o,S,$]),s.useEffect(()=>{!o||!S||$(b.current.x,b.current.y)},[l,o,S,$]),s.useEffect(()=>{S||h("none")},[S]);const P=(M,f,X,oe={})=>{var J,we;if(!((J=M==null?void 0:M.image)!=null&&J.assetId))return null;const ue=((we=E.current.get(M.image.assetId))==null?void 0:we.aspectRatio)??1,N=sd(M.image.assetId,G,E.current),{heightPx:se}=Ca(N,ue);let T=0,me=0;return F==="same"?{x:T,y:me}=ad(f,X,N,ue):(T=oe.x??Math.random()*f,me=oe.y??Math.random()*X,{x:T,y:me}=qs(T,me,f,X,N,se)),{id:p.current++,assetId:M.image.assetId,link:M.link,name:M.image.name,x:T,y:me,xRatio:T/f,yRatio:me/X,aspectRatio:ue,widthPx:N}},q=()=>{if(!o)return;const M=o.getBoundingClientRect(),f=M.width,X=M.height;f===0||X===0||c(oe=>oe.length===0?oe:oe.map(ue=>{const N=G.sizeType==="random"?ue.widthPx:sd(ue.assetId,G,E.current),{heightPx:se}=Ca(N,ue.aspectRatio);if(F==="same"){const{x:J,y:we}=ad(f,X,N,ue.aspectRatio);return{...ue,x:J,y:we,widthPx:N}}const{x:T,y:me}=qs(ue.xRatio*f,ue.yRatio*X,f,X,N,se);return{...ue,x:T,y:me,widthPx:N}}))};s.useEffect(()=>{if(!o||z.length===0||!y)return;const M=o.getBoundingClientRect(),f=M.width,X=M.height,oe=P(z[0],f,X);oe&&(c([oe]),u(z.length>1?1:0))},[G,F,o,t,y]),s.useEffect(()=>{if(!o)return;q();const M=new ResizeObserver(q);return M.observe(o),window.addEventListener("resize",q),()=>{M.disconnect(),window.removeEventListener("resize",q)}},[o,F,G,l.length]),s.useEffect(()=>{D==="last One"&&c(M=>M.length>0?[M[M.length-1]]:[])},[D]);const _=M=>{if(!o||z.length===0||!y)return;const f=o.getBoundingClientRect(),X=M.clientX-f.left,oe=M.clientY-f.top;if(O==="image"&&!wp(X,oe,l))return;let ue=0,N=0;F==="on Click"?(ue=X,N=oe):F==="same"?(ue=f.width/2,N=f.height/2):(ue=Math.random()*f.width,N=Math.random()*f.height);const se=z[d%z.length],T=P(se,f.width,f.height,{x:ue,y:N});if(!T)return;const me=D==="all"?[...l,T]:[T];c(me),u(J=>(J+1)%z.length),$(M.clientX,M.clientY,me)},K=H==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),a.jsxs("div",{ref:r,onClick:_,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:`${i}-root`,style:{cursor:K?"none":"default"},children:[l.map(M=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${M.y}px`,left:`${M.x}px`,width:`${M.widthPx}px`,cursor:K?"none":"default"},children:a.jsx(w.LinkWrapper,{link:O==="area"?M.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:M.assetId,alt:M.name,className:`${i}-image`})})},M.id)),S&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16743
16743
  import { CommonComponentProps } from '../props';
16744
16744
  import { LinkWrapper, useScopedStyles, type ContentLink } from '../utils/index';
16745
16745
 
@@ -17265,7 +17265,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17265
17265
  </>
17266
17266
  );
17267
17267
  }
17268
- `,hb={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"]}]}]},fb={element:mb,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:hb,sourceCode:gb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},yb=100,vb=70,hi="cubic-bezier(0.86, 0, 0.07, 1)";function xb(e){return`
17268
+ `,Sb={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"]}]}]},wb={element:xb,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:Sb,sourceCode:bb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},$b=100,Cb=70,vi="cubic-bezier(0.86, 0, 0.07, 1)";function Tb(e){return`
17269
17269
  .${e}-wrapper {
17270
17270
  position: relative;
17271
17271
  width: 100%;
@@ -17300,34 +17300,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17300
17300
  }
17301
17301
  .${e}-incoming-next {
17302
17302
  z-index: 4;
17303
- transition: transform var(--${e}-transition-ms) ${hi};
17303
+ transition: transform var(--${e}-transition-ms) ${vi};
17304
17304
  }
17305
17305
  .${e}-incoming-prev {
17306
17306
  z-index: 4;
17307
- transition: transform var(--${e}-transition-ms) ${hi};
17307
+ transition: transform var(--${e}-transition-ms) ${vi};
17308
17308
  }
17309
17309
  .${e}-outgoing {
17310
17310
  will-change: transform;
17311
17311
  }
17312
17312
  .${e}-outgoing-next {
17313
17313
  z-index: 3;
17314
- transition: transform var(--${e}-transition-ms) ${hi};
17314
+ transition: transform var(--${e}-transition-ms) ${vi};
17315
17315
  }
17316
17316
  .${e}-outgoing-prev {
17317
17317
  z-index: 3;
17318
- transition: transform var(--${e}-transition-ms) ${hi};
17318
+ transition: transform var(--${e}-transition-ms) ${vi};
17319
17319
  }
17320
17320
  .${e}-outgoing-next .${e}-effect-image {
17321
- transition: filter var(--${e}-transition-ms) ${hi};
17321
+ transition: filter var(--${e}-transition-ms) ${vi};
17322
17322
  }
17323
17323
  .${e}-outgoing-prev .${e}-effect-image {
17324
- transition: filter var(--${e}-transition-ms) ${hi};
17324
+ transition: filter var(--${e}-transition-ms) ${vi};
17325
17325
  }
17326
17326
  .${e}-incoming .${e}-effect-image {
17327
- transition: filter var(--${e}-transition-ms) ${hi};
17327
+ transition: filter var(--${e}-transition-ms) ${vi};
17328
17328
  }
17329
17329
  .${e}-background .${e}-effect-image {
17330
- transition: filter var(--${e}-transition-ms) ${hi};
17330
+ transition: filter var(--${e}-transition-ms) ${vi};
17331
17331
  }
17332
17332
  .${e}-snap .${e}-incoming,
17333
17333
  .${e}-snap .${e}-outgoing,
@@ -17375,7 +17375,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17375
17375
  display: block;
17376
17376
  pointer-events: none;
17377
17377
  }
17378
- `}function bb(e){return e==="blur"?vb:e==="greyscale"?yb:0}function Yo(e,t=1,n=1){const i=bb(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 ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Sb(e,t){return t<=1?0:(e-1+t)%t}function wb(e,t=1){return!e||e.height===0?t:e.width/e.height}function $b(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 cd(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 yp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...yp(e),[`--${n}-stage-scale`]:t}}function Cb(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 Tb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var ce,g,Y,Z,ee,ye,G;const{prefix:o}=$.useScopedStyles(),r=s.useMemo(()=>xb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=ld(y.length),[m,h]=s.useState(x.activeIndex),[v,b]=s.useState(x.backgroundIndex),[E,f]=s.useState(!1),[w,H]=s.useState(!1),[q,B]=s.useState(null),[M,_]=s.useState(null),[j,C]=s.useState(0),[L,W]=s.useState(1),[A,I]=s.useState("none"),[T,V]=s.useState("next"),[S,X]=s.useState({}),[P,k]=s.useState({width:0,height:0}),O=s.useRef(null),ie=s.useRef(null),ae=!n||!!i,D=l??60,se=Math.max(10,Math.min(100,c??D)),R=Math.max(10,Math.min(100,d??D)),de=Math.max(100,u),te=Yo(p),Se=s.useCallback(N=>{const K=wb(N?S[N]:void 0);return $b(P.width,P.height,K,se,R)},[P.height,P.width,S,R,se]);s.useEffect(()=>{const N=ie.current;if(!N)return;const K=new ResizeObserver(([ne])=>{const{width:pe,height:U}=ne.contentRect;k({width:pe,height:U})});return K.observe(N),()=>K.disconnect()},[]),s.useEffect(()=>{const N=(t??[]).map(K=>{var ne;return(ne=K.image)==null?void 0:ne.assetId}).filter(K=>!!K);Cb(N,(K,ne)=>{X(pe=>{var U,Pe;return((U=pe[K])==null?void 0:U.width)===ne.width&&((Pe=pe[K])==null?void 0:Pe.height)===ne.height?pe:{...pe,[K]:ne}})})},[t]),s.useEffect(()=>{const{backgroundIndex:N,activeIndex:K}=ld(y.length);h(K),b(N),f(!1),H(!1),B(null),_(null),C(0),W(1),I("none"),V("next")},[y.length,t]),s.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const Ce=s.useCallback(N=>{var le,J,De,Xe;if(!ae||E||y.length<=1)return;const K=N==="next"?(m+1)%y.length:(m-1+y.length)%y.length,ne=Se((J=(le=y[m])==null?void 0:le.image)==null?void 0:J.assetId),pe=Se((Xe=(De=y[K])==null?void 0:De.image)==null?void 0:Xe.assetId),U=cd(P.width,P.height,ne),Pe=cd(P.width,P.height,pe);O.current&&clearTimeout(O.current),V(N),H(!0),f(!0),N==="next"?(B(m),_(K),C(0),W(1),I(Yo(p,0,1))):(b(Sb(K,y.length)),B(K),_(m),C(1),W(Pe),I(Yo(p,1,Pe))),requestAnimationFrame(()=>{H(!1),requestAnimationFrame(()=>{N==="next"?(C(1),W(U),I(Yo(p,1,U))):(C(0),W(1),I(Yo(p,0,1)))})}),O.current=setTimeout(()=>{N==="next"&&b(m),h(K),B(null),_(null),f(!1)},de)},[m,p,P.height,P.width,Se,E,ae,y,de]),ve=y[m],ue=v!==null?y[v]:null,Q=q!==null?y[q]:null,re=M!==null?y[M]:null,fe=y.length<=1?0:(m-1+y.length)%y.length,he=y.length<=1?0:(m+1)%y.length,be=Se((ce=ve==null?void 0:ve.image)==null?void 0:ce.assetId),Me=Se((g=Q==null?void 0:Q.image)==null?void 0:g.assetId),Ne=Se((Y=re==null?void 0:re.image)==null?void 0:Y.assetId),we={[`--${o}-transition-ms`]:`${de}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ie,className:Tt(`${o}-wrapper`,w&&`${o}-snap`,n&&!i&&`${o}-editor`),style:we,"aria-label":"Zoom gallery",children:[((Z=ue==null?void 0:ue.image)==null?void 0:Z.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ue.image.assetId,alt:"",style:{filter:te}})}),E&&((ee=Q==null?void 0:Q.image)==null?void 0:ee.assetId)&&a.jsx("div",{className:Tt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${T}`),style:dd(Me,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Q.image.assetId,alt:"",style:{filter:A}})}),E&&((ye=re==null?void 0:re.image)==null?void 0:ye.assetId)&&a.jsx("div",{className:Tt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${T}`),style:dd(Ne,j,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:re.image.assetId,alt:""})}),!E&&((G=ve==null?void 0:ve.image)==null?void 0:G.assetId)&&a.jsx("div",{className:Tt(`${o}-stage`,`${o}-foreground`),style:yp(be),children:a.jsx("img",{className:`${o}-image`,src:ve.image.assetId,alt:ve.image.name??""})}),ae&&y.length>1&&!E&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Tt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Ce("prev"),"aria-label":`Show previous image (${fe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Tt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Ce("next"),"aria-label":`Show next image (${he+1} of ${y.length})`})]})]})]})}const Ib=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17378
+ `}function Ib(e){return e==="blur"?Cb:e==="greyscale"?$b:0}function Yo(e,t=1,n=1){const i=Ib(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 ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Lb(e,t){return t<=1?0:(e-1+t)%t}function Pb(e,t=1){return!e||e.height===0?t:e.width/e.height}function Mb(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 cd(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 $p(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...$p(e),[`--${n}-stage-scale`]:t}}function Rb(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 Eb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var le,g,V,Y,te,ge,ee;const{prefix:o}=w.useScopedStyles(),r=s.useMemo(()=>Tb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],x=ld(v.length),[m,h]=s.useState(x.activeIndex),[b,S]=s.useState(x.backgroundIndex),[R,y]=s.useState(!1),[C,E]=s.useState(!1),[G,H]=s.useState(null),[O,F]=s.useState(null),[D,I]=s.useState(0),[L,z]=s.useState(1),[k,$]=s.useState("none"),[P,q]=s.useState("next"),[_,K]=s.useState({}),[M,f]=s.useState({width:0,height:0}),X=s.useRef(null),oe=s.useRef(null),ue=!n||!!i,N=l??60,se=Math.max(10,Math.min(100,c??N)),T=Math.max(10,Math.min(100,d??N)),me=Math.max(100,u),J=Yo(p),we=s.useCallback(B=>{const Z=Pb(B?_[B]:void 0);return Mb(M.width,M.height,Z,se,T)},[M.height,M.width,_,T,se]);s.useEffect(()=>{const B=oe.current;if(!B)return;const Z=new ResizeObserver(([U])=>{const{width:de,height:j}=U.contentRect;f({width:de,height:j})});return Z.observe(B),()=>Z.disconnect()},[]),s.useEffect(()=>{const B=(t??[]).map(Z=>{var U;return(U=Z.image)==null?void 0:U.assetId}).filter(Z=>!!Z);Rb(B,(Z,U)=>{K(de=>{var j,Pe;return((j=de[Z])==null?void 0:j.width)===U.width&&((Pe=de[Z])==null?void 0:Pe.height)===U.height?de:{...de,[Z]:U}})})},[t]),s.useEffect(()=>{const{backgroundIndex:B,activeIndex:Z}=ld(v.length);h(Z),S(B),y(!1),E(!1),H(null),F(null),I(0),z(1),$("none"),q("next")},[v.length,t]),s.useEffect(()=>()=>{X.current&&clearTimeout(X.current)},[]);const Le=s.useCallback(B=>{var ne,Q,_e,Ge;if(!ue||R||v.length<=1)return;const Z=B==="next"?(m+1)%v.length:(m-1+v.length)%v.length,U=we((Q=(ne=v[m])==null?void 0:ne.image)==null?void 0:Q.assetId),de=we((Ge=(_e=v[Z])==null?void 0:_e.image)==null?void 0:Ge.assetId),j=cd(M.width,M.height,U),Pe=cd(M.width,M.height,de);X.current&&clearTimeout(X.current),q(B),E(!0),y(!0),B==="next"?(H(m),F(Z),I(0),z(1),$(Yo(p,0,1))):(S(Lb(Z,v.length)),H(Z),F(m),I(1),z(Pe),$(Yo(p,1,Pe))),requestAnimationFrame(()=>{E(!1),requestAnimationFrame(()=>{B==="next"?(I(1),z(j),$(Yo(p,1,j))):(I(0),z(1),$(Yo(p,0,1)))})}),X.current=setTimeout(()=>{B==="next"&&S(m),h(Z),H(null),F(null),y(!1)},me)},[m,p,M.height,M.width,we,R,ue,v,me]),he=v[m],fe=b!==null?v[b]:null,ie=G!==null?v[G]:null,re=O!==null?v[O]:null,ae=v.length<=1?0:(m-1+v.length)%v.length,pe=v.length<=1?0:(m+1)%v.length,be=we((le=he==null?void 0:he.image)==null?void 0:le.assetId),ke=we((g=ie==null?void 0:ie.image)==null?void 0:g.assetId),Fe=we((V=re==null?void 0:re.image)==null?void 0:V.assetId),xe={[`--${o}-transition-ms`]:`${me}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:oe,className:Pt(`${o}-wrapper`,C&&`${o}-snap`,n&&!i&&`${o}-editor`),style:xe,"aria-label":"Zoom gallery",children:[((Y=fe==null?void 0:fe.image)==null?void 0:Y.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:fe.image.assetId,alt:"",style:{filter:J}})}),R&&((te=ie==null?void 0:ie.image)==null?void 0:te.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${P}`),style:dd(ke,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ie.image.assetId,alt:"",style:{filter:k}})}),R&&((ge=re==null?void 0:re.image)==null?void 0:ge.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${P}`),style:dd(Fe,D,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:re.image.assetId,alt:""})}),!R&&((ee=he==null?void 0:he.image)==null?void 0:ee.assetId)&&a.jsx("div",{className:Pt(`${o}-stage`,`${o}-foreground`),style:$p(be),children:a.jsx("img",{className:`${o}-image`,src:he.image.assetId,alt:he.image.name??""})}),ue&&v.length>1&&!R&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Pt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${ae+1} of ${v.length})`}),a.jsx("button",{type:"button",className:Pt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${pe+1} of ${v.length})`})]})]})]})}const kb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17379
17379
  import cn from 'classnames';
17380
17380
  import { CommonComponentProps } from '../props';
17381
17381
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17894,7 +17894,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17894
17894
  </>
17895
17895
  );
17896
17896
  }
17897
- `,Lb={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:""}}]}},Pb={element:Tb,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:Lb,sourceCode:Ib,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Mb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Rb=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Eb(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 kb(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 Ab(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`,x=`.${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`
17897
+ `,Ab={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:""}}]}},Fb={element:Eb,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:Ab,sourceCode:kb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Nb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},_b=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function Hb(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 Wb(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 Ob(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}`,v=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${v}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
17898
17898
  .${e}-root {
17899
17899
  line-height: 0;
17900
17900
  }
@@ -18136,7 +18136,7 @@ a:active .${e}-button .${e}-icon-image,
18136
18136
  height: calc(1em * var(--${e}-icon-scale, 1));
18137
18137
  width: calc(1em * var(--${e}-icon-scale, 1));
18138
18138
  }
18139
- `}function xs(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 ud(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=$.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 Fb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=$.useScopedStyles(),l=s.useMemo(()=>Ab(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:m=0,iconSize:h=0,iconWidthC:v=0,dimensions:b=!1,padding:E={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:w={top:0,left:0,right:0,bottom:0},boxShadowColor:H="rgba(0, 0, 0, 0)",innerBoxShadow:q={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:M=0,blur:_=0,backgroundColor:j="#000000",textColor:C="#ffffff",borderColor:L="#ffffff",iconColor:W="#ffffff",hoverEffect:A="none",fontFamily:I,fontSettings:T,fontSize:V,lineHeight:S,letterSpacing:X=0,wordSpacing:P=0,textAppearance:k,stateOverrides:O,minWidth:ie=0,minHeight:ae=0,width:D=0,height:se=0}=e,R=$.buildColorVars(r,{backgroundColor:j,textColor:C,borderColor:L,iconColor:W,boxShadowColor:H,innerBoxShadowColor:B},Mb,Rb,O),de=i&&i!=="default"?`${r}-state-${i}`:"",te=t&&!n?`${r}-editing`:"",Se=A!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${A}`:"",Ce=A==="reveal"||A==="swipe",ve=A==="content-roll",ue=A==="reveal"&&(!t||n),Q=b===!0,fe=c==="a"?y??p:p,he=c==="c",be=c!=="b",Me={fontSettings:{fontFamily:I,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:V??.01,lineHeight:S,letterSpacing:X,wordSpacing:P,textAppearance:k,color:C},we={...be?un(nn(Me,t)):{},[`--${r}-box-shadow-x`]:$.scalingValue(w.left,t),[`--${r}-box-shadow-y`]:$.scalingValue(w.top,t),[`--${r}-box-shadow-blur`]:$.scalingValue(w.right,t),[`--${r}-box-shadow-spread`]:$.scalingValue(w.bottom,t),[`--${r}-inner-box-shadow-x`]:$.scalingValue(q.left,t),[`--${r}-inner-box-shadow-y`]:$.scalingValue(q.top,t),[`--${r}-inner-box-shadow-blur`]:$.scalingValue(q.right,t),[`--${r}-inner-box-shadow-spread`]:$.scalingValue(q.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${$.scalingValue(_,t)})`:void 0,paddingTop:$.scalingValue(E.top,t),paddingRight:$.scalingValue(E.right,t),paddingBottom:$.scalingValue(E.bottom,t),paddingLeft:$.scalingValue(E.left,t),borderRadius:$.scalingValue(f,t),borderWidth:$.scalingValue(M,t),...he?{}:{justifyContent:vs[fe],textAlign:fe},...he&&!ve?{gap:$.scalingValue(m,t)}:{},...Q?{width:$.scalingValue(D,t),height:$.scalingValue(se,t)}:{minWidth:$.scalingValue(ie,t),minHeight:$.scalingValue(ae,t),...he?{width:"100%"}:{}}};let ce;const g={display:"inline-flex",alignItems:"center",justifyContent:he?vs[fe]:vs[c==="a"?fe:"center"],gap:he?$.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:fe}:{}};if(c==="b"){const ee=()=>ud(r,u,h>0?"fixed":"fill",100,h,t);ce=ve?xs(r,ee,`${r}-icon-roll`,void 0,g):ee()}else if(c==="c"){const ee=()=>{const ye=a.jsx("span",{className:`${r}-text`,style:{textAlign:fe},children:d}),G=ud(r,u,v>0?"fixed":"fill",100,v,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[G,ye]}):a.jsxs(a.Fragment,{children:[ye,G]})};ce=ve?xs(r,ee,`${r}-icon-text-roll`,void 0,g):ee()}else ce=ve?xs(r,()=>d,`${r}-label-roll`,void 0,g):Ce?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const Y=ue?ee=>Eb(ee,r):void 0,Z=ue?ee=>kb(ee,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:R,children:a.jsx("div",{className:`${r}-wrapper ${de} ${te}`.trim(),children:a.jsx("div",{className:`${r}-button ${Se}`.trim(),style:we,onMouseEnter:Y,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:ce})})})]})}const Nb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18139
+ `}function xs(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 ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(gn,{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=w.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 Db({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=w.useScopedStyles(),l=s.useMemo(()=>Ob(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:v,order:x="text-icon",gap:m=0,iconSize:h=0,iconWidthC:b=0,dimensions:S=!1,padding:R={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:C={top:0,left:0,right:0,bottom:0},boxShadowColor:E="rgba(0, 0, 0, 0)",innerBoxShadow:G={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:H="rgba(0, 0, 0, 0)",stroke:O=0,blur:F=0,backgroundColor:D="#000000",textColor:I="#ffffff",borderColor:L="#ffffff",iconColor:z="#ffffff",hoverEffect:k="none",fontFamily:$,fontSettings:P,fontSize:q,lineHeight:_,letterSpacing:K=0,wordSpacing:M=0,textAppearance:f,stateOverrides:X,minWidth:oe=0,minHeight:ue=0,width:N=0,height:se=0}=e,T=w.buildColorVars(r,{backgroundColor:D,textColor:I,borderColor:L,iconColor:z,boxShadowColor:E,innerBoxShadowColor:H},Nb,_b,X),me=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",we=k!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${k}`:"",Le=k==="reveal"||k==="swipe",he=k==="content-roll",fe=k==="reveal"&&(!t||n),ie=S===!0,ae=c==="a"?v??p:p,pe=c==="c",be=c!=="b",ke={fontSettings:{fontFamily:$,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:q??.01,lineHeight:_,letterSpacing:K,wordSpacing:M,textAppearance:f,color:I},xe={...be?pn(nn(ke,t)):{},[`--${r}-box-shadow-x`]:w.scalingValue(C.left,t),[`--${r}-box-shadow-y`]:w.scalingValue(C.top,t),[`--${r}-box-shadow-blur`]:w.scalingValue(C.right,t),[`--${r}-box-shadow-spread`]:w.scalingValue(C.bottom,t),[`--${r}-inner-box-shadow-x`]:w.scalingValue(G.left,t),[`--${r}-inner-box-shadow-y`]:w.scalingValue(G.top,t),[`--${r}-inner-box-shadow-blur`]:w.scalingValue(G.right,t),[`--${r}-inner-box-shadow-spread`]:w.scalingValue(G.bottom,t),[`--${r}-backdrop-blur`]:F>0?`blur(${w.scalingValue(F,t)})`:void 0,paddingTop:w.scalingValue(R.top,t),paddingRight:w.scalingValue(R.right,t),paddingBottom:w.scalingValue(R.bottom,t),paddingLeft:w.scalingValue(R.left,t),borderRadius:w.scalingValue(y,t),borderWidth:w.scalingValue(O,t),...pe?{}:{justifyContent:vs[ae],textAlign:ae},...pe&&!he?{gap:w.scalingValue(m,t)}:{},...ie?{width:w.scalingValue(N,t),height:w.scalingValue(se,t)}:{minWidth:w.scalingValue(oe,t),minHeight:w.scalingValue(ue,t),...pe?{width:"100%"}:{}}};let le;const g={display:"inline-flex",alignItems:"center",justifyContent:pe?vs[ae]:vs[c==="a"?ae:"center"],gap:pe?w.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:ae}:{}};if(c==="b"){const te=()=>ud(r,u,h>0?"fixed":"fill",100,h,t);le=he?xs(r,te,`${r}-icon-roll`,void 0,g):te()}else if(c==="c"){const te=()=>{const ge=a.jsx("span",{className:`${r}-text`,style:{textAlign:ae},children:d}),ee=ud(r,u,b>0?"fixed":"fill",100,b,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[ee,ge]}):a.jsxs(a.Fragment,{children:[ge,ee]})};le=he?xs(r,te,`${r}-icon-text-roll`,void 0,g):te()}else le=he?xs(r,()=>d,`${r}-label-roll`,void 0,g):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const V=fe?te=>Hb(te,r):void 0,Y=fe?te=>Wb(te,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:T,children:a.jsx("div",{className:`${r}-wrapper ${me} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${we}`.trim(),style:xe,onMouseEnter:V,onMouseLeave:Y,role:"button",tabIndex:o||t&&!n?void 0:0,children:le})})})]})}const zb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18140
18140
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
18141
18141
  import { CommonComponentProps } from '../props';
18142
18142
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18768,7 +18768,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18768
18768
  </>
18769
18769
  );
18770
18770
  }
18771
- `,_b={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Wb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{..._b.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Hb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Ob={element:Fb,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Wb,sourceCode:Nb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Db(e){return`
18771
+ `,Bb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},jb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Vb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Bb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...jb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Gb={element:Db,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Vb,sourceCode:zb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Xb(e){return`
18772
18772
  .${e}-titles-row {
18773
18773
  position: relative;
18774
18774
  flex: 0 1 auto;
@@ -18966,7 +18966,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18966
18966
  pointer-events: auto;
18967
18967
  flex-shrink: 0;
18968
18968
  }
18969
- `}const On=500,Qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",zb=72,Bb=50,jb=1e4,Vb=650,Gb=500;function Xb(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 vp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(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 Ub(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vp(i,n):null}function qb(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 pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const Kb=.03;function xp(e){return e.width*Kb}const bs={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 md(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Yb(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 Qb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ks(e,t.width,t.height)}function Zb(e,t){if($.isEmbedMedia(e)){t(e.assetId,$.getEmbedAspect(e),1);return}if(Va(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 Jb(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 eS({mediaList:e}){const t=e.filter(n=>!$.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=>Va(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 Ao(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=xp(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 Ta(e,t,n){const i=Ao(e,t,n);return{...i,left:2*i.left-e.left}}function tS(e,t,n){const{left:i,width:o}=n,r=xp(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 bp(e,t,n,i){const o=Ao(e,"left",i),r=Ao(e,"right",i),l=Ta(e,"left",i),c=Ta(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 nS(e,t,n,i){const{start:o,end:r}=bp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function iS(e,t,n){const i=Ao(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return $.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function oS({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 $.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Va(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 rS({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:h,onPrev:v,onNext:b}){const E=s.useRef(null),f=s.useRef(null),w=s.useRef(null),H=s.useRef(new Map),[q,B]=s.useState(0),M=s.useRef(null),_=s.useRef(0),j=s.useRef(0),C=s.useRef("none"),L=s.useRef(!1),W=s.useRef(!1),A=s.useRef(!1),I=s.useRef(null),T=s.useRef(null),V=s.useRef(null),S=s.useRef(()=>{}),X=s.useRef(null),P=s.useRef(null),k=s.useRef(null),O=s.useRef(!1),[ie,ae]=s.useState(null),[D,se]=s.useState(bs),[R,de]=s.useState(0),[te,Se]=s.useState("opening"),[Ce,ve]=s.useState(0),[ue,Q]=s.useState(0),[re,fe]=s.useState(!1),[he,be]=s.useState(null),[Me,Ne]=s.useState(null),[we,ce]=s.useState(null),[g,Y]=s.useState(!1),[Z,ee]=s.useState(null),[ye,G]=s.useState(!1),N=s.useRef(!1),[K,ne]=s.useState(!1),[pe,U]=s.useState(!1),Pe=s.useRef(n),le=s.useRef(void 0),J=t[n],De=J?Va(J):!1,Xe=J?$.isEmbedMedia(J):!1,Ue=ue!==0||re,Je=!l&&(!r||!!c),et=d&&!l,Qe=u.length>1,it=s.useCallback((z,Re)=>t.length<=1?null:t[(z+Re+t.length)%t.length]??null,[t]),xe=Qe?or(u,p,-1):it(n,-1),Ie=Qe?or(u,p,1):it(n,1),We=he===-1&&Ue?Qe&&Me!==null?or(u,Me,-1):we!==null?it(we,-1):null:null,qe=he===1&&Ue?Qe&&Me!==null?or(u,Me,1):we!==null?it(we,1):null:null,je=We&&We.assetId!==(xe==null?void 0:xe.assetId)?We:null,ot=qe&&qe.assetId!==(Ie==null?void 0:Ie.assetId)?qe:null,nt=xe&&et?(()=>{const z=Qe?pd(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return z&&z.assetId!==xe.assetId?z:null})():null,Ee=Ie&&et?(()=>{const z=Qe?pd(u,p,1):t.length>2?it((n+1)%t.length,1):null;return z&&z.assetId!==Ie.assetId?z:null})():null,Be=je??nt,tt=ot??Ee,_e=s.useCallback((z,Re,Ae)=>{if(!z||!Re||!Ae)return;const Oe=H.current,vt=Oe.get(z);(vt==null?void 0:vt.width)===Re&&(vt==null?void 0:vt.height)===Ae||(Oe.set(z,{width:Re,height:Ae}),B(Gt=>Gt+1))},[]),He=s.useCallback(z=>{if(!(z!=null&&z.assetId))return null;const Re=H.current.get(z.assetId);return Qb(f.current,Re)},[q,R]),xt=s.useCallback(()=>{if(!J)return;const z=He(J);if(z){ae(z);return}const Re=f.current;Re&&ae(md(Re))},[J,He]),rt=s.useCallback(z=>{if(Qe){const Re=u.length;Ne((p+z+Re)%Re),ce(null);return}t.length>1&&(ce((n+z+t.length)%t.length),Ne(null))},[Qe,u.length,p,t.length,n]),ze=s.useCallback(z=>{A.current=z,fe(z)},[]),Te=s.useCallback(()=>{I.current!==null&&(window.clearTimeout(I.current),I.current=null)},[]),at=s.useCallback(()=>{Te(),I.current=window.setTimeout(()=>{Te(),ze(!1)},Qo+32)},[Te,ze]),me=s.useCallback(()=>{const z=E.current;if(!z){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Re=z.getBoundingClientRect();se({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),Fe=s.useCallback((z,Re)=>{if(Ue){if(K&&!re)return`translate(${ue}px, 0px)`;if(re&&he!==null){const Ae=He(z);if(!Ae)return;const{x:Oe,y:vt}=nS(Ae,Re,he,D);return`translate(${Oe}px, ${vt}px)`}if(re)return"translate(0px, 0px)"}},[Ue,K,re,ue,he,D,He]),Ze=s.useCallback(()=>{const z=T.current;T.current=null,Te(),ze(!1),be(null),Ne(null),ce(null),Q(0),ne(!1),L.current=!1,j.current=0,C.current="none",z===-1?v():z===1&&b()},[Te,ze,v,b]),dt=s.useCallback(()=>{Te(),I.current=window.setTimeout(()=>{T.current!==null&&Ze()},Qo+32)},[Te,Ze]),Ve=s.useCallback(()=>{Te(),T.current=null,ze(!1),be(null),Ne(null),ce(null),Q(0),ne(!1),L.current=!1,j.current=0,C.current="none"},[Te,ze]),Lt=s.useCallback(z=>{if(!(!et||!ie)){if(A.current){if(T.current===z){V.current=z,Ze();return}Ve()}Te(),rt(z),T.current=z,be(z),ze(!0),dt()}},[et,ie,Ze,Ve,Te,rt,ze,dt]);S.current=Lt;const ht=s.useCallback(()=>{X.current=null,O.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),kt=s.useCallback(z=>{P.current!==null&&window.clearInterval(P.current);const Re=O.current?Gb:Vb;P.current=window.setInterval(()=>{S.current(z)},Re)},[]),Ot=s.useCallback(z=>{X.current!==z&&(ht(),X.current=z,O.current=!1,S.current(z),kt(z),k.current=window.setTimeout(()=>{k.current=null,X.current===z&&(O.current=!0,kt(z))},jb))},[ht,kt]),It=s.useCallback(()=>{const z=f.current;if(!z)return;const Re=J==null?void 0:J.assetId,Ae=Re?H.current.get(Re):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){ae(Ks(z,Ae.width,Ae.height));return}const Oe=w.current;if(Oe&&Re&&(Oe.src===Re||Oe.currentSrc===Re)){const{width:Gt,height:lt}=Yb(Oe);if(Gt&&lt){_e(Re,Gt,lt),ae(Ks(z,Gt,lt));return}}const vt=md(z);!vt.width||!vt.height||ae(vt)},[J==null?void 0:J.assetId,_e]),Yt=s.useCallback(z=>{if(w.current=z,!!z){if(z instanceof HTMLVideoElement){z.readyState>=1&&z.videoWidth>0&&It();return}z.complete&&z.naturalWidth>0&&It()}},[It]),jt=s.useCallback(()=>{me(),It(),de(z=>z+1)},[me,It]);s.useEffect(()=>{jt();const z=f.current,Re=E.current,Ae=new ResizeObserver(()=>jt());return z&&Ae.observe(z),Re&&Ae.observe(Re),window.addEventListener("resize",jt),()=>{Ae.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const z=w.current;if(z){if(z instanceof HTMLImageElement&&z.complete&&z.naturalWidth>0){It();return}z instanceof HTMLVideoElement&&z.readyState>=1&&z.videoWidth>0&&It()}},[J==null?void 0:J.assetId,n,It]),s.useEffect(()=>{xt()},[xt,q]),s.useEffect(()=>{const z=new Set,Re=[],Ae=Oe=>{!(Oe!=null&&Oe.assetId)||z.has(Oe.assetId)||(z.add(Oe.assetId),Re.push(Oe))};t.forEach(Ae),u.forEach(Oe=>Oe.items.forEach(Ae)),Re.forEach(Oe=>{H.current.has(Oe.assetId)||Zb(Oe,_e)})},[t,u,_e]),s.useEffect(()=>{if(te!=="opening"||!ie)return;if(!x){Se("open");return}Y(!1);const z=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Y(!0),Se("open")})});return()=>cancelAnimationFrame(z)},[te,ie,x]),s.useEffect(()=>{if(te!=="closing")return;const z=setTimeout(()=>h(),On);return()=>clearTimeout(z)},[te,h]),s.useEffect(()=>()=>{Te()},[Te]),s.useLayoutEffect(()=>{Pe.current===n&&le.current===(J==null?void 0:J.assetId)||(Te(),T.current=null,be(null),Ne(null),ce(null),ve(0),Q(0),ze(!1),U(!1),ne(!1),_.current=0,j.current=0,C.current="none",L.current=!1,M.current=null,W.current=!1,w.current=null,xt(),Pe.current=n,le.current=J==null?void 0:J.assetId)},[n,J==null?void 0:J.assetId,ze,Te,xt]),s.useLayoutEffect(()=>{const z=V.current;z!==null&&(V.current=null,requestAnimationFrame(()=>{S.current(z)}))},[n,p,J==null?void 0:J.assetId]),s.useLayoutEffect(()=>{if(te==="opening"){N.current=!1,G(!1);return}if(te!=="open"||N.current)return;if(!xe&&!Ie){N.current=!0;return}G(!1);const z=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),N.current=!0})});return()=>cancelAnimationFrame(z)},[te,xe==null?void 0:xe.assetId,Ie==null?void 0:Ie.assetId]),s.useEffect(()=>{if(te!=="open")return;const z=()=>{const lt=Rt=>{Rt.stopPropagation(),Rt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0)},Re=lt=>{const Rt=lt<0?1:-1;Te(),rt(Rt),T.current=Rt,be(Rt),ze(!0),dt()},Ae=lt=>{if(Math.abs(lt)>Bb&&et){Re(lt);return}T.current=null,be(null),Ne(null),ce(null),ze(!0),Q(0),at()},Oe=lt=>{if(lt.touches.length!==1||A.current)return;const Rt=lt.touches[0];W.current=!0,M.current={x:Rt.clientX,y:Rt.clientY},C.current="none",j.current=0,L.current=!1},vt=lt=>{if(!M.current||lt.touches.length!==1||A.current)return;const Rt=lt.touches[0],Dt=Rt.clientX-M.current.x,zt=Rt.clientY-M.current.y;if(C.current==="none"){if(Math.abs(Dt)<10&&Math.abs(zt)<10)return;if(Math.abs(Dt)>Math.abs(zt)){if(!et)return;C.current="horizontal"}else if(zt>0){if(!Je)return;C.current="vertical"}else return}if(C.current==="horizontal"){L.current=!0,ne(!0),j.current=Dt,Q(Dt),lt.preventDefault();return}C.current==="vertical"&&(L.current=!0,ne(!0),_.current=zt,ve(zt),lt.preventDefault())},Gt=()=>{if(!M.current)return;const lt=C.current,Rt=L.current;if(Rt&&lt==="horizontal")Ae(j.current),z();else if(Rt&&lt==="vertical"){const Dt=_.current;if(Je&&Dt>zb){const zt=window.innerHeight;_.current=zt,U(!0),ve(zt),Se("closing")}else _.current=0,ve(0);z()}else lt==="horizontal"&&Math.abs(j.current)>0&&(Ae(j.current),z());M.current=null,C.current="none",j.current=0,L.current=!1,ne(!1)};return document.addEventListener("touchstart",Oe,{passive:!0}),document.addEventListener("touchmove",vt,{passive:!1}),document.addEventListener("touchend",Gt),document.addEventListener("touchcancel",Gt),()=>{document.removeEventListener("touchstart",Oe),document.removeEventListener("touchmove",vt),document.removeEventListener("touchend",Gt),document.removeEventListener("touchcancel",Gt)}},[te,et,ze,at,Te,Je,dt,rt]);const Xt=s.useCallback(()=>{const z=(m==null?void 0:m())??x??null;z&&ie&&(ee(z),Y(!0)),Se("closing")},[m,x,ie]);s.useEffect(()=>{const z=Oe=>{if(Oe.key==="Escape"){if(r&&c||te==="closing")return;ht(),Xt();return}if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight"||te!=="open"||!et)return;Oe.preventDefault();const vt=Oe.key==="ArrowLeft"?-1:1;Oe.repeat&&X.current===vt||Ot(vt)},Re=Oe=>{if(Oe.key!=="ArrowLeft"&&Oe.key!=="ArrowRight")return;const vt=Oe.key==="ArrowLeft"?-1:1;X.current===vt&&ht()},Ae=()=>{ht()};return window.addEventListener("keydown",z),window.addEventListener("keyup",Re),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",z),window.removeEventListener("keyup",Re),window.removeEventListener("blur",Ae),ht()}},[te,r,c,Xt,et,Ot,ht]),s.useEffect(()=>{te!=="open"&&ht()},[te,ht]);const Qt=()=>{te==="closing"||l||Xt()},St=te==="open",Zt=te==="closing",ft=Ce>0?Math.max(0,1-Ce/500):1,wt=Ce>0?Math.max(.35,1-Ce/500):1,Le=s.useCallback(z=>{if(!(z.propertyName!=="transform"||!A.current)){if(T.current!==null){Ze();return}Te(),ze(!1)}},[Te,ze,Ze]),Ye=te==="closing"?Z??x:x,st=Ye&&ie&&(te==="opening"||Zt)?Xb(Ye,ie):void 0,Mt=Ue&&J?Fe(J,"center"):Ce>0?`translateY(${Ce}px)`:st,ut=ie?Kr(ie,D):null,gt=!!(Ye&&ie),At=gt&&(te==="closing"||te==="open"&&g),Ht={position:"absolute",top:ut==null?void 0:ut.top,left:ut==null?void 0:ut.left,width:ut==null?void 0:ut.width,height:ut==null?void 0:ut.height,objectFit:"contain",transformOrigin:"top left",transform:Mt,opacity:Ce>0?wt:gt?1:te==="opening"||Zt?0:1,transition:K&&!re?"none":re?`transform ${Qo}ms ${Cn}`:pe?`transform ${On}ms ${Cn}, opacity ${On}ms ${Cn}`:At?`transform ${On}ms ${Cn}`:te==="opening"||Zt?`opacity ${On}ms ${Cn}`:"none",pointerEvents:(De||Xe)&&St&&!Ue?"auto":"none",touchAction:(De||Xe)&&St?"none":void 0,zIndex:1,overflow:De||Xe?"hidden":void 0},mt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:St&&!Ue?"auto":"none"},Nt=(z,Re,Ae="adjacent")=>{const Oe=He(z);if(!Oe)return{display:"none"};const vt=Ae==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:Gt}=he!==null?bp(Oe,vt,he,D):{start:Ae==="far"?Ta(Oe,Re,D):Ao(Oe,Re,D)},lt=Kr(Gt,D),Rt=Fe(z,vt),Dt=!Ue&&Ae==="adjacent"&&St&&!ye?iS(Oe,Re,D):null,zt=Ae==="far"&&Ue&&he===(Re==="left"?-1:1),cn=K&&!re?!1:re,xn=Ae==="adjacent"&&St&&ye&&!Ue;return{position:"absolute",top:lt.top,left:lt.left,width:lt.width,height:lt.height,objectFit:"contain",transform:Rt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Ae==="far"?St&&zt?1:0:St?1:0,transition:cn?Ae==="far"?`transform ${Qo}ms ${Cn}`:`transform ${Qo}ms ${Cn}, opacity ${On}ms ${Cn}`:xn?`transform ${On}ms ${Cn}`:te==="opening"||Zt?`opacity ${On}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},Kt=(z,Re)=>{const Ae=He(z);return Ae?tS(Ao(Ae,Re,D),Re,D):null},Ft=z=>Re=>{if(!l){if(W.current){W.current=!1;return}Re.stopPropagation(),Lt(z)}},_t=xe?Kt(xe,"left"):null,Vt=Ie?Kt(Ie,"right"):null,Ct=_t?Kr(_t,D):null,bt=Vt?Kr(Vt,D):null;return a.jsxs("div",{ref:E,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:te==="open"?"none":void 0},onClick:Qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:St?ft:0,transition:K?"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:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:St?1:0,transition:K?"none":`opacity ${On}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Qt})})]}),St&&Be&&a.jsx(Yr,{media:Be,style:Nt(Be,"left","far"),onMeasure:_e,onTransitionEnd:Le},`far-prev-${Be.assetId}`),St&&xe&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:xe,style:Nt(xe,"left"),onMeasure:_e,onTransitionEnd:Le},`prev-${xe.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||K?"default":"pointer",pointerEvents:l||K?"none":"auto",zIndex:3},onClick:Ft(-1)})]}),St&&Ie&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Ie,style:Nt(Ie,"right"),onMeasure:_e,onTransitionEnd:Le},`next-${Ie.assetId}`),bt&&a.jsx("div",{style:{position:"absolute",top:bt.top,left:bt.left,width:bt.width,height:bt.height,cursor:l||K?"default":"pointer",pointerEvents:l||K?"none":"auto",zIndex:3},onClick:Ft(1)})]}),St&&tt&&a.jsx(Yr,{media:tt,style:Nt(tt,"right","far"),onMeasure:_e,onTransitionEnd:Le},`far-next-${tt.assetId}`),ie&&J&&(Xe?a.jsx("div",{style:Ht,onTransitionEnd:Le,children:a.jsx($.EmbedMediaFrame,{media:J,mode:"player",fit:"contain",lazy:!1,interactive:St&&!Ue,style:mt})},`${n}-${J.assetId}`):De?a.jsx(oS,{src:J.assetId,phase:te,onMediaElement:Yt,wrapperStyle:Ht,videoStyle:mt,onLoadedMetadata:It,onTransitionEnd:Le},`${n}-${J.assetId}`):a.jsx("img",{ref:Yt,src:J.assetId,alt:J.name,onLoad:It,onTransitionEnd:Le,style:Ht},`${n}-${J.assetId}`))]})}const aS=20,sS=.18;function lS(e){return`
18969
+ `}const Dn=500,Qo=650,Tn="cubic-bezier(0.22, 1, 0.36, 1)",qb=72,Ub=50,Kb=1e4,Yb=650,Qb=500;function Zb(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=Sa(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 Jb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Cp(i,n):null}function eS(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 pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const tS=.03;function Tp(e){return e.width*tS}const bs={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 md(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Us(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 iS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Us(e,t.width,t.height)}function oS(e,t){if(w.isEmbedMedia(e)){t(e.assetId,w.getEmbedAspect(e),1);return}if(Va(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 rS(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 aS({mediaList:e}){const t=e.filter(n=>!w.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=>Va(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=Tp(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 Ta(e,t,n){const i=No(e,t,n);return{...i,left:2*i.left-e.left}}function sS(e,t,n){const{left:i,width:o}=n,r=Tp(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 Ip(e,t,n,i){const o=No(e,"left",i),r=No(e,"right",i),l=Ta(e,"left",i),c=Ta(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 lS(e,t,n,i){const{start:o,end:r}=Ip(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function cS(e,t,n){const i=No(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return w.isEmbedMedia(e)?!1:e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function dS({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 w.isEmbedMedia(e)?a.jsx("img",{src:e.thumbnail,alt:e.name,style:t,onTransitionEnd:n}):Va(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 uS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:m,onClose:h,onPrev:b,onNext:S}){const R=s.useRef(null),y=s.useRef(null),C=s.useRef(null),E=s.useRef(new Map),[G,H]=s.useState(0),O=s.useRef(null),F=s.useRef(0),D=s.useRef(0),I=s.useRef("none"),L=s.useRef(!1),z=s.useRef(!1),k=s.useRef(!1),$=s.useRef(null),P=s.useRef(null),q=s.useRef(null),_=s.useRef(()=>{}),K=s.useRef(null),M=s.useRef(null),f=s.useRef(null),X=s.useRef(!1),[oe,ue]=s.useState(null),[N,se]=s.useState(bs),[T,me]=s.useState(0),[J,we]=s.useState("opening"),[Le,he]=s.useState(0),[fe,ie]=s.useState(0),[re,ae]=s.useState(!1),[pe,be]=s.useState(null),[ke,Fe]=s.useState(null),[xe,le]=s.useState(null),[g,V]=s.useState(!1),[Y,te]=s.useState(null),[ge,ee]=s.useState(!1),B=s.useRef(!1),[Z,U]=s.useState(!1),[de,j]=s.useState(!1),Pe=s.useRef(n),ne=s.useRef(void 0),Q=t[n],_e=Q?Va(Q):!1,Ge=Q?w.isEmbedMedia(Q):!1,Be=fe!==0||re,qe=!l&&(!r||!!c),Ye=d&&!l,nt=u.length>1,it=s.useCallback((W,Re)=>t.length<=1?null:t[(W+Re+t.length)%t.length]??null,[t]),ve=nt?or(u,p,-1):it(n,-1),Te=nt?or(u,p,1):it(n,1),We=pe===-1&&Be?nt&&ke!==null?or(u,ke,-1):xe!==null?it(xe,-1):null:null,Ke=pe===1&&Be?nt&&ke!==null?or(u,ke,1):xe!==null?it(xe,1):null:null,Ze=We&&We.assetId!==(ve==null?void 0:ve.assetId)?We:null,lt=Ke&&Ke.assetId!==(Te==null?void 0:Te.assetId)?Ke:null,ot=ve&&Ye?(()=>{const W=nt?pd(u,p,-1):t.length>2?it((n-1+t.length)%t.length,-1):null;return W&&W.assetId!==ve.assetId?W:null})():null,Me=Te&&Ye?(()=>{const W=nt?pd(u,p,1):t.length>2?it((n+1)%t.length,1):null;return W&&W.assetId!==Te.assetId?W:null})():null,ze=Ze??ot,et=lt??Me,Oe=s.useCallback((W,Re,Ae)=>{if(!W||!Re||!Ae)return;const De=E.current,ft=De.get(W);(ft==null?void 0:ft.width)===Re&&(ft==null?void 0:ft.height)===Ae||(De.set(W,{width:Re,height:Ae}),H(Ut=>Ut+1))},[]),Ne=s.useCallback(W=>{if(!(W!=null&&W.assetId))return null;const Re=E.current.get(W.assetId);return iS(y.current,Re)},[G,T]),yt=s.useCallback(()=>{if(!Q)return;const W=Ne(Q);if(W){ue(W);return}const Re=y.current;Re&&ue(md(Re))},[Q,Ne]),je=s.useCallback(W=>{if(nt){const Re=u.length;Fe((p+W+Re)%Re),le(null);return}t.length>1&&(le((n+W+t.length)%t.length),Fe(null))},[nt,u.length,p,t.length,n]),He=s.useCallback(W=>{k.current=W,ae(W)},[]),Ce=s.useCallback(()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),tt=s.useCallback(()=>{Ce(),$.current=window.setTimeout(()=>{Ce(),He(!1)},Qo+32)},[Ce,He]),Qe=s.useCallback(()=>{const W=R.current;if(!W){se({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Re=W.getBoundingClientRect();se({left:Re.left,top:Re.top,width:Re.width,height:Re.height})},[]),St=s.useCallback((W,Re)=>{if(Be){if(Z&&!re)return`translate(${fe}px, 0px)`;if(re&&pe!==null){const Ae=Ne(W);if(!Ae)return;const{x:De,y:ft}=lS(Ae,Re,pe,N);return`translate(${De}px, ${ft}px)`}if(re)return"translate(0px, 0px)"}},[Be,Z,re,fe,pe,N,Ne]),Ct=s.useCallback(()=>{const W=P.current;P.current=null,Ce(),He(!1),be(null),Fe(null),le(null),ie(0),U(!1),L.current=!1,D.current=0,I.current="none",W===-1?b():W===1&&S()},[Ce,He,b,S]),Wt=s.useCallback(()=>{Ce(),$.current=window.setTimeout(()=>{P.current!==null&&Ct()},Qo+32)},[Ce,Ct]),ht=s.useCallback(()=>{Ce(),P.current=null,He(!1),be(null),Fe(null),le(null),ie(0),U(!1),L.current=!1,D.current=0,I.current="none"},[Ce,He]),Xt=s.useCallback(W=>{if(!(!Ye||!oe)){if(k.current){if(P.current===W){q.current=W,Ct();return}ht()}Ce(),je(W),P.current=W,be(W),He(!0),Wt()}},[Ye,oe,Ct,ht,Ce,je,He,Wt]);_.current=Xt;const wt=s.useCallback(()=>{K.current=null,X.current=!1,M.current!==null&&(window.clearInterval(M.current),M.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Vt=s.useCallback(W=>{M.current!==null&&window.clearInterval(M.current);const Re=X.current?Qb:Yb;M.current=window.setInterval(()=>{_.current(W)},Re)},[]),Yt=s.useCallback(W=>{K.current!==W&&(wt(),K.current=W,X.current=!1,_.current(W),Vt(W),f.current=window.setTimeout(()=>{f.current=null,K.current===W&&(X.current=!0,Vt(W))},Kb))},[wt,Vt]),$e=s.useCallback(()=>{const W=y.current;if(!W)return;const Re=Q==null?void 0:Q.assetId,Ae=Re?E.current.get(Re):void 0;if(Ae!=null&&Ae.width&&(Ae!=null&&Ae.height)){ue(Us(W,Ae.width,Ae.height));return}const De=C.current;if(De&&Re&&(De.src===Re||De.currentSrc===Re)){const{width:Ut,height:at}=nS(De);if(Ut&&at){Oe(Re,Ut,at),ue(Us(W,Ut,at));return}}const ft=md(W);!ft.width||!ft.height||ue(ft)},[Q==null?void 0:Q.assetId,Oe]),Xe=s.useCallback(W=>{if(C.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&$e();return}W.complete&&W.naturalWidth>0&&$e()}},[$e]),ut=s.useCallback(()=>{Qe(),$e(),me(W=>W+1)},[Qe,$e]);s.useEffect(()=>{ut();const W=y.current,Re=R.current,Ae=new ResizeObserver(()=>ut());return W&&Ae.observe(W),Re&&Ae.observe(Re),window.addEventListener("resize",ut),()=>{Ae.disconnect(),window.removeEventListener("resize",ut)}},[ut,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const W=C.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){$e();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&$e()}},[Q==null?void 0:Q.assetId,n,$e]),s.useEffect(()=>{yt()},[yt,G]),s.useEffect(()=>{const W=new Set,Re=[],Ae=De=>{!(De!=null&&De.assetId)||W.has(De.assetId)||(W.add(De.assetId),Re.push(De))};t.forEach(Ae),u.forEach(De=>De.items.forEach(Ae)),Re.forEach(De=>{E.current.has(De.assetId)||oS(De,Oe)})},[t,u,Oe]),s.useEffect(()=>{if(J!=="opening"||!oe)return;if(!x){we("open");return}V(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{V(!0),we("open")})});return()=>cancelAnimationFrame(W)},[J,oe,x]),s.useEffect(()=>{if(J!=="closing")return;const W=setTimeout(()=>h(),Dn);return()=>clearTimeout(W)},[J,h]),s.useEffect(()=>()=>{Ce()},[Ce]),s.useLayoutEffect(()=>{Pe.current===n&&ne.current===(Q==null?void 0:Q.assetId)||(Ce(),P.current=null,be(null),Fe(null),le(null),he(0),ie(0),He(!1),j(!1),U(!1),F.current=0,D.current=0,I.current="none",L.current=!1,O.current=null,z.current=!1,C.current=null,yt(),Pe.current=n,ne.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,He,Ce,yt]),s.useLayoutEffect(()=>{const W=q.current;W!==null&&(q.current=null,requestAnimationFrame(()=>{_.current(W)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){B.current=!1,ee(!1);return}if(J!=="open"||B.current)return;if(!ve&&!Te){B.current=!0;return}ee(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ee(!0),B.current=!0})});return()=>cancelAnimationFrame(W)},[J,ve==null?void 0:ve.assetId,Te==null?void 0:Te.assetId]),s.useEffect(()=>{if(J!=="open")return;const W=()=>{const at=Et=>{Et.stopPropagation(),Et.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0)},Re=at=>{const Et=at<0?1:-1;Ce(),je(Et),P.current=Et,be(Et),He(!0),Wt()},Ae=at=>{if(Math.abs(at)>Ub&&Ye){Re(at);return}P.current=null,be(null),Fe(null),le(null),He(!0),ie(0),tt()},De=at=>{if(at.touches.length!==1||k.current)return;const Et=at.touches[0];z.current=!0,O.current={x:Et.clientX,y:Et.clientY},I.current="none",D.current=0,L.current=!1},ft=at=>{if(!O.current||at.touches.length!==1||k.current)return;const Et=at.touches[0],It=Et.clientX-O.current.x,_t=Et.clientY-O.current.y;if(I.current==="none"){if(Math.abs(It)<10&&Math.abs(_t)<10)return;if(Math.abs(It)>Math.abs(_t)){if(!Ye)return;I.current="horizontal"}else if(_t>0){if(!qe)return;I.current="vertical"}else return}if(I.current==="horizontal"){L.current=!0,U(!0),D.current=It,ie(It),at.preventDefault();return}I.current==="vertical"&&(L.current=!0,U(!0),F.current=_t,he(_t),at.preventDefault())},Ut=()=>{if(!O.current)return;const at=I.current,Et=L.current;if(Et&&at==="horizontal")Ae(D.current),W();else if(Et&&at==="vertical"){const It=F.current;if(qe&&It>qb){const _t=window.innerHeight;F.current=_t,j(!0),he(_t),we("closing")}else F.current=0,he(0);W()}else at==="horizontal"&&Math.abs(D.current)>0&&(Ae(D.current),W());O.current=null,I.current="none",D.current=0,L.current=!1,U(!1)};return document.addEventListener("touchstart",De,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ut),document.addEventListener("touchcancel",Ut),()=>{document.removeEventListener("touchstart",De),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ut),document.removeEventListener("touchcancel",Ut)}},[J,Ye,He,tt,Ce,qe,Wt,je]);const $t=s.useCallback(()=>{const W=(m==null?void 0:m())??x??null;W&&oe&&(te(W),V(!0)),we("closing")},[m,x,oe]);s.useEffect(()=>{const W=De=>{if(De.key==="Escape"){if(r&&c||J==="closing")return;wt(),$t();return}if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight"||J!=="open"||!Ye)return;De.preventDefault();const ft=De.key==="ArrowLeft"?-1:1;De.repeat&&K.current===ft||Yt(ft)},Re=De=>{if(De.key!=="ArrowLeft"&&De.key!=="ArrowRight")return;const ft=De.key==="ArrowLeft"?-1:1;K.current===ft&&wt()},Ae=()=>{wt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Re),window.addEventListener("blur",Ae),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Re),window.removeEventListener("blur",Ae),wt()}},[J,r,c,$t,Ye,Yt,wt]),s.useEffect(()=>{J!=="open"&&wt()},[J,wt]);const bt=()=>{J==="closing"||l||$t()},ct=J==="open",Ht=J==="closing",mt=Le>0?Math.max(0,1-Le/500):1,Tt=Le>0?Math.max(.35,1-Le/500):1,Ie=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!k.current)){if(P.current!==null){Ct();return}Ce(),He(!1)}},[Ce,He,Ct]),Je=J==="closing"?Y??x:x,rt=Je&&oe&&(J==="opening"||Ht)?Zb(Je,oe):void 0,Mt=Be&&Q?St(Q,"center"):Le>0?`translateY(${Le}px)`:rt,gt=oe?Kr(oe,N):null,xt=!!(Je&&oe),Ft=xt&&(J==="closing"||J==="open"&&g),Ot={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:Mt,opacity:Le>0?Tt:xt?1:J==="opening"||Ht?0:1,transition:Z&&!re?"none":re?`transform ${Qo}ms ${Tn}`:de?`transform ${Dn}ms ${Tn}, opacity ${Dn}ms ${Tn}`:Ft?`transform ${Dn}ms ${Tn}`:J==="opening"||Ht?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:(_e||Ge)&&ct&&!Be?"auto":"none",touchAction:(_e||Ge)&&ct?"none":void 0,zIndex:1,overflow:_e||Ge?"hidden":void 0},pt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:ct&&!Be?"auto":"none"},Dt=(W,Re,Ae="adjacent")=>{const De=Ne(W);if(!De)return{display:"none"};const ft=Ae==="far"?Re==="left"?"far-left":"far-right":Re==="left"?"left-adjacent":"right-adjacent",{start:Ut}=pe!==null?Ip(De,ft,pe,N):{start:Ae==="far"?Ta(De,Re,N):No(De,Re,N)},at=Kr(Ut,N),Et=St(W,ft),It=!Be&&Ae==="adjacent"&&ct&&!ge?cS(De,Re,N):null,_t=Ae==="far"&&Be&&pe===(Re==="left"?-1:1),on=Z&&!re?!1:re,fn=Ae==="adjacent"&&ct&&ge&&!Be;return{position:"absolute",top:at.top,left:at.left,width:at.width,height:at.height,objectFit:"contain",transform:Et??(It?`translate(${It.x}px, ${It.y}px)`:void 0),opacity:Ae==="far"?ct&&_t?1:0:ct?1:0,transition:on?Ae==="far"?`transform ${Qo}ms ${Tn}`:`transform ${Qo}ms ${Tn}, opacity ${Dn}ms ${Tn}`:fn?`transform ${Dn}ms ${Tn}`:J==="opening"||Ht?`opacity ${Dn}ms ${Tn}`:"none",pointerEvents:"none",zIndex:1}},qt=(W,Re)=>{const Ae=Ne(W);return Ae?sS(No(Ae,Re,N),Re,N):null},Nt=W=>Re=>{if(!l){if(z.current){z.current=!1;return}Re.stopPropagation(),Xt(W)}},zt=ve?qt(ve,"left"):null,jt=Te?qt(Te,"right"):null,Bt=zt?Kr(zt,N):null,Rt=jt?Kr(jt,N):null;return a.jsxs("div",{ref:R,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:bt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:ct?mt:0,transition:Z?"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:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:ct?1:0,transition:Z?"none":`opacity ${Dn}ms ${Tn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:bt})})]}),ct&&ze&&a.jsx(Yr,{media:ze,style:Dt(ze,"left","far"),onMeasure:Oe,onTransitionEnd:Ie},`far-prev-${ze.assetId}`),ct&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:ve,style:Dt(ve,"left"),onMeasure:Oe,onTransitionEnd:Ie},`prev-${ve.assetId}`),Bt&&a.jsx("div",{style:{position:"absolute",top:Bt.top,left:Bt.left,width:Bt.width,height:Bt.height,cursor:l||Z?"default":"pointer",pointerEvents:l||Z?"none":"auto",zIndex:3},onClick:Nt(-1)})]}),ct&&Te&&a.jsxs(a.Fragment,{children:[a.jsx(Yr,{media:Te,style:Dt(Te,"right"),onMeasure:Oe,onTransitionEnd:Ie},`next-${Te.assetId}`),Rt&&a.jsx("div",{style:{position:"absolute",top:Rt.top,left:Rt.left,width:Rt.width,height:Rt.height,cursor:l||Z?"default":"pointer",pointerEvents:l||Z?"none":"auto",zIndex:3},onClick:Nt(1)})]}),ct&&et&&a.jsx(Yr,{media:et,style:Dt(et,"right","far"),onMeasure:Oe,onTransitionEnd:Ie},`far-next-${et.assetId}`),oe&&Q&&(Ge?a.jsx("div",{style:Ot,onTransitionEnd:Ie,children:a.jsx(w.EmbedMediaFrame,{media:Q,mode:"player",fit:"contain",lazy:!1,interactive:ct&&!Be,style:pt})},`${n}-${Q.assetId}`):_e?a.jsx(dS,{src:Q.assetId,phase:J,onMediaElement:Xe,wrapperStyle:Ot,videoStyle:pt,onLoadedMetadata:$e,onTransitionEnd:Ie},`${n}-${Q.assetId}`):a.jsx("img",{ref:Xe,src:Q.assetId,alt:Q.name,onLoad:$e,onTransitionEnd:Ie,style:Ot},`${n}-${Q.assetId}`))]})}const pS=20,mS=.18;function gS(e){return`
18970
18970
  .${e}-wrapper {
18971
18971
  box-sizing: border-box;
18972
18972
  max-width: 100%;
@@ -19054,8 +19054,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
19054
19054
  z-index: 2;
19055
19055
  pointer-events: auto;
19056
19056
  }
19057
- ${Db(e)}
19058
- `}function cS(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 dS(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 uS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:$.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:$.scalingValue(i*sS,n??!1),[`--${t}-image-aspect`]:cS(e)}}function pS(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 mS(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 gS(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?vp(c,o):void 0)}}function hS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=$.useScopedStyles(),d=s.useMemo(()=>lS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=$.scalingValue(x,n??!1),h=`max(${m}, ${aS}px)`,{objectFitMode:v,imageStyle:b}=mS(e),E=pS(e,n),f=s.useRef(null),[w,H]=s.useState(!1),[q,B]=s.useState([]),[M,_]=s.useState(0),[j,C]=s.useState(0),[L,W]=s.useState(null),[A,I]=s.useState({title1:"",title2:"",title3:""}),T=(!n||i)&&!w,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},S=V.sizeType??"none",X=T&&S!=="none"?`${c}-item-image-hover-${S}`:void 0,P=(V.value??120)/100,k=s.useCallback(ue=>{!ue||S!=="scale"||(ue.style.transformOrigin=df(ue))},[S]),O=s.useCallback(ue=>{if(ue){if(v==="contain"){const Q=dS(ue);if(Q){const re=ue.closest(`.${c}-item-image`);re instanceof HTMLElement&&re.style.setProperty(`--${c}-item-media-aspect`,String(Q))}}k(ue)}},[c,k,v]),ie={width:$.scalingValue(y,n??!1),...E,...uS(e,c,n),[`--${c}-image-hover-scale`]:String(P)},ae=(()=>{const ue={},Q=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return Q&&(ue["--cntrl-article-width"]=Q),ue})(),D=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),se=s.useMemo(()=>qb(u),[u]),R=s.useMemo(()=>Jb(u),[u]),de=(ue,Q)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const re=se.findIndex(he=>he.gridIndex===ue);if(re<0)return;const fe=se[re];C(re),B(fe.items),_(0),I(fe.entry),W(Q??null),H(!0)},te=s.useCallback(()=>{H(!1),W(null)},[]),Se=s.useCallback(()=>{const ue=se[j];return!ue||!f.current?L:Ub(f.current,ue.gridIndex,v)??L},[se,j,L,v]),Ce=s.useCallback(ue=>{if(se.length>1){const Q=se.length,re=(j+ue+Q)%Q,fe=se[re];C(re),B(fe.items),_(0),I(fe.entry);return}_(Q=>(Q+ue+q.length)%q.length)},[se,j,q.length]),ve=se.length>1||q.length>1;return s.useEffect(()=>{if(!w||typeof document>"u")return;const ue=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ue}},[w]),s.useEffect(()=>{!n||o||i||H(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&H(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(eS,{mediaList:R}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ie,children:u.map((ue,Q)=>{var he,be;const re=!!((he=ue.image)!=null&&he.assetId),fe=gS(!!D,re,Q,c,v,de);return a.jsxs("div",{className:`${c}-item`,children:[ue.title?a.jsx("span",{className:`${c}-item-title`,onClick:fe,style:fe?{cursor:"pointer"}:void 0,children:ue.title}):null,(be=ue.image)!=null&&be.assetId?a.jsx("span",{className:[`${c}-item-image`,v==="contain"?`${c}-item-image-fit`:void 0,X].filter(Boolean).join(" "),style:$.isEmbedMedia(ue.image)?{[`--${c}-item-media-aspect`]:String($.getEmbedAspect(ue.image))}:void 0,children:$.isEmbedMedia(ue.image)?a.jsx($.EmbedMediaFrame,{media:ue.image,mode:"background",fit:v,"data-waterfall-index":Q,style:{...b,position:"absolute",left:0,bottom:0,width:"100%",height:"1cap"},onClick:fe}):ue.image.type==="video"?a.jsx("video",{ref:O,src:ue.image.assetId,"data-waterfall-index":Q,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:fe,onLoadedData:Me=>O(Me.currentTarget)}):a.jsx("img",{ref:O,src:ue.image.assetId,alt:ue.image.name??"","data-waterfall-index":Q,style:b,onClick:fe,onLoad:Me=>O(Me.currentTarget)})}):null,Q<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!w&&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%"}})})]},Q)})}),w&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ue=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx(rS,{prefix:c,items:q,index:M,entry:A,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ve,lightboxEntries:se,entryIdx:j,layoutId:r,sourceRect:L,resolveCloseSourceRect:Se,onClose:te,onPrev:()=>Ce(-1),onNext:()=>Ce(1)})}),ue)})()]})}const fS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19057
+ ${Xb(e)}
19058
+ `}function hS(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 fS(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 yS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:w.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:w.scalingValue(i*mS,n??!1),[`--${t}-image-aspect`]:hS(e)}}function vS(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 xS(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 bS(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?Cp(c,o):void 0)}}function SS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=w.useScopedStyles(),d=s.useMemo(()=>gS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=w.scalingValue(x,n??!1),h=`max(${m}, ${pS}px)`,{objectFitMode:b,imageStyle:S}=xS(e),R=vS(e,n),y=s.useRef(null),[C,E]=s.useState(!1),[G,H]=s.useState([]),[O,F]=s.useState(0),[D,I]=s.useState(0),[L,z]=s.useState(null),[k,$]=s.useState({title1:"",title2:"",title3:""}),P=(!n||i)&&!C,q=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},_=q.sizeType??"none",K=P&&_!=="none"?`${c}-item-image-hover-${_}`:void 0,M=(q.value??120)/100,f=s.useCallback(fe=>{!fe||_!=="scale"||(fe.style.transformOrigin=ff(fe))},[_]),X=s.useCallback(fe=>{if(fe){if(b==="contain"){const ie=fS(fe);if(ie){const re=fe.closest(`.${c}-item-image`);re instanceof HTMLElement&&re.style.setProperty(`--${c}-item-media-aspect`,String(ie))}}f(fe)}},[c,f,b]),oe={width:w.scalingValue(v,n??!1),...R,...yS(e,c,n),[`--${c}-image-hover-scale`]:String(M)},ue=(()=>{const fe={},ie=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return ie&&(fe["--cntrl-article-width"]=ie),fe})(),N=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),se=s.useMemo(()=>eS(u),[u]),T=s.useMemo(()=>rS(u),[u]),me=(fe,ie)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const re=se.findIndex(pe=>pe.gridIndex===fe);if(re<0)return;const ae=se[re];I(re),H(ae.items),F(0),$(ae.entry),z(ie??null),E(!0)},J=s.useCallback(()=>{E(!1),z(null)},[]),we=s.useCallback(()=>{const fe=se[D];return!fe||!y.current?L:Jb(y.current,fe.gridIndex,b)??L},[se,D,L,b]),Le=s.useCallback(fe=>{if(se.length>1){const ie=se.length,re=(D+fe+ie)%ie,ae=se[re];I(re),H(ae.items),F(0),$(ae.entry);return}F(ie=>(ie+fe+G.length)%G.length)},[se,D,G.length]),he=se.length>1||G.length>1;return s.useEffect(()=>{if(!C||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[C]),s.useEffect(()=>{!n||o||i||E(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&E(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(aS,{mediaList:T}),a.jsx("div",{ref:y,className:`${c}-wrapper ${c}-type-${p}`,style:oe,children:u.map((fe,ie)=>{var pe,be;const re=!!((pe=fe.image)!=null&&pe.assetId),ae=bS(!!N,re,ie,c,b,me);return a.jsxs("div",{className:`${c}-item`,children:[fe.title?a.jsx("span",{className:`${c}-item-title`,onClick:ae,style:ae?{cursor:"pointer"}:void 0,children:fe.title}):null,(be=fe.image)!=null&&be.assetId?a.jsx("span",{className:[`${c}-item-image`,b==="contain"?`${c}-item-image-fit`:void 0,K].filter(Boolean).join(" "),style:w.isEmbedMedia(fe.image)?{[`--${c}-item-media-aspect`]:String(w.getEmbedAspect(fe.image))}:void 0,children:w.isEmbedMedia(fe.image)?a.jsx(w.EmbedMediaFrame,{media:fe.image,mode:"background",fit:b,"data-waterfall-index":ie,style:{...S,position:"absolute",left:0,bottom:0,width:"100%",height:"1cap"},onClick:ae}):fe.image.type==="video"?a.jsx("video",{ref:X,src:fe.image.assetId,"data-waterfall-index":ie,style:S,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:ae,onLoadedData:ke=>X(ke.currentTarget)}):a.jsx("img",{ref:X,src:fe.image.assetId,alt:fe.image.name??"","data-waterfall-index":ie,style:S,onClick:ae,onLoad:ke=>X(ke.currentTarget)})}):null,ie<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!C&&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)})}),C&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const fe=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:ue,"data-selection":"none",children:a.jsx(uS,{prefix:c,items:G,index:O,entry:k,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:he,lightboxEntries:se,entryIdx:D,layoutId:r,sourceRect:L,resolveCloseSourceRect:we,onClose:J,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),fe)})()]})}const wS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19059
19059
  import type React from 'react';
19060
19060
  import { createPortal } from 'react-dom';
19061
19061
  import { CommonComponentProps } from '../props';
@@ -19585,7 +19585,7 @@ export function Waterfall({
19585
19585
  </>
19586
19586
  );
19587
19587
  }
19588
- `,yS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",vi={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 vS(e){const t={};return t[yt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSettings")]={...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[yt(e,"fontSize")]={...vi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[yt(e,"lineHeight")]={...vi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[yt(e,"letterSpacing")]={...vi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[yt(e,"wordSpacing")]={...vi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[yt(e,"textAlign")]={...vi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[yt(e,"textAppearance")]={...vi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fo=Li.filter(e=>e!=="count"),xS=Fo.reduce((e,t)=>({...e,...vS(t)}),{}),bS=Fo.reduce((e,t)=>({...e,[yt(t,"fontFamily")]:"Arial",[yt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[yt(t,"letterSpacing")]:0,[yt(t,"wordSpacing")]:0,[yt(t,"textAlign")]:"left",[yt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[yt(n,"fontSize")]=i),o!==void 0&&(t[yt(n,"lineHeight")]=o),t},{})}const SS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fo.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},wS=[{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"}}],$S={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:wS},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:{...vi.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"]}}},...xS},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:yS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...bS},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,...Ss({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,...Ss({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,...Ss({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:[SS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},CS={element:hS,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"},...Fo.map(e=>({path:`${yt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${yt(t,"fontFamily")}`}),{})},schema:$S,sourceCode:fS},bo=500,Sp="cubic-bezier(0.25, 1, 0.5, 1)",TS=300,IS=5,LS=.15,PS=.4,MS=100,oo=100,gd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},RS={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}},ws={offset:{x:0,y:0},linkColor:"#cccccc"},hd={sizeType:"drag",value:3},ES="left";function kS(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:ES,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function ro(e,t,n){return`${e}: ${$.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function AS(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 FS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function NS(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(oo,0),l=i(0,oo);e.removeChild(n);const c={x:(r.x-o.x)/oo,y:(r.y-o.y)/oo},d={x:(l.x-o.x)/oo,y:(l.y-o.y)/oo},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function _S(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 HS(e,t){return`
19588
+ `,$S="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 CS(e){const t={};return t[vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[vt(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[vt(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[vt(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[vt(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[vt(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[vt(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _o=Ri.filter(e=>e!=="count"),TS=_o.reduce((e,t)=>({...e,...CS(t)}),{}),IS=_o.reduce((e,t)=>({...e,[vt(t,"fontFamily")]:"Arial",[vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[vt(t,"letterSpacing")]:0,[vt(t,"wordSpacing")]:0,[vt(t,"textAlign")]:"left",[vt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return _o.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[vt(n,"fontSize")]=i),o!==void 0&&(t[vt(n,"lineHeight")]=o),t},{})}const LS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(_o.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},PS=[{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"}}],MS={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:PS},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"]}}},...TS},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:$S,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...IS},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,...Ss({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,...Ss({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,...Ss({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:[LS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},RS={element:SS,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:`${vt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",..._o.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${vt(t,"fontFamily")}`}),{})},schema:MS,sourceCode:wS},wo=500,Lp="cubic-bezier(0.25, 1, 0.5, 1)",ES=300,kS=5,AS=.15,FS=.4,NS=100,ao=100,gd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},_S={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}},ws={offset:{x:0,y:0},linkColor:"#cccccc"},hd={sizeType:"drag",value:3},HS="left";function WS(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:HS,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function so(e,t,n){return`${e}: ${w.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function OS(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 DS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function zS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}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 BS(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 jS(e,t){return`
19589
19589
  .${e}-wrapper {
19590
19590
  position: relative;
19591
19591
  width: 100%;
@@ -19657,7 +19657,7 @@ export function Waterfall({
19657
19657
  top: 0;
19658
19658
  left: 0;
19659
19659
  opacity: 0;
19660
- transition: opacity ${bo}ms ${Sp};
19660
+ transition: opacity ${wo}ms ${Lp};
19661
19661
  }
19662
19662
  .${e}-list-fade .${e}-slide.${e}-is-active {
19663
19663
  opacity: 1;
@@ -19684,29 +19684,29 @@ export function Waterfall({
19684
19684
  top: 50%;
19685
19685
  z-index: 1;
19686
19686
  padding: 0;
19687
- ${ro("width",30,t)}
19688
- ${ro("height",30,t)}
19687
+ ${so("width",30,t)}
19688
+ ${so("height",30,t)}
19689
19689
  transition: opacity 0.15s ease-in-out;
19690
19690
  }
19691
19691
  .${e}-arrow-prev {
19692
- ${ro("left",-20,t)}
19692
+ ${so("left",-20,t)}
19693
19693
  transform: translate3d(-50%, -50%, 0);
19694
19694
  }
19695
19695
  .${e}-arrow-next {
19696
19696
  left: unset;
19697
- ${ro("right",-20,t)}
19697
+ ${so("right",-20,t)}
19698
19698
  transform: translate3d(50%, -50%, 0);
19699
19699
  }
19700
19700
  .${e}-arrow-prev-vertical {
19701
19701
  left: 50%;
19702
- ${ro("top",-20,t)}
19702
+ ${so("top",-20,t)}
19703
19703
  transform: translate3d(-50%, -50%, 0);
19704
19704
  }
19705
19705
  .${e}-arrow-next-vertical {
19706
19706
  left: 50%;
19707
19707
  right: unset;
19708
19708
  top: unset;
19709
- ${ro("bottom",-20,t)}
19709
+ ${so("bottom",-20,t)}
19710
19710
  transform: translate3d(-50%, 50%, 0);
19711
19711
  }
19712
19712
  .${e}-arrow-hidden {
@@ -19842,10 +19842,10 @@ export function Waterfall({
19842
19842
  object-fit: cover;
19843
19843
  }
19844
19844
  .${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
19845
- animation: ${e}-reveal-horizontal ${bo}ms ease;
19845
+ animation: ${e}-reveal-horizontal ${wo}ms ease;
19846
19846
  }
19847
19847
  .${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
19848
- animation: ${e}-reveal-vertical ${bo}ms ease;
19848
+ animation: ${e}-reveal-vertical ${wo}ms ease;
19849
19849
  }
19850
19850
  @keyframes ${e}-reveal-horizontal {
19851
19851
  from { clip-path: inset(0 100% 0 0); }
@@ -19855,7 +19855,7 @@ export function Waterfall({
19855
19855
  from { clip-path: inset(100% 0 0 0); }
19856
19856
  to { clip-path: inset(0 0 0 0); }
19857
19857
  }
19858
- `}function WS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=$.useScopedStyles(),l=kS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",y=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",v=(e==null?void 0:e.navSize)??"m",b=RS[v],E=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=xe=>$.scalingValue(xe*E,n),w=(e==null?void 0:e.show)??"always",H=(e==null?void 0:e.controls)??null,q=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,M=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??gd.color,j=(e==null?void 0:e.controlsHoverColor)??gd.hover,C=(e==null?void 0:e.navColor)??Zo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,W=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,A=(e==null?void 0:e.linkColor)??ws.linkColor,I=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,T=x==="horizontal",V=p==="click",S=p==="drag",X=p==="auto"&&(!n||!!i),P=!n,k=m==="slide",O=h==="classic",ie=w!=="never"&&q>0,ae=w==="on hover",D=$.scalingValue(q,n),se={width:D,height:D,maxWidth:D},R=k&&d>1,[de,te]=s.useState(0),[Se,Ce]=s.useState(R?1:0),[ve,ue]=s.useState(!1),[Q,re]=s.useState(!1),[fe,he]=s.useState(!1),[be,Me]=s.useState(0),[Ne,we]=s.useState(!1),[ce,g]=s.useState(!1),Y=s.useRef(!1),Z=s.useRef(Se);Z.current=Se;const ee=s.useRef(null),ye=s.useRef(0),G=s.useRef(null),N=s.useRef(null),K=s.useRef(null),ne=s.useRef(null),pe=s.useCallback(xe=>{Y.current=xe,ue(xe)},[]),U=s.useCallback(xe=>{if(d<2||xe===0)return;const Ie=xe>0?1:-1,We=Math.abs(xe);if(we(!0),pe(!0),!k){te(Be=>rr(Be+xe,d));return}let qe=Z.current;const je=R&&(qe===0||qe===d+1),ot=je?de+1:null;je&&(qe=de+1);let nt=We;for(;nt>0;){const Be=AS(qe,Ie,d,R);if(qe=Be.position,nt-=1,Be.hitBoundary){ye.current=nt*Ie;break}}const Ee=We-nt;if(Ee>0&&te(Be=>rr(Be+Ee*Ie,d)),Z.current=qe,ot!==null){if(Z.current=ot,qe===ot){re(!0),Ce(qe);return}ee.current=qe,re(!0),Ce(ot);return}re(!1),Ce(qe)},[de,d,R,k,pe]),Pe=s.useCallback(xe=>{U(xe)},[U]),le=s.useCallback(xe=>{if(d<2)return;const Ie=rr(xe,d);if(!(Ie===de&&!Y.current)&&(we(!0),pe(!0),te(Ie),k)){const We=Ie+(R?1:0);ee.current=null,ye.current=0,Z.current=We,re(!1),Ce(We)}},[de,d,R,k,pe]);s.useEffect(()=>{if(!ve)return;const xe=window.setTimeout(()=>{if(R&&(Se===0||Se===d+1)){ee.current=null,re(!0),Ce(de+1);return}pe(!1)},bo);return()=>window.clearTimeout(xe)},[de,d,R,ve,pe,Se]),s.useEffect(()=>{if(!Q)return;let xe=0;const Ie=requestAnimationFrame(()=>{xe=requestAnimationFrame(()=>{const We=ee.current;ee.current=null;const qe=ye.current;if(ye.current=0,re(!1),We!==null){Z.current=We,Ce(We);return}if(qe!==0){U(qe);return}pe(!1)})});return()=>{cancelAnimationFrame(Ie),cancelAnimationFrame(xe)}},[U,pe,Q]);const J=`${R}:${d}`,De=s.useRef(J);s.useEffect(()=>{if(De.current===J)return;De.current=J;const xe=d>0?Math.min(de,d-1):0;K.current=null,ne.current=null,he(!1),Me(0),te(xe),re(!0),Ce(xe+(R?1:0))},[de,d,R,J]),s.useEffect(()=>{if(!Ne)return;const xe=window.setTimeout(()=>we(!1),TS);return()=>window.clearTimeout(xe)},[Ne,de]),s.useEffect(()=>{if(!X||d<2)return;const xe=Math.max(y,.1)*1e3,Ie=window.setInterval(()=>{P&&ce||Pe(1)},xe);return()=>window.clearInterval(Ie)},[y,d,Pe,X,ce,P]);const Xe=s.useCallback(xe=>{const Ie=K.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;K.current=null,ne.current=null;const We=G.current;if(We!=null&&We.hasPointerCapture(xe.pointerId)&&We.releasePointerCapture(xe.pointerId),!Ie.isActive){k&&Me(0);return}const je=!(xe.timeStamp-Ie.lastTime>MS)&&Math.abs(Ie.velocity)>PS,ot=Ie.size>0&&Math.abs(Ie.offset-Ie.baseOffset)>Ie.size*LS;if(he(!1),!je&&!ot){Me(0);return}const nt=ot?Ie.offset-Ie.baseOffset:Ie.velocity;let Ee=1;ot&&Ie.size>0&&(Ee=Math.max(1,Math.round(Math.abs(nt)/Ie.size))),Me(0),U(nt<0?Ee:-Ee)},[U,k]);s.useEffect(()=>{const xe=Ie=>{ne.current===null||Ie.pointerId!==ne.current||Xe(Ie)};return window.addEventListener("pointerup",xe),window.addEventListener("pointercancel",xe),()=>{window.removeEventListener("pointerup",xe),window.removeEventListener("pointercancel",xe)}},[Xe]);const Ue=xe=>{const Ie=G.current;if(!S||d<2||!Ie||xe.pointerType==="mouse"&&xe.button!==0)return;ee.current=null,ye.current=0,Y.current&&pe(!1);let We=0;const qe=N.current;if(k&&qe){const je=T?qe.offsetWidth:qe.offsetHeight;if(je>0){const ot=FS(qe,T);let nt=Z.current;R&&(nt===0||nt===d+1)?(nt=de+1,Z.current=nt,re(!0),Ce(nt),We=0):We=ot+nt*je,Me(We)}}Ie.setPointerCapture(xe.pointerId),ne.current=xe.pointerId,K.current={pointerId:xe.pointerId,startClientX:xe.clientX,startClientY:xe.clientY,axes:NS(Ie,`${r}-axis-probe`),size:T?Ie.offsetWidth:Ie.offsetHeight,isActive:!1,baseOffset:We,offset:We,lastTime:xe.timeStamp,velocity:0}},Je=xe=>{const Ie=K.current;if(!Ie||Ie.pointerId!==xe.pointerId)return;if(xe.pointerType==="mouse"&&xe.buttons===0){Xe(xe);return}const We=xe.clientX-Ie.startClientX,qe=xe.clientY-Ie.startClientY,je=Ie.axes?_S(Ie.axes,We,qe):{x:We,y:qe},ot=T?je.x:je.y,nt=T?je.y:je.x,Ee=Ie.baseOffset+ot;if(!Ie.isActive){if(Math.max(Math.abs(ot),Math.abs(nt))<IS)return;if(Math.abs(nt)>Math.abs(ot)){const tt=G.current;tt!=null&&tt.hasPointerCapture(Ie.pointerId)&&tt.releasePointerCapture(Ie.pointerId),K.current=null,ne.current=null,k&&Me(0);return}Ie.isActive=!0,he(!0)}const Be=xe.timeStamp-Ie.lastTime;Be>0&&(Ie.velocity=(Ee-Ie.offset)/Be,Ie.lastTime=xe.timeStamp),Ie.offset=Ee,k&&Me(Ee)},et=xe=>{Xe(xe)},Qe=T?`translate3d(calc(${-Se*100}% + ${be}px), 0, 0)`:`translate3d(0, calc(${-Se*100}% + ${be}px), 0)`,it=R?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:HS(r,n)}}),a.jsxs("div",{className:Tt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!T}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:G,className:Tt(`${r}-track`,{[`${r}-track-draggable`]:S,[`${r}-track-draggable-vertical`]:S&&!T}),onPointerDown:Ue,onPointerMove:Je,onPointerUp:et,onPointerCancel:et,onLostPointerCapture:xe=>{ne.current===xe.pointerId&&Xe(xe)},children:a.jsx("div",{ref:N,className:Tt(`${r}-list`,{[`${r}-list-slide`]:k,[`${r}-list-slide-vertical`]:k&&!T,[`${r}-list-fade`]:!k}),style:k?{transform:Qe,transition:fe||Q?"none":`transform ${bo}ms ${Sp}`}:void 0,children:it.map((xe,Ie)=>{const We=R?rr(Ie-1,d):Ie,je=R&&(Ie===0||Ie===d+1)?`clone-${Ie===0?"start":"end"}`:`slide-${We}`;return a.jsx("div",{className:Tt(`${r}-slide`,{[`${r}-is-active`]:!k&&We===de}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Tt(`${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})})})},je)})})}),ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Tt(`${r}-arrow`,{[`${r}-arrow-prev`]:T,[`${r}-arrow-prev-vertical`]:!T,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":j,...se},children:a.jsxs("button",{onClick:xe=>{xe.stopPropagation(),Pe(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${$.scalingValue(B,n)}, ${$.scalingValue(M*(T?1:-1),n)}) rotate(${T?"0deg":"90deg"})`},children:[H&&a.jsx(mn,{url:H,fill:_,hoverFill:j,className:Tt(`${r}-arrow-img`,`${r}-mirror`),style:se}),!H&&a.jsx(fd,{color:_,className:Tt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Tt(`${r}-arrow`,{[`${r}-arrow-next`]:T,[`${r}-arrow-next-vertical`]:!T,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":j,...se},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:xe=>{xe.stopPropagation(),Pe(1)},style:{transform:`translate(${$.scalingValue(B*(T?-1:1),n)}, ${$.scalingValue(M,n)}) rotate(${T?"0deg":"90deg"})`},children:[H&&a.jsx(mn,{url:H,fill:_,hoverFill:j,className:`${r}-arrow-img`,style:se}),!H&&a.jsx(fd,{color:_,className:Tt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Pe(1)}),O&&a.jsx("div",{className:Tt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:T,[`${r}-pagination-inside-left`]:!T}),style:T?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Tt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!T,[`${r}-animate-dots`]:Ne}),style:{backgroundColor:W,gap:f(b.gapInactive-b.activeDot+b.dot),...T?{height:f(b.activeDot+b.paddingY*2),paddingTop:f(b.paddingY),paddingBottom:f(b.paddingY),paddingLeft:f(b.paddingActive),paddingRight:f(b.paddingActive)}:{width:f(b.activeDot+b.paddingY*2),paddingLeft:f(b.paddingY),paddingRight:f(b.paddingY),paddingTop:f(b.paddingActive),paddingBottom:f(b.paddingActive)},borderRadius:f(b.borderRadius),transform:`translate(${$.scalingValue(Zo.offset.x,n)}, ${$.scalingValue(Zo.offset.y,n)})`},children:c.map((xe,Ie)=>{const We=Ie===de,qe=We?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>le(Ie),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:We?L:C,width:f(qe)}})},Ie)})},`${v}-${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:$.scalingValue(I,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((xe,Ie)=>a.jsx("div",{className:Tt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Ie===de&&n,[`${r}-active`]:Ie===de}),style:{...l,width:"max-content",transitionDuration:`${Math.round(bo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":A,"--link-hover-color":A,position:"relative",top:$.scalingValue(ws.offset.y,n),left:$.scalingValue(ws.offset.x,n)},children:a.jsx(Ki,{content:xe.imageCaption})})},Ie))})]})]})]})}function fd({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 OS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19858
+ `}function VS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=w.useScopedStyles(),l=WS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",v=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",b=(e==null?void 0:e.navSize)??"m",S=_S[b],R=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=ve=>w.scalingValue(ve*R,n),C=(e==null?void 0:e.show)??"always",E=(e==null?void 0:e.controls)??null,G=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,H=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,O=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,F=(e==null?void 0:e.controlsColor)??gd.color,D=(e==null?void 0:e.controlsHoverColor)??gd.hover,I=(e==null?void 0:e.navColor)??Zo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,z=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,k=(e==null?void 0:e.linkColor)??ws.linkColor,$=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,P=x==="horizontal",q=p==="click",_=p==="drag",K=p==="auto"&&(!n||!!i),M=!n,f=m==="slide",X=h==="classic",oe=C!=="never"&&G>0,ue=C==="on hover",N=w.scalingValue(G,n),se={width:N,height:N,maxWidth:N},T=f&&d>1,[me,J]=s.useState(0),[we,Le]=s.useState(T?1:0),[he,fe]=s.useState(!1),[ie,re]=s.useState(!1),[ae,pe]=s.useState(!1),[be,ke]=s.useState(0),[Fe,xe]=s.useState(!1),[le,g]=s.useState(!1),V=s.useRef(!1),Y=s.useRef(we);Y.current=we;const te=s.useRef(null),ge=s.useRef(0),ee=s.useRef(null),B=s.useRef(null),Z=s.useRef(null),U=s.useRef(null),de=s.useCallback(ve=>{V.current=ve,fe(ve)},[]),j=s.useCallback(ve=>{if(d<2||ve===0)return;const Te=ve>0?1:-1,We=Math.abs(ve);if(xe(!0),de(!0),!f){J(ze=>rr(ze+ve,d));return}let Ke=Y.current;const Ze=T&&(Ke===0||Ke===d+1),lt=Ze?me+1:null;Ze&&(Ke=me+1);let ot=We;for(;ot>0;){const ze=OS(Ke,Te,d,T);if(Ke=ze.position,ot-=1,ze.hitBoundary){ge.current=ot*Te;break}}const Me=We-ot;if(Me>0&&J(ze=>rr(ze+Me*Te,d)),Y.current=Ke,lt!==null){if(Y.current=lt,Ke===lt){re(!0),Le(Ke);return}te.current=Ke,re(!0),Le(lt);return}re(!1),Le(Ke)},[me,d,T,f,de]),Pe=s.useCallback(ve=>{j(ve)},[j]),ne=s.useCallback(ve=>{if(d<2)return;const Te=rr(ve,d);if(!(Te===me&&!V.current)&&(xe(!0),de(!0),J(Te),f)){const We=Te+(T?1:0);te.current=null,ge.current=0,Y.current=We,re(!1),Le(We)}},[me,d,T,f,de]);s.useEffect(()=>{if(!he)return;const ve=window.setTimeout(()=>{if(T&&(we===0||we===d+1)){te.current=null,re(!0),Le(me+1);return}de(!1)},wo);return()=>window.clearTimeout(ve)},[me,d,T,he,de,we]),s.useEffect(()=>{if(!ie)return;let ve=0;const Te=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const We=te.current;te.current=null;const Ke=ge.current;if(ge.current=0,re(!1),We!==null){Y.current=We,Le(We);return}if(Ke!==0){j(Ke);return}de(!1)})});return()=>{cancelAnimationFrame(Te),cancelAnimationFrame(ve)}},[j,de,ie]);const Q=`${T}:${d}`,_e=s.useRef(Q);s.useEffect(()=>{if(_e.current===Q)return;_e.current=Q;const ve=d>0?Math.min(me,d-1):0;Z.current=null,U.current=null,pe(!1),ke(0),J(ve),re(!0),Le(ve+(T?1:0))},[me,d,T,Q]),s.useEffect(()=>{if(!Fe)return;const ve=window.setTimeout(()=>xe(!1),ES);return()=>window.clearTimeout(ve)},[Fe,me]),s.useEffect(()=>{if(!K||d<2)return;const ve=Math.max(v,.1)*1e3,Te=window.setInterval(()=>{M&&le||Pe(1)},ve);return()=>window.clearInterval(Te)},[v,d,Pe,K,le,M]);const Ge=s.useCallback(ve=>{const Te=Z.current;if(!Te||Te.pointerId!==ve.pointerId)return;Z.current=null,U.current=null;const We=ee.current;if(We!=null&&We.hasPointerCapture(ve.pointerId)&&We.releasePointerCapture(ve.pointerId),!Te.isActive){f&&ke(0);return}const Ze=!(ve.timeStamp-Te.lastTime>NS)&&Math.abs(Te.velocity)>FS,lt=Te.size>0&&Math.abs(Te.offset-Te.baseOffset)>Te.size*AS;if(pe(!1),!Ze&&!lt){ke(0);return}const ot=lt?Te.offset-Te.baseOffset:Te.velocity;let Me=1;lt&&Te.size>0&&(Me=Math.max(1,Math.round(Math.abs(ot)/Te.size))),ke(0),j(ot<0?Me:-Me)},[j,f]);s.useEffect(()=>{const ve=Te=>{U.current===null||Te.pointerId!==U.current||Ge(Te)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[Ge]);const Be=ve=>{const Te=ee.current;if(!_||d<2||!Te||ve.pointerType==="mouse"&&ve.button!==0)return;te.current=null,ge.current=0,V.current&&de(!1);let We=0;const Ke=B.current;if(f&&Ke){const Ze=P?Ke.offsetWidth:Ke.offsetHeight;if(Ze>0){const lt=DS(Ke,P);let ot=Y.current;T&&(ot===0||ot===d+1)?(ot=me+1,Y.current=ot,re(!0),Le(ot),We=0):We=lt+ot*Ze,ke(We)}}Te.setPointerCapture(ve.pointerId),U.current=ve.pointerId,Z.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:zS(Te,`${r}-axis-probe`),size:P?Te.offsetWidth:Te.offsetHeight,isActive:!1,baseOffset:We,offset:We,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const Te=Z.current;if(!Te||Te.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){Ge(ve);return}const We=ve.clientX-Te.startClientX,Ke=ve.clientY-Te.startClientY,Ze=Te.axes?BS(Te.axes,We,Ke):{x:We,y:Ke},lt=P?Ze.x:Ze.y,ot=P?Ze.y:Ze.x,Me=Te.baseOffset+lt;if(!Te.isActive){if(Math.max(Math.abs(lt),Math.abs(ot))<kS)return;if(Math.abs(ot)>Math.abs(lt)){const et=ee.current;et!=null&&et.hasPointerCapture(Te.pointerId)&&et.releasePointerCapture(Te.pointerId),Z.current=null,U.current=null,f&&ke(0);return}Te.isActive=!0,pe(!0)}const ze=ve.timeStamp-Te.lastTime;ze>0&&(Te.velocity=(Me-Te.offset)/ze,Te.lastTime=ve.timeStamp),Te.offset=Me,f&&ke(Me)},Ye=ve=>{Ge(ve)},nt=P?`translate3d(calc(${-we*100}% + ${be}px), 0, 0)`:`translate3d(0, calc(${-we*100}% + ${be}px), 0)`,it=T?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:jS(r,n)}}),a.jsxs("div",{className:Pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!P}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:ee,className:Pt(`${r}-track`,{[`${r}-track-draggable`]:_,[`${r}-track-draggable-vertical`]:_&&!P}),onPointerDown:Be,onPointerMove:qe,onPointerUp:Ye,onPointerCancel:Ye,onLostPointerCapture:ve=>{U.current===ve.pointerId&&Ge(ve)},children:a.jsx("div",{ref:B,className:Pt(`${r}-list`,{[`${r}-list-slide`]:f,[`${r}-list-slide-vertical`]:f&&!P,[`${r}-list-fade`]:!f}),style:f?{transform:nt,transition:ae||ie?"none":`transform ${wo}ms ${Lp}`}:void 0,children:it.map((ve,Te)=>{const We=T?rr(Te-1,d):Te,Ze=T&&(Te===0||Te===d+1)?`clone-${Te===0?"start":"end"}`:`slide-${We}`;return a.jsx("div",{className:Pt(`${r}-slide`,{[`${r}-is-active`]:!f&&We===me}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Pt(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.assetId,alt:ve.image.name??"",draggable:!1})})})},Ze)})})}),oe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-prev`]:P,[`${r}-arrow-prev-vertical`]:!P,[`${r}-hover-arrow`]:ue}),style:{color:F,"--arrow-hover-color":D,...se},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Pe(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${w.scalingValue(H,n)}, ${w.scalingValue(O*(P?1:-1),n)}) rotate(${P?"0deg":"90deg"})`},children:[E&&a.jsx(gn,{url:E,fill:F,hoverFill:D,className:Pt(`${r}-arrow-img`,`${r}-mirror`),style:se}),!E&&a.jsx(fd,{color:F,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-next`]:P,[`${r}-arrow-next-vertical`]:!P,[`${r}-hover-arrow`]:ue}),style:{color:F,"--arrow-hover-color":D,...se},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Pe(1)},style:{transform:`translate(${w.scalingValue(H*(P?-1:1),n)}, ${w.scalingValue(O,n)}) rotate(${P?"0deg":"90deg"})`},children:[E&&a.jsx(gn,{url:E,fill:F,hoverFill:D,className:`${r}-arrow-img`,style:se}),!E&&a.jsx(fd,{color:F,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),q&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Pe(1)}),X&&a.jsx("div",{className:Pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:P,[`${r}-pagination-inside-left`]:!P}),style:P?{bottom:y(S.inset)}:{left:y(S.inset)},children:a.jsx("div",{className:Pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!P,[`${r}-animate-dots`]:Fe}),style:{backgroundColor:z,gap:y(S.gapInactive-S.activeDot+S.dot),...P?{height:y(S.activeDot+S.paddingY*2),paddingTop:y(S.paddingY),paddingBottom:y(S.paddingY),paddingLeft:y(S.paddingActive),paddingRight:y(S.paddingActive)}:{width:y(S.activeDot+S.paddingY*2),paddingLeft:y(S.paddingY),paddingRight:y(S.paddingY),paddingTop:y(S.paddingActive),paddingBottom:y(S.paddingActive)},borderRadius:y(S.borderRadius),transform:`translate(${w.scalingValue(Zo.offset.x,n)}, ${w.scalingValue(Zo.offset.y,n)})`},children:c.map((ve,Te)=>{const We=Te===me,Ke=We?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>ne(Te),className:`${r}-pagination-item`,style:{width:y(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:We?L:I,width:y(Ke)}})},Te)})},`${b}-${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:w.scalingValue($,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,Te)=>a.jsx("div",{className:Pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Te===me&&n,[`${r}-active`]:Te===me}),style:{...l,width:"max-content",transitionDuration:`${Math.round(wo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":k,"--link-hover-color":k,position:"relative",top:w.scalingValue(ws.offset.y,n),left:w.scalingValue(ws.offset.x,n)},children:a.jsx(Zi,{content:ve.imageCaption})})},Te))})]})]})]})}function fd({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 GS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19859
19859
  import cn from 'classnames';
19860
19860
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19861
19861
  import { scalingValue } from '../utils/scalingValue';
@@ -21036,14 +21036,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21036
21036
  </svg>
21037
21037
  );
21038
21038
  }
21039
- `,DS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",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",contentKey:"title",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},zS={element:WS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:DS,sourceCode:OS,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},uo=300/1440,BS=8/1440,ei=.004;function jS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $s(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:$.scalingValue((r-t)/2,i)}}function VS(e){return`
21039
+ `,XS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",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",contentKey:"title",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},qS={element:VS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:XS,sourceCode:GS,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},mo=300/1440,US=8/1440,ti=.004;function KS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $s(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:w.scalingValue((r-t)/2,i)}}function YS(e){return`
21040
21040
  .${e}-wrapper {
21041
21041
  box-sizing: border-box;
21042
21042
  display: flex;
21043
21043
  flex-direction: column;
21044
21044
  position: relative;
21045
21045
  width: 100%;
21046
- min-height: ${jS(48)};
21046
+ min-height: ${KS(48)};
21047
21047
  }
21048
21048
  .${e}-single-title-layer {
21049
21049
  position: absolute;
@@ -21276,7 +21276,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21276
21276
  width: var(--cntrl-article-width, 100vw) !important;
21277
21277
  height: var(--cntrl-viewport-height, 100vh) !important;
21278
21278
  }
21279
- `}const wp={"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 GS(e){return e in wp}function XS(e){if(e&&GS(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 Gl(e){return wp[e]}const US="rgba(28,31,34,0.9)",Zn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",qS=72,KS=50,YS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},QS=[];function ZS(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 JS(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function ew(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tw(e){if(!Array.isArray(e)||e.length===0)return[];if(ZS(e)){const t=[];for(const n of e){const i=JS(n);if(!i)continue;const o=ew(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 nw(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 iw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const ow=1140/1440;function rw(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 aw(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 sw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function lw({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()=>{nw(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})}function cw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const y=i==="cover",x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),v=s.useRef(0),b=s.useRef(0),E=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),H=s.useRef(!1),q=s.useRef(null),[B,M]=s.useState(null),[_,j]=s.useState("opening"),[C,L]=s.useState(0),[W,A]=s.useState(0),[I,T]=s.useState(!1),[V,S]=s.useState(!1),[X,P]=s.useState(!1),k=s.useRef(n),O=t[n],ie=O?Ys(O):!1,ae=O?$.isEmbedMedia(O):!1,D=W!==0||I,se=s.useCallback(ce=>{H.current=ce,T(ce)},[]),R=s.useCallback(()=>{q.current!==null&&(window.clearTimeout(q.current),q.current=null)},[]),de=s.useCallback(()=>{R(),q.current=window.setTimeout(()=>{R(),se(!1)},Zn+32)},[R,se]),te=s.useCallback(()=>{const ce=x.current,g=m.current;if(!ce)return;const Y=ce.getBoundingClientRect(),Z=Y.width,ee=Y.height;if(!Z||!ee)return;if(i==="cover"){M({width:Z,height:ee,left:Y.left,top:Y.top});return}let ye=O&&$.isEmbedMedia(O)?$.getEmbedAspect(O):null;if(ye===null){if(!g){M(Zr(ce));return}const{width:N,height:K}=iw(g);if(!N||!K){M(Zr(ce));return}ye=N/K}const G=Z/ee;if(ye>G){const N=Z/ye;M({width:Z,height:N,left:Y.left,top:Y.top+(ee-N)/2})}else{const N=ee*ye;M({width:N,height:ee,left:Y.left+(Z-N)/2,top:Y.top})}},[i,O]);s.useEffect(()=>{te();const ce=x.current;if(!ce)return;const g=new ResizeObserver(()=>te());return g.observe(ce),()=>g.disconnect()},[te,n]),s.useEffect(()=>{_==="opening"&&B&&j("open")},[_,B]),s.useEffect(()=>{if(_!=="closing")return;const ce=setTimeout(()=>r(),Zn);return()=>clearTimeout(ce)},[_,r]),s.useEffect(()=>()=>{R()},[R]),s.useLayoutEffect(()=>{if(k.current===n)return;R(),L(0),A(0),se(!1),P(!1),S(!1),v.current=0,b.current=0,E.current="none",f.current=!1,h.current=null,w.current=!1;const ce=x.current;ce&&M(Zr(ce)),k.current=n},[n,se,R]),s.useEffect(()=>{if(_!=="open")return;let ce=null;const g=()=>{ce&&(document.removeEventListener("click",ce,!0),ce=null)},Y=()=>{g(),ce=K=>{K.stopPropagation(),K.preventDefault(),g()},document.addEventListener("click",ce,!0)},Z=K=>{R(),H.current=!1,T(!1),A(0),S(!1),f.current=!1,b.current=0,E.current="none";const ne=x.current;ne&&M(Zr(ne)),K<0?c():l()},ee=K=>{if(Math.abs(K)>KS&&t.length>1){Z(K);return}se(!0),A(0),de()},ye=K=>{if(K.touches.length!==1||H.current)return;const ne=K.touches[0];w.current=!0,h.current={x:ne.clientX,y:ne.clientY},E.current="none",b.current=0,f.current=!1},G=K=>{if(!h.current||K.touches.length!==1||H.current)return;const ne=K.touches[0],pe=ne.clientX-h.current.x,U=ne.clientY-h.current.y;if(E.current==="none"){if(Math.abs(pe)<10&&Math.abs(U)<10)return;if(Math.abs(pe)>Math.abs(U)){if(t.length<=1)return;E.current="horizontal"}else if(U>0)E.current="vertical";else return}if(E.current==="horizontal"){f.current=!0,S(!0),b.current=pe,A(pe),K.preventDefault();return}E.current==="vertical"&&(f.current=!0,S(!0),v.current=U,L(U),K.preventDefault())},N=()=>{if(!h.current)return;const K=E.current,ne=f.current;if(ne&&K==="horizontal")ee(b.current),Y();else if(ne&&K==="vertical")if(v.current>qS){const U=window.innerHeight;v.current=U,P(!0),L(U),j("closing")}else v.current=0,L(0),Y();else K==="horizontal"&&Math.abs(b.current)>0&&(ee(b.current),Y());h.current=null,E.current="none",b.current=0,f.current=!1,S(!1)};return document.addEventListener("touchstart",ye,{passive:!0}),document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N),()=>{document.removeEventListener("touchstart",ye),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N),g()}},[_,t.length,c,l,se,de,R]),s.useEffect(()=>{const ce=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),_!=="closing"&&j("closing"))};return window.addEventListener("keydown",ce,!0),()=>window.removeEventListener("keydown",ce,!0)},[_]);const Se=()=>{_!=="closing"&&j("closing")},Ce=_==="open",ve=_==="closing",ue=C>0?Math.max(0,1-C/500):1,Q=C>0?Math.max(.35,1-C/500):1,re=ce=>{if(ce.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const g=ce.currentTarget.getBoundingClientRect(),Y=ce.clientY-g.top,Z=Math.min(52,g.height*.2);if(!(Y>g.height-Z)){if(ce.clientX-g.left<g.width/2){l();return}c()}},fe=ce=>{if(t.length<=1)return;const g=ce.currentTarget.getBoundingClientRect(),Y=ce.clientX-g.left,Z=ce.clientY-g.top,ee=Math.min(52,g.height*.2);if(Z>g.height-ee){ce.currentTarget.style.cursor="default";return}ce.currentTarget.style.cursor=Y<g.width/2?"w-resize":"e-resize"},he=s.useCallback(ce=>{ce.propertyName!=="transform"||!H.current||(R(),se(!1))},[R,se]),be=D?`translateX(${W}px)`:C>0?`translateY(${C}px)`:void 0,Me={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:be,opacity:C>0?Q:_==="opening"||ve?0:1,transition:V&&!I?"none":I?`transform ${Zn}ms ${Oi}`:X?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||ve?`opacity ${Zn}ms ${Oi}`:"none",pointerEvents:(ie||ae)&&Ce&&!D?"auto":"none",touchAction:(ie||ae)&&Ce?"none":void 0,zIndex:9998},Ne=ae&&B?Math.min(52,B.height*.2):0,we=B?{position:"fixed",top:B.top,height:B.height-Ne,width:B.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:_==="open"?"none":void 0},onClick:Se,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:Ce?ue:0,transition:V?"none":`opacity ${Zn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,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:Ce?1:0,transition:`opacity ${Zn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Ce?1:0,transition:`opacity ${Zn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&O&&(ae?a.jsx($.EmbedMediaFrame,{media:O,mode:"player",fit:i==="cover"?"cover":"contain",lazy:!1,interactive:Ce&&!D,style:Me,onTransitionEnd:he},`${n}-${O.assetId}`):ie?a.jsx(lw,{src:O.assetId,phase:_,mediaRef:m,mediaStyle:Me,onLoadedMetadata:te,onClick:re,onMouseMove:fe,onTransitionEnd:he},`${n}-${O.assetId}`):a.jsx("img",{ref:m,src:O.assetId,alt:O.name,onLoad:te,onTransitionEnd:he,style:Me},`${n}-${O.assetId}`)),Ce&&we&&t.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...we,left:B.left,cursor:"w-resize",pointerEvents:D?"none":"auto"},onClick:ce=>{if(w.current){w.current=!1;return}ce.stopPropagation(),l()}}),a.jsx("div",{style:{...we,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:D?"none":"auto"},onClick:ce=>{if(w.current){w.current=!1;return}ce.stopPropagation(),c()}})]})]})}function yd({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=aw(r),h=_=>$.scalingValue(_,l??!1),v=n??uo,b=o?{width:"100%",maxWidth:"100%"}:{width:h(v),maxWidth:"100%"},E=i?{borderRadius:h(i)}:{},f={...b,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...E},w={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(v)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:E},q={className:y,style:w,onClick:p?_=>{_.stopPropagation(),p()}:void 0},B=Math.max(c,ei),M=$.isEmbedMedia(t)?a.jsx($.EmbedMediaFrame,{...q,media:t,mode:"background",fit:x?"cover":"contain"}):Ys(t)?a.jsx("video",{...q,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...q,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:f,children:M}):M,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(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:h(B)}})]})}function dw({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 uw(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 vd({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 Ts({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:h=!1,topPaddingControl:v,bottomPaddingControl:b}){const E=s.useRef(null),[f,w]=s.useState(0),H=t??"",q=n??"",B=q.length>0,{horizontal:M,vertical:_}=Gl(i),j=_==="center"||_==="bottom",C=_==="bottom";s.useLayoutEffect(()=>{if(!j)return;const I=E.current;if(!I||typeof ResizeObserver>"u")return;const T=()=>w(I.offsetHeight);T();const V=new ResizeObserver(T);return V.observe(I),()=>V.disconnect()},[H,q,j]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:H}),W=B?a.jsx("span",{className:u,style:p,children:q}):null,A=B?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=>{E.current=I,o(I)},className:[r,`${e}-title-h-${M}`,`${e}-title-v-${_}`].join(" "),style:{...j?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[v,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:C?a.jsxs(a.Fragment,{children:[W,A,L]}):a.jsxs(a.Fragment,{children:[L,A,W]})})}),b]})})}const xd=45;function bd(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 pw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function mw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=pw(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 gw(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=mw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function hw(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(gw(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 Sd(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 fw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var Mt,ut;const{prefix:l}=$.useScopedStyles(),c=s.useMemo(()=>VS(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)??uo,x=(e==null?void 0:e.titleWidth)??ow,m=rw(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??BS,v=XS(e==null?void 0:e.position),{horizontal:b,vertical:E}=Gl(v),f=(e==null?void 0:e.titleTopPadding)??0,w=(e==null?void 0:e.titleBottomPadding)??0,H=(e==null?void 0:e.titleLeftPadding)??0,q=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,M=uw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",j=p==="b",C=M==="fade"||M==="retype",{setTitleRef:L,dominantIndex:W}=hw(d.length,C,v),A=((Mt=d[W])==null?void 0:Mt.title)??"",I=((ut=d[W])==null?void 0:ut.description)??"",T=Sd(A,M==="retype"),V=Sd(I,M==="retype"),S=M==="fade"||M==="retype",X=M==="retype"?T:A,P=M==="retype"?V:I,k=j?void 0:{width:$.scalingValue(y,n??!1)},O=_==="on"&&(!n||i||o),ie=o??!1,ae=(e==null?void 0:e.galleryPaddingRight)??0,D=(e==null?void 0:e.galleryPaddingLeft)??0,se=(e==null?void 0:e.galleryPaddingBetween)??0,R=gt=>$.scalingValue(gt,n??!1),te={width:R(x)},Se=p==="a"?ae:D,Ce=j?{width:"100%"}:{width:`calc(100% - ${R(y)} - ${R(Se)})`,...p==="c"?{marginLeft:"auto"}:{}},ve=Math.max(ae,ei),ue=Math.max(D,ei),Q=Math.max(se,ei),re=Math.max(f,ei),fe=Math.max(w,ei),he=Math.max(H,ei),be=Math.max(q,ei),Me=Math.max(B,ei),Ne=Math.max(0,(u??1)-(y??uo)),we=p==="a"?Math.max(0,(u??1)-(y??uo)-ae):p==="c"?Math.max(0,(u??1)-(y??uo)-D):p==="b"?u??1:1,ce=ie&&E==="top",g=ie&&E==="bottom",Y=ie&&b==="left",Z=ie&&b==="right",ee=d.length>1,ye=j?void 0:R((p==="c"?D:ae)+(y??uo)),G=p==="c"&&ye?{left:ye}:void 0,N=p==="a"&&ye?{right:ye}:void 0,K=j?{left:0,width:"100%"}:p==="a"?{right:R(ae),width:R(y)}:{left:R(D),width:R(y)},{titleColor:ne,titleFontFamily:pe,titleFontSettings:U,titleFontSize:Pe,titleLineHeight:le,titleLetterSpacing:J,titleWordSpacing:De,titleAlign:Xe,titleTextAppearance:Ue,descriptionColor:Je,descriptionFontFamily:et,descriptionFontSettings:Qe,descriptionFontSize:it,descriptionLineHeight:xe,descriptionLetterSpacing:Ie,descriptionWordSpacing:We,descriptionAlign:qe,descriptionTextAppearance:je,lightboxCounterColor:ot,lightboxCounterFontFamily:nt,lightboxCounterFontSettings:Ee,lightboxCounterFontSize:Be,lightboxCounterLineHeight:tt,lightboxCounterLetterSpacing:_e,lightboxCounterWordSpacing:He,lightboxCounterTextAppearance:xt}=e??{},rt={fontSettings:{fontFamily:pe,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:le,letterSpacing:J??0,wordSpacing:De??0,textAlign:Xe??"left",textAppearance:Ue,color:ne??"#000000"},Te=un(nn(rt,n)),at=te,me={...Cs(Pe,le,l,n),...Cs(it,xe,l,n,"description-leading-gap")},Fe=$s(Pe,le,`${l}-title`,`${l}-text-tight-leading`),Ze={fontSettings:{fontFamily:et,fontWeight:(Qe==null?void 0:Qe.fontWeight)??400,fontStyle:(Qe==null?void 0:Qe.fontStyle)??"normal"},fontSize:it??.01,lineHeight:xe,letterSpacing:Ie??0,wordSpacing:We??0,textAlign:qe??"left",textAppearance:je,color:Je??"#000000"},dt=un(nn(Ze,n)),Ve=$s(it,xe,`${l}-description-text`,`${l}-description-tight-leading`),Lt=R(ie?Me:B),ht={fontSettings:{fontFamily:nt,fontWeight:(Ee==null?void 0:Ee.fontWeight)??400,fontStyle:(Ee==null?void 0:Ee.fontStyle)??"normal"},fontSize:Be??.01,lineHeight:tt,letterSpacing:_e??0,wordSpacing:He??0,textAppearance:xt,color:ot??"#DEDDDD"},Ot={...un(nn(ht,n)),...Cs(Be,tt,l,n)},It=$s(Be,tt,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Yt=$.buildColorVars(l,{titleColor:ne??"#000000",descriptionColor:Je??"#000000",lightboxCounterColor:ot??"#DEDDDD"},YS,QS),jt=s.useRef(null),[Xt,Qt]=s.useState(!1),[St,Zt]=s.useState([]),[ft,wt]=s.useState(0),Le=s.useCallback((gt,At)=>{O&&(Zt(gt),wt(At),Qt(!0))},[O]),Ye=s.useCallback(()=>{Qt(!1)},[]),st=s.useMemo(()=>{const gt={...Yt},At=jt.current?getComputedStyle(jt.current).getPropertyValue("--cntrl-article-width").trim():"";return At&&(gt["--cntrl-article-width"]=At),gt},[Yt,Xt]);return s.useEffect(()=>{if(!Xt||_!=="on"||typeof document>"u")return;const gt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=gt}},[Xt,_]),s.useEffect(()=>{!n||o||i||Qt(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&Qt(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Yt,children:a.jsxs("div",{ref:jt,className:`${l}-wrapper`,style:{width:$.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:E==="top"?R(f):void 0,[`--${l}-title-bottom-padding`]:E==="bottom"?R(w):void 0,[`--${l}-title-left-padding`]:b==="left"?R(H):void 0,[`--${l}-title-right-padding`]:b==="right"?R(q):void 0},children:[S&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:X,description:P,position:v,titleRef:()=>{},titleClassName:`${Fe} ${l}-single-title`,titleContainerStyle:{...me,...Ce},titleTextBoxStyle:at,titleStyle:Te,descriptionClassName:Ve,descriptionStyle:dt,descriptionPadding:Lt,showTextBoxOutline:ie,showDescriptionPaddingControl:ie,topPaddingControl:ce?Jr({P:l,controlKey:"titleTopPadding",scaled:R,height:re,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:R,height:fe,paired:!1,side:"bottom"}):void 0})}),d.map((gt,At)=>{const Ht=tw(gt.gallery),mt=At<d.length-1,Nt=Ht.filter(Ft=>Ft.lightboxMedia).map(Ft=>Ft.lightboxMedia),Kt={P:l,position:v,titleRef:L(At),titleClassName:Fe,titleContainerStyle:me,titleTextBoxStyle:S?{maxWidth:"100%"}:at,titleStyle:Te,descriptionClassName:Ve,descriptionStyle:dt,descriptionPadding:Lt,showTextBoxOutline:ie&&!S,showDescriptionPaddingControl:ie&&!S,descriptionPaddingPaired:ee,topPaddingControl:ce&&!S?Jr({P:l,controlKey:"titleTopPadding",scaled:R,height:re,paired:ee,side:"top"}):void 0,bottomPaddingControl:g&&!S?Jr({P:l,controlKey:"titleBottomPadding",scaled:R,height:fe,paired:ee,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":At,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:mt?R(se):void 0},children:[Y&&vd({P:l,controlKey:"titleLeftPadding",scaled:R,width:he,maxFraction:we,side:"left",paired:ee,anchorStyle:G}),Z&&vd({P:l,controlKey:"titleRightPadding",scaled:R,width:be,maxFraction:we,side:"right",paired:ee,anchorStyle:N}),ie&&mt&&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:R(Q),...K}}),j?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Ht.map(({displayMedia:Ft,lightboxMedia:_t},Vt)=>{const Ct=_t?Nt.findIndex(bt=>bt.assetId===_t.assetId):-1;return a.jsx(yd,{P:l,media:Ft,imgWidth:y||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:se,showPaddingAfter:Vt<Ht.length-1,showControls:ie,onMediaClick:O&&Ct>=0?()=>Le(Nt,Ct):void 0},`${Ft.assetId}-${Vt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Kt,title:S?"":gt.title,description:S?"":gt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Kt,title:S?"":gt.title,description:S?"":gt.description}),Ht.length>0&&a.jsx(dw,{P:l,layoutType:p,galleryWidthStyle:k,galleryPaddingRight:ae,galleryPaddingLeft:D,galleryPaddingRightWidth:ve,galleryPaddingLeftWidth:ue,galleryPaddingMaxFraction:Ne,showControls:ie,scaled:R,children:Ht.map(({displayMedia:Ft,lightboxMedia:_t},Vt)=>{const Ct=_t?Nt.findIndex(bt=>bt.assetId===_t.assetId):-1;return a.jsx(yd,{P:l,media:Ft,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:se,showPaddingAfter:Vt<Ht.length-1,showControls:ie,onMediaClick:O&&Ct>=0?()=>Le(Nt,Ct):void 0},`${Ft.assetId}-${Vt}`)})})]})]},At)})]})}),Xt&&_==="on"&&typeof document<"u"&&e&&(()=>{const gt=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx("div",{style:st,"data-selection":"none",children:a.jsx(cw,{prefix:l,items:St,index:ft,imageDisplay:sw(e.lightboxImageDisplay),isEditor:n,onClose:Ye,onPrev:()=>wt(At=>(At-1+St.length)%St.length),onNext:()=>wt(At=>(At+1)%St.length),counterClassName:It,counterStyle:Ot,backgroundColor:e.backgroundColor??US})}),gt)})()]})}const yw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21279
+ `}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 QS(e){return e in Pp}function ZS(e){if(e&&QS(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 Gl(e){return Pp[e]}const JS="rgba(28,31,34,0.9)",Jn=500,Bi="cubic-bezier(0.22, 1, 0.36, 1)",ew=72,tw=50,nw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},iw=[];function ow(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 rw(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function aw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function sw(e){if(!Array.isArray(e)||e.length===0)return[];if(ow(e)){const t=[];for(const n of e){const i=rw(n);if(!i)continue;const o=aw(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 Ks(e){return e.type==="video"}function lw(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 cw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const dw=1140/1440;function uw(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 pw(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 mw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gw({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()=>{lw(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})}function hw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const v=i==="cover",x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),b=s.useRef(0),S=s.useRef(0),R=s.useRef("none"),y=s.useRef(!1),C=s.useRef(!1),E=s.useRef(!1),G=s.useRef(null),[H,O]=s.useState(null),[F,D]=s.useState("opening"),[I,L]=s.useState(0),[z,k]=s.useState(0),[$,P]=s.useState(!1),[q,_]=s.useState(!1),[K,M]=s.useState(!1),f=s.useRef(n),X=t[n],oe=X?Ks(X):!1,ue=X?w.isEmbedMedia(X):!1,N=z!==0||$,se=s.useCallback(le=>{E.current=le,P(le)},[]),T=s.useCallback(()=>{G.current!==null&&(window.clearTimeout(G.current),G.current=null)},[]),me=s.useCallback(()=>{T(),G.current=window.setTimeout(()=>{T(),se(!1)},Jn+32)},[T,se]),J=s.useCallback(()=>{const le=x.current,g=m.current;if(!le)return;const V=le.getBoundingClientRect(),Y=V.width,te=V.height;if(!Y||!te)return;if(i==="cover"){O({width:Y,height:te,left:V.left,top:V.top});return}let ge=X&&w.isEmbedMedia(X)?w.getEmbedAspect(X):null;if(ge===null){if(!g){O(Zr(le));return}const{width:B,height:Z}=cw(g);if(!B||!Z){O(Zr(le));return}ge=B/Z}const ee=Y/te;if(ge>ee){const B=Y/ge;O({width:Y,height:B,left:V.left,top:V.top+(te-B)/2})}else{const B=te*ge;O({width:B,height:te,left:V.left+(Y-B)/2,top:V.top})}},[i,X]);s.useEffect(()=>{J();const le=x.current;if(!le)return;const g=new ResizeObserver(()=>J());return g.observe(le),()=>g.disconnect()},[J,n]),s.useEffect(()=>{F==="opening"&&H&&D("open")},[F,H]),s.useEffect(()=>{if(F!=="closing")return;const le=setTimeout(()=>r(),Jn);return()=>clearTimeout(le)},[F,r]),s.useEffect(()=>()=>{T()},[T]),s.useLayoutEffect(()=>{if(f.current===n)return;T(),L(0),k(0),se(!1),M(!1),_(!1),b.current=0,S.current=0,R.current="none",y.current=!1,h.current=null,C.current=!1;const le=x.current;le&&O(Zr(le)),f.current=n},[n,se,T]),s.useEffect(()=>{if(F!=="open")return;let le=null;const g=()=>{le&&(document.removeEventListener("click",le,!0),le=null)},V=()=>{g(),le=Z=>{Z.stopPropagation(),Z.preventDefault(),g()},document.addEventListener("click",le,!0)},Y=Z=>{T(),E.current=!1,P(!1),k(0),_(!1),y.current=!1,S.current=0,R.current="none";const U=x.current;U&&O(Zr(U)),Z<0?c():l()},te=Z=>{if(Math.abs(Z)>tw&&t.length>1){Y(Z);return}se(!0),k(0),me()},ge=Z=>{if(Z.touches.length!==1||E.current)return;const U=Z.touches[0];C.current=!0,h.current={x:U.clientX,y:U.clientY},R.current="none",S.current=0,y.current=!1},ee=Z=>{if(!h.current||Z.touches.length!==1||E.current)return;const U=Z.touches[0],de=U.clientX-h.current.x,j=U.clientY-h.current.y;if(R.current==="none"){if(Math.abs(de)<10&&Math.abs(j)<10)return;if(Math.abs(de)>Math.abs(j)){if(t.length<=1)return;R.current="horizontal"}else if(j>0)R.current="vertical";else return}if(R.current==="horizontal"){y.current=!0,_(!0),S.current=de,k(de),Z.preventDefault();return}R.current==="vertical"&&(y.current=!0,_(!0),b.current=j,L(j),Z.preventDefault())},B=()=>{if(!h.current)return;const Z=R.current,U=y.current;if(U&&Z==="horizontal")te(S.current),V();else if(U&&Z==="vertical")if(b.current>ew){const j=window.innerHeight;b.current=j,M(!0),L(j),D("closing")}else b.current=0,L(0),V();else Z==="horizontal"&&Math.abs(S.current)>0&&(te(S.current),V());h.current=null,R.current="none",S.current=0,y.current=!1,_(!1)};return document.addEventListener("touchstart",ge,{passive:!0}),document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",B),document.addEventListener("touchcancel",B),()=>{document.removeEventListener("touchstart",ge),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",B),document.removeEventListener("touchcancel",B),g()}},[F,t.length,c,l,se,me,T]),s.useEffect(()=>{const le=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),F!=="closing"&&D("closing"))};return window.addEventListener("keydown",le,!0),()=>window.removeEventListener("keydown",le,!0)},[F]);const we=()=>{F!=="closing"&&D("closing")},Le=F==="open",he=F==="closing",fe=I>0?Math.max(0,1-I/500):1,ie=I>0?Math.max(.35,1-I/500):1,re=le=>{if(le.stopPropagation(),C.current){C.current=!1;return}if(t.length<=1)return;const g=le.currentTarget.getBoundingClientRect(),V=le.clientY-g.top,Y=Math.min(52,g.height*.2);if(!(V>g.height-Y)){if(le.clientX-g.left<g.width/2){l();return}c()}},ae=le=>{if(t.length<=1)return;const g=le.currentTarget.getBoundingClientRect(),V=le.clientX-g.left,Y=le.clientY-g.top,te=Math.min(52,g.height*.2);if(Y>g.height-te){le.currentTarget.style.cursor="default";return}le.currentTarget.style.cursor=V<g.width/2?"w-resize":"e-resize"},pe=s.useCallback(le=>{le.propertyName!=="transform"||!E.current||(T(),se(!1))},[T,se]),be=N?`translateX(${z}px)`:I>0?`translateY(${I}px)`:void 0,ke={position:"fixed",top:H==null?void 0:H.top,left:H==null?void 0:H.left,width:H==null?void 0:H.width,height:H==null?void 0:H.height,objectFit:i==="cover"?"cover":"contain",transform:be,opacity:I>0?ie:F==="opening"||he?0:1,transition:q&&!$?"none":$?`transform ${Jn}ms ${Bi}`:K?`transform ${Jn}ms ${Bi}, opacity ${Jn}ms ${Bi}`:F==="opening"||he?`opacity ${Jn}ms ${Bi}`:"none",pointerEvents:(oe||ue)&&Le&&!N?"auto":"none",touchAction:(oe||ue)&&Le?"none":void 0,zIndex:9998},Fe=ue&&H?Math.min(52,H.height*.2):0,xe=H?{position:"fixed",top:H.top,height:H.height-Fe,width:H.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:F==="open"?"none":void 0},onClick:we,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:Le?fe:0,transition:q?"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:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,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:Le?1:0,transition:`opacity ${Jn}ms ${Bi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,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:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Le?1:0,transition:`opacity ${Jn}ms ${Bi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),H&&X&&(ue?a.jsx(w.EmbedMediaFrame,{media:X,mode:"player",fit:i==="cover"?"cover":"contain",lazy:!1,interactive:Le&&!N,style:ke,onTransitionEnd:pe},`${n}-${X.assetId}`):oe?a.jsx(gw,{src:X.assetId,phase:F,mediaRef:m,mediaStyle:ke,onLoadedMetadata:J,onClick:re,onMouseMove:ae,onTransitionEnd:pe},`${n}-${X.assetId}`):a.jsx("img",{ref:m,src:X.assetId,alt:X.name,onLoad:J,onTransitionEnd:pe,style:ke},`${n}-${X.assetId}`)),Le&&xe&&t.length>1&&!oe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...xe,left:H.left,cursor:"w-resize",pointerEvents:N?"none":"auto"},onClick:le=>{if(C.current){C.current=!1;return}le.stopPropagation(),l()}}),a.jsx("div",{style:{...xe,left:H.left+H.width/2,cursor:"e-resize",pointerEvents:N?"none":"auto"},onClick:le=>{if(C.current){C.current=!1;return}le.stopPropagation(),c()}})]})]})}function yd({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 v=`${e}-gallery-${Ks(t)?"video":"image"}`,x=r.display==="cover",m=pw(r),h=F=>w.scalingValue(F,l??!1),b=n??mo,S=o?{width:"100%",maxWidth:"100%"}:{width:h(b),maxWidth:"100%"},R=i?{borderRadius:h(i)}:{},y={...S,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...R},C={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(b)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:R},G={className:v,style:C,onClick:p?F=>{F.stopPropagation(),p()}:void 0},H=Math.max(c,ti),O=w.isEmbedMedia(t)?a.jsx(w.EmbedMediaFrame,{...G,media:t,mode:"background",fit:x?"cover":"contain"}):Ks(t)?a.jsx("video",{...G,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...G,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:y,children:O}):O,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(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:h(H)}})]})}function fw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,x=v>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(v)},"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(v)},"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 yw(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 vd({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 Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:v,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:h=!1,topPaddingControl:b,bottomPaddingControl:S}){const R=s.useRef(null),[y,C]=s.useState(0),E=t??"",G=n??"",H=G.length>0,{horizontal:O,vertical:F}=Gl(i),D=F==="center"||F==="bottom",I=F==="bottom";s.useLayoutEffect(()=>{if(!D)return;const $=R.current;if(!$||typeof ResizeObserver>"u")return;const P=()=>C($.offsetHeight);P();const q=new ResizeObserver(P);return q.observe($),()=>q.disconnect()},[E,G,D]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:E}),z=H?a.jsx("span",{className:u,style:p,children:G}):null,k=H?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:v},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:$=>{R.current=$,o($)},className:[r,`${e}-title-h-${O}`,`${e}-title-v-${F}`].join(" "),style:{...D?{[`--${e}-title-height`]:`${y}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[b,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:I?a.jsxs(a.Fragment,{children:[z,k,L]}):a.jsxs(a.Fragment,{children:[L,k,z]})})}),S]})})}const xd=45;function bd(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 vw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function xw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=vw(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 bw(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=xw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function Sw(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(bw(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 Sd(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 ww({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var Mt,gt;const{prefix:l}=w.useScopedStyles(),c=s.useMemo(()=>YS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??mo,x=(e==null?void 0:e.titleWidth)??dw,m=uw(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??US,b=ZS(e==null?void 0:e.position),{horizontal:S,vertical:R}=Gl(b),y=(e==null?void 0:e.titleTopPadding)??0,C=(e==null?void 0:e.titleBottomPadding)??0,E=(e==null?void 0:e.titleLeftPadding)??0,G=(e==null?void 0:e.titleRightPadding)??0,H=(e==null?void 0:e.titleDescriptionPadding)??0,O=yw(e==null?void 0:e.transition),F=(e==null?void 0:e.lightbox)??"on",D=p==="b",I=O==="fade"||O==="retype",{setTitleRef:L,dominantIndex:z}=Sw(d.length,I,b),k=((Mt=d[z])==null?void 0:Mt.title)??"",$=((gt=d[z])==null?void 0:gt.description)??"",P=Sd(k,O==="retype"),q=Sd($,O==="retype"),_=O==="fade"||O==="retype",K=O==="retype"?P:k,M=O==="retype"?q:$,f=D?void 0:{width:w.scalingValue(v,n??!1)},X=F==="on"&&(!n||i||o),oe=o??!1,ue=(e==null?void 0:e.galleryPaddingRight)??0,N=(e==null?void 0:e.galleryPaddingLeft)??0,se=(e==null?void 0:e.galleryPaddingBetween)??0,T=xt=>w.scalingValue(xt,n??!1),J={width:T(x)},we=p==="a"?ue:N,Le=D?{width:"100%"}:{width:`calc(100% - ${T(v)} - ${T(we)})`,...p==="c"?{marginLeft:"auto"}:{}},he=Math.max(ue,ti),fe=Math.max(N,ti),ie=Math.max(se,ti),re=Math.max(y,ti),ae=Math.max(C,ti),pe=Math.max(E,ti),be=Math.max(G,ti),ke=Math.max(H,ti),Fe=Math.max(0,(u??1)-(v??mo)),xe=p==="a"?Math.max(0,(u??1)-(v??mo)-ue):p==="c"?Math.max(0,(u??1)-(v??mo)-N):p==="b"?u??1:1,le=oe&&R==="top",g=oe&&R==="bottom",V=oe&&S==="left",Y=oe&&S==="right",te=d.length>1,ge=D?void 0:T((p==="c"?N:ue)+(v??mo)),ee=p==="c"&&ge?{left:ge}:void 0,B=p==="a"&&ge?{right:ge}:void 0,Z=D?{left:0,width:"100%"}:p==="a"?{right:T(ue),width:T(v)}:{left:T(N),width:T(v)},{titleColor:U,titleFontFamily:de,titleFontSettings:j,titleFontSize:Pe,titleLineHeight:ne,titleLetterSpacing:Q,titleWordSpacing:_e,titleAlign:Ge,titleTextAppearance:Be,descriptionColor:qe,descriptionFontFamily:Ye,descriptionFontSettings:nt,descriptionFontSize:it,descriptionLineHeight:ve,descriptionLetterSpacing:Te,descriptionWordSpacing:We,descriptionAlign:Ke,descriptionTextAppearance:Ze,lightboxCounterColor:lt,lightboxCounterFontFamily:ot,lightboxCounterFontSettings:Me,lightboxCounterFontSize:ze,lightboxCounterLineHeight:et,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Ne,lightboxCounterTextAppearance:yt}=e??{},je={fontSettings:{fontFamily:de,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:ne,letterSpacing:Q??0,wordSpacing:_e??0,textAlign:Ge??"left",textAppearance:Be,color:U??"#000000"},Ce=pn(nn(je,n)),tt=J,Qe={...Cs(Pe,ne,l,n),...Cs(it,ve,l,n,"description-leading-gap")},St=$s(Pe,ne,`${l}-title`,`${l}-text-tight-leading`),Ct={fontSettings:{fontFamily:Ye,fontWeight:(nt==null?void 0:nt.fontWeight)??400,fontStyle:(nt==null?void 0:nt.fontStyle)??"normal"},fontSize:it??.01,lineHeight:ve,letterSpacing:Te??0,wordSpacing:We??0,textAlign:Ke??"left",textAppearance:Ze,color:qe??"#000000"},Wt=pn(nn(Ct,n)),ht=$s(it,ve,`${l}-description-text`,`${l}-description-tight-leading`),Xt=T(oe?ke:H),wt={fontSettings:{fontFamily:ot,fontWeight:(Me==null?void 0:Me.fontWeight)??400,fontStyle:(Me==null?void 0:Me.fontStyle)??"normal"},fontSize:ze??.01,lineHeight:et,letterSpacing:Oe??0,wordSpacing:Ne??0,textAppearance:yt,color:lt??"#DEDDDD"},Yt={...pn(nn(wt,n)),...Cs(ze,et,l,n)},$e=$s(ze,et,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Xe=w.buildColorVars(l,{titleColor:U??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:lt??"#DEDDDD"},nw,iw),ut=s.useRef(null),[$t,bt]=s.useState(!1),[ct,Ht]=s.useState([]),[mt,Tt]=s.useState(0),Ie=s.useCallback((xt,Ft)=>{X&&(Ht(xt),Tt(Ft),bt(!0))},[X]),Je=s.useCallback(()=>{bt(!1)},[]),rt=s.useMemo(()=>{const xt={...Xe},Ft=ut.current?getComputedStyle(ut.current).getPropertyValue("--cntrl-article-width").trim():"";return Ft&&(xt["--cntrl-article-width"]=Ft),xt},[Xe,$t]);return s.useEffect(()=>{if(!$t||F!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[$t,F]),s.useEffect(()=>{!n||o||i||bt(!1)},[n,o,i]),s.useEffect(()=>{F==="off"&&bt(!1)},[F]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Xe,children:a.jsxs("div",{ref:ut,className:`${l}-wrapper`,style:{width:w.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:R==="top"?T(y):void 0,[`--${l}-title-bottom-padding`]:R==="bottom"?T(C):void 0,[`--${l}-title-left-padding`]:S==="left"?T(E):void 0,[`--${l}-title-right-padding`]:S==="right"?T(G):void 0},children:[_&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:K,description:M,position:b,titleRef:()=>{},titleClassName:`${St} ${l}-single-title`,titleContainerStyle:{...Qe,...Le},titleTextBoxStyle:tt,titleStyle:Ce,descriptionClassName:ht,descriptionStyle:Wt,descriptionPadding:Xt,showTextBoxOutline:oe,showDescriptionPaddingControl:oe,topPaddingControl:le?Jr({P:l,controlKey:"titleTopPadding",scaled:T,height:re,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:T,height:ae,paired:!1,side:"bottom"}):void 0})}),d.map((xt,Ft)=>{const Ot=sw(xt.gallery),pt=Ft<d.length-1,Dt=Ot.filter(Nt=>Nt.lightboxMedia).map(Nt=>Nt.lightboxMedia),qt={P:l,position:b,titleRef:L(Ft),titleClassName:St,titleContainerStyle:Qe,titleTextBoxStyle:_?{maxWidth:"100%"}:tt,titleStyle:Ce,descriptionClassName:ht,descriptionStyle:Wt,descriptionPadding:Xt,showTextBoxOutline:oe&&!_,showDescriptionPaddingControl:oe&&!_,descriptionPaddingPaired:te,topPaddingControl:le&&!_?Jr({P:l,controlKey:"titleTopPadding",scaled:T,height:re,paired:te,side:"top"}):void 0,bottomPaddingControl:g&&!_?Jr({P:l,controlKey:"titleBottomPadding",scaled:T,height:ae,paired:te,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":Ft,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:pt?T(se):void 0},children:[V&&vd({P:l,controlKey:"titleLeftPadding",scaled:T,width:pe,maxFraction:xe,side:"left",paired:te,anchorStyle:ee}),Y&&vd({P:l,controlKey:"titleRightPadding",scaled:T,width:be,maxFraction:xe,side:"right",paired:te,anchorStyle:B}),oe&&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:T(ie),...Z}}),D?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Ot.map(({displayMedia:Nt,lightboxMedia:zt},jt)=>{const Bt=zt?Dt.findIndex(Rt=>Rt.assetId===zt.assetId):-1;return a.jsx(yd,{P:l,media:Nt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:se,showPaddingAfter:jt<Ot.length-1,showControls:oe,onMediaClick:X&&Bt>=0?()=>Ie(Dt,Bt):void 0},`${Nt.assetId}-${jt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...qt,title:_?"":xt.title,description:_?"":xt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...qt,title:_?"":xt.title,description:_?"":xt.description}),Ot.length>0&&a.jsx(fw,{P:l,layoutType:p,galleryWidthStyle:f,galleryPaddingRight:ue,galleryPaddingLeft:N,galleryPaddingRightWidth:he,galleryPaddingLeftWidth:fe,galleryPaddingMaxFraction:Fe,showControls:oe,scaled:T,children:Ot.map(({displayMedia:Nt,lightboxMedia:zt},jt)=>{const Bt=zt?Dt.findIndex(Rt=>Rt.assetId===zt.assetId):-1;return a.jsx(yd,{P:l,media:Nt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:se,showPaddingAfter:jt<Ot.length-1,showControls:oe,onMediaClick:X&&Bt>=0?()=>Ie(Dt,Bt):void 0},`${Nt.assetId}-${jt}`)})})]})]},Ft)})]})}),$t&&F==="on"&&typeof document<"u"&&e&&(()=>{const xt=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx("div",{style:rt,"data-selection":"none",children:a.jsx(hw,{prefix:l,items:ct,index:mt,imageDisplay:mw(e.lightboxImageDisplay),isEditor:n,onClose:Je,onPrev:()=>Tt(Ft=>(Ft-1+ct.length)%ct.length),onNext:()=>Tt(Ft=>(Ft+1)%ct.length),counterClassName:$e,counterStyle:Yt,backgroundColor:e.backgroundColor??JS})}),xt)})()]})}const $w=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21280
21280
  import { createPortal } from 'react-dom';
21281
21281
  import type React from 'react';
21282
21282
  import { CommonComponentProps } from '../props';
@@ -23603,7 +23603,7 @@ export function Mercury({
23603
23603
  </>
23604
23604
  );
23605
23605
  }
23606
- `;function fi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},vw={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"}},description:{type:"string",label:"Description",contentKey:"subtitle",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:fi("Gallery Padding Right"),galleryPaddingLeft:fi("Gallery Padding Left"),galleryPaddingBetween:fi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:fi("Title Top Padding"),titleBottomPadding:fi("Title Bottom Padding"),titleLeftPadding:fi("Title Left Padding"),titleRightPadding:fi("Title Right Padding"),titleDescriptionPadding:fi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.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"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.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:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},xw={element:fw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:vw,sourceCode:yw,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},bw=10,Sw=400,ww=1,$w=1120/1440,Cw=140/1440,Tw=550/1440,Iw=13,Lw=4,Pw=38/100,Mw=28/100,$p=2.8,Rw=.9,Cp=.22,Ew=.5,kw=1,Aw=1.5,Fw=0,Nw=.85;function _w(e){return`
23606
+ `;function xi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},Cw={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"}},description:{type:"string",label:"Description",contentKey:"subtitle",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"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"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{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"}}},galleryPaddingRight:xi("Gallery Padding Right"),galleryPaddingLeft:xi("Gallery Padding Left"),galleryPaddingBetween:xi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:xi("Title Top Padding"),titleBottomPadding:xi("Title Bottom Padding"),titleLeftPadding:xi("Title Left Padding"),titleRightPadding:xi("Title Right Padding"),titleDescriptionPadding:xi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.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"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.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:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{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"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Tw={element:ww,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:Cw,sourceCode:$w,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Iw=10,Lw=400,Pw=1,Mw=1120/1440,Rw=140/1440,Ew=550/1440,kw=13,Aw=4,Fw=38/100,Nw=28/100,Mp=2.8,_w=.9,Rp=.22,Hw=.5,Ww=1,Ow=1.5,Dw=0,zw=.85;function Bw(e){return`
23607
23607
  .${e}-wrapper {
23608
23608
  position: relative;
23609
23609
  box-sizing: border-box;
@@ -23645,7 +23645,7 @@ export function Mercury({
23645
23645
  object-fit: cover;
23646
23646
  object-position: center;
23647
23647
  }
23648
- `}function Tp(e){return Number(e.toFixed(4))}function wd(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 Is(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 Hw(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 Ww(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Ow(e){return $.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 Ip(e,t){return(1-e)/(1-e*Math.cos(t))}function Dw(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)*Ip(e,i)))}return t||1}function zw(e,t){return e?1:1+Cp*(.35+t)}function Bw(e,t,n,i){const o=t*zw(n,i);return Math.max(0,(e-o)/2)}function jw(e,t,n){const i=Ip(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Vw(e,t,n){return e/2+t*n}function Gw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Tp(n)})`}function Xw(e){return Math.round(e*1e3)}function Lp(e,t,n){const i=Math.cos(e),o=Math.cos(Nw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Tp(t+(n-t)*r)}function Uw(e){return Lp(e,Ew,kw)}function qw(e){return Lp(e,Aw,Fw)}function Kw(e,t){if(!t)return"none";const n=qw(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=jw(e.depthFactor,e.spreadFactor,n),r=Vw(e.width,e.orbitRadius,i);return{transform:Gw(e.scaled,r,o),zIndex:Xw(o),opacity:Uw(n),filter:Kw(n,e.blurEnabled)}}function Pp(e,t){return(e%t+t)%t}function Yw(e,t){return Xl(e,t)/t}function Xl(e,t){return Pp(e,t)}function Qw(e,t){return Math.floor(e/t)}function Zw(e,t,n,i){return Qw(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function Jw(e,t,n){const i=t/$p,o=n==="left"?-e*i:e*i;return ha(o)}function e$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=$.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),$w),c=Is(e==null?void 0:e.imageWidth,Cw),d=Is(e==null?void 0:e.turnHeight,Tw),u=wd(e==null?void 0:e.itemsPerTurn,Iw,3,40),p=wd(e==null?void 0:e.turns,Lw,1,30),y=Math.min(Rw,Math.max(0,Pw)),x=Math.min(1,Math.max(0,Mw)),m=Math.max(0,(e==null?void 0:e.speed)??$p),h=(e==null?void 0:e.direction)==="left"?"left":"right",v=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,E=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>Hw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),w=f.display==="cover",H=R=>$.scalingValue(R,n??!1),q=s.useMemo(()=>Dw(y),[y]),B=s.useMemo(()=>Bw(l,c,w,x),[l,c,w,x]),M=s.useMemo(()=>_w(o),[o]),_=s.useMemo(()=>({scaled:R=>$.scalingValue(R,n??!1),width:l,orbitRadius:B,depthFactor:y,spreadFactor:q,blurEnabled:E}),[n,l,B,y,q,E]),j=s.useRef([]),C=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(R=>{var de;return!!((de=R.image)!=null&&de.assetId)}),[t]),W=d/u,A=c*Ww(f),I=Math.min(Sw,p*u),T=ww*u,V=I+T*2,X=Math.max(0,p-1)*d+(u-1)*W,P=m>0,k=v==="scroll"&&P,O=v==="autoplay"&&P&&(n?!!i:!0),ie=O?360/(m*bw):0,ae=L.length===0?0:V,D=s.useMemo(()=>Array.from({length:ae},(R,de)=>Yw(de-T,u)),[ae,T,u]);s.useEffect(()=>{if(!O&&!k)return;const R=r.current;if(!R)return;const de=fe=>{C.current=fe,D.forEach((he,be)=>{const Me=j.current[be];if(!Me)return;const Ne=$d(_,ha(he+fe));Me.style.transform=Ne.transform,Me.style.zIndex=String(Ne.zIndex),Me.style.opacity=String(Ne.opacity),Me.style.filter=Ne.filter})};if(k){const fe=R.ownerDocument.defaultView??window,he=()=>{const Me=R.getBoundingClientRect(),Ne=fe.innerHeight||R.ownerDocument.documentElement.clientHeight,we=Ne+Me.height;if(we<=0)return;const ce=Math.min(1,Math.max(0,(Ne-Me.top)/we));de(Jw(ce,m,h))};he(),fe.addEventListener("scroll",he,{passive:!0,capture:!0}),fe.addEventListener("resize",he);const be=new ResizeObserver(he);return be.observe(R),()=>{fe.removeEventListener("scroll",he,{capture:!0}),fe.removeEventListener("resize",he),be.disconnect()}}const te=h==="left"?-1:1;let Se=null,Ce=null;const ve=fe=>{if(Ce!==null){const he=(fe-Ce)/1e3/ie*te;C.current=ha(C.current+he)}Ce=fe,de(C.current),Se=requestAnimationFrame(ve)},ue=()=>{Se===null&&(Ce=null,Se=requestAnimationFrame(ve))},Q=()=>{Se!==null&&cancelAnimationFrame(Se),Se=null},re=new IntersectionObserver(([fe])=>{fe!=null&&fe.isIntersecting?ue():Q()});return re.observe(R),()=>{Q(),re.disconnect()}},[O,k,D,_,ie,m,h]);const se=O||k?C.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:H(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:H(l),height:H(X)},children:Array.from({length:V},(R,de)=>{const te=de-T,Ce=L[Pp(te,L.length)].image,ve=Xl(te,u),ue=D[de],Q=Zw(te,u,d,W),re=x===0?0:(Cd(ve+7.3)-.5)*x*W,fe=w?1:1+(Cd(ve+3.1)-.5)*2*Cp*(.35+x),he=c*fe,be={"--helix-base-w":H(he),...w?{"--helix-base-h":H(A)}:{}},Me={top:H(Q+re),...be,...$d(_,ha(ue+se))},Ne=b>0?{borderRadius:H(b)}:{},we=w?{...Ne,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Ne,ce=$.isEmbedMedia(Ce)?a.jsx($.EmbedMediaFrame,{className:`${o}-media`,style:w?{...we,position:"absolute",inset:0}:we,media:Ce,mode:"background",fit:w?"cover":"contain"}):Ow(Ce)?a.jsx("video",{className:`${o}-media`,style:we,src:Ce.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:we,src:Ce.assetId,alt:Ce.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{j.current[de]=g},className:w?`${o}-item ${o}-item-cover`:`${o}-item`,style:Me,children:w?a.jsx("div",{className:`${o}-cover`,style:Ne,children:ce}):ce},`${p}-${u}-${te}`)})})]})}const t$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23648
+ `}function Ep(e){return Number(e.toFixed(4))}function wd(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 Is(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 jw(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 Vw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Gw(e){return w.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 kp(e,t){return(1-e)/(1-e*Math.cos(t))}function Xw(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)*kp(e,i)))}return t||1}function qw(e,t){return e?1:1+Rp*(.35+t)}function Uw(e,t,n,i){const o=t*qw(n,i);return Math.max(0,(e-o)/2)}function Kw(e,t,n){const i=kp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Yw(e,t,n){return e/2+t*n}function Qw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Ep(n)})`}function Zw(e){return Math.round(e*1e3)}function Ap(e,t,n){const i=Math.cos(e),o=Math.cos(zw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ep(t+(n-t)*r)}function Jw(e){return Ap(e,Hw,Ww)}function e$(e){return Ap(e,Ow,Dw)}function t$(e,t){if(!t)return"none";const n=e$(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=Kw(e.depthFactor,e.spreadFactor,n),r=Yw(e.width,e.orbitRadius,i);return{transform:Qw(e.scaled,r,o),zIndex:Zw(o),opacity:Jw(n),filter:t$(n,e.blurEnabled)}}function Fp(e,t){return(e%t+t)%t}function n$(e,t){return Xl(e,t)/t}function Xl(e,t){return Fp(e,t)}function i$(e,t){return Math.floor(e/t)}function o$(e,t,n,i){return i$(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function r$(e,t,n){const i=t/Mp,o=n==="left"?-e*i:e*i;return ha(o)}function a$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=w.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Mw),c=Is(e==null?void 0:e.imageWidth,Rw),d=Is(e==null?void 0:e.turnHeight,Ew),u=wd(e==null?void 0:e.itemsPerTurn,kw,3,40),p=wd(e==null?void 0:e.turns,Aw,1,30),v=Math.min(_w,Math.max(0,Fw)),x=Math.min(1,Math.max(0,Nw)),m=Math.max(0,(e==null?void 0:e.speed)??Mp),h=(e==null?void 0:e.direction)==="left"?"left":"right",b=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",S=(e==null?void 0:e.cornerRadius)??0,R=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>jw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),C=y.display==="cover",E=T=>w.scalingValue(T,n??!1),G=s.useMemo(()=>Xw(v),[v]),H=s.useMemo(()=>Uw(l,c,C,x),[l,c,C,x]),O=s.useMemo(()=>Bw(o),[o]),F=s.useMemo(()=>({scaled:T=>w.scalingValue(T,n??!1),width:l,orbitRadius:H,depthFactor:v,spreadFactor:G,blurEnabled:R}),[n,l,H,v,G,R]),D=s.useRef([]),I=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(T=>{var me;return!!((me=T.image)!=null&&me.assetId)}),[t]),z=d/u,k=c*Vw(y),$=Math.min(Lw,p*u),P=Pw*u,q=$+P*2,K=Math.max(0,p-1)*d+(u-1)*z,M=m>0,f=b==="scroll"&&M,X=b==="autoplay"&&M&&(n?!!i:!0),oe=X?360/(m*Iw):0,ue=L.length===0?0:q,N=s.useMemo(()=>Array.from({length:ue},(T,me)=>n$(me-P,u)),[ue,P,u]);s.useEffect(()=>{if(!X&&!f)return;const T=r.current;if(!T)return;const me=ae=>{I.current=ae,N.forEach((pe,be)=>{const ke=D.current[be];if(!ke)return;const Fe=$d(F,ha(pe+ae));ke.style.transform=Fe.transform,ke.style.zIndex=String(Fe.zIndex),ke.style.opacity=String(Fe.opacity),ke.style.filter=Fe.filter})};if(f){const ae=T.ownerDocument.defaultView??window,pe=()=>{const ke=T.getBoundingClientRect(),Fe=ae.innerHeight||T.ownerDocument.documentElement.clientHeight,xe=Fe+ke.height;if(xe<=0)return;const le=Math.min(1,Math.max(0,(Fe-ke.top)/xe));me(r$(le,m,h))};pe(),ae.addEventListener("scroll",pe,{passive:!0,capture:!0}),ae.addEventListener("resize",pe);const be=new ResizeObserver(pe);return be.observe(T),()=>{ae.removeEventListener("scroll",pe,{capture:!0}),ae.removeEventListener("resize",pe),be.disconnect()}}const J=h==="left"?-1:1;let we=null,Le=null;const he=ae=>{if(Le!==null){const pe=(ae-Le)/1e3/oe*J;I.current=ha(I.current+pe)}Le=ae,me(I.current),we=requestAnimationFrame(he)},fe=()=>{we===null&&(Le=null,we=requestAnimationFrame(he))},ie=()=>{we!==null&&cancelAnimationFrame(we),we=null},re=new IntersectionObserver(([ae])=>{ae!=null&&ae.isIntersecting?fe():ie()});return re.observe(T),()=>{ie(),re.disconnect()}},[X,f,N,F,oe,m,h]);const se=X||f?I.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:E(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:E(l),height:E(K)},children:Array.from({length:q},(T,me)=>{const J=me-P,Le=L[Fp(J,L.length)].image,he=Xl(J,u),fe=N[me],ie=o$(J,u,d,z),re=x===0?0:(Cd(he+7.3)-.5)*x*z,ae=C?1:1+(Cd(he+3.1)-.5)*2*Rp*(.35+x),pe=c*ae,be={"--helix-base-w":E(pe),...C?{"--helix-base-h":E(k)}:{}},ke={top:E(ie+re),...be,...$d(F,ha(fe+se))},Fe=S>0?{borderRadius:E(S)}:{},xe=C?{...Fe,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:Fe,le=w.isEmbedMedia(Le)?a.jsx(w.EmbedMediaFrame,{className:`${o}-media`,style:C?{...xe,position:"absolute",inset:0}:xe,media:Le,mode:"background",fit:C?"cover":"contain"}):Gw(Le)?a.jsx("video",{className:`${o}-media`,style:xe,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{D.current[me]=g},className:C?`${o}-item ${o}-item-cover`:`${o}-item`,style:ke,children:C?a.jsx("div",{className:`${o}-cover`,style:Fe,children:le}):le},`${p}-${u}-${J}`)})})]})}const s$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23649
23649
  import { CommonComponentProps } from '../props';
23650
23650
  import { scalingValue } from '../utils/scalingValue';
23651
23651
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -24219,7 +24219,7 @@ export function Helix({
24219
24219
  </>
24220
24220
  );
24221
24221
  }
24222
- `,n$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],i$={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:n$.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"]}]}]},o$={element:e$,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:i$,sourceCode:t$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Tn=300,on=300,r$=8/1440,mo=.004,a$=50,s$=1440,ji=a$/s$;function l$(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 d$(e){return e==="left"||e==="right"?e:"center"}function u$(e,t,n){const i=$.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function p$(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 Mp(e,t){const n=(p$(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(Mp(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 g$(e,t){switch(Mp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function h$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function f$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):h$(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 Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Rp(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(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=Td(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=Rp(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=f$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const bi=24,xi=bi*.125,Ep=bi*.125,Ls=(bi-(3*xi+2*Ep))/2,Id=xi+Ep;function y$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${bi} ${bi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:bi,height:xi,rx:xi/2})]})}function v$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function x$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:$.scalingValue((o-t)/2,i)}}const kp=.004;let er;function b$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function S$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=b$();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 Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=S$(o);i(u=>Math.abs(u-d)<kp?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)<kp))return`translateY(${e}em)`}function Md(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 Ed(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 kd(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:{...un(nn(i,n)),...x$(t.fontSize,t.lineHeight,e,n)},className:v$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(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 Fd(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 Ap(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function w$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function $$(e){return e.position?w$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function C$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const T$=[["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 Fp(e){var o,r;const t=e,n={};for(const[l,c]of T$)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 Nd(e){var o,r,l,c,d,u,p,y,x,m,h,v,b,E,f,w;e=Fp(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 H=((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;H!==void 0&&(n.openLinkColor=H)}if(e.compactIconColor===void 0){const H=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;H!==void 0&&(n.compactIconColor=H)}if(e.compactLinkColor===void 0){const H=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;H!==void 0&&(n.compactLinkColor=H)}if(e.compactLogoColor===void 0){const H=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;H!==void 0&&(n.compactLogoColor=H)}if(e.openLogoColor===void 0){const H=((v=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:v.logoColor)??e.logoColor;H!==void 0&&(n.openLogoColor=H)}if(e.compactBackgroundColor===void 0){const H=((E=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:E.backgroundColor)??((w=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:w.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;H!==void 0&&(n.compactBackgroundColor=H)}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=(H,q)=>{if(e[H]!==void 0)return;const B=e[q];B!==void 0&&(n[H]=B)};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 I$(e,t){const n=Ap({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 L$(e,t){return{paddingLeft:$.scalingValue(e.effectivePaddingLeft,t),paddingRight:$.scalingValue(e.effectivePaddingRight,t),paddingTop:$.scalingValue(e.effectivePaddingTop,t),paddingBottom:$.scalingValue(e.effectivePaddingBottom,t)}}function P$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);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 M$={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"},R$=["hover","open"],E$={top:"flex-start",center:"center",bottom:"flex-end"},k$={left:"flex-start",center:"center",right:"flex-end"};function A$(e){return`
24222
+ `,l$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],c$={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:l$.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"]}]}]},d$={element:a$,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:c$,sourceCode:s$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},In=300,rn=300,u$=8/1440,ho=.004,p$=50,m$=1440,Xi=p$/m$;function g$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function h$(e){return e==="center"||e==="right"?e:"left"}function f$(e){return e==="left"||e==="right"?e:"center"}function y$(e,t,n){const i=w.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function v$(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 Np(e,t){const n=(v$(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 x$(e,t,n){switch(Np(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 b$(e,t){switch(Np(e.showIn,t)){case"default and compact":return!1;default:return!0}}function S$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function w$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):S$(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 Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function _p(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(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=Td(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 Ys(e,t){const n=e.label||"Link",i=_p(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=w$(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,Hp=$i*.125,Ls=($i-(3*wi+2*Hp))/2,Id=wi+Hp;function $$({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:Ls,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:$i,height:wi,rx:wi/2})]})}function C$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function T$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:w.scalingValue((o-t)/2,i)}}const Wp=.004;let er;function I$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function L$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=I$();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 Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=L$(o);i(u=>Math.abs(u-d)<Wp?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)<Wp))return`translateY(${e}em)`}function Md(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 Ed(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 kd(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)),...T$(t.fontSize,t.lineHeight,e,n)},className:C$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(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 Fd(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 Op(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function P$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function M$(e){return e.position?P$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function R$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const E$=[["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 Dp(e){var o,r;const t=e,n={};for(const[l,c]of E$)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 Nd(e){var o,r,l,c,d,u,p,v,x,m,h,b,S,R,y,C;e=Dp(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=((v=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:v.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=((b=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:b.logoColor)??e.logoColor;E!==void 0&&(n.openLogoColor=E)}if(e.compactBackgroundColor===void 0){const E=((R=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:R.backgroundColor)??((C=(y=t.stateOverrides)==null?void 0:y.compact)==null?void 0:C.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,G)=>{if(e[E]!==void 0)return;const H=e[G];H!==void 0&&(n[E]=H)};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 k$(e,t){const n=Op({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 A$(e,t){return{paddingLeft:w.scalingValue(e.effectivePaddingLeft,t),paddingRight:w.scalingValue(e.effectivePaddingRight,t),paddingTop:w.scalingValue(e.effectivePaddingTop,t),paddingBottom:w.scalingValue(e.effectivePaddingBottom,t)}}function F$(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),v=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(v),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 N$={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"},_$=["hover","open"],H$={top:"flex-start",center:"center",bottom:"flex-end"},W$={left:"flex-start",center:"center",right:"flex-end"};function O$(e){return`
24223
24223
  .${e}-root {
24224
24224
  position: relative;
24225
24225
  display: block;
@@ -24249,7 +24249,7 @@ export function Helix({
24249
24249
  background: none;
24250
24250
  cursor: pointer;
24251
24251
  color: var(--${e}-icon-color);
24252
- transition: color ${Tn}ms ease;
24252
+ transition: color ${In}ms ease;
24253
24253
  line-height: 0;
24254
24254
  font-size: 0;
24255
24255
  -webkit-appearance: none;
@@ -24269,7 +24269,7 @@ export function Helix({
24269
24269
  fill: currentColor;
24270
24270
  transform-box: fill-box;
24271
24271
  transform-origin: center;
24272
- transition: transform ${Tn}ms ease, opacity ${Tn}ms ease;
24272
+ transition: transform ${In}ms ease, opacity ${In}ms ease;
24273
24273
  }
24274
24274
  .${e}-root.${e}-open .${e}-icon-line-top {
24275
24275
  transform: translateY(200%) rotate(45deg);
@@ -24324,7 +24324,7 @@ export function Helix({
24324
24324
  margin: 0;
24325
24325
  background-color: var(--${e}-overlay-color);
24326
24326
  opacity: 0;
24327
- transition: opacity ${Tn}ms ease, background-color ${Tn}ms ease;
24327
+ transition: opacity ${In}ms ease, background-color ${In}ms ease;
24328
24328
  }
24329
24329
  .${e}-lightbox.${e}-lightbox-active .${e}-backdrop {
24330
24330
  opacity: 1;
@@ -24339,7 +24339,7 @@ export function Helix({
24339
24339
  flex-direction: column;
24340
24340
  overflow-y: auto;
24341
24341
  background-color: var(--${e}-menu-background-color);
24342
- transition: transform ${Tn}ms ease, opacity ${Tn}ms ease, background-color ${Tn}ms ease;
24342
+ transition: transform ${In}ms ease, opacity ${In}ms ease, background-color ${In}ms ease;
24343
24343
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
24344
24344
  }
24345
24345
  .${e}-full-lightbox .${e}-panel {
@@ -24822,23 +24822,23 @@ export function Helix({
24822
24822
  font-size: 0;
24823
24823
  }
24824
24824
  .${e}-nav-state-anim {
24825
- transition: margin-top ${on}ms ease;
24825
+ transition: margin-top ${rn}ms ease;
24826
24826
  }
24827
24827
  .${e}-nav-state-anim .${e}-nav-bar {
24828
24828
  transition:
24829
- background-color ${Tn}ms ease,
24830
- height ${on}ms ease,
24831
- min-height ${on}ms ease,
24832
- padding ${on}ms ease,
24833
- gap ${on}ms ease;
24829
+ background-color ${In}ms ease,
24830
+ height ${rn}ms ease,
24831
+ min-height ${rn}ms ease,
24832
+ padding ${rn}ms ease,
24833
+ gap ${rn}ms ease;
24834
24834
  }
24835
24835
  .${e}-nav-state-anim .${e}-nav-logo,
24836
24836
  .${e}-nav-state-anim .${e}-nav-toggle-wrap,
24837
24837
  .${e}-nav-state-anim .${e}-nav-links {
24838
24838
  transition:
24839
- left ${on}ms ease,
24840
- right ${on}ms ease,
24841
- transform ${on}ms ease;
24839
+ left ${rn}ms ease,
24840
+ right ${rn}ms ease,
24841
+ transform ${rn}ms ease;
24842
24842
  }
24843
24843
  .${e}-nav-state-anim .${e}-nav-logo-inner,
24844
24844
  .${e}-nav-state-anim .${e}-nav-padding-left,
@@ -24846,26 +24846,26 @@ export function Helix({
24846
24846
  .${e}-nav-state-anim .${e}-nav-gap-control,
24847
24847
  .${e}-nav-state-anim .${e}-link-text-box {
24848
24848
  transition:
24849
- width ${on}ms ease,
24850
- height ${on}ms ease;
24849
+ width ${rn}ms ease,
24850
+ height ${rn}ms ease;
24851
24851
  }
24852
24852
  .${e}-nav-state-anim .${e}-nav-logo-tint {
24853
24853
  transition:
24854
- background-color ${on}ms ease;
24854
+ background-color ${rn}ms ease;
24855
24855
  }
24856
24856
  .${e}-nav-state-anim .${e}-nav-toggle-wrap .${e}-root {
24857
24857
  transition:
24858
- width ${on}ms ease,
24859
- height ${on}ms ease,
24860
- min-width ${on}ms ease,
24861
- min-height ${on}ms ease,
24862
- max-width ${on}ms ease,
24863
- max-height ${on}ms ease;
24858
+ width ${rn}ms ease,
24859
+ height ${rn}ms ease,
24860
+ min-width ${rn}ms ease,
24861
+ min-height ${rn}ms ease,
24862
+ max-width ${rn}ms ease,
24863
+ max-height ${rn}ms ease;
24864
24864
  }
24865
24865
  .${e}-nav-state-anim .${e}-icon-line {
24866
24866
  transition:
24867
- transform ${Tn}ms ease,
24868
- opacity ${Tn}ms ease;
24867
+ transform ${In}ms ease,
24868
+ opacity ${In}ms ease;
24869
24869
  }
24870
24870
  .${e}-nav-state-anim .${e}-nav-link,
24871
24871
  .${e}-nav-state-anim .${e}-link,
@@ -24873,13 +24873,13 @@ export function Helix({
24873
24873
  .${e}-nav-state-anim .${e}-text-tight-leading {
24874
24874
  transition:
24875
24875
  color 200ms ease,
24876
- font-size ${on}ms ease,
24877
- line-height ${on}ms ease,
24878
- letter-spacing ${on}ms ease,
24879
- word-spacing ${on}ms ease,
24880
- padding ${on}ms ease;
24876
+ font-size ${rn}ms ease,
24877
+ line-height ${rn}ms ease,
24878
+ letter-spacing ${rn}ms ease,
24879
+ word-spacing ${rn}ms ease,
24880
+ padding ${rn}ms ease;
24881
24881
  }
24882
- `}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function F$(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 N$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function _$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function H$(e){const t=_$(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 W$(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 Bu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function O$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function D$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Np(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 _d(e){const t=Np(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function z$(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=O$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Qs(r,l),m=Rp(r),h={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};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!y&&p&&D$(u)&&Np(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const B$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function j$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function V$(e){const t={},n=j$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of B$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(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 G$({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 tc;const{prefix:m}=$.useScopedStyles(),h=s.useRef(null),v=s.useRef(null),b=s.useRef(null),E=s.useRef(null),f=s.useRef(null),w=s.useRef(0),H=s.useRef(null),q=s.useRef(null),B=s.useRef(d),M=s.useMemo(()=>A$(m),[m]),[_,j]=s.useState(!1),[C,L]=s.useState(!1),[W,A]=s.useState(!1),I=l$(r),T=s.useMemo(()=>new Set(c),[c]),V=Pt=>!!(Pt&&T.has(Pt)),X=!!(t&&!i&&I==="open"&&!V("open"))||!(t&&!i)&&_,P=!!(t&&!i),k=X&&!P;jl(k),s.useEffect(()=>{if(!X||!P)return;const Pt=document.documentElement,Ut=Pt.style.overflow;return Pt.style.overflow="hidden",()=>{Pt.style.overflow=Ut}},[X,P]);const O=!V("compact")&&!V("onScroll"),ie=!t||!!i&&!n,ae=o&&o!=="default"?o:void 0,D=O&&I==="compact"?"compact":"default",[se,R]=s.useState(D),[de,te]=s.useState(!1),Se=!n;D!==se&&(R(D),Se&&te(!0));const Ce=Fp(e),{logo:ve,logoMaxHeight:ue=120/1440,logoPosition:Q="left",panelHeight:re=60/1440,backgroundColor:fe="#b3b3b3",logoColor:he="#000000",position:be,horizontalAlign:Me,verticalAlign:Ne,iconColor:we="#000000",showIcon:ce="on",iconSize:g=16/1440,linkColor:Y="#000000",openLinkColor:Z="#000000",compactIconColor:ee="#000000",compactLinkColor:ye="#000000",compactLogoColor:G="#000000",compactBackgroundColor:N="#ffffff",compactLogoMaxHeight:K=120/1440,compactLogoPosition:ne,compactPanelHeight:pe=60/1440,compactShowIcon:U="on",compactIconSize:Pe=16/1440,compactNavTextWidth:le,compactNavTextPosition:J,compactNavTextOffset:De,compactNavGap:Xe,compactNavPaddingLeft:Ue=10/1440,compactNavPaddingRight:Je=10/1440,compactFontFamily:et,compactFontSettings:Qe,compactFontSize:it,compactLineHeight:xe,compactLetterSpacing:Ie=0,compactWordSpacing:We=0,compactTextAlign:qe="left",compactTextAppearance:je,openLogoColor:ot="#000000",menuBackgroundColor:nt="#ffffff",overlayColor:Ee="rgba(0, 0, 0, 0.45)",closeButtonColor:Be="#000000",effect:tt="fade",openPanelSize:_e=100,textWidth:He=280/1440,navTextWidth:xt,navTextPosition:rt="center",navTextOffset:ze=0,gap:Te=0,navGap:at,navPaddingLeft:me=10/1440,navPaddingRight:Fe=10/1440,textPaddingLeft:Ze=10/1440,textPaddingRight:dt=10/1440,textPaddingTop:Ve=10/1440,textPaddingBottom:Lt=10/1440,fontFamily:ht,fontSettings:kt,fontSize:Ot,lineHeight:It,letterSpacing:Yt=0,wordSpacing:jt=0,textAlign:Xt="left",textAppearance:Qt,openFontFamily:St,openFontSettings:Zt,openFontSize:ft,openLineHeight:wt,openLetterSpacing:Le,openWordSpacing:Ye,openTextAlign:st,openTextAppearance:Mt,stateOverrides:ut,link:gt}=Ce,{horizontalAlign:At,verticalAlign:Ht}=$$({position:be,horizontalAlign:Me,verticalAlign:Ne}),mt=D==="compact",Nt=mt?K:ue,Kt=c$(mt?ne:Q),Ft=mt?pe:re,_t=mt?Pe:g,Vt=mt?le:xt,Ct=d$(mt?J:rt),bt=(mt?De:ze)??0,z=mt?Xe:at,Re=mt?Ue:me,Ae=mt?Je:Fe,Oe=Vt??He,vt=X||(mt?U:ce)!=="off",Gt=$.buildColorVars(m,{iconColor:we,closeButtonColor:Be,linkColor:Y,openLinkColor:Z,compactIconColor:ee,compactLinkColor:ye,compactLogoColor:G,compactBackgroundColor:N,openLogoColor:ot,menuBackgroundColor:nt,overlayColor:Ee,backgroundColor:fe,logoColor:he},M$,R$,ut),lt=Ed(mt?{fontFamily:et,fontSettings:Qe,fontSize:it,lineHeight:xe,letterSpacing:Ie,wordSpacing:We,textAlign:qe,textAppearance:je}:{fontFamily:ht,fontSettings:kt,fontSize:Ot,lineHeight:It,letterSpacing:Yt,wordSpacing:jt,textAlign:Xt,textAppearance:Qt}),Rt=Ed({fontFamily:St,fontSettings:Zt,fontSize:ft,lineHeight:wt,letterSpacing:Le,wordSpacing:Ye,textAlign:st,textAppearance:Mt},lt),Dt=kd(m,lt,t),zt=kd(m,Rt,t),cn=Ld(b,Md(lt)),xn=Ld(E,Md(Rt)),Kn={...zt.css,whiteSpace:"pre-wrap",transform:Pd(xn)},Qi=zt.className,hn=Pt=>$.scalingValue(Pt,t),jo=z??Te,Vo=Math.max(Re,mo),bn=Math.max(Ae,mo),di=Math.max(0,1-_t),Zi=Math.max(0,1-_t),Sn=n??!1,Yn=Sn&&!X,Ji=s.useMemo(()=>Ap({textPaddingLeft:Ze,textPaddingRight:dt,textPaddingTop:Ve,textPaddingBottom:Lt,fontSize:Rt.fontSize}),[Ze,dt,Ve,Lt,Rt.fontSize]),eo=Pt=>{const Ut=a.jsx("span",{className:Qi,style:Kn,children:Ad(Pt)});return Hd(m,Ut,He,Sn,hn)},Ke=tt==="left"||tt==="right"?{width:`${_e}%`}:{height:`${_e}%`},F={...L$(Ji,t),...Ke,alignItems:k$[At],justifyContent:E$[Ht]},oe=s.useRef(e),ge=s.useRef(d),ke=s.useRef(null);Zs((tc=e.logo)==null?void 0:tc.icon)&&(ke.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!y||!t){oe.current=e,ge.current=d;return}const Pt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(Pt)&&!ke.current){oe.current=e,ge.current=d;return}const Ut=_r=>{y(F$(_r,ke.current))};if(ge.current!==d){oe.current=e,ge.current=d;const _r=Nd(e);_r!==e&&Ut(_r);return}const ln=Nd(e),fn=oe.current,wn=fn!==e,An=wn?I$(ln,fn):ln;oe.current=e;const to=ln!==e,Xo=wn&&C$(ln,An);!to&&!Xo||Ut(An)},[e,y,t,d]);const Ge=$.scalingValue(_t,t),pt={width:Ge,height:Ge,minWidth:Ge,minHeight:Ge,maxWidth:Ge,maxHeight:Ge},Et={...Dt.css,textDecoration:"none",transform:Pd(cn)},Bt=Dt.className,an=(ve==null?void 0:ve.mode)!=="Off",en=(ve==null?void 0:ve.icon)??"",ui=H$(en),kn=W$(en,ui),Qn=!!kn,kr=hn(Math.min(Nt,Ft)),Go=!!(an&&en&&Kt==="right")?"left":"right",Ql=Array.isArray(gt)?gt:[],Ga=[D!=="default"?`${m}-state-${D}`:"",X||I==="open"?`${m}-state-open`:"",ae&&ae!==D&&ae!==I?`${m}-state-${ae}`:""].filter(Boolean).join(" "),Xp=t&&!i?`${m}-editor`:"",Zl=ie?`${m}-interactive`:"",Up=Se&&(D!==se||de)?`${m}-nav-state-anim`:"",qp=X?`${m}-open`:"",Kp=s.useMemo(()=>V$(h.current),[C,X,d]),Xa=()=>{j(!1)},Ua=!t||i,Yp=Pt=>{if(k){q.current=Pt;return}Pt()};s.useEffect(()=>{if(X)return;const Pt=q.current;q.current=null,Pt==null||Pt()},[X]);const Jl=(Pt,Ut)=>{z$(Pt,Xa,{isEditor:t,isPreviewMode:i,item:Ut,pages:u,onLinkNavigate:p,runAfterClose:Yp})},Qp=()=>{t&&!i||j(Pt=>!Pt)},Zp=Pt=>{Pt.pointerType==="touch"&&Pt.currentTarget.blur()},Ar=()=>{H.current!==null&&(window.clearTimeout(H.current),H.current=null)};s.useEffect(()=>{if(!de)return;const Pt=window.setTimeout(()=>{te(!1)},on);return()=>window.clearTimeout(Pt)},[de,D]),s.useEffect(()=>{if(X){Ar(),L(!0);return}return w.current+=1,A(!1),Ar(),H.current=window.setTimeout(()=>{H.current=null,L(!1)},Tn),Ar},[X]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,w.current+=1,Ar(),j(!1),A(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var ln;if(!C||!X)return;const Pt=w.current+1;w.current=Pt,A(!1),(ln=v.current)==null||ln.offsetHeight;const Ut=requestAnimationFrame(()=>{w.current===Pt&&A(!0)});return()=>{cancelAnimationFrame(Ut)}},[C,X]),s.useLayoutEffect(()=>{if(!k||!C)return;const Pt=f.current;if(!Pt)return;const Ut=getComputedStyle(Pt).backgroundColor;if(!Ut)return;const ln=document.documentElement,{body:fn}=document,wn=ln.style.backgroundColor,An=fn.style.backgroundColor;return ln.style.backgroundColor=Ut,fn.style.backgroundColor=Ut,()=>{ln.style.backgroundColor=wn,fn.style.backgroundColor=An}},[k,C,Ga,nt,ut]),s.useEffect(()=>{x==null||x(X)},[X,x]),s.useEffect(()=>{if(!X)return;const Pt=Ut=>{Ut.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",Pt),()=>window.removeEventListener("keydown",Pt)},[X,t,i]),s.useEffect(()=>{t&&!i&&I!=="open"&&j(!1)},[t,i,I]),s.useEffect(()=>{i&&j(!1)},[i]);const ec=Sn&&X,Jp=Pt=>Ql.filter(Ut=>g$(Ut,d)).map((Ut,ln)=>{const{label:fn,href:wn,target:An}=Qs(Ut,u),to=wn?a.jsx("a",{href:wn,target:An,rel:An==="_blank"?"noopener noreferrer":void 0,className:`${Pt} ${m}-has-href`,onClick:Xo=>Jl(Xo,Ut),children:eo(fn)}):a.jsx("span",{className:Pt,children:eo(fn)});return a.jsxs(s.Fragment,{children:[ln>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${m}-gap-control`:void 0,style:{height:hn(Te)}}),to]},ln)}),em=C?a.jsxs("div",{ref:v,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${tt}`,W?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...Gt,...Kp},"aria-hidden":!W,children:[a.jsx("div",{className:[`${m}-backdrop`,Ua?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${m}-panel`,Ua?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:F,"aria-label":"Menu","data-lightbox-scrollable":"",children:[Sn&&P$(m,Ji,Rt.fontSize,hn),Jp(`${m}-link`)]}),k?a.jsx("div",{ref:f,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,tm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:Qp,onPointerUp:Zp,"aria-expanded":X,"aria-label":X?"Close menu":"Open menu",children:a.jsx(y$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Pt=>{const Ut=Pt==="left",ln=Ut?Re:Ae,fn=Ut?Vo:bn,wn=Ut?di:Zi,An=mt?Ut?"compactNavPaddingLeft":"compactNavPaddingRight":Ut?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Ut?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:hn(ln),flexShrink:0},children:Yn?a.jsx("div",{"data-controls":An,"data-controls-axis":"x","data-controls-variant":"column-padding",...Ut?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(wn),className:`${m}-control-anchor`,style:{top:0,[Ut?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},nm=(Pt,Ut)=>{const{label:ln,href:fn,target:wn}=Qs(Pt,u),An=a.jsx("span",{className:Bt,style:Et,children:Ad(ln)}),to=Hd(m,An,Oe,Yn,hn),Xo=fn?a.jsx("a",{href:fn,target:wn,rel:wn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>Jl(Nr,Pt),children:to}):a.jsx("span",{className:`${m}-nav-link`,children:to});return a.jsxs(s.Fragment,{children:[Ut>0&&a.jsx("div",{"data-controls":Yn?mt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Yn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:hn(jo),flexShrink:0}}),Xo]},Ut)},im={...Gt,height:$.scalingValue(Ft,t),minHeight:$.scalingValue(Ft,t),[`--${m}-panel-height`]:$.scalingValue(Ft,t)},om=l&&D==="default"&&I!=="open"&&!i?hn(re+r$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Ga} ${Xp} ${Zl} ${Up}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:om,...Gt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:M}}),a.jsx("span",{ref:b,"aria-hidden":!0,style:Rd(Dt.css),children:"H"}),a.jsx("span",{ref:E,"aria-hidden":!0,style:Rd(zt.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:im,children:[an&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Kt}`,children:[Kt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Qn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Qn&&kn?{[`--${m}-logo-image`]:N$(kn)}:{}},children:[a.jsx("img",{src:Qn&&kn?kn:en,alt:"",className:`${m}-nav-logo-img`}),Qn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Kt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Ct}`,style:{transform:u$(Ct,bt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(Pt=>m$(Pt,D,d)).map((Pt,Ut)=>nm(Pt,Ut))})})]})}),em,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Go}`,children:[Go==="left"?Fr("left"):null,vt?a.jsx("div",{className:`${m}-root ${qp}`.trim(),style:pt,children:tm()}):null,Go==="right"?Fr("right"):null]})]})}const X$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24882
+ `}function Qs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function D$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Qs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function z$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function B$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function j$(e){const t=B$(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 V$(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 Uu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function G$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function X$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function zp(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 _d(e){const t=zp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function q$(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=G$(u),v=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Ys(r,l),m=_p(r),h={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};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!v&&p&&X$(u)&&zp(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const U$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function K$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function Y$(e){const t={},n=K$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of U$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(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 Q$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:v,onOpenChange:x}){var tc;const{prefix:m}=w.useScopedStyles(),h=s.useRef(null),b=s.useRef(null),S=s.useRef(null),R=s.useRef(null),y=s.useRef(null),C=s.useRef(0),E=s.useRef(null),G=s.useRef(null),H=s.useRef(d),O=s.useMemo(()=>O$(m),[m]),[F,D]=s.useState(!1),[I,L]=s.useState(!1),[z,k]=s.useState(!1),$=g$(r),P=s.useMemo(()=>new Set(c),[c]),q=kt=>!!(kt&&P.has(kt)),K=!!(t&&!i&&$==="open"&&!q("open"))||!(t&&!i)&&F,M=!!(t&&!i),f=K&&!M;jl(f),s.useEffect(()=>{if(!K||!M)return;const kt=document.documentElement,Qt=kt.style.overflow;return kt.style.overflow="hidden",()=>{kt.style.overflow=Qt}},[K,M]);const X=!q("compact")&&!q("onScroll"),oe=!t||!!i&&!n,ue=o&&o!=="default"?o:void 0,N=X&&$==="compact"?"compact":"default",[se,T]=s.useState(N),[me,J]=s.useState(!1),we=!n;N!==se&&(T(N),we&&J(!0));const Le=Dp(e),{logo:he,logoMaxHeight:fe=120/1440,logoPosition:ie="left",panelHeight:re=60/1440,backgroundColor:ae="#b3b3b3",logoColor:pe="#000000",position:be,horizontalAlign:ke,verticalAlign:Fe,iconColor:xe="#000000",showIcon:le="on",iconSize:g=16/1440,linkColor:V="#000000",openLinkColor:Y="#000000",compactIconColor:te="#000000",compactLinkColor:ge="#000000",compactLogoColor:ee="#000000",compactBackgroundColor:B="#ffffff",compactLogoMaxHeight:Z=120/1440,compactLogoPosition:U,compactPanelHeight:de=60/1440,compactShowIcon:j="on",compactIconSize:Pe=16/1440,compactNavTextWidth:ne,compactNavTextPosition:Q,compactNavTextOffset:_e,compactNavGap:Ge,compactNavPaddingLeft:Be=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:Ye,compactFontSettings:nt,compactFontSize:it,compactLineHeight:ve,compactLetterSpacing:Te=0,compactWordSpacing:We=0,compactTextAlign:Ke="left",compactTextAppearance:Ze,openLogoColor:lt="#000000",menuBackgroundColor:ot="#ffffff",overlayColor:Me="rgba(0, 0, 0, 0.45)",closeButtonColor:ze="#000000",effect:et="fade",openPanelSize:Oe=100,textWidth:Ne=280/1440,navTextWidth:yt,navTextPosition:je="center",navTextOffset:He=0,gap:Ce=0,navGap:tt,navPaddingLeft:Qe=10/1440,navPaddingRight:St=10/1440,textPaddingLeft:Ct=10/1440,textPaddingRight:Wt=10/1440,textPaddingTop:ht=10/1440,textPaddingBottom:Xt=10/1440,fontFamily:wt,fontSettings:Vt,fontSize:Yt,lineHeight:$e,letterSpacing:Xe=0,wordSpacing:ut=0,textAlign:$t="left",textAppearance:bt,openFontFamily:ct,openFontSettings:Ht,openFontSize:mt,openLineHeight:Tt,openLetterSpacing:Ie,openWordSpacing:Je,openTextAlign:rt,openTextAppearance:Mt,stateOverrides:gt,link:xt}=Le,{horizontalAlign:Ft,verticalAlign:Ot}=M$({position:be,horizontalAlign:ke,verticalAlign:Fe}),pt=N==="compact",Dt=pt?Z:fe,qt=h$(pt?U:ie),Nt=pt?de:re,zt=pt?Pe:g,jt=pt?ne:yt,Bt=f$(pt?Q:je),Rt=(pt?_e:He)??0,W=pt?Ge:tt,Re=pt?Be:Qe,Ae=pt?qe:St,De=jt??Ne,ft=K||(pt?j:le)!=="off",Ut=w.buildColorVars(m,{iconColor:xe,closeButtonColor:ze,linkColor:V,openLinkColor:Y,compactIconColor:te,compactLinkColor:ge,compactLogoColor:ee,compactBackgroundColor:B,openLogoColor:lt,menuBackgroundColor:ot,overlayColor:Me,backgroundColor:ae,logoColor:pe},N$,_$,gt),at=Ed(pt?{fontFamily:Ye,fontSettings:nt,fontSize:it,lineHeight:ve,letterSpacing:Te,wordSpacing:We,textAlign:Ke,textAppearance:Ze}:{fontFamily:wt,fontSettings:Vt,fontSize:Yt,lineHeight:$e,letterSpacing:Xe,wordSpacing:ut,textAlign:$t,textAppearance:bt}),Et=Ed({fontFamily:ct,fontSettings:Ht,fontSize:mt,lineHeight:Tt,letterSpacing:Ie,wordSpacing:Je,textAlign:rt,textAppearance:Mt},at),It=kd(m,at,t),_t=kd(m,Et,t),on=Ld(S,Md(at)),fn=Ld(R,Md(Et)),bn={..._t.css,whiteSpace:"pre-wrap",transform:Pd(fn)},ui=_t.className,dn=kt=>w.scalingValue(kt,t),pi=W??Ce,Yn=Math.max(Re,ho),Sn=Math.max(Ae,ho),mi=Math.max(0,1-zt),eo=Math.max(0,1-zt),wn=n??!1,Qn=wn&&!K,to=s.useMemo(()=>Op({textPaddingLeft:Ct,textPaddingRight:Wt,textPaddingTop:ht,textPaddingBottom:Xt,fontSize:Et.fontSize}),[Ct,Wt,ht,Xt,Et.fontSize]),no=kt=>{const Qt=a.jsx("span",{className:ui,style:bn,children:Ad(kt)});return Hd(m,Qt,Ne,wn,dn)},Ue=et==="left"||et==="right"?{width:`${Oe}%`}:{height:`${Oe}%`},A={...A$(to,t),...Ue,alignItems:W$[Ft],justifyContent:H$[Ot]},ce=s.useRef(e),ye=s.useRef(d),Ee=s.useRef(null);Qs((tc=e.logo)==null?void 0:tc.icon)&&(Ee.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!v||!t){ce.current=e,ye.current=d;return}const kt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Qs(kt)&&!Ee.current){ce.current=e,ye.current=d;return}const Qt=_r=>{v(D$(_r,Ee.current))};if(ye.current!==d){ce.current=e,ye.current=d;const _r=Nd(e);_r!==e&&Qt(_r);return}const cn=Nd(e),yn=ce.current,$n=yn!==e,Fn=$n?k$(cn,yn):cn;ce.current=e;const io=cn!==e,Xo=$n&&R$(cn,Fn);!io&&!Xo||Qt(Fn)},[e,v,t,d]);const Ve=w.scalingValue(zt,t),dt={width:Ve,height:Ve,minWidth:Ve,minHeight:Ve,maxWidth:Ve,maxHeight:Ve},At={...It.css,textDecoration:"none",transform:Pd(on)},Kt=It.className,sn=(he==null?void 0:he.mode)!=="Off",en=(he==null?void 0:he.icon)??"",gi=j$(en),An=V$(en,gi),Zn=!!An,kr=dn(Math.min(Dt,Nt)),Go=!!(sn&&en&&qt==="right")?"left":"right",Ql=Array.isArray(xt)?xt:[],Ga=[N!=="default"?`${m}-state-${N}`:"",K||$==="open"?`${m}-state-open`:"",ue&&ue!==N&&ue!==$?`${m}-state-${ue}`:""].filter(Boolean).join(" "),Zp=t&&!i?`${m}-editor`:"",Zl=oe?`${m}-interactive`:"",Jp=we&&(N!==se||me)?`${m}-nav-state-anim`:"",em=K?`${m}-open`:"",tm=s.useMemo(()=>Y$(h.current),[I,K,d]),Xa=()=>{D(!1)},qa=!t||i,nm=kt=>{if(f){G.current=kt;return}kt()};s.useEffect(()=>{if(K)return;const kt=G.current;G.current=null,kt==null||kt()},[K]);const Jl=(kt,Qt)=>{q$(kt,Xa,{isEditor:t,isPreviewMode:i,item:Qt,pages:u,onLinkNavigate:p,runAfterClose:nm})},im=()=>{t&&!i||D(kt=>!kt)},om=kt=>{kt.pointerType==="touch"&&kt.currentTarget.blur()},Ar=()=>{E.current!==null&&(window.clearTimeout(E.current),E.current=null)};s.useEffect(()=>{if(!me)return;const kt=window.setTimeout(()=>{J(!1)},rn);return()=>window.clearTimeout(kt)},[me,N]),s.useEffect(()=>{if(K){Ar(),L(!0);return}return C.current+=1,k(!1),Ar(),E.current=window.setTimeout(()=>{E.current=null,L(!1)},In),Ar},[K]),s.useLayoutEffect(()=>{H.current!==d&&(H.current=d,C.current+=1,Ar(),D(!1),k(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!I||!K)return;const kt=C.current+1;C.current=kt,k(!1),(cn=b.current)==null||cn.offsetHeight;const Qt=requestAnimationFrame(()=>{C.current===kt&&k(!0)});return()=>{cancelAnimationFrame(Qt)}},[I,K]),s.useLayoutEffect(()=>{if(!f||!I)return;const kt=y.current;if(!kt)return;const Qt=getComputedStyle(kt).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}},[f,I,Ga,ot,gt]),s.useEffect(()=>{x==null||x(K)},[K,x]),s.useEffect(()=>{if(!K)return;const kt=Qt=>{Qt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",kt),()=>window.removeEventListener("keydown",kt)},[K,t,i]),s.useEffect(()=>{t&&!i&&$!=="open"&&D(!1)},[t,i,$]),s.useEffect(()=>{i&&D(!1)},[i]);const ec=wn&&K,rm=kt=>Ql.filter(Qt=>b$(Qt,d)).map((Qt,cn)=>{const{label:yn,href:$n,target:Fn}=Ys(Qt,u),io=$n?a.jsx("a",{href:$n,target:Fn,rel:Fn==="_blank"?"noopener noreferrer":void 0,className:`${kt} ${m}-has-href`,onClick:Xo=>Jl(Xo,Qt),children:no(yn)}):a.jsx("span",{className:kt,children:no(yn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${m}-gap-control`:void 0,style:{height:dn(Ce)}}),io]},cn)}),am=I?a.jsxs("div",{ref:b,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${et}`,z?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...Ut,...tm},"aria-hidden":!z,children:[a.jsx("div",{className:[`${m}-backdrop`,qa?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:qa?Xa: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&&F$(m,to,Et.fontSize,dn),rm(`${m}-link`)]}),f?a.jsx("div",{ref:y,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,sm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:im,onPointerUp:om,"aria-expanded":K,"aria-label":K?"Close menu":"Open menu",children:a.jsx($$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=kt=>{const Qt=kt==="left",cn=Qt?Re:Ae,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})},lm=(kt,Qt)=>{const{label:cn,href:yn,target:$n}=Ys(kt,u),Fn=a.jsx("span",{className:Kt,style:At,children:Ad(cn)}),io=Hd(m,Fn,De,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=>Jl(Nr,kt),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)},cm={...Ut,height:w.scalingValue(Nt,t),minHeight:w.scalingValue(Nt,t),[`--${m}-panel-height`]:w.scalingValue(Nt,t)},dm=l&&N==="default"&&$!=="open"&&!i?dn(re+u$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Ga} ${Zp} ${Zl} ${Jp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:dm,...Ut},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Rd(It.css),children:"H"}),a.jsx("span",{ref:R,"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:cm,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`]:z$(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:y$(Bt,Rt,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(kt=>x$(kt,N,d)).map((kt,Qt)=>lm(kt,Qt))})})]})}),am,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 ${em}`.trim(),style:dt,children:sm()}):null,Go==="right"?Fr("right"):null]})]})}const Z$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24883
24883
  import { CommonComponentProps } from '../props';
24884
24884
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
24885
24885
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -27520,7 +27520,8 @@ export function Burger({
27520
27520
  </div>
27521
27521
  );
27522
27522
  }
27523
- `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={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 yi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[yi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[yi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[yi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[yi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[yi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[yi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[yi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[yi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const U$=Ul(""),q$=Ul("open"),K$=Ul("compact"),Y$=["__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"],Q$=["__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"],Z$=["__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"],Jn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},J$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],eC=["iconColor","logoColor","linkColor","backgroundColor"],tC={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:[...J$]}},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}},...U$,...q$,...K$},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:Jn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn},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:Jn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,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:Jn,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:Y$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:Q$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:Z$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...eC],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"]},nC={element:G$,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:tC,sourceCode:X$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,iC=.12,ql={x:0,y:0,width:100,height:100};function So(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(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 oC(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 rC(e){return e.map(([t,n])=>({x:t,y:n}))}function Ms(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 aC(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=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return sC(i)}function sC(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 lC(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 dC(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 uC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=aC(e,l),d=i==="avoid"?cC(c):c;if(o=o===null?d:lC(o,d),o.length===0)return[]}return o??[]}function zd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Mi(i),c=$r(l);if(c.length)return t==="viewbox"?So(c,n):Ms(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 h=[];for(let v=0;v<Wd;v+=1){const b=x.getPointAtLength(v/Wd*m);h.push({x:b.x,y:b.y})}p.push(h)}return p.length?t==="viewbox"?So(p,n):Ms(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"?So([r],n):Ms([r])}const Kl={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",La=100,el=16,pC=12,mC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,gC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Bd=Math.PI/4,hC=8,fC=Math.PI/18,yC=8,go=24,ho=[];function vC(){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 Es(e,t){return dn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function xC(e){const t=Ci(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:dn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function bC(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 dn(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=Mi(c);d.length&&(l=n==="viewbox"?Es(d,i):xC(d))}if(!l.length){const d=o!=="custom"?Kl[o]:void 0;d?l=Es(Mi(d),ql):l=vC()}}return o==="circle"?bC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":No(dn(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function tl(e){const t=e==="rectangle"||e==="custom"?void 0:Kl[e];return t?So($r(Mi(t)),ql):[rC([[0,0],[1,0],[1,1],[0,1]])]}function SC(e){const t=e.match(gC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function In(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 pn(e){return{x:e.x,y:e.y}}function wC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function jn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(wC)}))}function dn(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 Gd(e,t,n,i=n){return dn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function $C(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:pn(e),c2:pn(l),p:pn(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,h=p*x+y*m,v=-y*x+p*m,b=h*h/(c*c)+v*v/(d*d);if(b>1){const X=Math.sqrt(b);c*=X,d*=X}const E=o===r?-1:1,f=c*c*v*v+d*d*h*h,w=Math.max(0,c*c*d*d-f),H=f===0?0:E*Math.sqrt(w/f),q=H*c*v/d,B=-H*d*h/c,M=p*q-y*B+(e.x+l.x)/2,_=y*q+p*B+(e.y+l.y)/2,j=Math.atan2((v-B)/d,(h-q)/c);let L=Math.atan2((-v-B)/d,(-h-q)/c)-j;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const W=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),A=L/W,I=4/3*Math.tan(A/4),T=(X,P)=>({x:M+p*c*X-y*d*P,y:_+y*c*X+p*d*P}),V=[];let S=j;for(let X=0;X<W;X+=1){const P=S+A,k=Math.cos(S),O=Math.sin(S),ie=Math.cos(P),ae=Math.sin(P);V.push({c1:T(k-I*O,O+I*k),c2:T(ie+I*ae,ae-I*ie),p:X===W-1?pn(l):T(ie,ae)}),S=P}return V}function Mi(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:Xn(h??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Xn(m,h.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const m=x[1],h=m.toUpperCase(),v=m!==h,b=SC(x[2]),E=f=>v?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(h==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(h==="M"){for(let f=0;f+1<b.length;f+=2){const w=E(f);f===0&&(u(),l=pn(w)),p(w)}c=null,d=null}else if(h==="L"){for(let f=0;f+1<b.length;f+=2)p(E(f));c=null,d=null}else if(h==="H"){for(const f of b)p({x:v?r.x+f:f,y:r.y});c=null,d=null}else if(h==="V"){for(const f of b)p({x:r.x,y:v?r.y+f:f});c=null,d=null}else if(h==="C"){for(let f=0;f+5<b.length;f+=6){const w=E(f),H=E(f+2),q=E(f+4);y(w),p(q,H),c=H}d=null}else if(h==="S"){for(let f=0;f+3<b.length;f+=4){const w=c?nl(c,r):pn(r),H=E(f),q=E(f+2);y(w),p(q,H),c=H}d=null}else if(h==="Q")for(let f=0;f+3<b.length;f+=4){const w=E(f),H=E(f+2);y(In(r,w,2/3)),p(H,In(H,w,2/3)),d=w,c=null}else if(h==="T")for(let f=0;f+1<b.length;f+=2){const w=d?nl(d,r):pn(r),H=E(f);y(In(r,w,2/3)),p(H,In(H,w,2/3)),d=w,c=null}else if(h==="A")for(let f=0;f+6<b.length;f+=7){const w=v?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const H of $C(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,w))y(H.c1),p(H.p,H.c2);c=null,d=null}x=Rs.exec(t)}return u(),n}function zn(e){return`${Number(e.toFixed(2))}`}function Xn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function _p(e){return!!(Xn(e.in,e.p)||Xn(e.out,e.p))}function Bo(e,t){return!Xn(e.out,e.p)&&!Xn(t.in,t.p)}function Xd(e,t){if(Bo(e,t))return`L${zn(t.p.x)},${zn(t.p.y)}`;const n=Xn(e.out,e.p)??e.p,i=Xn(t.in,t.p)??t.p;return`C${zn(n.x)},${zn(n.y)} ${zn(i.x)},${zn(i.y)} ${zn(t.p.x)},${zn(t.p.y)}`}function No(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${zn(i.p.x)},${zn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Hp(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(Bo(e,t))return In(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 Hp(n)){if(Bo(o.from,o.to)){i.push(pn(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(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Ci(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 CC(e){const t=Ci(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 Wp(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 Op(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=pC)return{closed:!0,nodes:t.map(r=>({p:pn(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:pn(r),...Wp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Dp(e,t,n=1){if(!e.length)return!1;const i=Ci(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 TC(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:dn(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 IC(e,t){if(!e.length)return e;const n=Ci(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 dn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function zp(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Kl[e]:void 0,i=n?dn(Mi(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):dn(Op(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=IC(i,t);return{shape:e,customPath:No(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function LC(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=jn(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 Ud(e,t,n,i){var r;if(!t.length)return e;const o=jn(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 PC(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=Bp(i,r,c)}),i}function MC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=jn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function RC(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=jn(e);return r[t].nodes[n][i]=null,r}function EC(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=jn(e),d=c[t].nodes,u=n+1;if(Bo(r,l))return d.splice(u,0,{p:In(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=In(r.p,p,i),m=In(p,y,i),h=In(y,l.p,i),v=In(x,m,i),b=In(m,h,i),E=In(v,b,i),f=(n+1)%o.nodes.length;return d[n].out=x,d[f].in=h,d.splice(u,0,{p:E,in:v,out:b}),{contours:c,nodeIndex:u}}function Bp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=jn(e);return o[t].nodes.splice(n,1),o}function qd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=jn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Xn(l[u].out,l[u].p),x=!!Xn(l[p].in,l[p].p);if(_p(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Wp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function kC(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 Kd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Hp(i)){const l=Bo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=kC(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 AC(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 Yd(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 Qd(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 FC(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 NC(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 _C(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*go,y:e.y-n.y*go},b:{x:t.x+n.x*go,y:t.y+n.y*go}}:{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 Zd(e,t,n,i,o){if(e.axis===null)return _C(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 HC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function WC(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 OC(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:ho};const x=Math.atan2(p,u),m=Math.round(x/Bd)*Bd;let h=o?m:null,v=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const M of B){const _=NC(M.angle-x);if(!(Math.abs(_)>fC)&&!(Math.abs(Math.sin(_))*y>hC)){h=M.angle,v=M.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=yC;if(h===null&&!b)return{point:e,guides:ho};const E=h??x,f=b?i:y,w={x:Math.cos(E),y:Math.sin(E)},H=f+(h===null?0:go),q=b?f:v?go:0;return{point:l({x:c.x+w.x*f,y:c.y+w.y*f}),guides:[{kind:"angle",a:{x:c.x-w.x*q,y:c.y-w.y*q},b:{x:c.x+w.x*H,y:c.y+w.y*H}}]}}const al=.1,sl=8,DC=4,Jd=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}}},jp=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*Jd,y:n.y+o*Jd}},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),Vi=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},Bn=(e,t,n)=>(e-t)*n,fo=(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)<DC?.5:Ia(r)},zC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Bn(e.width,l.width,i),d=e.y+Bn(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=Vi(t,n,y);return{focalX:fo(t.width,x.width,c-t.x,{clamp:!1}),focalY:fo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},eu=1.08,na=14,ia=8;function BC({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),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,v=s.useRef(null),b=s.useRef(null),E=s.useRef({focalX:d,focalY:u,scale:p});E.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var A;f&&((A=m.current)==null||A.focus({preventScroll:!0}))},[f]);const w=s.useCallback((A,I)=>{var V;const T=(V=m.current)==null?void 0:V.getBoundingClientRect();return!T||T.width<=0||T.height<=0?{x:0,y:0}:{x:(A-T.left)/T.width*t.width,y:(I-T.top)/T.height*t.height}},[t.width,t.height]),H=A=>{var T,V;if(!i)return;A.stopPropagation(),A.preventDefault(),(T=m.current)==null||T.focus({preventScroll:!0});const I=Vi(n,i,p);v.current={pointerId:A.pointerId,origin:w(A.clientX,A.clientY),startX:Bn(n.width,I.width,d),startY:Bn(n.height,I.height,u),width:I.width,height:I.height,moved:!1},(V=m.current)==null||V.setPointerCapture(A.pointerId)},q=(A,I)=>{var ie,ae;if(!i)return;A.stopPropagation(),A.preventDefault(),(ie=m.current)==null||ie.focus({preventScroll:!0});const T=Vi(n,i,p),V=Bn(n.width,T.width,d),S=Bn(n.height,T.height,u),X={minX:V,minY:S,maxX:V+T.width,maxY:S+T.height},P=Pa(X,jp(I)),k=Pa(X,I),O=Math.hypot(k.x-P.x,k.y-P.y);!isFinite(O)||O<=0||(b.current={pointerId:A.pointerId,anchor:P,startDistance:O,startScale:p,startX:V,startY:S,moved:!1},(ae=m.current)==null||ae.setPointerCapture(A.pointerId))},B=A=>{if(!i)return;const I=b.current;if(I&&A.pointerId===I.pointerId){A.stopPropagation(),A.preventDefault();const V=w(A.clientX,A.clientY),S={x:V.x-n.x,y:V.y-n.y},X=Math.hypot(S.x-I.anchor.x,S.y-I.anchor.y),P=Math.min(sl,Math.max(al,I.startScale*(X/I.startDistance)));if(!I.moved&&Math.abs(P-I.startScale)<1e-4)return;I.moved=!0;const k=P/I.startScale,O=I.anchor.x+(I.startX-I.anchor.x)*k,ie=I.anchor.y+(I.startY-I.anchor.y)*k,ae=Vi(n,i,P);y({focalX:fo(n.width,ae.width,O),focalY:fo(n.height,ae.height,ie),scale:P});return}const T=v.current;if(T&&A.pointerId===T.pointerId){A.stopPropagation(),A.preventDefault();const V=w(A.clientX,A.clientY),S=V.x-T.origin.x,X=V.y-T.origin.y;if(!T.moved&&S===0&&X===0)return;T.moved=!0,y({focalX:fo(n.width,T.width,T.startX+S),focalY:fo(n.height,T.height,T.startY+X),scale:p})}},M=A=>{var V,S;const I=v.current;if(I&&A.pointerId===I.pointerId){v.current=null,A.stopPropagation(),(V=m.current)!=null&&V.hasPointerCapture(I.pointerId)&&m.current.releasePointerCapture(I.pointerId),I.moved&&x(E.current);return}const T=b.current;T&&A.pointerId===T.pointerId&&(b.current=null,A.stopPropagation(),(S=m.current)!=null&&S.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&x(E.current))},_=A=>{if(A.key==="Escape"){A.stopPropagation(),c("none");return}if(A.key==="="||A.key==="+"||A.key==="-"||A.key==="_"){A.preventDefault(),A.stopPropagation();const I=A.key==="="||A.key==="+",T=Math.min(sl,Math.max(al,p*(I?eu:1/eu))),V={focalX:d,focalY:u,scale:T};y(V),x(V)}},j=["nw","ne","se","sw"],C={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const A=i??{width:n.width,height:n.height},I=Vi(n,A,p);return!(I.width>0)||!(I.height>0)?null:{x:n.x+Bn(n.width,I.width,d),y:n.y+Bn(n.height,I.height,u),width:I.width,height:I.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),W=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:C;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:B,onPointerUp:M,onPointerCancel:M,onLostPointerCapture:M,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&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})]}),f&&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:H}),j.map(A=>{const I=ll(W,A),T=A==="ne"||A==="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${T?` ${e}-editor-scale-grab-nesw`:""}`,x:I.x-na/2,y:I.y-na/2,width:na,height:na,onPointerDown:V=>q(V,A)})]},A)})]})]})}const dl=10,jC=dl*2,Dn=7,VC=4,ao=9,GC=3.5,tu=1.08,XC=.05,oa=14,UC=1,ra=14,aa=8;function qC({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),h=s.useRef(i);h.current=i;const v=s.useRef(null),b=s.useRef(null),E=s.useRef(null),f=s.useRef(null),[w,H]=s.useState([]),[q,B]=s.useState(ho),[M,_]=s.useState(null),j=s.useCallback(g=>{B(Y=>FC(Y,g)?Y:g)},[]),C=c==="shape";s.useEffect(()=>{var g;C&&((g=x.current)==null||g.focus({preventScroll:!0}))},[C]),s.useEffect(()=>{C||H(g=>g.length?[]:g)},[C]);const L=w.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const W=n.width>0?t.width/n.width:1,A=n.height>0?t.height/n.height:1,I=Math.min(W,A),T=r&&l?I:W,V=r&&l?I:A,S=r&&l?(t.width-n.width*I)/2:0,X=r&&l?(t.height-n.height*I)/2:0,P=s.useCallback(g=>r?{x:S+(g.x-n.x)*T,y:X+(g.y-n.y)*V}:{x:g.x-n.x,y:g.y-n.y},[r,n,T,V,S,X]),k=s.useCallback(g=>r?{x:n.x+(T>0?(g.x-S)/T:0),y:n.y+(V>0?(g.y-X)/V:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,T,V,S,X]),O=s.useMemo(()=>k({x:t.width/2,y:t.height/2}),[k,t.width,t.height]),ie=s.useCallback((g,Y)=>{var ee;const Z=(ee=x.current)==null?void 0:ee.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const ye=(g-Z.left)/Z.width*t.width,G=(Y-Z.top)/Z.height*t.height;return{x:n.x+(T>0?(ye-S)/T:0),y:n.y+(V>0?(G-X)/V:0)}}return{x:n.x+(g-Z.left),y:n.y+(Y-Z.top)}},[r,n,t.width,t.height,T,V,S,X]),ae=s.useCallback((g,Y)=>{var ee;const Z=(ee=x.current)==null?void 0:ee.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(g-Z.left)/Z.width*t.width,y:(Y-Z.top)/Z.height*t.height}},[t.width,t.height]),D=s.useCallback((g,Y)=>{const Z=l&&!(Y!=null&&Y.preserveShape)?TC(g,n,t,S,X,T,V):g;y(Z,Y)},[y,l,n,t,S,X,T,V]),se=s.useCallback(()=>{_(null)},[]),R=s.useCallback((g,Y,Z)=>{if(!Z||v.current||b.current||E.current||f.current){se();return}const ee=ae(g,Y),ye=dn(h.current,P);for(const U of ye)for(const Pe of U.nodes)if(Math.hypot(Pe.p.x-ee.x,Pe.p.y-ee.y)<=ao){se();return}const G=Kd(ye,ee);if(!G||G.distance>dl){se();return}const N=ye[G.contour],K=N==null?void 0:N.nodes[G.segment],ne=N==null?void 0:N.nodes[(G.segment+1)%((N==null?void 0:N.nodes.length)??1)],pe=!!(K&&ne&&!Bo(K,ne));_(U=>U&&U.curved===pe&&Math.hypot(U.point.x-G.point.x,U.point.y-G.point.y)<.25?U:{point:G.point,curved:pe})},[ae,P,se]),de=g=>{var Xe;const Y=g.metaKey||g.ctrlKey,Z=E.current;if(Z&&g.pointerId===Z.pointerId){if(g.stopPropagation(),g.preventDefault(),Z.startDistance<=0)return;const Ue=ie(g.clientX,g.clientY),Je=Math.hypot(Ue.x-Z.origin.x,Ue.y-Z.origin.y),et=Math.max(XC,Je/Z.startDistance);if(!Z.moved&&Math.abs(et-1)<1e-4)return;Z.moved=!0,p(Gd(Z.startContours,Z.origin,et));return}const ee=b.current;if(ee&&g.pointerId===ee.pointerId){g.stopPropagation(),g.preventDefault();const Ue=ie(g.clientX,g.clientY),{bbox:Je}=ee,et=Je.maxX-Je.minX,Qe=Je.maxY-Je.minY,it=Ue.x-ee.origin.x,xe=Ue.y-ee.origin.y;let Ie=it,We=xe;if(isFinite(et)&&isFinite(Qe))if(r){let je=n.x,ot=n.x+n.width,nt=n.y,Ee=n.y+n.height;l&&(T>0&&(je=n.x+(0-S)/T,ot=n.x+(t.width-S)/T),V>0&&(nt=n.y+(0-X)/V,Ee=n.y+(t.height-X)/V));const Be=Math.min(je,ot-et),tt=Math.max(je,ot-et),_e=Math.min(nt,Ee-Qe),He=Math.max(nt,Ee-Qe),xt=Math.min(tt,Math.max(Be,Je.minX+it)),rt=Math.min(He,Math.max(_e,Je.minY+xe));Ie=xt-Je.minX,We=rt-Je.minY}else{const je=Je.minX-n.x,ot=Je.minY-n.y,nt=Math.min(0,t.width-et),Ee=Math.max(0,t.width-et),Be=Math.min(0,t.height-Qe),tt=Math.max(0,t.height-Qe),_e=Math.min(Ee,Math.max(nt,je+it)),He=Math.min(tt,Math.max(Be,ot+xe));Ie=_e-je,We=He-ot}const qe=[];if(!Y&&isFinite(et)&&isFinite(Qe)){const je=P({x:Je.minX+et/2+Ie,y:Je.minY+Qe/2+We}),ot={x:t.width/2,y:t.height/2};Math.abs(je.x-ot.x)<=oa&&(Ie=O.x-Je.minX-et/2,qe.push(rl(ot.x,"x",t))),Math.abs(je.y-ot.y)<=oa&&(We=O.y-Je.minY-Qe/2,qe.push(rl(ot.y,"y",t)))}if(!ee.moved&&Ie===0&&We===0)return;ee.moved=!0,j(qe.length?qe:ho),p(dn(ee.startContours,je=>({x:je.x+Ie,y:je.y+We})),{carryImage:!0});return}const ye=f.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const Ue=ie(g.clientX,g.clientY);let Je=Ue.x-ye.origin.x,et=Ue.y-ye.origin.y;if(g.shiftKey&&(Math.abs(Je)>Math.abs(et)?et=0:Je=0),!ye.moved&&Je===0&&et===0)return;ye.moved=!0,p(Ud(ye.startContours,ye.selection,Je,et));return}const G=v.current;if(!G||g.pointerId!==G.pointerId){R(g.clientX,g.clientY,w.length>0||C);return}se(),g.stopPropagation(),g.preventDefault();const N=ie(g.clientX,g.clientY);if(G.kind==="anchor"){const Ue={x:G.anchor.x+(N.x-G.origin.x),y:G.anchor.y+(N.y-G.origin.y)},Je=Y?[]:AC(h.current,{contour:G.contour,node:G.node}),et=Y||!G.center?[]:[G.center],Qe=Qd(Yd(Je,et.map(Ie=>Ie.x),"x"),Ue,"x",P,oa),it=Qd(Yd(Je,et.map(Ie=>Ie.y),"y"),Ue,"y",P,oa),xe=Y?Ue:{x:(Qe==null?void 0:Qe.value)??ta(Ue.x,o),y:(it==null?void 0:it.value)??ta(Ue.y,o)};if(g.shiftKey&&(Math.abs(xe.x-G.anchor.x)>Math.abs(xe.y-G.anchor.y)?xe.y=G.anchor.y:xe.x=G.anchor.x),!G.moved&&xe.x===G.anchor.x&&xe.y===G.anchor.y)return;G.moved=!0,j(HC(xe,Qe,it,t,P)),p(LC(h.current,G.contour,G.node,xe));return}const K=(Xe=h.current[G.contour])==null?void 0:Xe.nodes[G.node],ne=G.mirror&&!g.altKey,pe=ne||Y?null:G.kind==="in"?K==null?void 0:K.out:K==null?void 0:K.in,U=K?P(K.p):null,Pe=pe?P(pe):null,le=K&&(!Y||g.shiftKey)?OC(N,K.p,ne||Y?null:WC(h.current[G.contour],G.node,G.kind,P),U&&Pe?Math.hypot(Pe.x-U.x,Pe.y-U.y):null,g.shiftKey,P,k):{point:N,guides:ho},J=le.guides.length?le.point:Y?N:{x:ta(N.x,o),y:ta(N.y,o)},De=G.kind==="in"?K==null?void 0:K.in:K==null?void 0:K.out;!G.moved&&De&&J.x===De.x&&J.y===De.y||(G.moved=!0,j(le.guides),p(MC(h.current,G.contour,G.node,G.kind,J,ne)))},te=g=>{j(ho);const Y=E.current;if(Y&&g.pointerId===Y.pointerId){E.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(Y.pointerId)&&pe.releasePointerCapture(Y.pointerId),Y.moved&&D(h.current,{preserveShape:!0});return}const Z=b.current;if(Z&&g.pointerId===Z.pointerId){b.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(Z.pointerId)&&pe.releasePointerCapture(Z.pointerId),Z.moved?D(h.current,{preserveShape:!0}):H([]);return}const ee=f.current;if(ee&&g.pointerId===ee.pointerId){f.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(ee.pointerId)&&pe.releasePointerCapture(ee.pointerId),ee.moved&&D(h.current);return}const ye=v.current;if(!ye||g.pointerId!==ye.pointerId)return;v.current=null,g.stopPropagation();const G=x.current;G!=null&&G.hasPointerCapture(ye.pointerId)&&G.releasePointerCapture(ye.pointerId);const N=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||N>VC){ye.moved&&D(h.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const ne=qd(h.current,ye.contour,ye.node);ne!==h.current&&(p(ne),D(ne))},Se=g=>{g.stopPropagation()},Ce=g=>{var Y,Z;g.stopPropagation(),g.preventDefault(),se(),(Y=x.current)==null||Y.focus({preventScroll:!0}),b.current={pointerId:g.pointerId,origin:ie(g.clientX,g.clientY),startContours:jn(i),bbox:Ci(i),moved:!1},(Z=x.current)==null||Z.setPointerCapture(g.pointerId)},ve=(g,Y)=>{var N,K;g.stopPropagation(),g.preventDefault(),se(),(N=x.current)==null||N.focus({preventScroll:!0}),H([]),d("shape");const Z=Ci(i),ee=Pa(Z,jp(Y)),ye=ll(Z,Y),G=Math.hypot(ye.x-ee.x,ye.y-ee.y);!isFinite(G)||G<=0||(E.current={pointerId:g.pointerId,corner:Y,origin:ee,startDistance:G,startContours:jn(i),moved:!1},(K=x.current)==null||K.setPointerCapture(g.pointerId))},ue=(g,Y,Z,ee)=>{var N,K,ne,pe;g.stopPropagation(),g.preventDefault(),se(),(N=x.current)==null||N.focus({preventScroll:!0});const ye=(K=i[Z])==null?void 0:K.nodes[ee];if(!ye)return;if(g.altKey){const U=Y==="anchor"?Bp(i,Z,ee):RC(i,Z,ee,Y);if(U===i)return;H(Y==="anchor"?[]:[{contour:Z,node:ee}]),p(U),D(U);return}const G=g.metaKey||g.ctrlKey;if(Y==="anchor"&&g.shiftKey&&!G){H(U=>U.some(Pe=>Pe.contour===Z&&Pe.node===ee)?U.filter(Pe=>!(Pe.contour===Z&&Pe.node===ee)):[...U,{contour:Z,node:ee}]);return}if(Y==="anchor"&&!G&&w.length>1&&w.some(U=>U.contour===Z&&U.node===ee)){f.current={pointerId:g.pointerId,origin:ie(g.clientX,g.clientY),startContours:jn(i),selection:w,moved:!1},(ne=x.current)==null||ne.setPointerCapture(g.pointerId);return}H([{contour:Z,node:ee}]),v.current={kind:Y,contour:Z,node:ee,pointerId:g.pointerId,origin:ie(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:CC(i),mirror:Y!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:G,moved:!1},(pe=x.current)==null||pe.setPointerCapture(g.pointerId)},Q=g=>{g.stopPropagation(),g.preventDefault(),se();const Y=dn(i,P),Z=Kd(Y,ae(g.clientX,g.clientY));if(!Z||Z.distance>dl)return;const{contours:ee,nodeIndex:ye}=EC(i,Z.contour,Z.segment,Z.t);ye<0||(H([{contour:Z.contour,node:ye}]),p(ee),D(ee))},re=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const G=Ci(i);if(!isFinite(G.minX)||!isFinite(G.maxX))return;const N={x:(G.minX+G.maxX)/2,y:(G.minY+G.maxY)/2},ne=g.key==="="||g.key==="+"?tu:1/tu,pe=Gd(i,N,ne);p(pe),D(pe,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),H([]),d("none");return}if(!w.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const G=PC(i,w);if(G===i)return;H([]),p(G),D(G);return}const Y=o>0?o:UC,Z=g.shiftKey?Y*10:Y,ee={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[g.key];if(!ee)return;g.preventDefault(),g.stopPropagation();const ye=Ud(i,w,ee[0],ee[1]);p(ye),D(ye)},fe=s.useMemo(()=>No(dn(i,P)),[i,P]),he=s.useMemo(()=>Ci(i),[i]),be=P({x:he.minX,y:he.minY}),Me={width:P({x:he.maxX,y:he.minY}).x-be.x,height:P({x:he.minX,y:he.maxY}).y-be.y},Ne=C&&w.length===0&&isFinite(he.minX)&&isFinite(he.maxX)&&he.maxX>he.minX&&he.maxY>he.minY,we=w.length>0||C,ce=we;return a.jsxs("svg",{ref:x,className:`${e}-editor${we?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:re,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:de,onPointerLeave:se,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:()=>{H([]),d("none")},onClick:Q}),ce&&a.jsx("path",{className:`${e}-editor-outline`,d:fe}),ce&&q.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:fe,fillRule:"evenodd",onPointerDown:Ce,onClick:Q}),ce&&a.jsx("path",{className:`${e}-editor-hit`,d:fe,style:{strokeWidth:jC},onClick:Q}),ce&&M&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:M.point.x-Dn/2,y:M.point.y-Dn/2,width:Dn,height:Dn,rx:M.curved?Dn/2:0}),ce&&i.map((g,Y)=>g.nodes.map((Z,ee)=>{const ye=w.some(N=>N.contour===Y&&N.node===ee),G=P(Z.p);return a.jsxs("g",{children:[ye&&w.length===1&&["in","out"].map(N=>{const K=Z[N];if(!K)return null;const ne=P(K);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:G.x,y1:G.y,x2:ne.x,y2:ne.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:ne.x,cy:ne.y,r:GC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:ne.x,cy:ne.y,r:ao,onPointerDown:pe=>ue(pe,N,Y,ee),onClick:Se})]},N)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:G.x-Dn/2,y:G.y-Dn/2,width:Dn,height:Dn,rx:_p(Z)?Dn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:G.x-ao,y:G.y-ao,width:ao*2,height:ao*2,onPointerDown:N=>ue(N,"anchor",Y,ee),onClick:Se,onDoubleClick:N=>{N.stopPropagation(),N.preventDefault();const K=qd(i,Y,ee);p(K),D(K)}})]},`${Y}-${ee}`)})),Ne&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:be.x,y:be.y,width:Me.width,height:Me.height}),["nw","ne","se","sw"].map(g=>{const Y=P(ll(he,g)),Z=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${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:Y.x-ra/2,y:Y.y-ra/2,width:ra,height:ra,onPointerDown:ee=>ve(ee,g),onClick:Se})]},g)})]})]})}const KC=4e3,YC=/^(?:https?:|mailto:|tel:)/i;function Vp(e){return!!e&&typeof e=="object"&&e.type==="link"}function QC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!YC.test(t)))return t}function ZC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Vp(d)){o(d.children??[],QC(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 nu(e){return{...e.fontFamily&&{fontFamily:Oo(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 JC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Vp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function eT(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,v=m.y*i;h<c&&(c=h),h>d&&(d=h),v<u&&(u=v),v>p&&(p=v)}const y=(c+d)/2,x=(u+p)/2;return l.map(m=>{const h=m.x*n,v=m.y*i,b=h-y,E=v-x,f=Math.sqrt(b*b+E*E);if(f<1e-6)return m;const H=Math.max(0,f+r*t)/f;return{x:(y+b*H)/n,y:(x+E*H)/i}})})}const ks=2,As=2;function tT(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<ks+As)return null;const c=Math.min(r.length-As,l.length-As);let d=-1;for(let u=c;u>=ks;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<ks?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function iu(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??[],h=e.hyphenWidth??0,v=e.lineHeight*l,b=e.spaceWidth*l,E=Math.max(0,e.shapeMargin??0),f=[],w=t.map((T,V)=>({token:T,originalIndex:V,width:n[V],kind:"whole"}));if(!w.length||c<=0||v<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const H=Math.max(1,b*.5),q=v*iC,B=eT(i,E,c,d,o);let M=0,_=0,j=0,C=w[0].token.para,L=0,W=0,A=null;for(;M<w.length&&j<KC;){const T=_+v>d;if(T&&!u)break;const V=w[M].token.para;if(V>C+1){_+=v*(V-C-1),C=V-1,j+=1;continue}let S=T?[{x0:0,x1:c}]:uC(B,(_+q)/d,(_+v-q)/d,o).map(P=>({x0:P.x0*c,x1:P.x1*c}));p>0&&y>0&&!T&&S.length&&(A===null&&(A=j,L=S[0].x0,W=_),j-A<y&&(S=dC(S,{x0:L,x1:L+p})));const X=S.reduce((P,k)=>Math.max(P,k.x1-k.x0),0);for(const P of S){const k=P.x1-P.x0;if(k<H)continue;if(M>=w.length||w[M].token.para!==V)break;const O=M;let ie=0;for(;M<w.length&&w[M].token.para===V;){const ae=w[M],D=M===O,se=ae.width*l,R=D?se:b+se;if(ie+R<=k){ie+=R,M+=1;continue}if(D&&k>=X-.5&&se>c-.5){ie+=R,M+=1;continue}if(x){const te=k-ie-(D?0:b),Se=tT(ae,m,te,l,h);if(Se){const Ce={token:{...ae.token,text:Se.fragmentText},originalIndex:ae.originalIndex,width:Se.fragmentWidth,kind:"fragment"},ve={token:{...ae.token,text:Se.remainderText},originalIndex:ae.originalIndex,width:Se.remainderWidth,kind:"remainder"};w.splice(M,1,Ce,ve),ie+=(D?0:b)+Se.fragmentWidth*l,M+=1}}break}if(M>O){const ae=M>=w.length||w[M].token.para!==V;f.push({top:_,left:P.x0,width:k,from:O,to:M,justify:r==="justify"&&!ae})}if(M>=w.length||w[M].token.para!==V)break}C=V,_+=v,j+=1}let I=0;if(M>0){const T=w[M-1];I=T.kind==="fragment"?T.originalIndex:T.originalIndex+1}return{segments:f,placed:I,height:f.length?_:0,capLeft:L,capTop:W,renderTokens:w.map(T=>T.token)}}const nT=.12,iT=2,oT=10,Fs=.25,rT=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,sT=(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=rT(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 lT(){return typeof document>"u"?null:document.body}function cT({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,hyphenate:m,showOverflowIndicator:h,dropCapLines:v,dropCapSize:b,showGuides:E,typography:f,imageUrl:w,imageFocalX:H,imageFocalY:q,imageScale:B,imageCustomPath:M,pathDragActive:_,pathCarryImage:j,onCarryImageConsumed:C,pathEditor:L,imageEditor:W}){var Te,at;const A=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[I,T]=s.useState(null),V=s.useRef(null),[S,X]=s.useState({width:0,height:0}),[P,k]=s.useState(0),[O,ie]=s.useState(null),[ae,D]=s.useState(0),[se,R]=s.useState("none");s.useEffect(()=>{!L&&!W&&R("none")},[L,W]);const[de,te]=s.useState(null);s.useEffect(()=>{if(!w||typeof Image>"u"){te(null);return}let me=!1;const Fe=new Image;return Fe.onload=()=>{me||te({width:Fe.naturalWidth,height:Fe.naturalHeight})},Fe.src=w,()=>{me=!0}},[w]);const Se=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Ce=s.useMemo(()=>ZC(Se),[Se]),ve=s.useMemo(()=>JC(Se),[Se]),ue=v>0&&b>1?((at=(Te=Ce[0])==null?void 0:Te.text)==null?void 0:at.charAt(0))??"":"",Q=(L==null?void 0:L.contours)??null,re=s.useMemo(()=>{let me=[];if(Q){const Fe=$r(Q);Fe.length&&(me=So(Fe,r))}if(!me.length){const Fe=i.trim(),Ze=Fe?zd(Fe,o,r):null;Ze&&Ze.length?me=Ze:me=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns(me,S):me},[Q,n,i,o,r,S.width,S.height]),fe=L==null?void 0:L.onConvert,he=(L==null?void 0:L.needsConversion)??!1,be=s.useMemo(()=>{if(n==="circle")return!1;const me=Q??(i.trim()?Mi(i):null);return!!(me&&Dp(me,r))},[Q,i,r,n]),[Me,Ne]=s.useState(null);nr(()=>{if(!be){Me&&Ne(null);return}!Me&&S.width>0&&S.height>0&&Ne({width:S.width,height:S.height})},[be,S.width,S.height,Me]);const we=s.useMemo(()=>{if(!be||S.width<=0||S.height<=0)return re;const me=Me??S,Fe=r.width/me.width,Ze=r.height/me.height;return re.map(dt=>dt.map(Ve=>({x:Ve.x*Fe,y:Ve.y*Ze})))},[re,be,Me,r.width,r.height,S.width,S.height]),ce=s.useMemo(()=>{if(Q){const dt=$r(Q);if(dt.length){const Ve=So(dt,r);return n==="circle"?Ns(Ve,S):Ve}}const me=M.trim(),Fe=me?zd(me,o,r):null,Ze=Fe&&Fe.length?Fe:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(Ze,S):Ze},[Q,n,M,o,r,S.width,S.height]),g=s.useMemo(()=>{if(!be||S.width<=0||S.height<=0)return ce;const me=Me??S,Fe=r.width/me.width,Ze=r.height/me.height;return ce.map(dt=>dt.map(Ve=>({x:Ve.x*Fe,y:Ve.y*Ze})))},[ce,be,Me,r.width,r.height,S.width,S.height]),Y=s.useRef(null),Z=s.useRef(!1);s.useEffect(()=>{if(!(!fe||S.width<=0||S.height<=0)){if(be){if(Y.current===i)return;const me=Q??(i.trim()?Mi(i):null);if(!(me!=null&&me.length))return;const Fe=dn(me,Ze=>({x:r.x+(Ze.x-r.x)/S.width*r.width,y:r.y+(Ze.y-r.y)/S.height*r.height}));Y.current=No(Fe),fe(Fe);return}!he||!re.length||Z.current||(Z.current=!0,fe(dn(Op(re),me=>({x:me.x*La,y:me.y*La}))))}},[he,be,fe,re,Q,i,r,S.width,S.height]);const ee=s.useCallback(()=>{const me=I;if(!me)return;const Fe=me.getBoundingClientRect(),Ze=parseFloat(window.getComputedStyle(me).paddingTop)||0;k(Ve=>Math.abs(Ve-Ze)<.5?Ve:Ze);const dt={width:Fe.width,height:Fe.height};X(Ve=>Math.abs(Ve.width-dt.width)<.5&&Math.abs(Ve.height-dt.height)<.5?Ve:dt)},[I]);nr(()=>{const me=I;if(!me||typeof ResizeObserver>"u")return;ee();const Fe=new ResizeObserver(ee);return Fe.observe(me),()=>Fe.disconnect()},[I,ee]),nr(()=>{ee()},[x,ee]),s.useEffect(()=>{const me=typeof document<"u"?document.fonts:void 0;me!=null&&me.ready&&me.ready.then(()=>{D(Fe=>Fe+1)})},[]),nr(()=>{const me=V.current;if(!me)return;if(!Ce.length){ie(null);return}const Fe=[],Ze=document.createDocumentFragment();for(const Ct of Ce){const bt=document.createElement("span");Object.assign(bt.style,nu(Ct.leaf)),bt.textContent=Ct.text,Ze.appendChild(bt),Fe.push(bt)}const dt=document.createElement("span");dt.textContent=" ",Ze.appendChild(dt);const Ve=document.createElement("span");Ve.textContent="-",Ze.appendChild(Ve);const Lt=ue||"H",ht=document.createElement("span");ht.textContent=Lt,ht.style.lineHeight="1",Ze.appendChild(ht),me.replaceChildren(Ze);const kt=window.getComputedStyle(me),Ot=parseFloat(kt.fontSize)||16,It=parseFloat(kt.lineHeight),Yt=Number.isNaN(It)?Ot*1.2:It,jt=Math.max(Yt,Ot),Xt=document.createElement("span");Xt.textContent=Lt,Xt.style.lineHeight=`${jt}px`;const Qt=document.createElement("span");Qt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Xt.appendChild(Qt),me.appendChild(Xt);const St=Xt.getBoundingClientRect().top,Zt=Qt.getBoundingClientRect().top,ft=Math.max(1,Zt-St);Xt.remove();let wt=ft*.8;const Ye=document.createElement("canvas").getContext("2d"),st=Ct=>`${kt.fontStyle} ${kt.fontWeight} ${Ct}px ${kt.fontFamily}`;if(Ye){Ye.font=st(Ot);const Ct=Ye.measureText(Lt).actualBoundingBoxAscent;Ct>0&&(wt=Ct)}const Mt=b>1?(b-1)*jt+wt:wt;let ut=Ot*(Mt/wt);if(Ye){Ye.font=st(ut);const Ct=Ye.measureText(Lt).actualBoundingBoxAscent;Ct>0&&(ut=ut*(Mt/Ct))}ht.style.fontSize=`${ut}px`,ht.style.lineHeight=`${ut}px`;const gt=document.createElement("span");gt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ht.appendChild(gt);const At=Math.max(1,gt.getBoundingClientRect().top-ht.getBoundingClientRect().top);gt.remove();const mt=(b-1)*jt+ft-At,Nt=Fe.map(Ct=>Ct.getBoundingClientRect().width),Kt=dt.getBoundingClientRect().width,Ft=Ve.getBoundingClientRect().width,_t=ue?ht.getBoundingClientRect().width:0,Vt=m?Fe.map(Ct=>{const bt=Ct.firstChild;if(!(bt instanceof Text)||bt.data.length<4)return;const z=document.createRange(),Re=Ct.getBoundingClientRect().left,Ae=[];for(let Oe=1;Oe<=bt.data.length;Oe+=1)z.setStart(bt,0),z.setEnd(bt,Oe),Ae.push(z.getBoundingClientRect().right-Re);return Ae}):[];me.replaceChildren(),ie({widths:Nt,spaceWidth:Kt,dashWidth:Ft,charWidths:Vt,lineHeight:jt,capWidth:_t,dropCapFontSize:ut,dropCapTopAdjust:mt})},[Ce,f,ue,v,b,ae,S.width,m]);const ye=O&&ue?O.capWidth+O.lineHeight*nT:0,G=Math.max(v,Math.ceil(b)),N=s.useMemo(()=>{if(!O||!Ce.length||S.width<=0||S.height<=0||!u)return 1;const me=dt=>iu({tokens:Ce,widths:O.widths,spaceWidth:O.spaceWidth,lineHeight:O.lineHeight,width:S.width,height:S.height,rings:we,mode:l,align:c,scale:dt,allowOverflow:!1,capInset:ye*dt,capLines:ue?G:0,hyphenate:m,charWidths:O.charWidths,hyphenWidth:O.dashWidth,shapeMargin:P});if(me(1).placed>=Ce.length)return 1;if(me(Fs).placed<Ce.length)return Fs;let Fe=Fs,Ze=1;for(let dt=0;dt<oT;dt+=1){const Ve=(Fe+Ze)/2;me(Ve).placed>=Ce.length?Fe=Ve:Ze=Ve}return Fe},[O,Ce,S.width,S.height,we,l,c,u,ye,ue,G,m,P]);s.useEffect(()=>{y(N)},[N,y]);const K=u?Math.min(p,N):1,ne=s.useMemo(()=>!O||!Ce.length||S.width<=0||S.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Ce}:iu({tokens:Ce,widths:O.widths,spaceWidth:O.spaceWidth,lineHeight:O.lineHeight,width:S.width,height:S.height,rings:we,mode:l,align:c,scale:K,allowOverflow:d,capInset:ye*K,capLines:ue?G:0,hyphenate:m,charWidths:O.charWidths,hyphenWidth:O.dashWidth,shapeMargin:P}),[O,Ce,S.width,S.height,we,l,c,K,d,ye,ue,G,m,P]),pe=h&&Ce.length>0&&ne.placed<Ce.length,U=O?O.dropCapFontSize*K:0,Pe=O?O.dropCapTopAdjust*K:0,le=c==="justify"?"left":c,J=O?O.lineHeight*K:0,De=ne.segments.length?ne.segments[ne.segments.length-1]:null,Xe=De?{top:De.top+J,left:De.left+De.width/2}:{top:S.height,left:S.width/2},Ue=!!(L&&Q&&S.width>0&&S.height>0),Je=!!W,et=(Ue||Je)&&S.width>0&&S.height>0,Qe=sT(I,et),it=et&&Qe?lT():null,xe=s.useRef(!1),Ie=s.useCallback(me=>{xe.current=me},[]);s.useEffect(()=>{if(!Ue&&!Je)return;const me=Fe=>{const Ze=I;if(!Ze)return;const dt=Ze.getBoundingClientRect();Fe.clientX>=dt.left&&Fe.clientX<=dt.right&&Fe.clientY>=dt.top&&Fe.clientY<=dt.bottom&&(Fe.preventDefault(),Fe.stopPropagation(),R(Lt=>Lt==="shape"&&xe.current?Lt:Lt==="shape"&&Je?"image":Ue?"shape":"image"))};return document.addEventListener("dblclick",me,!0),()=>document.removeEventListener("dblclick",me,!0)},[Ue,Je,I]);const We=s.useMemo(()=>w&&S.width>0&&S.height>0?oC(g,S):null,[w,g,S.width,S.height]),qe=s.useRef(null),je=(()=>{const me=qe.current;return j||!W||!de||!We||!me||M===me.customPath||me.shape!==n&&n!=="custom"?null:zC(me.bounds,We,de,me.focalX,me.focalY,me.scale)})();nr(()=>{if(_||!W||!de||!We)return;const me=qe.current,Fe=!!(me&&M!==me.customPath);Fe&&je&&W.onCommit(je),Fe&&j&&(C==null||C()),qe.current={rings:g,bounds:We,focalX:(je==null?void 0:je.focalX)??H,focalY:(je==null?void 0:je.focalY)??q,scale:(je==null?void 0:je.scale)??B,customPath:M,shape:n}},[_,j,M,n,g,We,W,de,H,q,B,je,C]);const ot=qe.current,nt=!!(_&&!j&&ot&&!je),Ee=nt&&ot?ot.focalX:(je==null?void 0:je.focalX)??H,Be=nt&&ot?ot.focalY:(je==null?void 0:je.focalY)??q,tt=nt&&ot?ot.scale:(je==null?void 0:je.scale)??B,_e=nt&&ot?ot.bounds:We,He=s.useMemo(()=>{if(!(S.width>0)||!(S.height>0))return"";let me=jd(i,Q,o,r,n,S);if(be){const Fe=Me??S,Ze=r.width/Fe.width,dt=r.height/Fe.height;me=dn(me,Ve=>({x:Ve.x*Ze,y:Ve.y*dt}))}return Vd(me,S)||Dd(we,S)},[i,Q,o,r,n,S.width,S.height,be,Me,we]),xt=s.useMemo(()=>{if(!w||!(S.width>0)||!(S.height>0))return"";let me=jd(M,Q,o,r,n,S);if(be){const Fe=Me??S,Ze=r.width/Fe.width,dt=r.height/Fe.height;me=dn(me,Ve=>({x:Ve.x*Ze,y:Ve.y*dt}))}return Vd(me,S)||Dd(g,S)},[w,M,Q,o,r,n,S.width,S.height,be,Me,g]),rt=`${A}-clip`,ze=s.useMemo(()=>{if(!_e)return null;const me=de??{width:_e.width,height:_e.height},Fe=Vi(_e,me,tt);return{x:Bn(_e.width,Fe.width,Ee),y:Bn(_e.height,Fe.height,Be),width:Fe.width,height:Fe.height}},[_e,de,Ee,Be,tt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x},ref:T,children:[He?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:S.width,height:S.height},viewBox:`0 0 ${S.width} ${S.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:He,fillRule:"evenodd"}),w&&xt&&_e&&ze?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:rt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:xt,fillRule:"evenodd"})})}),a.jsx("image",{href:w,x:_e.x+ze.x,y:_e.y+ze.y,width:ze.width,height:ze.height,preserveAspectRatio:"none",clipPath:`url(#${rt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:K,top:0,left:0,width:S.width,height:S.height},children:[a.jsx("div",{className:`${e}-measure`,ref:V,style:f,"aria-hidden":!0}),ne.segments.map((me,Fe)=>{const Ze=ne.renderTokens.slice(me.from,me.to),dt=Fe===0;return a.jsx("div",{className:`${e}-line${me.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${me.top}px`,left:`${me.left}px`,width:`${me.width}px`,textAlign:me.justify?void 0:le},children:Ze.map((Ve,Lt)=>{const kt=ue&&dt&&me.from===0&&Lt===0?Ve.text.slice(1):Ve.text,Ot=nu(Ve.leaf),It=Ve.href?a.jsx("a",{className:`${e}-link`,href:Ve.href,target:Ve.target,rel:Ve.target?"noopener noreferrer":void 0,style:Ot,children:kt}):a.jsx("span",{style:Ot,children:kt});return a.jsxs("span",{children:[!me.justify&&Lt>0?" ":null,It]},Lt)})},`${me.from}-${me.to}-${Fe}`)}),E&&!Q&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:we.map((me,Fe)=>a.jsx("polygon",{points:me.map(Ze=>`${Ze.x},${Ze.y}`).join(" ")},Fe))})]}),ue&&O&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${ne.capTop+Pe}px`,left:`${ne.capLeft}px`,fontSize:`${U}px`,lineHeight:`${U}px`},children:ue}),it&&Qe&&(Q&&L||W)&&Un.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,zIndex:iT,pointerEvents:"none"},children:[Q&&L&&a.jsx(qC,{P:e,box:{width:Qe.width,height:Qe.height},viewBox:r,contours:Q,snap:L.snap,stretchToBox:!be,uniformStretch:n==="circle",stage:se,onStageChange:R,onSelectionChange:Ie,onChange:L.onChange,onCommit:L.onCommit}),W&&_e&&a.jsx(BC,{P:e,box:{width:Qe.width,height:Qe.height},bounds:_e,natural:de,imageUrl:w,maskPath:xt,stage:se,onStageChange:R,focalX:Ee,focalY:Be,scale:tt,onChange:W.onChange,onCommit:W.onCommit})]}),it),a.jsx("div",{className:`${e}-a11y`,children:ve.map((me,Fe)=>a.jsx("p",{children:me},Fe))}),pe&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Xe.top,left:Xe.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 Gp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],dT={x:0,y:0,width:100,height:100},uT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?dT:{x:t[0],y:t[1],width:t[2],height:t[3]}},pT=e=>`
27523
+ `;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 J$=ql(""),eC=ql("open"),tC=ql("compact"),nC=["__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"],iC=["__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"],oC=["__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"},rC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],aC=["iconColor","logoColor","linkColor","backgroundColor"],sC={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:[...rC]}},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}},...J$,...eC,...tC},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:nC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:iC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:oC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...aC],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"]},lC={element:Q$,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:sC,sourceCode:Z$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,cC=.12,Ul={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 Ia(e){return e<0?0:e>1?1:e}function Dd(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 dC(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,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}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 uC(e){return e.map(([t,n])=>({x:t,y:n}))}function Ms(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 pC(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=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return mC(i)}function mC(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 gC(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 hC(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 fC(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 yC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=pC(e,l),d=i==="avoid"?hC(c):c;if(o=o===null?d:gC(o,d),o.length===0)return[]}return o??[]}function zd(e,t="stretch",n=Ul){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):Ms(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",v),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let b=0;b<Wd;b+=1){const S=x.getPointAtLength(b/Wd*m);h.push({x:S.x,y:S.y})}p.push(h)}return p.length?t==="viewbox"?$o(p,n):Ms(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):Ms([r])}const Kl={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"},Zs="0 0 100 100",La=100,Js=16,vC=12,xC=16,Rs=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,bC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Bd=Math.PI/4,SC=8,wC=Math.PI/18,$C=8,fo=24,yo=[];function CC(){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 Es(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function TC(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 IC(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 jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?Es(d,i):TC(d))}if(!l.length){const d=o!=="custom"?Kl[o]:void 0;d?l=Es(ki(d),Ul):l=CC()}}return o==="circle"?IC(l,r):l}function Vd(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 el(e){const t=e==="rectangle"||e==="custom"?void 0:Kl[e];return t?$o($r(ki(t)),Ul):[uC([[0,0],[1,0],[1,1],[0,1]])]}function LC(e){const t=e.match(bC);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 tl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function mn(e){return{x:e.x,y:e.y}}function PC(e){return{p:mn(e.p),in:e.in?mn(e.in):null,out:e.out?mn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(PC)}))}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 Gd(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 MC(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:mn(e),c2:mn(l),p:mn(l)}];const u=i*Math.PI/180,p=Math.cos(u),v=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*x+v*m,b=-v*x+p*m,S=h*h/(c*c)+b*b/(d*d);if(S>1){const K=Math.sqrt(S);c*=K,d*=K}const R=o===r?-1:1,y=c*c*b*b+d*d*h*h,C=Math.max(0,c*c*d*d-y),E=y===0?0:R*Math.sqrt(C/y),G=E*c*b/d,H=-E*d*h/c,O=p*G-v*H+(e.x+l.x)/2,F=v*G+p*H+(e.y+l.y)/2,D=Math.atan2((b-H)/d,(h-G)/c);let L=Math.atan2((-b-H)/d,(-h-G)/c)-D;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const z=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),k=L/z,$=4/3*Math.tan(k/4),P=(K,M)=>({x:O+p*c*K-v*d*M,y:F+v*c*K+p*d*M}),q=[];let _=D;for(let K=0;K<z;K+=1){const M=_+k,f=Math.cos(_),X=Math.sin(_),oe=Math.cos(M),ue=Math.sin(M);q.push({c1:P(f-$*X,X+$*f),c2:P(oe+$*ue,ue-$*oe),p:K===z-1?mn(l):P(oe,ue)}),_=M}return q}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:qn(h??null,m),out:null}),r=m},v=m=>{if(!i.length)return;const h=i[i.length-1];h.out=qn(m,h.p)};Rs.lastIndex=0;let x=Rs.exec(t);for(;x!==null;){const m=x[1],h=m.toUpperCase(),b=m!==h,S=LC(x[2]),R=y=>b?{x:r.x+S[y],y:r.y+S[y+1]}:{x:S[y],y:S[y+1]};if(h==="Z")o=!0,u(),r=mn(l),c=null,d=null;else if(h==="M"){for(let y=0;y+1<S.length;y+=2){const C=R(y);y===0&&(u(),l=mn(C)),p(C)}c=null,d=null}else if(h==="L"){for(let y=0;y+1<S.length;y+=2)p(R(y));c=null,d=null}else if(h==="H"){for(const y of S)p({x:b?r.x+y:y,y:r.y});c=null,d=null}else if(h==="V"){for(const y of S)p({x:r.x,y:b?r.y+y:y});c=null,d=null}else if(h==="C"){for(let y=0;y+5<S.length;y+=6){const C=R(y),E=R(y+2),G=R(y+4);v(C),p(G,E),c=E}d=null}else if(h==="S"){for(let y=0;y+3<S.length;y+=4){const C=c?tl(c,r):mn(r),E=R(y),G=R(y+2);v(C),p(G,E),c=E}d=null}else if(h==="Q")for(let y=0;y+3<S.length;y+=4){const C=R(y),E=R(y+2);v(Ln(r,C,2/3)),p(E,Ln(E,C,2/3)),d=C,c=null}else if(h==="T")for(let y=0;y+1<S.length;y+=2){const C=d?tl(d,r):mn(r),E=R(y);v(Ln(r,C,2/3)),p(E,Ln(E,C,2/3)),d=C,c=null}else if(h==="A")for(let y=0;y+6<S.length;y+=7){const C=b?{x:r.x+S[y+5],y:r.y+S[y+6]}:{x:S[y+5],y:S[y+6]};for(const E of MC(r,S[y],S[y+1],S[y+2],S[y+3]!==0,S[y+4]!==0,C))v(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 qn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Bp(e){return!!(qn(e.in,e.p)||qn(e.out,e.p))}function Vo(e,t){return!qn(e.out,e.p)&&!qn(t.in,t.p)}function Xd(e,t){if(Vo(e,t))return`L${Bn(t.p.x)},${Bn(t.p.y)}`;const n=qn(e.out,e.p)??e.p,i=qn(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(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function jp(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 nl(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 jp(n)){if(Vo(o.from,o.to)){i.push(mn(o.from.p));continue}for(let r=0;r<Js;r+=1)i.push(nl(o.from,o.to,r/Js))}n.closed||i.push(mn(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 RC(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 Vp(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 Gp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=vC)return{closed:!0,nodes:t.map(r=>({p:mn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/xC)),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:mn(r),...Vp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Xp(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 EC(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,v=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+v/d}})}function kC(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:La,height:La},n=e!=="custom"?Kl[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(Gp(el("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=kC(i,t);return{shape:e,customPath:Ho(o),pathFit:"viewbox",pathViewBox:Zs}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function AC(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 FC(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=Up(i,r,c)}),i}function NC(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]=mn(o),r){const p=i==="in"?"out":"in";d[p]=tl(o,d.p)}return c}function _C(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 HC(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,v=l.in??l.p,x=Ln(r.p,p,i),m=Ln(p,v,i),h=Ln(v,l.p,i),b=Ln(x,m,i),S=Ln(m,h,i),R=Ln(b,S,i),y=(n+1)%o.nodes.length;return d[n].out=x,d[y].in=h,d.splice(u,0,{p:R,in:b,out:S}),{contours:c,nodeIndex:u}}function Up(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 Ud(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,v=!!qn(l[u].out,l[u].p),x=!!qn(l[p].in,l[p].p);if(Bp(c)||v||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Vp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function WC(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 Kd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of jp(i)){const l=Vo(r.from,r.to)?1:Js;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=WC(t,nl(r.from,r.to,d),nl(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 OC(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 Yd(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 Qd(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 DC(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 zC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function il(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 BC(e,t){const n=il(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 ol(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 Zd(e,t,n,i,o){if(e.axis===null)return BC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return ol(o(r)[t],t,i)}function jC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function VC(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 il(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 il(i(p),r)}function GC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,v=Math.hypot(u,p);if(v<1e-6)return{point:e,guides:yo};const x=Math.atan2(p,u),m=Math.round(x/Bd)*Bd;let h=o?m:null,b=!1;if(!o){const H=[];n&&H.push({angle:Math.atan2(n.y,n.x),smooth:!0}),H.push({angle:m,smooth:!1});for(const O of H){const F=zC(O.angle-x);if(!(Math.abs(F)>wC)&&!(Math.abs(Math.sin(F))*v>SC)){h=O.angle,b=O.smooth;break}}}const S=i!==null&&i>0&&Math.abs(v-i)<=$C;if(h===null&&!S)return{point:e,guides:yo};const R=h??x,y=S?i:v,C={x:Math.cos(R),y:Math.sin(R)},E=y+(h===null?0:fo),G=S?y:b?fo:0;return{point:l({x:c.x+C.x*y,y:c.y+C.y*y}),guides:[{kind:"angle",a:{x:c.x-C.x*G,y:c.y-C.y*G},b:{x:c.x+C.x*E,y:c.y+C.y*E}}]}}const rl=.1,al=8,XC=4,Jd=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}}},Kp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},sl=(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*Jd,y:n.y+o*Jd}},ll=(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),qi=(e,t,n)=>{const i=ll(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)<XC?.5:Ia(r)},qC=(e,t,n,i,o,r)=>{const l=qi(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=ll(e,n),p=ll(t,n),v=Math.min(al,Math.max(rl,p>0?r*(u/p):r)),x=qi(t,n,v);return{focalX:vo(t.width,x.width,c-t.x,{clamp:!1}),focalY:vo(t.height,x.height,d-t.y,{clamp:!1}),scale:v}},UC=6,KC=3,YC=2,ks="­",QC=new RegExp("\\p{L}","gu"),eu=20,ZC={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"},cl={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)},JC=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let tu=null;const eT=()=>(tu??(tu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),tu),nu=new Map,tT=e=>{let t=nu.get(e);return t||(t=cl[e]().then(n=>JC(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),nu.set(e,t)),t},iu=e=>{if(!e)return null;const t=e.toLowerCase();if(cl[t])return t;const n=t.split("-")[0];return cl[n]?n:null},nT=(e,t)=>{const n=t.trim();if(n.length<eu)return;const i=e(n,{minLength:eu});if(i!=="und")return ZC[i]??i},iT={hyphenateSync:null};function oT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return eT().then(async r=>{const l=r?nT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=iu(l)??iu(c)??"en",u=await tT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:iT}const ou=e=>{var t;return((t=e.match(QC))==null?void 0:t.length)??0};function rT(e,t){if(e.length<2||e.includes(ks))return;const n=new Set;if(t){const o=t(e,{hyphenChar:ks,minWordLength:UC});let r=0;for(let l=0;l<o.length;l+=1)o[l]===ks?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&&ou(e.slice(0,o))>=(r?1:KC)&&ou(e.slice(o))>=(r?1:YC)}).sort((o,r)=>o-r);return i.length?i:void 0}const ru=1.08,na=14,ia=8;function aT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:v,onCommit:x}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,b=s.useRef(null),S=s.useRef(null),R=s.useRef({focalX:d,focalY:u,scale:p});R.current={focalX:d,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var k;y&&((k=m.current)==null||k.focus({preventScroll:!0}))},[y]);const C=s.useCallback((k,$)=>{var q;const P=(q=m.current)==null?void 0:q.getBoundingClientRect();return!P||P.width<=0||P.height<=0?{x:0,y:0}:{x:(k-P.left)/P.width*t.width,y:($-P.top)/P.height*t.height}},[t.width,t.height]),E=k=>{var P,q;if(!i)return;k.stopPropagation(),k.preventDefault(),(P=m.current)==null||P.focus({preventScroll:!0});const $=qi(n,i,p);b.current={pointerId:k.pointerId,origin:C(k.clientX,k.clientY),startX:jn(n.width,$.width,d),startY:jn(n.height,$.height,u),width:$.width,height:$.height,moved:!1},(q=m.current)==null||q.setPointerCapture(k.pointerId)},G=(k,$)=>{var oe,ue;if(!i)return;k.stopPropagation(),k.preventDefault(),(oe=m.current)==null||oe.focus({preventScroll:!0});const P=qi(n,i,p),q=jn(n.width,P.width,d),_=jn(n.height,P.height,u),K={minX:q,minY:_,maxX:q+P.width,maxY:_+P.height},M=Pa(K,Kp($)),f=Pa(K,$),X=Math.hypot(f.x-M.x,f.y-M.y);!isFinite(X)||X<=0||(S.current={pointerId:k.pointerId,anchor:M,startDistance:X,startScale:p,startX:q,startY:_,moved:!1},(ue=m.current)==null||ue.setPointerCapture(k.pointerId))},H=k=>{if(!i)return;const $=S.current;if($&&k.pointerId===$.pointerId){k.stopPropagation(),k.preventDefault();const q=C(k.clientX,k.clientY),_={x:q.x-n.x,y:q.y-n.y},K=Math.hypot(_.x-$.anchor.x,_.y-$.anchor.y),M=Math.min(al,Math.max(rl,$.startScale*(K/$.startDistance)));if(!$.moved&&Math.abs(M-$.startScale)<1e-4)return;$.moved=!0;const f=M/$.startScale,X=$.anchor.x+($.startX-$.anchor.x)*f,oe=$.anchor.y+($.startY-$.anchor.y)*f,ue=qi(n,i,M);v({focalX:vo(n.width,ue.width,X),focalY:vo(n.height,ue.height,oe),scale:M});return}const P=b.current;if(P&&k.pointerId===P.pointerId){k.stopPropagation(),k.preventDefault();const q=C(k.clientX,k.clientY),_=q.x-P.origin.x,K=q.y-P.origin.y;if(!P.moved&&_===0&&K===0)return;P.moved=!0,v({focalX:vo(n.width,P.width,P.startX+_),focalY:vo(n.height,P.height,P.startY+K),scale:p})}},O=k=>{var q,_;const $=b.current;if($&&k.pointerId===$.pointerId){b.current=null,k.stopPropagation(),(q=m.current)!=null&&q.hasPointerCapture($.pointerId)&&m.current.releasePointerCapture($.pointerId),$.moved&&x(R.current);return}const P=S.current;P&&k.pointerId===P.pointerId&&(S.current=null,k.stopPropagation(),(_=m.current)!=null&&_.hasPointerCapture(P.pointerId)&&m.current.releasePointerCapture(P.pointerId),P.moved&&x(R.current))},F=k=>{if(k.key==="Escape"){k.stopPropagation(),c("none");return}if(k.key==="="||k.key==="+"||k.key==="-"||k.key==="_"){k.preventDefault(),k.stopPropagation();const $=k.key==="="||k.key==="+",P=Math.min(al,Math.max(rl,p*($?ru:1/ru))),q={focalX:d,focalY:u,scale:P};v(q),x(q)}},D=["nw","ne","se","sw"],I={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const k=i??{width:n.width,height:n.height},$=qi(n,k,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]),z=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:I;return a.jsxs("svg",{ref:m,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:F,onPointerMove:H,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),y&&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})]}),y&&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}),D.map(k=>{const $=sl(z,k),P=k==="ne"||k==="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${P?` ${e}-editor-scale-grab-nesw`:""}`,x:$.x-na/2,y:$.y-na/2,width:na,height:na,onPointerDown:q=>G(q,k)})]},k)})]})]})}const dl=10,sT=dl*2,zn=7,lT=4,lo=9,cT=3.5,au=1.08,dT=.05,oa=14,uT=1,ra=14,aa=8;function pT({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:v}){const x=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const b=s.useRef(null),S=s.useRef(null),R=s.useRef(null),y=s.useRef(null),[C,E]=s.useState([]),[G,H]=s.useState(yo),[O,F]=s.useState(null),D=s.useCallback(g=>{H(V=>DC(V,g)?V:g)},[]),I=c==="shape";s.useEffect(()=>{var g;I&&((g=x.current)==null||g.focus({preventScroll:!0}))},[I]),s.useEffect(()=>{I||E(g=>g.length?[]:g)},[I]);const L=C.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const z=n.width>0?t.width/n.width:1,k=n.height>0?t.height/n.height:1,$=Math.min(z,k),P=r&&l?$:z,q=r&&l?$:k,_=r&&l?(t.width-n.width*$)/2:0,K=r&&l?(t.height-n.height*$)/2:0,M=s.useCallback(g=>r?{x:_+(g.x-n.x)*P,y:K+(g.y-n.y)*q}:{x:g.x-n.x,y:g.y-n.y},[r,n,P,q,_,K]),f=s.useCallback(g=>r?{x:n.x+(P>0?(g.x-_)/P:0),y:n.y+(q>0?(g.y-K)/q:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,P,q,_,K]),X=s.useMemo(()=>f({x:t.width/2,y:t.height/2}),[f,t.width,t.height]),oe=s.useCallback((g,V)=>{var te;const Y=(te=x.current)==null?void 0:te.getBoundingClientRect();if(!Y||Y.width<=0||Y.height<=0)return{x:0,y:0};if(r){const ge=(g-Y.left)/Y.width*t.width,ee=(V-Y.top)/Y.height*t.height;return{x:n.x+(P>0?(ge-_)/P:0),y:n.y+(q>0?(ee-K)/q:0)}}return{x:n.x+(g-Y.left),y:n.y+(V-Y.top)}},[r,n,t.width,t.height,P,q,_,K]),ue=s.useCallback((g,V)=>{var te;const Y=(te=x.current)==null?void 0:te.getBoundingClientRect();return!Y||Y.width<=0||Y.height<=0?{x:0,y:0}:{x:(g-Y.left)/Y.width*t.width,y:(V-Y.top)/Y.height*t.height}},[t.width,t.height]),N=s.useCallback((g,V)=>{const Y=l&&!(V!=null&&V.preserveShape)?EC(g,n,t,_,K,P,q):g;v(Y,V)},[v,l,n,t,_,K,P,q]),se=s.useCallback(()=>{F(null)},[]),T=s.useCallback((g,V,Y)=>{if(!Y||b.current||S.current||R.current||y.current){se();return}const te=ue(g,V),ge=un(h.current,M);for(const j of ge)for(const Pe of j.nodes)if(Math.hypot(Pe.p.x-te.x,Pe.p.y-te.y)<=lo){se();return}const ee=Kd(ge,te);if(!ee||ee.distance>dl){se();return}const B=ge[ee.contour],Z=B==null?void 0:B.nodes[ee.segment],U=B==null?void 0:B.nodes[(ee.segment+1)%((B==null?void 0:B.nodes.length)??1)],de=!!(Z&&U&&!Vo(Z,U));F(j=>j&&j.curved===de&&Math.hypot(j.point.x-ee.point.x,j.point.y-ee.point.y)<.25?j:{point:ee.point,curved:de})},[ue,M,se]),me=g=>{var Ge;const V=g.metaKey||g.ctrlKey,Y=R.current;if(Y&&g.pointerId===Y.pointerId){if(g.stopPropagation(),g.preventDefault(),Y.startDistance<=0)return;const Be=oe(g.clientX,g.clientY),qe=Math.hypot(Be.x-Y.origin.x,Be.y-Y.origin.y),Ye=Math.max(dT,qe/Y.startDistance);if(!Y.moved&&Math.abs(Ye-1)<1e-4)return;Y.moved=!0,p(Gd(Y.startContours,Y.origin,Ye));return}const te=S.current;if(te&&g.pointerId===te.pointerId){g.stopPropagation(),g.preventDefault();const Be=oe(g.clientX,g.clientY),{bbox:qe}=te,Ye=qe.maxX-qe.minX,nt=qe.maxY-qe.minY,it=Be.x-te.origin.x,ve=Be.y-te.origin.y;let Te=it,We=ve;if(isFinite(Ye)&&isFinite(nt))if(r){let Ze=n.x,lt=n.x+n.width,ot=n.y,Me=n.y+n.height;l&&(P>0&&(Ze=n.x+(0-_)/P,lt=n.x+(t.width-_)/P),q>0&&(ot=n.y+(0-K)/q,Me=n.y+(t.height-K)/q));const ze=Math.min(Ze,lt-Ye),et=Math.max(Ze,lt-Ye),Oe=Math.min(ot,Me-nt),Ne=Math.max(ot,Me-nt),yt=Math.min(et,Math.max(ze,qe.minX+it)),je=Math.min(Ne,Math.max(Oe,qe.minY+ve));Te=yt-qe.minX,We=je-qe.minY}else{const Ze=qe.minX-n.x,lt=qe.minY-n.y,ot=Math.min(0,t.width-Ye),Me=Math.max(0,t.width-Ye),ze=Math.min(0,t.height-nt),et=Math.max(0,t.height-nt),Oe=Math.min(Me,Math.max(ot,Ze+it)),Ne=Math.min(et,Math.max(ze,lt+ve));Te=Oe-Ze,We=Ne-lt}const Ke=[];if(!V&&isFinite(Ye)&&isFinite(nt)){const Ze=M({x:qe.minX+Ye/2+Te,y:qe.minY+nt/2+We}),lt={x:t.width/2,y:t.height/2};Math.abs(Ze.x-lt.x)<=oa&&(Te=X.x-qe.minX-Ye/2,Ke.push(ol(lt.x,"x",t))),Math.abs(Ze.y-lt.y)<=oa&&(We=X.y-qe.minY-nt/2,Ke.push(ol(lt.y,"y",t)))}if(!te.moved&&Te===0&&We===0)return;te.moved=!0,D(Ke.length?Ke:yo),p(un(te.startContours,Ze=>({x:Ze.x+Te,y:Ze.y+We})),{carryImage:!0});return}const ge=y.current;if(ge&&g.pointerId===ge.pointerId){g.stopPropagation(),g.preventDefault();const Be=oe(g.clientX,g.clientY);let qe=Be.x-ge.origin.x,Ye=Be.y-ge.origin.y;if(g.shiftKey&&(Math.abs(qe)>Math.abs(Ye)?Ye=0:qe=0),!ge.moved&&qe===0&&Ye===0)return;ge.moved=!0,p(qd(ge.startContours,ge.selection,qe,Ye));return}const ee=b.current;if(!ee||g.pointerId!==ee.pointerId){T(g.clientX,g.clientY,C.length>0||I);return}se(),g.stopPropagation(),g.preventDefault();const B=oe(g.clientX,g.clientY);if(ee.kind==="anchor"){const Be={x:ee.anchor.x+(B.x-ee.origin.x),y:ee.anchor.y+(B.y-ee.origin.y)},qe=V?[]:OC(h.current,{contour:ee.contour,node:ee.node}),Ye=V||!ee.center?[]:[ee.center],nt=Qd(Yd(qe,Ye.map(Te=>Te.x),"x"),Be,"x",M,oa),it=Qd(Yd(qe,Ye.map(Te=>Te.y),"y"),Be,"y",M,oa),ve=V?Be:{x:(nt==null?void 0:nt.value)??ta(Be.x,o),y:(it==null?void 0:it.value)??ta(Be.y,o)};if(g.shiftKey&&(Math.abs(ve.x-ee.anchor.x)>Math.abs(ve.y-ee.anchor.y)?ve.y=ee.anchor.y:ve.x=ee.anchor.x),!ee.moved&&ve.x===ee.anchor.x&&ve.y===ee.anchor.y)return;ee.moved=!0,D(jC(ve,nt,it,t,M)),p(AC(h.current,ee.contour,ee.node,ve));return}const Z=(Ge=h.current[ee.contour])==null?void 0:Ge.nodes[ee.node],U=ee.mirror&&!g.altKey,de=U||V?null:ee.kind==="in"?Z==null?void 0:Z.out:Z==null?void 0:Z.in,j=Z?M(Z.p):null,Pe=de?M(de):null,ne=Z&&(!V||g.shiftKey)?GC(B,Z.p,U||V?null:VC(h.current[ee.contour],ee.node,ee.kind,M),j&&Pe?Math.hypot(Pe.x-j.x,Pe.y-j.y):null,g.shiftKey,M,f):{point:B,guides:yo},Q=ne.guides.length?ne.point:V?B:{x:ta(B.x,o),y:ta(B.y,o)},_e=ee.kind==="in"?Z==null?void 0:Z.in:Z==null?void 0:Z.out;!ee.moved&&_e&&Q.x===_e.x&&Q.y===_e.y||(ee.moved=!0,D(ne.guides),p(NC(h.current,ee.contour,ee.node,ee.kind,Q,U)))},J=g=>{D(yo);const V=R.current;if(V&&g.pointerId===V.pointerId){R.current=null,g.stopPropagation();const de=x.current;de!=null&&de.hasPointerCapture(V.pointerId)&&de.releasePointerCapture(V.pointerId),V.moved&&N(h.current,{preserveShape:!0});return}const Y=S.current;if(Y&&g.pointerId===Y.pointerId){S.current=null,g.stopPropagation();const de=x.current;de!=null&&de.hasPointerCapture(Y.pointerId)&&de.releasePointerCapture(Y.pointerId),Y.moved?N(h.current,{preserveShape:!0}):E([]);return}const te=y.current;if(te&&g.pointerId===te.pointerId){y.current=null,g.stopPropagation();const de=x.current;de!=null&&de.hasPointerCapture(te.pointerId)&&de.releasePointerCapture(te.pointerId),te.moved&&N(h.current);return}const ge=b.current;if(!ge||g.pointerId!==ge.pointerId)return;b.current=null,g.stopPropagation();const ee=x.current;ee!=null&&ee.hasPointerCapture(ge.pointerId)&&ee.releasePointerCapture(ge.pointerId);const B=Math.hypot(g.clientX-ge.clientOrigin.x,g.clientY-ge.clientOrigin.y);if(ge.moved||B>lT){ge.moved&&N(h.current);return}if(!ge.toggleOnRelease||g.type!=="pointerup")return;const U=Ud(h.current,ge.contour,ge.node);U!==h.current&&(p(U),N(U))},we=g=>{g.stopPropagation()},Le=g=>{var V,Y;g.stopPropagation(),g.preventDefault(),se(),(V=x.current)==null||V.focus({preventScroll:!0}),S.current={pointerId:g.pointerId,origin:oe(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(Y=x.current)==null||Y.setPointerCapture(g.pointerId)},he=(g,V)=>{var B,Z;g.stopPropagation(),g.preventDefault(),se(),(B=x.current)==null||B.focus({preventScroll:!0}),E([]),d("shape");const Y=Li(i),te=Pa(Y,Kp(V)),ge=sl(Y,V),ee=Math.hypot(ge.x-te.x,ge.y-te.y);!isFinite(ee)||ee<=0||(R.current={pointerId:g.pointerId,corner:V,origin:te,startDistance:ee,startContours:Vn(i),moved:!1},(Z=x.current)==null||Z.setPointerCapture(g.pointerId))},fe=(g,V,Y,te)=>{var B,Z,U,de;g.stopPropagation(),g.preventDefault(),se(),(B=x.current)==null||B.focus({preventScroll:!0});const ge=(Z=i[Y])==null?void 0:Z.nodes[te];if(!ge)return;if(g.altKey){const j=V==="anchor"?Up(i,Y,te):_C(i,Y,te,V);if(j===i)return;E(V==="anchor"?[]:[{contour:Y,node:te}]),p(j),N(j);return}const ee=g.metaKey||g.ctrlKey;if(V==="anchor"&&g.shiftKey&&!ee){E(j=>j.some(Pe=>Pe.contour===Y&&Pe.node===te)?j.filter(Pe=>!(Pe.contour===Y&&Pe.node===te)):[...j,{contour:Y,node:te}]);return}if(V==="anchor"&&!ee&&C.length>1&&C.some(j=>j.contour===Y&&j.node===te)){y.current={pointerId:g.pointerId,origin:oe(g.clientX,g.clientY),startContours:Vn(i),selection:C,moved:!1},(U=x.current)==null||U.setPointerCapture(g.pointerId);return}E([{contour:Y,node:te}]),b.current={kind:V,contour:Y,node:te,pointerId:g.pointerId,origin:oe(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ge.p,center:RC(i),mirror:V!=="anchor"&&!!(ge.in&&ge.out),toggleOnRelease:ee,moved:!1},(de=x.current)==null||de.setPointerCapture(g.pointerId)},ie=g=>{g.stopPropagation(),g.preventDefault(),se();const V=un(i,M),Y=Kd(V,ue(g.clientX,g.clientY));if(!Y||Y.distance>dl)return;const{contours:te,nodeIndex:ge}=HC(i,Y.contour,Y.segment,Y.t);ge<0||(E([{contour:Y.contour,node:ge}]),p(te),N(te))},re=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const ee=Li(i);if(!isFinite(ee.minX)||!isFinite(ee.maxX))return;const B={x:(ee.minX+ee.maxX)/2,y:(ee.minY+ee.maxY)/2},U=g.key==="="||g.key==="+"?au:1/au,de=Gd(i,B,U);p(de),N(de,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),E([]),d("none");return}if(!C.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const ee=FC(i,C);if(ee===i)return;E([]),p(ee),N(ee);return}const V=o>0?o:uT,Y=g.shiftKey?V*10:V,te={ArrowLeft:[-Y,0],ArrowRight:[Y,0],ArrowUp:[0,-Y],ArrowDown:[0,Y]}[g.key];if(!te)return;g.preventDefault(),g.stopPropagation();const ge=qd(i,C,te[0],te[1]);p(ge),N(ge)},ae=s.useMemo(()=>Ho(un(i,M)),[i,M]),pe=s.useMemo(()=>Li(i),[i]),be=M({x:pe.minX,y:pe.minY}),ke={width:M({x:pe.maxX,y:pe.minY}).x-be.x,height:M({x:pe.minX,y:pe.maxY}).y-be.y},Fe=I&&C.length===0&&isFinite(pe.minX)&&isFinite(pe.maxX)&&pe.maxX>pe.minX&&pe.maxY>pe.minY,xe=C.length>0||I,le=xe;return a.jsxs("svg",{ref:x,className:`${e}-editor${xe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:re,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:me,onPointerLeave:se,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,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:ie}),le&&a.jsx("path",{className:`${e}-editor-outline`,d:ae}),le&&G.map((g,V)=>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}-${V}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:ae,fillRule:"evenodd",onPointerDown:Le,onClick:ie}),le&&a.jsx("path",{className:`${e}-editor-hit`,d:ae,style:{strokeWidth:sT},onClick:ie}),le&&O&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:O.point.x-zn/2,y:O.point.y-zn/2,width:zn,height:zn,rx:O.curved?zn/2:0}),le&&i.map((g,V)=>g.nodes.map((Y,te)=>{const ge=C.some(B=>B.contour===V&&B.node===te),ee=M(Y.p);return a.jsxs("g",{children:[ge&&C.length===1&&["in","out"].map(B=>{const Z=Y[B];if(!Z)return null;const U=M(Z);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:ee.x,y1:ee.y,x2:U.x,y2:U.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:U.x,cy:U.y,r:cT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:U.x,cy:U.y,r:lo,onPointerDown:de=>fe(de,B,V,te),onClick:we})]},B)}),a.jsx("rect",{className:`${e}-editor-anchor${ge?` ${e}-editor-anchor-selected`:""}`,x:ee.x-zn/2,y:ee.y-zn/2,width:zn,height:zn,rx:Bp(Y)?zn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:ee.x-lo,y:ee.y-lo,width:lo*2,height:lo*2,onPointerDown:B=>fe(B,"anchor",V,te),onClick:we,onDoubleClick:B=>{B.stopPropagation(),B.preventDefault();const Z=Ud(i,V,te);p(Z),N(Z)}})]},`${V}-${te}`)})),Fe&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:be.x,y:be.y,width:ke.width,height:ke.height}),["nw","ne","se","sw"].map(g=>{const V=M(sl(pe,g)),Y=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:V.x-aa/2,y:V.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${Y?` ${e}-editor-scale-grab-nesw`:""}`,x:V.x-ra/2,y:V.y-ra/2,width:ra,height:ra,onPointerDown:te=>he(te,g),onClick:we})]},g)})]})]})}const mT=4e3,gT=/^(?:https?:|mailto:|tel:)/i;function Yp(e){return!!e&&typeof e=="object"&&e.type==="link"}function hT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!gT.test(t)))return t}function fT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Yp(d)){o(d.children??[],hT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const v of p.split(/\s+/))v&&t.push({text:v,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function su(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 yT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Yp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function vT(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,b=m.y*i;h<c&&(c=h),h>d&&(d=h),b<u&&(u=b),b>p&&(p=b)}const v=(c+d)/2,x=(u+p)/2;return l.map(m=>{const h=m.x*n,b=m.y*i,S=h-v,R=b-x,y=Math.sqrt(S*S+R*R);if(y<1e-6)return m;const E=Math.max(0,y+r*t)/y;return{x:(v+S*E)/n,y:(x+R*E)/i}})})}const xT=.75;function lu(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 v=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,m=x+(v?r:0);if(!(m*o>i))return{chars:p,fragmentText:v?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-x)}}return null}function cu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:v}=e,x=!!e.hyphenate,m=e.charWidths??[],h=e.hyphenPoints??[],b=e.hyphenWidth??0,S=e.lineHeight*l,R=e.spaceWidth*l,y=Math.max(0,e.shapeMargin??0),C=[],E=t.map((M,f)=>({token:M,originalIndex:f,width:n[f],kind:"whole",offset:0}));if(!E.length||c<=0||S<=0)return{segments:C,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const G=Math.max(1,R*.5),H=S*cC,O=vT(i,y,c,d,o),F=Math.max(1,Math.floor(e.columns??1)),D=F>1?Math.max(0,e.columnGap??0):0,I=(c-D*(F-1))/F;let L=0,z=0,k=0,$=0,P=0,q=null;const _=(M,f,X)=>yC(O,(M+H)/d,(M+S-H)/d,o).map(oe=>({x0:Math.max(f,oe.x0*c),x1:Math.min(X,oe.x1*c)})).filter(oe=>oe.x1>oe.x0);for(let M=0;M<F&&L<E.length&&I>0;M+=1){const f=M*(I+D),X=f+I,oe=u&&M===F-1;let ue=0;for(let T=0;T+S<=d;T+=S)for(const me of _(T,f,X))ue=Math.max(ue,me.x1-me.x0);let N=E[L].token.para,se=0;for(;L<E.length&&k<mT;){const T=se+S>d;if(T&&!oe)break;const me=E[L].token.para;if(me>N+1){se+=S*(me-N-1),N=me-1,k+=1;continue}let J=T?[{x0:f,x1:X}]:_(se,f,X);p>0&&v>0&&M===0&&!T&&J.length&&(q===null&&(q=k,$=J[0].x0,P=se),k-q<v&&(J=fC(J,{x0:$,x1:$+p})));const we=J.reduce((Le,he)=>Math.max(Le,he.x1-he.x0),0);for(const Le of J){const he=Le.x1-Le.x0;if(he<G)continue;if(L>=E.length||E[L].token.para!==me)break;const fe=L;let ie=0;for(;L<E.length&&E[L].token.para===me;){const re=E[L],ae=L===fe,pe=re.width*l,be=ae?pe:R+pe;if(ie+be<=he){ie+=be,L+=1;continue}const ke=he-ie-(ae?0:R),Fe=ae&&pe>I-.5,xe=he>=we-.5&&he>=ue*xT,le=m[re.originalIndex],g=h[re.originalIndex],V=(x&&g?lu(re,le,g,ke,l,b):null)??(Fe&&xe?lu(re,le,void 0,ke,l,b):null);if(V){const Y={token:{...re.token,text:V.fragmentText},originalIndex:re.originalIndex,width:V.fragmentWidth,kind:"fragment",offset:re.offset},te={token:{...re.token,text:V.remainderText},originalIndex:re.originalIndex,width:V.remainderWidth,kind:"remainder",offset:re.offset+V.chars};E.splice(L,1,Y,te),ie+=(ae?0:R)+V.fragmentWidth*l,L+=1;break}if(Fe&&F===1&&he>=ue-.5){ie+=be,L+=1;continue}break}if(L>fe){const re=L>=E.length||E[L].token.para!==me;C.push({top:se,left:Le.x0,width:he,from:fe,to:L,justify:r==="justify"&&!re})}if(L>=E.length||E[L].token.para!==me)break}N=me,se+=S,k+=1}z=Math.max(z,se)}let K=0;if(L>0){const M=E[L-1];K=M.kind==="fragment"?M.originalIndex:M.originalIndex+1}return{segments:C,placed:K,height:C.length?z:0,capLeft:$,capTop:P,renderTokens:E.map(M=>M.token)}}const bT=.12,ST=2,wT=10,As=.25,$T=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},CT=(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,TT=(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=$T(e);(!r||!CT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Fs=(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 IT(){return typeof document>"u"?null:document.body}function LT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:v,padding:x,columns:m,gutter:h,hyphenate:b,showOverflowIndicator:S,dropCapLines:R,dropCapSize:y,showGuides:C,typography:E,imageUrl:G,imageFocalX:H,imageFocalY:O,imageScale:F,imageCustomPath:D,imagePathEdited:I,pathDragActive:L,pathCarryImage:z,onCarryImageConsumed:k,pathEditor:$,imageEditor:P}){var Vt,Yt;const q=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[_,K]=s.useState(null),M=s.useRef(null),[f,X]=s.useState({width:0,height:0}),[oe,ue]=s.useState(0),[N,se]=s.useState(0),[T,me]=s.useState(null),[J,we]=s.useState(0),[Le,he]=s.useState("none");s.useEffect(()=>{!$&&!P&&he("none")},[$,P]);const[fe,ie]=s.useState(null);s.useEffect(()=>{if(!G||typeof Image>"u"){ie(null);return}let $e=!1;const Xe=new Image;return Xe.onload=()=>{$e||ie({width:Xe.naturalWidth,height:Xe.naturalHeight})},Xe.src=G,()=>{$e=!0}},[G]);const re=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),ae=s.useMemo(()=>fT(re),[re]),pe=s.useMemo(()=>yT(re),[re]),be=s.useMemo(()=>pe.join(`
27524
+ `),[pe]),{lang:ke,hyphenateSync:Fe}=oT(b,be),xe=s.useMemo(()=>b?ae.map($e=>rT($e.text,Fe)):[],[b,ae,Fe]),le=R>0&&y>1?((Yt=(Vt=ae[0])==null?void 0:Vt.text)==null?void 0:Yt.charAt(0))??"":"",g=($==null?void 0:$.contours)??null,V=s.useMemo(()=>{let $e=[];if(g){const Xe=$r(g);Xe.length&&($e=$o(Xe,r))}if(!$e.length){const Xe=i.trim(),ut=Xe?zd(Xe,o,r):null;ut&&ut.length?$e=ut:$e=el(n==="custom"?"rectangle":n)}return n==="circle"?Fs($e,f):$e},[g,n,i,o,r,f.width,f.height]),Y=$==null?void 0:$.onConvert,te=($==null?void 0:$.needsConversion)??!1,ge=s.useMemo(()=>{if(n==="circle")return!1;const $e=g??(i.trim()?ki(i):null);return!!($e&&Xp($e,r))},[g,i,r,n]),[ee,B]=s.useState(null);nr(()=>{if(!ge){ee&&B(null);return}!ee&&f.width>0&&f.height>0&&B({width:f.width,height:f.height})},[ge,f.width,f.height,ee]);const Z=s.useMemo(()=>{if(!ge||f.width<=0||f.height<=0)return V;const $e=ee??f,Xe=r.width/$e.width,ut=r.height/$e.height;return V.map($t=>$t.map(bt=>({x:bt.x*Xe,y:bt.y*ut})))},[V,ge,ee,r.width,r.height,f.width,f.height]),U=s.useMemo(()=>{if(g){const $t=$r(g);if($t.length){const bt=$o($t,r);return n==="circle"?Fs(bt,f):bt}}const $e=D.trim(),Xe=$e?zd($e,o,r):null,ut=Xe&&Xe.length?Xe:el(n==="custom"?"rectangle":n);return n==="circle"?Fs(ut,f):ut},[g,n,D,o,r,f.width,f.height]),de=s.useMemo(()=>{if(!ge||f.width<=0||f.height<=0)return U;const $e=ee??f,Xe=r.width/$e.width,ut=r.height/$e.height;return U.map($t=>$t.map(bt=>({x:bt.x*Xe,y:bt.y*ut})))},[U,ge,ee,r.width,r.height,f.width,f.height]),j=s.useRef(null),Pe=s.useRef(!1);s.useEffect(()=>{if(!(!Y||f.width<=0||f.height<=0)){if(ge){if(j.current===i)return;const $e=g??(i.trim()?ki(i):null);if(!($e!=null&&$e.length))return;const Xe=un($e,ut=>({x:r.x+(ut.x-r.x)/f.width*r.width,y:r.y+(ut.y-r.y)/f.height*r.height}));j.current=Ho(Xe),Y(Xe);return}!te||!V.length||Pe.current||(Pe.current=!0,Y(un(Gp(V),$e=>({x:$e.x*La,y:$e.y*La}))))}},[te,ge,Y,V,g,i,r,f.width,f.height]);const ne=s.useCallback(()=>{const $e=_;if(!$e)return;const Xe=$e.getBoundingClientRect(),ut=window.getComputedStyle($e),$t=parseFloat(ut.paddingTop)||0;ue(Ht=>Math.abs(Ht-$t)<.5?Ht:$t);const bt=parseFloat(ut.columnGap)||0;se(Ht=>Math.abs(Ht-bt)<.5?Ht:bt);const ct={width:Xe.width,height:Xe.height};X(Ht=>Math.abs(Ht.width-ct.width)<.5&&Math.abs(Ht.height-ct.height)<.5?Ht:ct)},[_]);nr(()=>{const $e=_;if(!$e||typeof ResizeObserver>"u")return;ne();const Xe=new ResizeObserver(ne);return Xe.observe($e),()=>Xe.disconnect()},[_,ne]),nr(()=>{ne()},[x,h,ne]),s.useEffect(()=>{const $e=typeof document<"u"?document.fonts:void 0;$e!=null&&$e.ready&&$e.ready.then(()=>{we(Xe=>Xe+1)})},[]),nr(()=>{const $e=M.current;if(!$e)return;if(!ae.length){me(null);return}const Xe=[],ut=document.createDocumentFragment();for(const It of ae){const _t=document.createElement("span");Object.assign(_t.style,su(It.leaf)),_t.textContent=It.text,ut.appendChild(_t),Xe.push(_t)}const $t=document.createElement("span");$t.textContent=" ",ut.appendChild($t);const bt=document.createElement("span");bt.textContent="-",ut.appendChild(bt);const ct=le||"H",Ht=document.createElement("span");Ht.textContent=ct,Ht.style.lineHeight="1",ut.appendChild(Ht),$e.replaceChildren(ut);const mt=window.getComputedStyle($e),Tt=parseFloat(mt.fontSize)||16,Ie=parseFloat(mt.lineHeight),Je=Number.isNaN(Ie)?Tt*1.2:Ie,rt=Math.max(Je,Tt),Mt=document.createElement("span");Mt.textContent=ct,Mt.style.lineHeight=`${rt}px`;const gt=document.createElement("span");gt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Mt.appendChild(gt),$e.appendChild(Mt);const xt=Mt.getBoundingClientRect().top,Ft=gt.getBoundingClientRect().top,Ot=Math.max(1,Ft-xt);Mt.remove();let pt=Ot*.8;const qt=document.createElement("canvas").getContext("2d"),Nt=It=>`${mt.fontStyle} ${mt.fontWeight} ${It}px ${mt.fontFamily}`;if(qt){qt.font=Nt(Tt);const It=qt.measureText(ct).actualBoundingBoxAscent;It>0&&(pt=It)}const zt=y>1?(y-1)*rt+pt:pt;let jt=Tt*(zt/pt);if(qt){qt.font=Nt(jt);const It=qt.measureText(ct).actualBoundingBoxAscent;It>0&&(jt=jt*(zt/It))}Ht.style.fontSize=`${jt}px`,Ht.style.lineHeight=`${jt}px`;const Bt=document.createElement("span");Bt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Ht.appendChild(Bt);const Rt=Math.max(1,Bt.getBoundingClientRect().top-Ht.getBoundingClientRect().top);Bt.remove();const Re=(y-1)*rt+Ot-Rt,Ae=Xe.map(It=>It.getBoundingClientRect().width),De=$t.getBoundingClientRect().width,ft=bt.getBoundingClientRect().width,Ut=le?Ht.getBoundingClientRect().width:0,at=(f.width-N*(m-1))/m,Et=Xe.map((It,_t)=>{var pi;const on=It.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Ae[_t]>at-.5)&&!((pi=xe[_t])!=null&&pi.length))return;const bn=document.createRange(),ui=It.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:Ae,spaceWidth:De,dashWidth:ft,charWidths:Et,lineHeight:rt,capWidth:Ut,dropCapFontSize:jt,dropCapTopAdjust:Re})},[ae,E,le,R,y,J,f.width,b,xe,m,N]);const Q=T&&le?T.capWidth+T.lineHeight*bT:0,_e=Math.max(R,Math.ceil(y)),Ge=s.useMemo(()=>{if(!T||!ae.length||f.width<=0||f.height<=0||!u)return 1;const $e=$t=>cu({tokens:ae,widths:T.widths,spaceWidth:T.spaceWidth,lineHeight:T.lineHeight,width:f.width,height:f.height,rings:Z,mode:l,align:c,scale:$t,allowOverflow:!1,capInset:Q*$t,capLines:le?_e:0,hyphenate:b,charWidths:T.charWidths,hyphenPoints:xe,hyphenWidth:T.dashWidth,shapeMargin:oe,columns:m,columnGap:N});if($e(1).placed>=ae.length)return 1;if($e(As).placed<ae.length)return As;let Xe=As,ut=1;for(let $t=0;$t<wT;$t+=1){const bt=(Xe+ut)/2;$e(bt).placed>=ae.length?Xe=bt:ut=bt}return Xe},[T,ae,f.width,f.height,Z,l,c,u,Q,le,_e,b,xe,oe,m,N]);s.useEffect(()=>{v(Ge)},[Ge,v]);const Be=u?Math.min(p,Ge):1,qe=s.useMemo(()=>!T||!ae.length||f.width<=0||f.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:ae}:cu({tokens:ae,widths:T.widths,spaceWidth:T.spaceWidth,lineHeight:T.lineHeight,width:f.width,height:f.height,rings:Z,mode:l,align:c,scale:Be,allowOverflow:d,capInset:Q*Be,capLines:le?_e:0,hyphenate:b,charWidths:T.charWidths,hyphenPoints:xe,hyphenWidth:T.dashWidth,shapeMargin:oe,columns:m,columnGap:N}),[T,ae,f.width,f.height,Z,l,c,Be,d,Q,le,_e,b,xe,oe,m,N]),Ye=S&&ae.length>0&&qe.placed<ae.length,nt=T?T.dropCapFontSize*Be:0,it=T?T.dropCapTopAdjust*Be:0,ve=c==="justify"?"left":c,Te=T?T.lineHeight*Be:0,We=qe.segments.length?qe.segments[qe.segments.length-1]:null,Ke=We?{top:We.top+Te,left:We.left+We.width/2}:{top:f.height,left:f.width/2},Ze=!!($&&g&&f.width>0&&f.height>0),lt=!!P,ot=(Ze||lt)&&f.width>0&&f.height>0,Me=TT(_,ot),ze=ot&&Me?IT():null,et=s.useRef(!1),Oe=s.useCallback($e=>{et.current=$e},[]);s.useEffect(()=>{if(!Ze&&!lt)return;const $e=Xe=>{const ut=_;if(!ut)return;const $t=ut.getBoundingClientRect();Xe.clientX>=$t.left&&Xe.clientX<=$t.right&&Xe.clientY>=$t.top&&Xe.clientY<=$t.bottom&&(Xe.preventDefault(),Xe.stopPropagation(),he(ct=>ct==="shape"&&et.current?ct:ct==="shape"&&lt?"image":Ze?"shape":"image"))};return document.addEventListener("dblclick",$e,!0),()=>document.removeEventListener("dblclick",$e,!0)},[Ze,lt,_]);const Ne=s.useMemo(()=>G&&f.width>0&&f.height>0?dC(de,f):null,[G,de,f.width,f.height]),yt=s.useRef(null),je=(()=>{const $e=yt.current;return z||!I||!P||!fe||!Ne||!$e||D===$e.customPath||$e.shape!==n&&n!=="custom"?null:qC($e.bounds,Ne,fe,$e.focalX,$e.focalY,$e.scale)})();nr(()=>{if(!P){yt.current=null;return}if(L||!fe||!Ne)return;const $e=yt.current,Xe=!!($e&&D!==$e.customPath);Xe&&je&&P.onCommit(je),Xe&&z&&(k==null||k()),yt.current={rings:de,bounds:Ne,focalX:(je==null?void 0:je.focalX)??H,focalY:(je==null?void 0:je.focalY)??O,scale:(je==null?void 0:je.scale)??F,customPath:D,shape:n}},[L,z,D,n,de,Ne,P,fe,H,O,F,je,k]);const He=yt.current,Ce=!!(L&&!z&&He&&!je),tt=Ce&&He?He.focalX:(je==null?void 0:je.focalX)??H,Qe=Ce&&He?He.focalY:(je==null?void 0:je.focalY)??O,St=Ce&&He?He.scale:(je==null?void 0:je.scale)??F,Ct=Ce&&He?He.bounds:Ne,Wt=s.useMemo(()=>{if(!(f.width>0)||!(f.height>0))return"";let $e=jd(i,g,o,r,n,f);if(ge){const Xe=ee??f,ut=r.width/Xe.width,$t=r.height/Xe.height;$e=un($e,bt=>({x:bt.x*ut,y:bt.y*$t}))}return Vd($e,f)||Dd(Z,f)},[i,g,o,r,n,f.width,f.height,ge,ee,Z]),ht=s.useMemo(()=>{if(!G||!(f.width>0)||!(f.height>0))return"";let $e=jd(D,g,o,r,n,f);if(ge){const Xe=ee??f,ut=r.width/Xe.width,$t=r.height/Xe.height;$e=un($e,bt=>({x:bt.x*ut,y:bt.y*$t}))}return Vd($e,f)||Dd(de,f)},[G,D,g,o,r,n,f.width,f.height,ge,ee,de]),Xt=`${q}-clip`,wt=s.useMemo(()=>{if(!Ct)return null;const $e=fe??{width:Ct.width,height:Ct.height},Xe=qi(Ct,$e,St);return{x:jn(Ct.width,Xe.width,tt),y:jn(Ct.height,Xe.height,Qe),width:Xe.width,height:Xe.height}},[Ct,fe,tt,Qe,St]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:h},lang:ke,ref:K,children:[Wt?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:Wt,fillRule:"evenodd"}),G&&ht&&Ct&&wt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Xt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ht,fillRule:"evenodd"})})}),a.jsx("image",{href:G,x:Ct.x+wt.x,y:Ct.y+wt.y,width:wt.width,height:wt.height,preserveAspectRatio:"none",clipPath:`url(#${Xt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...E,["--"+e+"-fit"]:Be,top:0,left:0,width:f.width,height:f.height},children:[a.jsx("div",{className:`${e}-measure`,ref:M,style:E,"aria-hidden":!0}),qe.segments.map(($e,Xe)=>{const ut=qe.renderTokens.slice($e.from,$e.to),$t=Xe===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:ve},children:ut.map((bt,ct)=>{const mt=le&&$t&&$e.from===0&&ct===0?bt.text.slice(1):bt.text,Tt=su(bt.leaf),Ie=bt.href?a.jsx("a",{className:`${e}-link`,href:bt.href,target:bt.target,rel:bt.target?"noopener noreferrer":void 0,style:Tt,children:mt}):a.jsx("span",{style:Tt,children:mt});return a.jsxs("span",{children:[!$e.justify&&ct>0?" ":null,Ie]},ct)})},`${$e.from}-${$e.to}-${Xe}`)}),C&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:Z.map(($e,Xe)=>a.jsx("polygon",{points:$e.map(ut=>`${ut.x},${ut.y}`).join(" ")},Xe))})]}),le&&T&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...E,top:`${qe.capTop+it}px`,left:`${qe.capLeft}px`,fontSize:`${nt}px`,lineHeight:`${nt}px`},children:le}),ze&&Me&&(g&&$||P)&&Un.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Me.top,left:Me.left,width:Me.width,height:Me.height,zIndex:ST,pointerEvents:"none"},children:[g&&$&&a.jsx(pT,{P:e,box:{width:Me.width,height:Me.height},viewBox:r,contours:g,snap:$.snap,stretchToBox:!ge,uniformStretch:n==="circle",stage:Le,onStageChange:he,onSelectionChange:Oe,onChange:$.onChange,onCommit:$.onCommit}),P&&Ct&&a.jsx(aT,{P:e,box:{width:Me.width,height:Me.height},bounds:Ct,natural:fe,imageUrl:G,maskPath:ht,stage:Le,onStageChange:he,focalX:tt,focalY:Qe,scale:St,onChange:P.onChange,onCommit:P.onCommit})]}),ze),a.jsx("div",{className:`${e}-a11y`,children:pe.map(($e,Xe)=>a.jsx("p",{children:$e},Xe))}),Ye&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ke.top,left:Ke.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 Qp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],PT={x:0,y:0,width:100,height:100},MT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?PT:{x:t[0],y:t[1],width:t[2],height:t[3]}},RT=e=>`
27524
27525
  .${e}-wrapper {
27525
27526
  box-sizing: border-box;
27526
27527
  display: flex;
@@ -27749,7 +27750,7 @@ export function Burger({
27749
27750
  clip-path: inset(50%);
27750
27751
  white-space: nowrap;
27751
27752
  }
27752
- `,mT=1;function gT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=$.useScopedStyles(),d=s.useMemo(()=>pT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",v=s.useMemo(()=>uT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",E=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",w=((e==null?void 0:e.fitText)??"off")==="on",H=((e==null?void 0:e.hyphenate)??"off")==="on",q=$.scalingValue((e==null?void 0:e.padding)??0,u),B=(e==null?void 0:e.dropCapSize)??mT,M=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??B)),_=u&&p&&!i,j=u&&!i,[C,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const G=()=>L(!0),N=()=>L(!1),K=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],ne=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const pe of K)window.addEventListener(pe,G);for(const pe of ne)window.addEventListener(pe,N);return()=>{for(const pe of K)window.removeEventListener(pe,G);for(const pe of ne)window.removeEventListener(pe,N)}},[u,p]);const W=u&&p&&!i&&typeof l=="function",A=!C,I=Math.max(0,(e==null?void 0:e.pathSnap)??0),T=s.useRef(e??{}),V=s.useRef(""),S=[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(S!==V.current)V.current=S,T.current=e??{};else if(e){const{customPath:G,shape:N,pathFit:K,pathViewBox:ne,imageScale:pe,imageFocalX:U,imageFocalY:Pe,image:le,...J}=e,De=T.current;for(const Xe of Object.keys(J))if(De[Xe]!==J[Xe]){T.current={...De,...J};break}}const[X,P]=s.useState(null),[k,O]=s.useState(!1),[ie,ae]=s.useState(!1),D=s.useCallback(()=>ae(!1),[]),se=T.current.shape??x,R=s.useMemo(()=>!X||X.serialized===m?m:X.serialized,[X,m]);s.useEffect(()=>{W||(O(!1),ae(!1))},[W]),s.useEffect(()=>{!X||k||X.serialized===m&&P(null)},[X,m,k]);const de=s.useMemo(()=>{if(!W)return null;if(X&&(X.base===m||X.serialized===m))return X.contours;const G=Mi(m);return G.length?G:null},[W,X,m]),te=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Js&&de&&(x==="circle"||!Dp(de,v))),Se=s.useCallback((G,N,K)=>{const ne=No(G);if(P(pe=>({base:pe&&(pe.base===m||pe.serialized===m)?pe.base:m,serialized:ne,contours:G})),N){const pe=T.current,U=K!=null&&K.preserveShape?pe.shape:"custom",Pe={...pe,shape:U,customPath:ne};T.current=Pe,l==null||l(Pe)}},[m,l]),Ce=s.useMemo(()=>W?{contours:te?de:null,snap:I,needsConversion:!te,onConvert:G=>{const N=No(G);P({base:N,serialized:N,contours:G});const K={...T.current,pathFit:"viewbox",pathViewBox:Js,customPath:N};T.current=K,l==null||l(K)},onChange:(G,N)=>{O(!0),ae(!!(N!=null&&N.carryImage)),Se(G,!1)},onCommit:(G,N)=>{Se(G,!0,N),O(!1)}}:null,[W,te,de,I,l,Se]),ve=b==="avoid"&&!!(e!=null&&e.image),ue=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]),[Q,re]=s.useState(null),fe=Q??ue,he=s.useCallback(G=>re(G),[]),be=s.useCallback(G=>{re(G);const N={...T.current,imageFocalX:G.focalX,imageFocalY:G.focalY,imageScale:G.scale};T.current=N,l==null||l(N)},[l]);s.useEffect(()=>{Q&&Math.abs(Q.focalX-ue.focalX)<1e-9&&Math.abs(Q.focalY-ue.focalY)<1e-9&&Math.abs(Q.scale-ue.scale)<1e-9&&re(null)},[Q,ue]);const Me=s.useMemo(()=>!W||!ve?null:{onChange:he,onCommit:be},[W,ve,he,be]),[Ne,we]=s.useState(void 0),ce=s.useRef(void 0),g=s.useCallback(G=>{const N=ce.current;N!==void 0&&Math.abs(N-G)<.005||(ce.current=G,we(G))},[]),Y=s.useMemo(()=>w&&typeof Ne=="number"?Ne:1,[Ne,w]),Z=G=>`calc(${G} * var(--${c}-fit, 1))`,ee=s.useMemo(()=>{var K,ne,pe,U,Pe;const G=(e==null?void 0:e.textFontSize)??.012,N=Math.max((e==null?void 0:e.textLineHeight)??G,G);return{fontFamily:Oo(e==null?void 0:e.textFontFamily),fontWeight:(K=e==null?void 0:e.textFontSettings)==null?void 0:K.fontWeight,fontStyle:(ne=e==null?void 0:e.textFontSettings)==null?void 0:ne.fontStyle,fontSize:Z($.scalingValue(G,u)),lineHeight:Z($.scalingValue(N,u)),letterSpacing:Z($.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Z($.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(pe=e==null?void 0:e.textTextAppearance)==null?void 0:pe.textTransform,textDecoration:(U=e==null?void 0:e.textTextAppearance)==null?void 0:U.textDecoration,fontVariant:(Pe=e==null?void 0:e.textTextAppearance)==null?void 0:Pe.fontVariant}},[e,u,c]),ye={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...ye},children:a.jsx(cT,{P:c,item:y,shape:se,customPath:m,pathFit:h,viewBox:v,mode:b,align:E,allowOverflow:f,fitEnabled:w,scale:Y,onFitScale:g,padding:q,hyphenate:H,showOverflowIndicator:j,dropCapLines:M,dropCapSize:B,showGuides:(_||W)&&A,typography:ee,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:fe.focalX,imageFocalY:fe.focalY,imageScale:fe.scale,imageCustomPath:R,pathDragActive:k,pathCarryImage:ie,onCarryImageConsumed:D,pathEditor:A?Ce:null,imageEditor:A?Me:null})})]})}const hT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27753
+ `,ET=1;function kT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=w.useScopedStyles(),d=s.useMemo(()=>RT(c),[c]),u=n??!1,p=!!r||!!o,v=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",b=s.useMemo(()=>MT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),S=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",R=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",C=((e==null?void 0:e.fitText)??"off")==="on",E=((e==null?void 0:e.hyphenate)??"off")==="on",G=w.scalingValue((e==null?void 0:e.padding)??0,u),H=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),O=w.scalingValue((e==null?void 0:e.columnGutter)??0,u),F=(e==null?void 0:e.dropCapSize)??ET,D=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??F)),I=u&&p&&!i,L=u&&!i,[z,k]=s.useState(!1);s.useEffect(()=>{if(!u||!p){k(!1);return}const U=()=>k(!0),de=()=>k(!1),j=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],Pe=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const ne of j)window.addEventListener(ne,U);for(const ne of Pe)window.addEventListener(ne,de);return()=>{for(const ne of j)window.removeEventListener(ne,U);for(const ne of Pe)window.removeEventListener(ne,de)}},[u,p]);const $=u&&p&&!i&&typeof l=="function",P=!z,q=Math.max(0,(e==null?void 0:e.pathSnap)??0),_=s.useRef(e??{}),K=s.useRef(""),M=[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(M!==K.current)K.current=M,_.current=e??{};else if(e){const{customPath:U,shape:de,pathFit:j,pathViewBox:Pe,imageScale:ne,imageFocalX:Q,imageFocalY:_e,image:Ge,...Be}=e,qe=_.current;for(const Ye of Object.keys(Be))if(qe[Ye]!==Be[Ye]){_.current={...qe,...Be};break}}const[f,X]=s.useState(null),[oe,ue]=s.useState(!1),[N,se]=s.useState(!1),T=s.useCallback(()=>se(!1),[]),me=_.current.shape??x,J=!!(f&&(f.base===m||f.serialized===m)),we=J&&f?f.serialized:m;s.useEffect(()=>{$||(ue(!1),se(!1))},[$]),s.useEffect(()=>{!f||oe||f.serialized===m&&X(null)},[f,m,oe]);const Le=s.useMemo(()=>{if(!$)return null;if(f&&(f.base===m||f.serialized===m))return f.contours;const U=ki(m);return U.length?U:null},[$,f,m]),he=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Zs&&Le&&(x==="circle"||!Xp(Le,b))),fe=s.useCallback((U,de,j)=>{const Pe=Ho(U);if(X(ne=>({base:ne&&(ne.base===m||ne.serialized===m)?ne.base:m,serialized:Pe,contours:U})),de){const ne=_.current,Q=j!=null&&j.preserveShape?ne.shape:"custom",_e={...ne,shape:Q,customPath:Pe};_.current=_e,l==null||l(_e)}},[m,l]),ie=s.useMemo(()=>$?{contours:he?Le:null,snap:q,needsConversion:!he,onConvert:U=>{const de=Ho(U);X({base:de,serialized:de,contours:U});const j={..._.current,pathFit:"viewbox",pathViewBox:Zs,customPath:de};_.current=j,l==null||l(j)},onChange:(U,de)=>{ue(!0),se(!!(de!=null&&de.carryImage)),fe(U,!1)},onCommit:(U,de)=>{fe(U,!0,de),ue(!1)}}:null,[$,he,Le,q,l,fe]),re=S==="avoid"&&!!(e!=null&&e.image),ae=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]),[pe,be]=s.useState(null),ke=pe??ae,Fe=s.useCallback(U=>be(U),[]),xe=s.useCallback(U=>{be(U);const de={..._.current,imageFocalX:U.focalX,imageFocalY:U.focalY,imageScale:U.scale};_.current=de,l==null||l(de)},[l]);s.useEffect(()=>{pe&&Math.abs(pe.focalX-ae.focalX)<1e-9&&Math.abs(pe.focalY-ae.focalY)<1e-9&&Math.abs(pe.scale-ae.scale)<1e-9&&be(null)},[pe,ae]);const le=s.useMemo(()=>!$||!re?null:{onChange:Fe,onCommit:xe},[$,re,Fe,xe]),[g,V]=s.useState(void 0),Y=s.useRef(void 0),te=s.useCallback(U=>{const de=Y.current;de!==void 0&&Math.abs(de-U)<.005||(Y.current=U,V(U))},[]),ge=s.useMemo(()=>C&&typeof g=="number"?g:1,[g,C]),ee=U=>`calc(${U} * var(--${c}-fit, 1))`,B=s.useMemo(()=>{var j,Pe,ne,Q,_e;const U=(e==null?void 0:e.textFontSize)??.012,de=Math.max((e==null?void 0:e.textLineHeight)??U,U);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(j=e==null?void 0:e.textFontSettings)==null?void 0:j.fontWeight,fontStyle:(Pe=e==null?void 0:e.textFontSettings)==null?void 0:Pe.fontStyle,fontSize:ee(w.scalingValue(U,u)),lineHeight:ee(w.scalingValue(de,u)),letterSpacing:ee(w.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:ee(w.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(ne=e==null?void 0:e.textTextAppearance)==null?void 0:ne.textTransform,textDecoration:(Q=e==null?void 0:e.textTextAppearance)==null?void 0:Q.textDecoration,fontVariant:(_e=e==null?void 0:e.textTextAppearance)==null?void 0:_e.fontVariant}},[e,u,c]),Z={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...Z},children:a.jsx(LT,{P:c,item:v,shape:me,customPath:m,pathFit:h,viewBox:b,mode:S,align:R,allowOverflow:y,fitEnabled:C,scale:ge,onFitScale:te,padding:G,columns:H,gutter:O,hyphenate:E,showOverflowIndicator:L,dropCapLines:D,dropCapSize:F,showGuides:(I||$)&&P,typography:B,imageUrl:S==="avoid"?e==null?void 0:e.image:null,imageFocalX:ke.focalX,imageFocalY:ke.focalY,imageScale:ke.scale,imageCustomPath:we,imagePathEdited:J,pathDragActive:oe,pathCarryImage:N,onCarryImageConsumed:T,pathEditor:P?ie:null,imageEditor:P?le:null})})]})}const AT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27753
27754
  import type React from 'react';
27754
27755
  import { CommonComponentProps } from '../props';
27755
27756
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -27818,6 +27819,8 @@ export type PretextSettings = {
27818
27819
  fitText?: 'on' | 'off';
27819
27820
  hyphenate?: 'on' | 'off';
27820
27821
  padding?: number;
27822
+ columns?: number;
27823
+ columnGutter?: number;
27821
27824
  dropCapLines?: number;
27822
27825
  dropCapSize?: number;
27823
27826
  image?: string | null;
@@ -27954,6 +27957,8 @@ export type ColumnProps = {
27954
27957
  scale: number;
27955
27958
  onFitScale: (scale: number) => void;
27956
27959
  padding: string;
27960
+ columns: number;
27961
+ gutter: string;
27957
27962
  hyphenate: boolean;
27958
27963
  showOverflowIndicator: boolean;
27959
27964
  dropCapLines: number;
@@ -27965,6 +27970,7 @@ export type ColumnProps = {
27965
27970
  imageFocalY: number;
27966
27971
  imageScale: number;
27967
27972
  imageCustomPath: string;
27973
+ imagePathEdited: boolean;
27968
27974
  pathDragActive: boolean;
27969
27975
  pathCarryImage: boolean;
27970
27976
  onCarryImageConsumed?: () => void;
@@ -28301,6 +28307,8 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28301
28307
  const fitEnabled = (settings?.fitText ?? 'off') === 'on';
28302
28308
  const hyphenate = (settings?.hyphenate ?? 'off') === 'on';
28303
28309
  const paddingCss = scalingValue(settings?.padding ?? 0, editor);
28310
+ const columns = Math.max(1, Math.round(settings?.columns ?? 1));
28311
+ const gutterCss = scalingValue(settings?.columnGutter ?? 0, editor);
28304
28312
  const dropCapSize = settings?.dropCapSize ?? DROP_CAP_SIZE_DEFAULT;
28305
28313
  const dropCapLines = Math.max(1, Math.round(settings?.dropCapLines ?? dropCapSize));
28306
28314
  const showGuides = editor && selected && !isPreviewMode;
@@ -28376,10 +28384,11 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28376
28384
  const onCarryImageConsumed = useCallback(() => setPathCarryImage(false), []);
28377
28385
 
28378
28386
  const liveShape = settingsRef.current.shape ?? shape;
28379
- const imageCustomPath = useMemo(() => {
28380
- if (!draft || draft.serialized === customPath) return customPath;
28381
- return draft.serialized;
28382
- }, [draft, customPath]);
28387
+ // A draft only stands in for the path it was made from. Once customPath moves
28388
+ // on for another reason (layout switch, undo), the draft is stale and the
28389
+ // image must not treat that change as a path edit.
28390
+ const imagePathEdited = Boolean(draft && (draft.base === customPath || draft.serialized === customPath));
28391
+ const imageCustomPath = imagePathEdited && draft ? draft.serialized : customPath;
28383
28392
 
28384
28393
  useEffect(() => {
28385
28394
  if (!pathEditing) {
@@ -28555,6 +28564,8 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28555
28564
  scale={sharedScale}
28556
28565
  onFitScale={handleFitScale}
28557
28566
  padding={paddingCss}
28567
+ columns={columns}
28568
+ gutter={gutterCss}
28558
28569
  hyphenate={hyphenate}
28559
28570
  showOverflowIndicator={showOverflowIndicator}
28560
28571
  dropCapLines={dropCapLines}
@@ -28566,6 +28577,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28566
28577
  imageFocalY={liveImageTransform.focalY}
28567
28578
  imageScale={liveImageTransform.scale}
28568
28579
  imageCustomPath={imageCustomPath}
28580
+ imagePathEdited={imagePathEdited}
28569
28581
  pathDragActive={pathDragActive}
28570
28582
  pathCarryImage={pathCarryImage}
28571
28583
  onCarryImageConsumed={onCarryImageConsumed}
@@ -28576,4 +28588,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28576
28588
  </>
28577
28589
  );
28578
28590
  }
28579
- `,ou=[...Gp],fT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:ou},enum:ou},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 with a hyphen when they don’t fit on a line.",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"}},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:{...fT.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:{...zp("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},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","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"]}]},{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."}]}]}]}},vT={element:gT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Gp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...zp(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:yT,sourceCode:hT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},xT=[gh,Sh,fb,gf,$f,Af,Zf,Sy,Py,Ny,av,e0,rx,gx,Yx,sb,Pb,CS,Ob,zS,xw,o$,nC,vT];exports.getAvailableStatePanels=$.getAvailableStatePanels;exports.getUnavailableStates=$.getUnavailableStates;exports.isPanelAvailable=$.isPanelAvailable;exports.components=xT;exports.isSchemaV1=rm;
28591
+ `,du=[...Qp],FT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},NT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:du},enum:du},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:{...FT.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."}]}]}]}},_T={element:kT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Qp.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:NT,sourceCode:AT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},HT=[bh,Lh,wb,bf,Mf,Of,oy,Ly,Fy,zy,pv,a0,ux,bx,nb,mb,Fb,RS,Gb,qS,Tw,d$,lC,_T];exports.getAvailableStatePanels=w.getAvailableStatePanels;exports.getUnavailableStates=w.getUnavailableStates;exports.isPanelAvailable=w.isPanelAvailable;exports.components=HT;exports.isSchemaV1=um;