@cntrl-site/components 1.0.23 → 1.0.24

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.
@@ -14,11 +14,9 @@ export declare const MarqueeComponent: {
14
14
  defaultSize: {
15
15
  d: {
16
16
  width: string;
17
- height: number;
18
17
  };
19
18
  m: {
20
19
  width: number;
21
- height: number;
22
20
  };
23
21
  };
24
22
  preview: {
package/dist/index.js CHANGED
@@ -2320,7 +2320,7 @@ type MarqueeProps = {
2320
2320
  isPreviewMode?: boolean;
2321
2321
  isEditMode?: boolean;
2322
2322
  } & CommonComponentProps;
2323
- `,Bu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},ju={element:Hu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Bu,sourceCode:Ou,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function La(e){return`
2323
+ `,Bu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},ju={element:Hu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},m:{width:390}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Bu,sourceCode:Ou,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function La(e){return`
2324
2324
  .${e}-marquee-wrapper {
2325
2325
  overflow: hidden;
2326
2326
  width: 100%;
@@ -9837,7 +9837,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9837
9837
  </>
9838
9838
  );
9839
9839
  }
9840
- `;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Rm={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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",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:[...Pm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Am={element:Em,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"}]},schema:Rm,sourceCode:Im},xn=e=>e.display==="cover",Do=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,Mm=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*Mm),[]),R=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),b=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),I=l.useCallback(y=>{const k=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-y/k*.12);return`translateY(${y}px) scale(${_})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=y.clientX-k.startX,V=y.clientY-k.startY;if(k.isLocked===null){if(Math.abs(_)<Za&&Math.abs(V)<Za)return;if(V>0&&V>Math.abs(_))k.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{k.isLocked=!1,g();return}}if(!k.isLocked)return;y.preventDefault();const ne=Math.max(0,V);m.current=ne,s(ne)},[e,g]),S=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=k.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!_){g();return}y.clientY-k.startY>=p?T():v()},[p,T,e,g,v]),z=l.useCallback(y=>{S(y)},[S]),M=l.useCallback(y=>{S(y)},[S]),N=o>0,L=a?`transform ${n}ms ease`:"none",C=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:N,backdropStyle:{opacity:R(o),transition:C},mediaAreaStyle:{transform:I(o),transition:L,touchAction:N?"none":void 0,willChange:N?"transform":void 0},overlayContentStyle:J?{opacity:b(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:z,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:N?"none":"pan-x"}:void 0}},km="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(km)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,R=0;const b=()=>{t.removeEventListener("transitionend",I),clearTimeout(R)},I=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,b(),m(n,!0))};return t.addEventListener("transitionend",I),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(${c}px, 0, 0)`,R=window.setTimeout(()=>{p||(p=!0,b(),m(n,!0))},i+64),()=>{p||(p=!0,b(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},st=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[st(e,"fontFamily"),st(e,"fontSettings"),{type:"row",items:[st(e,"fontSize"),st(e,"lineHeight"),st(e,"letterSpacing"),st(e,"wordSpacing")]},st(e,"textAlign"),st(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},ur=(e,t)=>{const n=i=>{const o=st(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),pr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:R,closeIcon:b,closeIconMaxWidth:I,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:z,title1Width:M,title2Width:N,title3Width:L,title1MarginLeft:C=0,title2MarginLeft:J=0,title3MarginLeft:y=0,titleRowMarginBottom:k=0,titleHeaderLayout:_="desktop",contentMarginTop:V,iconMarginLeft:ne}=n,me=d=>P.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,H=me(K),Q=me(m),Y=me(p??.02),O=me(R??0),te=me(V??0),ce=co(te),oe=me(ne??0),[W,ue]=l.useState(0),h=l.useRef(W);h.current=W;const ae=t[W],{title1:be,title2:ye,title3:Ae}=Zm(ae),Z=pr("title1",ur(n,"title1"),i),ge=pr("title2",ur(n,"title2"),i),U=pr("title3",ur(n,"title3"),i),X=_==="mobile",B=!o&&(!i||s),se=B,Ee=B,Fe=B,Re=xn($),Ie=Re?{"--image-aspect-ratio":Do($)}:void 0,_e=!!(be||ye||Ae),F=l.useMemo(()=>tg(e,be,ye,Ae,Z,ge,U),[e,W,be,ye,Ae,Z,ge,U]),D=l.useMemo(()=>({title1Width:M,title2Width:N,title3Width:L}),[M,N,L]),E=l.useMemo(()=>F.map(d=>D[d.widthKey]),[F,D]),j=l.useMemo(()=>ta(F.length,E),[F.length,E]),G=l.useMemo(()=>el(F.length,E),[F.length,E]),ee=l.useMemo(()=>F.filter(d=>d.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[F]),he=l.useMemo(()=>Qa(ee,D),[ee,D]),Se=l.useMemo(()=>Qa(ie,D),[ie,D]),$e=l.useCallback((d,f)=>{const x=F.indexOf(d);if(!X||f==="single-row")return{effectiveWidth:G[x]??0,resolvedWidth:j[x]??0,maxWidth:uo(x,j)};if(f==="two-row-top"){const re=ee.indexOf(d);return{effectiveWidth:he.effective[re]??0,resolvedWidth:he.resolved[re]??0,maxWidth:uo(re,he.resolved)}}const q=ie.indexOf(d);return{effectiveWidth:Se.effective[q]??0,resolvedWidth:Se.resolved[q]??0,maxWidth:uo(q,Se.resolved)}},[ie,Se,G,j,F,ee,he,X]),fe=l.useCallback(d=>P.scalingValue(d,i??!1),[i]),Ge=fe(k??0),de=l.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:J,title3MarginLeft:y}),[C,J,y]),Me=l.useCallback(d=>F.slice(0,d+1).reduce((f,x,q)=>f+(x!=null&&x.marginLeftKey?de[x.marginLeftKey]??0:0)+(j[q]??0),0)+(X?0:C??0),[F,de,j,X,C]),je=l.useCallback(()=>X?0:C??0,[X,C]),Ve=l.useCallback(d=>ie.slice(0,d).reduce((f,x,q)=>f+(x.marginLeftKey?de[x.marginLeftKey]??0:0)+(Se.resolved[q]??0),0),[ie,Se.resolved,de]),at=l.useCallback(d=>{const f=ie[d];return Ve(d)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Se.resolved[d]??0)},[ie,Se.resolved,Ve,de]),ht=(d,f)=>{const x=d.marginLeftKey?de[d.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:re,maxWidth:we}=$e(d,f),ke=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:fe(q),...x>0?{marginLeft:fe(x)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),ke&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(-x),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ke&&r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(we),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:fe(-ei/2),width:fe(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Et=()=>{const d=X?-1:F.findIndex(q=>q.prefix==="title1"),f=!X&&(o||(C??0)>0)?(()=>{const q=C??0,re=d>=0?j[d]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:0,width:`max(${fe(q)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,x=F.flatMap((q,re)=>{if(!q.marginLeftKey)return[];const we=de[q.marginLeftKey]??0,ke=ng(F,j,de,re)+je();return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[re]),style:{position:"absolute",top:0,left:fe(ke),width:`max(${fe(we)}, 10px)`,height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return f?[f,...x]:x},mt=()=>F.map((d,f)=>{const x=uo(f,j),re=Me(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),ft=()=>ie.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const x=de[d.marginLeftKey]??0,q=Ve(f),{resolvedWidth:re}=$e(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(q),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ft=()=>ie.map((d,f)=>{const{maxWidth:x}=$e(d,"two-row-bottom"),re=at(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useRef(null),qe=l.useRef(null),Qe=l.useRef([]),Oe=l.useRef([]),$t=l.useRef(0),At=l.useRef(null),Je=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ht=l.useRef(null),We=l.useRef(0),yt=l.useRef("forward"),et=l.useRef(0),Xe=l.useRef(null),ot=l.useRef(!1),ut=t.length>1&&(!o||!!s),un=ut?3:1,rn=l.useMemo(()=>Array.from({length:un},()=>t).flat(),[t,un]),[Wn,nt]=l.useState(!1),[an,Vt]=l.useState(!1),[jt,ze]=l.useState(!0),vt=l.useRef(null),le=l.useRef(null),xe=l.useRef(!1),Pe=l.useRef(!1),Ne=l.useRef(null),tt=l.useRef(null),bt=se&&!jt,Te=l.useCallback(()=>{se&&(ze(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Je.current.isActive||ze(!1)},jm))},[se]),it=l.useCallback(()=>{o||Pe.current||(Pe.current=!0,Vt(!1),Ne.current=setTimeout(()=>{a()},Li))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":bt?"true":"false",style:{width:P.scalingValue(I??0,i),height:P.scalingValue(I??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:it,"aria-label":"Close",children:r.jsx(nn,{url:b,fill:g,hoverFill:i&&!s?g:v,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),rt=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:fe(C??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const d=F.find(q=>q.prefix==="title1"),f=F.filter(q=>q.prefix==="title2"||q.prefix==="title3"),x=f.length>0||o||(k??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?rt():null,d&&ht(d,"two-row-top"),b&&De()]}),x?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(q=>ht(q,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ft(),Ft()]})]}):null,r.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:Ge,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?rt("single-row"):null,F.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),mt()]}):null,b?De():null]}),St=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Be,backdropStyle:xt,mediaAreaStyle:Ct,overlayContentStyle:wt,swipeHandlers:Dt,dismissAreaStyle:dt}=Zs({enabled:B??!1,onClose:it,animMs:Li,isBlockedTarget:St}),Ot=()=>{if(!ut||t.length===0)return $t.current=0,0;const d=Oe.current[0],f=Oe.current[t.length];if(!d||!f)return $t.current;const x=f.offsetLeft-d.offsetLeft;return x>0&&($t.current=x),$t.current},Wt=(d=!1)=>{if(!ut)return;const f=Ue.current,x=Ot();!f||x<=0||x<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=x,d&&(Je.current.scrollLeft+=x),ot.current&&(et.current+=x)):f.scrollLeft>=x*2&&(f.scrollLeft-=x,d&&(Je.current.scrollLeft-=x),ot.current&&(et.current-=x)))},pn=(d,f=(x=>(x=Ue.current)==null?void 0:x.scrollLeft)()??0)=>{if(!ut)return d;let q=t.length+d,re=1/0;for(let we=0;we<un;we++){const ke=we*t.length+d,Ke=Oe.current[ke];if(!Ke)continue;const Pt=Math.abs(Ke.offsetLeft-f);Pt<re&&(re=Pt,q=ke)}return q},$n=d=>{const f=Ue.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},mn=d=>{const f=Ue.current;if(!d||!f||!$n(d))return!1;const x=d.offsetLeft,q=x+d.offsetWidth;return f.scrollLeft>=x-1&&f.scrollLeft+f.clientWidth<=q+1},qt=(d=(f=>(f=Ue.current)==null?void 0:f.scrollLeft)()??0)=>{for(let q=0;q<Oe.current.length;q+=1){const re=Oe.current[q];if(re&&mn(re))return q}let x={flatIndex:0,distance:1/0};return Oe.current.forEach((q,re)=>{if(!q)return;const we=Math.abs(q.offsetLeft-d);we<x.distance&&(x={flatIndex:re,distance:we})}),x.flatIndex},Cn=d=>{Ue.current&&Oe.current.forEach(f=>{f&&(f.style.scrollSnapAlign=$n(f)&&d==="backward"?"end":"start")})},Xn=(d,f,x)=>{const q=d-f,re=qt(f),we=Oe.current[re];if(mn(we))return qt(d)%t.length;const ke=Oe.current[re+1],Ke=we?ke?ke.offsetLeft-we.offsetLeft:we.offsetWidth:0,Pt=Ke>0?q>Ke*lo?1:q<-Ke*lo?-1:0:0;return Pt===0?x:ut?(x+Pt+t.length)%t.length:Math.max(0,Math.min(t.length-1,x+Pt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=qe.current,x=h.current,q=Qe.current[x];if(!f||!q||f.scrollWidth<=f.clientWidth)return;const re=f.scrollLeft,we=re+f.clientWidth,ke=q.offsetLeft,Ke=ke+q.offsetWidth;if(ke>=re&&Ke<=we)return;const Pt=f.scrollWidth-f.clientWidth;let Tt=re;if(!d&&vt.current===null){const Zn=Qe.current[x-1],wi=Qe.current[x+1],Qi=Zn?q.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-q.offsetLeft:q.offsetWidth;Ke>we?Tt+=Qi:ke<re&&(Tt-=Qi)}else Ke>we?Tt=Ke-f.clientWidth:Tt=ke;f.scrollLeft=Math.max(0,Math.min(Pt,Tt))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(xe.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=xe.current;xe.current=!1,Yn(f)}))},[Yn]),Go=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const x=Math.abs(d-f)>1,q=ut&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);ue(d),xi(x||q)},[t.length,ut,xi]),Jt=()=>{if(!Ue.current||t.length===0||vt.current!==null||Je.current.isActive&&Je.current.hasMoved)return;const d=Ue.current.scrollLeft,f=qt(d)%t.length;f!==h.current&&Go(f)},Ui=()=>{vt.current=null},Zt=d=>{const f=Ue.current;f&&(f.style.scrollSnapType=d?"":"none")},gn=()=>{var d;(d=Ht.current)==null||d.call(Ht),Ht.current=null},Tn=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ot.current=!1},Fn=()=>{const d=Ue.current;if(!d){Xe.current=null,ot.current=!1;return}const f=et.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=et.current,Wt(),Jt(),Xe.current=null,ot.current=!1;return}d.scrollLeft+=f*Dm,Wt(),Jt(),Te(),Xe.current=requestAnimationFrame(Fn)},Nn=()=>{const d=Ce.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,x,q)=>{Nn(),d.scrollLeft=f,We.current=d.scrollLeft,Wt(),x!==void 0?(h.current=x,ue(x)):Jt(),Zt(!0),q==null||q()},Yi=(d,{behavior:f="smooth",activeIndex:x,onComplete:q}={})=>{const re=Ue.current,we=Ce.current;if(!re||!we)return;if(Tn(),gn(),Zt(!1),f==="auto"){Xi(re,d,x,q);return}const ke=Math.abs(d-re.scrollLeft),Ke=_m(ke,Hm,Om,re.clientWidth*.55);Ht.current=Nm(re,we,d,{duration:Ke,easing:Bm,onComplete:()=>{Ht.current=null,Xi(re,d,x,q)}})},Uo=(d="smooth")=>{const f=Ue.current;if(!f||t.length===0)return;const x=qt()%t.length,q=pn(x,f.scrollLeft),re=Oe.current[q];re&&Yi(re.offsetLeft,{behavior:d,activeIndex:x})},Xo=(d,f="smooth",x,q)=>{const re=Ue.current;if(!re||t.length===0)return;const we=(q??re.scrollLeft)-d,ke=qt(d),Ke=Oe.current[ke];if(mn(Ke)){Zt(!0),Jt();return}const Pt=Oe.current[ke+1],Tt=Ke?Pt?Pt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Tt>0?we>Tt*lo?1:we<-Tt*lo?-1:0:0)!==0){const ol=x??ke%t.length,rl=Xn(q??re.scrollLeft,d,ol);sn(rl,f);return}const wi=q??re.scrollLeft,Qi=qt(wi),oa=Oe.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Zt(!0),Jt();return}Uo("auto")},sn=(d,f="smooth")=>{const x=Ue.current;if(!x||t.length===0)return;const q=pn(d,x.scrollLeft),re=Oe.current[q];re&&(f==="smooth"?vt.current=d:vt.current=null,h.current=d,ue(d),xi(!0),Yi(re.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,x,q,re)=>{const we=x-d,ke=q-f,Ke=Math.abs(we),Pt=Math.abs(ke);if(Ke<Km||Ke<=Pt)return!1;const Tt=we<0?1:-1,Zn=ut?(re+Tt+t.length)%t.length:Math.max(0,Math.min(t.length-1,re+Tt));return Zn===re?!1:(sn(Zn),!0)},Hn=d=>{if(!Je.current.isActive)return;Jn();const f=Ue.current;if(!f)return;const{scrollLeft:x,startActiveIndex:q,hasMoved:re}=Je.current,we=f.scrollLeft;Wt(!0),Je.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),re?Xo(x,"smooth",q,we):(Zt(!0),Jt()),Te()},Zi=(d,f)=>{const x=At.current;At.current=null,x&&(Ji(x.startX,x.startY,d,f,x.startActiveIndex),Te())},Yo=d=>{if(!Ee)return;if(d.pointerType==="touch"){if(Tn(),Zt(!0),St(d.target))return;At.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||St(d.target))return;const f=Ue.current;if(!f)return;Tn(),gn(),Nn(),vt.current=null,Je.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Zt(!1),Te(),f.setPointerCapture(d.pointerId),Jn();const x=q=>{q.pointerType==="mouse"&&Hn(q.pointerId)};Mt.current=x,window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},Jo=d=>{if(!Ee||d.pointerType!=="mouse")return;const f=Ue.current;if(!f||!Je.current.isActive)return;if(d.buttons===0){Hn(d.pointerId);return}const x=d.clientX-Je.current.startX;Math.abs(x)>qm&&(Je.current.hasMoved=!0,nt(!0)),Je.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Je.current.scrollLeft-x,Wt(!0),Jt(),Te())},A=d=>{if(Ee){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):At.current=null;return}d.pointerType==="mouse"&&Hn(d.pointerId)}},pe=d=>{!Ee||d.pointerType!=="mouse"||Hn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Vt(!0));return()=>{cancelAnimationFrame(d),gn(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Ne.current&&clearTimeout(Ne.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){ze(!0);return}Te();const d=It.current;if(!d)return;const f=()=>Te();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Te]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&it()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[it]),l.useLayoutEffect(()=>{Ot()},[O,t.length,ut]),l.useLayoutEffect(()=>{o||sn(h.current,"auto")},[O,o]),l.useLayoutEffect(()=>{sn(0,"auto")},[t.length,ut]),l.useEffect(()=>{const d=Ue.current;if(!d||o||!B)return;const f=x=>{if(x.preventDefault(),Math.abs(x.deltaY)<=Math.abs(x.deltaX))return;const q=x.deltaMode===1?Vm:x.deltaMode===2?d.clientHeight:1,re=x.deltaY*q*zm;if(re!==0){if(gn(),ot.current||(ot.current=!0,et.current=d.scrollLeft,vt.current=null,Zt(!1)),et.current+=re,!ut){const we=d.scrollWidth-d.clientWidth;et.current=Math.max(0,Math.min(we,et.current))}Te(),Xe.current===null&&(Xe.current=requestAnimationFrame(Fn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,B,ut]),l.useEffect(()=>{const d=Ue.current;if(!d)return;const f=()=>{Wt(Je.current.isActive);const q=d.scrollLeft,re=q-We.current;We.current=q;const we=$t.current>0?$t.current*.5:1/0;if(re!==0&&Math.abs(re)<we){const ke=re>0?"forward":"backward";ke!==yt.current&&(yt.current=ke,Cn(ke))}Je.current.isActive&&Je.current.hasMoved||Jt()};d.addEventListener("scroll",f,{passive:!0});const x=new ResizeObserver(()=>{Ot(),Wt(Je.current.isActive),Cn(yt.current),Jt()});return x.observe(d),()=>{gn(),d.removeEventListener("scroll",f),x.disconnect()}},[t.length,ut]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Be||it()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:an?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:an?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...xt}}),r.jsxs("div",{ref:It,className:`${e}-lightbox-dismiss-area`,style:dt,...Dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ct,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ee&&t.length>0?"true":"false","data-mouse-dragging":Wn?"true":"false",onPointerDown:Yo,onPointerMove:Jo,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:pe,children:r.jsx("div",{ref:Ce,className:`${e}-lightbox-strip-track`,style:{gap:O},children:rn.map((d,f)=>{const x=d.image.objectFit??"contain",q=f%t.length,re=Math.floor(f/t.length),we=co(O),ke=`calc(-0.5 * (${we} + ${O}))`;return r.jsxs("div",{ref:Ke=>Oe.current[f]=Ke,className:`${e}-strip-item`,style:{height:_==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:x}}),o&&q<t.length-1&&re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ke,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${re}-${d.image.url}-${q}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":bt?"true":"false",style:wt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:te,flexShrink:0,pointerEvents:"none"},children:o&&r.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:ce,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${X?` ${e}-lightbox-content-area-stacked`:""}`,children:(_e||b)&&r.jsx("div",{className:`${e}-header ${X?`${e}-header-two-row`:`${e}-header-single-row`}`,children:X?pt():_e||b?kt():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(Y),f=`calc(-0.5 * (${Y} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:Y},children:r.jsx("div",{ref:qe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:x=>x.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Q,"--thumbnail-active-color":z},children:[t.map((x,q)=>{const re=co(Q),we=`calc(-0.5 * (${re} + ${Q}))`;return r.jsxs("div",{ref:ke=>{Qe.current[q]=ke},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":W===q?"true":"false",onClick:()=>B&&T==="click"&&sn(q),onMouseEnter:()=>Fe&&T==="hover"&&sn(q),"aria-label":x.image.name?`View ${x.image.name}`:`View image ${q+1}`,"aria-current":W===q?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:x.image.url,alt:"",draggable:!1,style:{...Ie,maxWidth:H,maxHeight:H,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&q<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:we,width:re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${x.image.url}-${q}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
9840
+ `;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Rm={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:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",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:[...Pm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Am={element:Em,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"}]},schema:Rm,sourceCode:Im},xn=e=>e.display==="cover",Do=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,Mm=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*Mm),[]),R=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),b=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),I=l.useCallback(y=>{const k=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-y/k*.12);return`translateY(${y}px) scale(${_})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=y.clientX-k.startX,V=y.clientY-k.startY;if(k.isLocked===null){if(Math.abs(_)<Za&&Math.abs(V)<Za)return;if(V>0&&V>Math.abs(_))k.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{k.isLocked=!1,g();return}}if(!k.isLocked)return;y.preventDefault();const ne=Math.max(0,V);m.current=ne,s(ne)},[e,g]),S=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=k.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!_){g();return}y.clientY-k.startY>=p?T():v()},[p,T,e,g,v]),z=l.useCallback(y=>{S(y)},[S]),M=l.useCallback(y=>{S(y)},[S]),N=o>0,L=a?`transform ${n}ms ease`:"none",C=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:N,backdropStyle:{opacity:R(o),transition:C},mediaAreaStyle:{transform:I(o),transition:L,touchAction:N?"none":void 0,willChange:N?"transform":void 0},overlayContentStyle:J?{opacity:b(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:z,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:N?"none":"pan-x"}:void 0}},km="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(km)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,R=0;const b=()=>{t.removeEventListener("transitionend",I),clearTimeout(R)},I=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,b(),m(n,!0))};return t.addEventListener("transitionend",I),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(${c}px, 0, 0)`,R=window.setTimeout(()=>{p||(p=!0,b(),m(n,!0))},i+64),()=>{p||(p=!0,b(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},st=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[st(e,"fontFamily"),st(e,"fontSettings"),{type:"row",items:[st(e,"fontSize"),st(e,"lineHeight"),st(e,"letterSpacing"),st(e,"wordSpacing")]},st(e,"textAlign"),st(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},ur=(e,t)=>{const n=i=>{const o=st(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),pr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:R,closeIcon:b,closeIconMaxWidth:I,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:z,title1Width:M,title2Width:N,title3Width:L,title1MarginLeft:C=0,title2MarginLeft:J=0,title3MarginLeft:y=0,titleRowMarginBottom:k=0,titleHeaderLayout:_="desktop",contentMarginTop:V,iconMarginLeft:ne}=n,me=d=>P.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,H=me(K),Q=me(m),Y=me(p??.02),O=me(R??0),te=me(V??0),ce=co(te),oe=me(ne??0),[W,ue]=l.useState(0),h=l.useRef(W);h.current=W;const ae=t[W],{title1:be,title2:ye,title3:Ae}=Zm(ae),Z=pr("title1",ur(n,"title1"),i),ge=pr("title2",ur(n,"title2"),i),U=pr("title3",ur(n,"title3"),i),X=_==="mobile",B=!o&&(!i||s),se=B,Ee=B,Fe=B,Re=xn($),Ie=Re?{"--image-aspect-ratio":Do($)}:void 0,_e=!!(be||ye||Ae),F=l.useMemo(()=>tg(e,be,ye,Ae,Z,ge,U),[e,W,be,ye,Ae,Z,ge,U]),D=l.useMemo(()=>({title1Width:M,title2Width:N,title3Width:L}),[M,N,L]),E=l.useMemo(()=>F.map(d=>D[d.widthKey]),[F,D]),j=l.useMemo(()=>ta(F.length,E),[F.length,E]),G=l.useMemo(()=>el(F.length,E),[F.length,E]),ee=l.useMemo(()=>F.filter(d=>d.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[F]),he=l.useMemo(()=>Qa(ee,D),[ee,D]),Se=l.useMemo(()=>Qa(ie,D),[ie,D]),$e=l.useCallback((d,f)=>{const x=F.indexOf(d);if(!X||f==="single-row")return{effectiveWidth:G[x]??0,resolvedWidth:j[x]??0,maxWidth:uo(x,j)};if(f==="two-row-top"){const re=ee.indexOf(d);return{effectiveWidth:he.effective[re]??0,resolvedWidth:he.resolved[re]??0,maxWidth:uo(re,he.resolved)}}const q=ie.indexOf(d);return{effectiveWidth:Se.effective[q]??0,resolvedWidth:Se.resolved[q]??0,maxWidth:uo(q,Se.resolved)}},[ie,Se,G,j,F,ee,he,X]),fe=l.useCallback(d=>P.scalingValue(d,i??!1),[i]),Ge=fe(k??0),de=l.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:J,title3MarginLeft:y}),[C,J,y]),Me=l.useCallback(d=>F.slice(0,d+1).reduce((f,x,q)=>f+(x!=null&&x.marginLeftKey?de[x.marginLeftKey]??0:0)+(j[q]??0),0)+(X?0:C??0),[F,de,j,X,C]),je=l.useCallback(()=>X?0:C??0,[X,C]),Ve=l.useCallback(d=>ie.slice(0,d).reduce((f,x,q)=>f+(x.marginLeftKey?de[x.marginLeftKey]??0:0)+(Se.resolved[q]??0),0),[ie,Se.resolved,de]),at=l.useCallback(d=>{const f=ie[d];return Ve(d)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Se.resolved[d]??0)},[ie,Se.resolved,Ve,de]),ht=(d,f)=>{const x=d.marginLeftKey?de[d.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:re,maxWidth:we}=$e(d,f),ke=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:fe(q),...x>0?{marginLeft:fe(x)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),ke&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(-x),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ke&&r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(we),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:fe(-ei/2),width:fe(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Et=()=>{const d=X?-1:F.findIndex(q=>q.prefix==="title1"),f=!X&&(o||(C??0)>0)?(()=>{const q=C??0,re=d>=0?j[d]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:0,width:`max(${fe(q)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,x=F.flatMap((q,re)=>{if(!q.marginLeftKey)return[];const we=de[q.marginLeftKey]??0,ke=ng(F,j,de,re)+je();return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[re]),style:{position:"absolute",top:0,left:fe(ke),width:`max(${fe(we)}, 10px)`,height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return f?[f,...x]:x},mt=()=>F.map((d,f)=>{const x=uo(f,j),re=Me(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),ft=()=>ie.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const x=de[d.marginLeftKey]??0,q=Ve(f),{resolvedWidth:re}=$e(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(q),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ft=()=>ie.map((d,f)=>{const{maxWidth:x}=$e(d,"two-row-bottom"),re=at(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useRef(null),qe=l.useRef(null),Qe=l.useRef([]),Oe=l.useRef([]),$t=l.useRef(0),At=l.useRef(null),Je=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ht=l.useRef(null),We=l.useRef(0),yt=l.useRef("forward"),et=l.useRef(0),Xe=l.useRef(null),ot=l.useRef(!1),ut=t.length>1&&(!o||!!s),un=ut?3:1,rn=l.useMemo(()=>Array.from({length:un},()=>t).flat(),[t,un]),[Wn,nt]=l.useState(!1),[an,Vt]=l.useState(!1),[jt,ze]=l.useState(!0),vt=l.useRef(null),le=l.useRef(null),xe=l.useRef(!1),Pe=l.useRef(!1),Ne=l.useRef(null),tt=l.useRef(null),bt=se&&!jt,Te=l.useCallback(()=>{se&&(ze(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Je.current.isActive||ze(!1)},jm))},[se]),it=l.useCallback(()=>{o||Pe.current||(Pe.current=!0,Vt(!1),Ne.current=setTimeout(()=>{a()},Li))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":bt?"true":"false",style:{width:P.scalingValue(I??0,i),height:P.scalingValue(I??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:it,"aria-label":"Close",children:r.jsx(nn,{url:b,fill:g,hoverFill:i&&!s?g:v,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),rt=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:fe(C??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const d=F.find(q=>q.prefix==="title1"),f=F.filter(q=>q.prefix==="title2"||q.prefix==="title3"),x=f.length>0||o||(k??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?rt():null,d&&ht(d,"two-row-top"),b&&De()]}),x?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(q=>ht(q,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ft(),Ft()]})]}):null,r.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:Ge,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?rt("single-row"):null,F.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),mt()]}):null,b?De():null]}),St=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Be,backdropStyle:xt,mediaAreaStyle:Ct,overlayContentStyle:wt,swipeHandlers:Dt,dismissAreaStyle:dt}=Zs({enabled:B??!1,onClose:it,animMs:Li,isBlockedTarget:St}),Ot=()=>{if(!ut||t.length===0)return $t.current=0,0;const d=Oe.current[0],f=Oe.current[t.length];if(!d||!f)return $t.current;const x=f.offsetLeft-d.offsetLeft;return x>0&&($t.current=x),$t.current},Wt=(d=!1)=>{if(!ut)return;const f=Ue.current,x=Ot();!f||x<=0||x<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=x,d&&(Je.current.scrollLeft+=x),ot.current&&(et.current+=x)):f.scrollLeft>=x*2&&(f.scrollLeft-=x,d&&(Je.current.scrollLeft-=x),ot.current&&(et.current-=x)))},pn=(d,f=(x=>(x=Ue.current)==null?void 0:x.scrollLeft)()??0)=>{if(!ut)return d;let q=t.length+d,re=1/0;for(let we=0;we<un;we++){const ke=we*t.length+d,Ke=Oe.current[ke];if(!Ke)continue;const Pt=Math.abs(Ke.offsetLeft-f);Pt<re&&(re=Pt,q=ke)}return q},$n=d=>{const f=Ue.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},mn=d=>{const f=Ue.current;if(!d||!f||!$n(d))return!1;const x=d.offsetLeft,q=x+d.offsetWidth;return f.scrollLeft>=x-1&&f.scrollLeft+f.clientWidth<=q+1},qt=(d=(f=>(f=Ue.current)==null?void 0:f.scrollLeft)()??0)=>{for(let q=0;q<Oe.current.length;q+=1){const re=Oe.current[q];if(re&&mn(re))return q}let x={flatIndex:0,distance:1/0};return Oe.current.forEach((q,re)=>{if(!q)return;const we=Math.abs(q.offsetLeft-d);we<x.distance&&(x={flatIndex:re,distance:we})}),x.flatIndex},Cn=d=>{Ue.current&&Oe.current.forEach(f=>{f&&(f.style.scrollSnapAlign=$n(f)&&d==="backward"?"end":"start")})},Xn=(d,f,x)=>{const q=d-f,re=qt(f),we=Oe.current[re];if(mn(we))return qt(d)%t.length;const ke=Oe.current[re+1],Ke=we?ke?ke.offsetLeft-we.offsetLeft:we.offsetWidth:0,Pt=Ke>0?q>Ke*lo?1:q<-Ke*lo?-1:0:0;return Pt===0?x:ut?(x+Pt+t.length)%t.length:Math.max(0,Math.min(t.length-1,x+Pt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=qe.current,x=h.current,q=Qe.current[x];if(!f||!q||f.scrollWidth<=f.clientWidth)return;const re=f.scrollLeft,we=re+f.clientWidth,ke=q.offsetLeft,Ke=ke+q.offsetWidth;if(ke>=re&&Ke<=we)return;const Pt=f.scrollWidth-f.clientWidth;let Tt=re;if(!d&&vt.current===null){const Zn=Qe.current[x-1],wi=Qe.current[x+1],Qi=Zn?q.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-q.offsetLeft:q.offsetWidth;Ke>we?Tt+=Qi:ke<re&&(Tt-=Qi)}else Ke>we?Tt=Ke-f.clientWidth:Tt=ke;f.scrollLeft=Math.max(0,Math.min(Pt,Tt))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(xe.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=xe.current;xe.current=!1,Yn(f)}))},[Yn]),Go=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const x=Math.abs(d-f)>1,q=ut&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);ue(d),xi(x||q)},[t.length,ut,xi]),Jt=()=>{if(!Ue.current||t.length===0||vt.current!==null||Je.current.isActive&&Je.current.hasMoved)return;const d=Ue.current.scrollLeft,f=qt(d)%t.length;f!==h.current&&Go(f)},Ui=()=>{vt.current=null},Zt=d=>{const f=Ue.current;f&&(f.style.scrollSnapType=d?"":"none")},gn=()=>{var d;(d=Ht.current)==null||d.call(Ht),Ht.current=null},Tn=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ot.current=!1},Fn=()=>{const d=Ue.current;if(!d){Xe.current=null,ot.current=!1;return}const f=et.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=et.current,Wt(),Jt(),Xe.current=null,ot.current=!1;return}d.scrollLeft+=f*Dm,Wt(),Jt(),Te(),Xe.current=requestAnimationFrame(Fn)},Nn=()=>{const d=Ce.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,x,q)=>{Nn(),d.scrollLeft=f,We.current=d.scrollLeft,Wt(),x!==void 0?(h.current=x,ue(x)):Jt(),Zt(!0),q==null||q()},Yi=(d,{behavior:f="smooth",activeIndex:x,onComplete:q}={})=>{const re=Ue.current,we=Ce.current;if(!re||!we)return;if(Tn(),gn(),Zt(!1),f==="auto"){Xi(re,d,x,q);return}const ke=Math.abs(d-re.scrollLeft),Ke=_m(ke,Hm,Om,re.clientWidth*.55);Ht.current=Nm(re,we,d,{duration:Ke,easing:Bm,onComplete:()=>{Ht.current=null,Xi(re,d,x,q)}})},Uo=(d="smooth")=>{const f=Ue.current;if(!f||t.length===0)return;const x=qt()%t.length,q=pn(x,f.scrollLeft),re=Oe.current[q];re&&Yi(re.offsetLeft,{behavior:d,activeIndex:x})},Xo=(d,f="smooth",x,q)=>{const re=Ue.current;if(!re||t.length===0)return;const we=(q??re.scrollLeft)-d,ke=qt(d),Ke=Oe.current[ke];if(mn(Ke)){Zt(!0),Jt();return}const Pt=Oe.current[ke+1],Tt=Ke?Pt?Pt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Tt>0?we>Tt*lo?1:we<-Tt*lo?-1:0:0)!==0){const ol=x??ke%t.length,rl=Xn(q??re.scrollLeft,d,ol);sn(rl,f);return}const wi=q??re.scrollLeft,Qi=qt(wi),oa=Oe.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Zt(!0),Jt();return}Uo("auto")},sn=(d,f="smooth")=>{const x=Ue.current;if(!x||t.length===0)return;const q=pn(d,x.scrollLeft),re=Oe.current[q];re&&(f==="smooth"?vt.current=d:vt.current=null,h.current=d,ue(d),xi(!0),Yi(re.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,x,q,re)=>{const we=x-d,ke=q-f,Ke=Math.abs(we),Pt=Math.abs(ke);if(Ke<Km||Ke<=Pt)return!1;const Tt=we<0?1:-1,Zn=ut?(re+Tt+t.length)%t.length:Math.max(0,Math.min(t.length-1,re+Tt));return Zn===re?!1:(sn(Zn),!0)},Hn=d=>{if(!Je.current.isActive)return;Jn();const f=Ue.current;if(!f)return;const{scrollLeft:x,startActiveIndex:q,hasMoved:re}=Je.current,we=f.scrollLeft;Wt(!0),Je.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),re?Xo(x,"smooth",q,we):(Zt(!0),Jt()),Te()},Zi=(d,f)=>{const x=At.current;At.current=null,x&&(Ji(x.startX,x.startY,d,f,x.startActiveIndex),Te())},Yo=d=>{if(!Ee)return;if(d.pointerType==="touch"){if(Tn(),Zt(!0),St(d.target))return;At.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||St(d.target))return;const f=Ue.current;if(!f)return;Tn(),gn(),Nn(),vt.current=null,Je.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Zt(!1),Te(),f.setPointerCapture(d.pointerId),Jn();const x=q=>{q.pointerType==="mouse"&&Hn(q.pointerId)};Mt.current=x,window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},Jo=d=>{if(!Ee||d.pointerType!=="mouse")return;const f=Ue.current;if(!f||!Je.current.isActive)return;if(d.buttons===0){Hn(d.pointerId);return}const x=d.clientX-Je.current.startX;Math.abs(x)>qm&&(Je.current.hasMoved=!0,nt(!0)),Je.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Je.current.scrollLeft-x,Wt(!0),Jt(),Te())},A=d=>{if(Ee){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):At.current=null;return}d.pointerType==="mouse"&&Hn(d.pointerId)}},pe=d=>{!Ee||d.pointerType!=="mouse"||Hn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Vt(!0));return()=>{cancelAnimationFrame(d),gn(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Ne.current&&clearTimeout(Ne.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){ze(!0);return}Te();const d=It.current;if(!d)return;const f=()=>Te();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Te]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&it()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[it]),l.useLayoutEffect(()=>{Ot()},[O,t.length,ut]),l.useLayoutEffect(()=>{o||sn(h.current,"auto")},[O,o]),l.useLayoutEffect(()=>{sn(0,"auto")},[t.length,ut]),l.useEffect(()=>{const d=Ue.current;if(!d||o||!B)return;const f=x=>{if(x.preventDefault(),Math.abs(x.deltaY)<=Math.abs(x.deltaX))return;const q=x.deltaMode===1?Vm:x.deltaMode===2?d.clientHeight:1,re=x.deltaY*q*zm;if(re!==0){if(gn(),ot.current||(ot.current=!0,et.current=d.scrollLeft,vt.current=null,Zt(!1)),et.current+=re,!ut){const we=d.scrollWidth-d.clientWidth;et.current=Math.max(0,Math.min(we,et.current))}Te(),Xe.current===null&&(Xe.current=requestAnimationFrame(Fn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,B,ut]),l.useEffect(()=>{const d=Ue.current;if(!d)return;const f=()=>{Wt(Je.current.isActive);const q=d.scrollLeft,re=q-We.current;We.current=q;const we=$t.current>0?$t.current*.5:1/0;if(re!==0&&Math.abs(re)<we){const ke=re>0?"forward":"backward";ke!==yt.current&&(yt.current=ke,Cn(ke))}Je.current.isActive&&Je.current.hasMoved||Jt()};d.addEventListener("scroll",f,{passive:!0});const x=new ResizeObserver(()=>{Ot(),Wt(Je.current.isActive),Cn(yt.current),Jt()});return x.observe(d),()=>{gn(),d.removeEventListener("scroll",f),x.disconnect()}},[t.length,ut]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Be||it()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:an?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:an?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...xt}}),r.jsxs("div",{ref:It,className:`${e}-lightbox-dismiss-area`,style:dt,...Dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ct,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ee&&t.length>0?"true":"false","data-mouse-dragging":Wn?"true":"false",onPointerDown:Yo,onPointerMove:Jo,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:pe,children:r.jsx("div",{ref:Ce,className:`${e}-lightbox-strip-track`,style:{gap:O},children:rn.map((d,f)=>{const x=d.image.objectFit??"contain",q=f%t.length,re=Math.floor(f/t.length),we=co(O),ke=`calc(-0.5 * (${we} + ${O}))`;return r.jsxs("div",{ref:Ke=>Oe.current[f]=Ke,className:`${e}-strip-item`,style:{height:_==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:x}}),o&&q<t.length-1&&re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ke,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${re}-${d.image.url}-${q}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":bt?"true":"false",style:wt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:te,flexShrink:0,pointerEvents:"none"},children:o&&r.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:ce,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${X?` ${e}-lightbox-content-area-stacked`:""}`,children:(_e||b)&&r.jsx("div",{className:`${e}-header ${X?`${e}-header-two-row`:`${e}-header-single-row`}`,children:X?pt():_e||b?kt():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(Y),f=`calc(-0.5 * (${Y} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:Y},children:r.jsx("div",{ref:qe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:x=>x.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Q,"--thumbnail-active-color":z},children:[t.map((x,q)=>{const re=co(Q),we=`calc(-0.5 * (${re} + ${Q}))`;return r.jsxs("div",{ref:ke=>{Qe.current[q]=ke},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":W===q?"true":"false",onClick:()=>B&&T==="click"&&sn(q),onMouseEnter:()=>Fe&&T==="hover"&&sn(q),"aria-label":x.image.name?`View ${x.image.name}`:`View image ${q+1}`,"aria-current":W===q?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:x.image.url,alt:"",draggable:!1,style:{...Ie,maxWidth:H,maxHeight:H,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&q<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:we,width:re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${x.image.url}-${q}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
9841
9841
  .${e}-wrapper {
9842
9842
  position: relative;
9843
9843
  width: 100%;
@@ -10783,7 +10783,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10783
10783
  </>
10784
10784
  );
10785
10785
  };
10786
- `,sg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),zn={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 lg(e){const t={};return t[st(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[st(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[st(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[st(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[st(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[st(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[st(t,"fontFamily")]:"Goudy Bookletter 1911",[st(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[st(t,"letterSpacing")]:0,[st(t,"wordSpacing")]:0,[st(t,"textAlign")]:"left",[st(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[st(n,"fontSize")]=i),o!==void 0&&(t[st(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...cg,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:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${st(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",qo=na,Lr=`${na}-`,Ko=e=>`${na}-${e}`,ia=e=>e===qo||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Ko(e)));if(i)return i}const n=ns(t.get(qo));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Ko(t),String(e)):i.searchParams.set(qo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ko(e)||i===qo:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ko(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,mr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},$o=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sg=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,gr=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},po=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Ro=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ro(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)},mo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ro(e.length,n),effective:Er(e.length,n)}},$g=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Ig={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},go=(e,t)=>{const n=i=>{const o=lt(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[Ig[t]]}},ho=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},Rg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:R,coverFit:b,backgroundColor:I,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:z,title1MarginLeft:M=0,title2MarginLeft:N=0,title3MarginLeft:L=0,titleRowMarginBottom:C=0,titleHeaderLayout:J="single-row",countCloseGap:y=0,closeIcon:k,closeIconMaxWidth:_,closeIconColor:V,closeIconHoverColor:ne,contentMarginTop:me=0,iconMarginRight:K=0}=n,H=l.useCallback(A=>P.scalingValue(A,i??!1),[i]),Q=H(g??0),Y=`${v}%`,O=`${T}%`,te=H(y),ce=H(me),oe=H(K),W=ho("title1",go(n,"title1"),i),ue=ho("title2",go(n,"title2"),i),h=ho("title3",go(n,"title3"),i),ae=ho("count",go(n,"count"),i),be=J==="mobile",ye=!i||!!s,Ae=!o&&(!i||!!s),Z=l.useMemo(()=>$o(t,R),[t,R]),[ge,U]=l.useState(a),X=Z[ge],B=X==null?void 0:X.entry,[se,Ee]=l.useState(!1),[Fe,Re]=l.useState(null),[Ie,_e]=l.useState(!1),[F,D]=l.useState(null),[E,j]=l.useState(!1),[G,ee]=l.useState(0),[ie,he]=l.useState(),[Se,$e]=l.useState(),[fe,Ge]=l.useState(null),de=l.useRef(null),Me=l.useRef(0),je=l.useRef(0),Ve=l.useRef(0),at=l.useRef(!1),ht=l.useRef(null),Et=l.useRef(null),mt=l.useRef(null),ft=l.useRef(null),Ft=l.useRef(null),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useCallback(()=>{const A=Et.current;if(!A)return;const pe=A.closest(`.${e}-lightbox-content-area`);if(!pe)return A.getBoundingClientRect().width;const d=Array.from(pe.children).reduce((f,x)=>!(x instanceof HTMLElement)||x.contains(A)?f:f+x.getBoundingClientRect().width,0);return pe.getBoundingClientRect().width-d},[e]),qe=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Qe=l.useCallback(A=>{A===Me.current&&(D(null),j(!1))},[]),Oe=l.useCallback(()=>{o||at.current||(at.current=!0,m==null||m(),Ee(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),$t=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Je,mediaAreaStyle:Mt,overlayContentStyle:Ht,swipeHandlers:We,dismissAreaStyle:yt}=Zs({enabled:Ae,onClose:Oe,animMs:300,isBlockedTarget:$t}),et=l.useCallback(A=>{u&&tl(A+1,c,!0)},[u,c]),Xe=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),ot=l.useCallback(A=>{if(Z.length===0)return;const pe=(A%Z.length+Z.length)%Z.length;if(pe===ge)return;const d=Z[ge],f=Z[pe];Me.current+=1;const x=Me.current,q=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),re=Xe(mt.current),we=q?(()=>{const Ke=Ce();Ni.flushSync(()=>{Ge(f.entry)}),mt.current&&Ke&&(mt.current.style.width=`${Ke}px`);const Pt=Xe(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:Pt,incomingTitlesMeasureWidth:Ke}})():void 0,ke=Math.max(re??0,(we==null?void 0:we.measuredIncomingTitlesHeight)??0)||void 0;ee(x),D(ge),j(!0),U(pe),et(pe),Ve.current=pe,q?(qe(),ke&&he(ke),we!=null&&we.incomingTitlesMeasureWidth&&$e(we.incomingTitlesMeasureWidth),Re((d==null?void 0:d.entryIndex)??null),_e(!0),je.current=f.entryIndex,de.current=setTimeout(()=>{Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),de.current=null},400)):(qe(),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),je.current=f.entryIndex)},[ge,qe,Ce,Xe,Z,et,w]),ut=l.useCallback(()=>{Ue.current=null},[]),un=l.useCallback(A=>{!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Ue.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[ye,Z.length]),rn=l.useCallback(A=>{var Ke;if(!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(At){ut();return}const pe=Ue.current;if(!pe||pe.pointerId!==A.pointerId||(ut(),A.target.closest("[data-controls]")))return;const f=A.clientX-pe.startX,x=A.clientY-pe.startY,q=Math.abs(f),re=Math.abs(x);if(q>=gg&&q>re){ot(f>0?ge-1:ge+1);return}if(q>ts||re>ts)return;const we=(Ke=ft.current)==null?void 0:Ke.getBoundingClientRect(),ke=we?we.left+we.width/2:window.innerWidth/2;ot(A.clientX<ke?ge-1:ge+1)},[ge,ye,ot,At,ut,Z.length]),Wn=l.useCallback(A=>{const pe=Ue.current;(pe==null?void 0:pe.pointerId)===A.pointerId&&ut()},[ut]);Qs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{Ee(!0),requestAnimationFrame(()=>{Ft.current?Ft.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(A),ht.current&&clearTimeout(ht.current),de.current&&clearTimeout(de.current);const pe=It.current;pe&&document.contains(pe)&&pe.focus()}},[]),l.useEffect(()=>{var A;w!=="fade"&&(je.current=((A=Z[ge])==null?void 0:A.entryIndex)??0,qe(),Re(null),_e(!1),he(void 0),$e(void 0))},[ge,qe,Z,w]),l.useEffect(()=>{const A=pe=>{if(pe.key==="Escape"){Oe();return}if(pe.key==="ArrowLeft"&&Z.length>1){ot(ge-1);return}if(pe.key==="ArrowRight"&&Z.length>1){ot(ge+1);return}if(pe.key==="Tab"&&ft.current){const d=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(we=>!we.closest('[aria-hidden="true"]'));if(f.length===0)return;const x=f[0],q=f[f.length-1],re=document.activeElement;pe.shiftKey?(re===x||!ft.current.contains(re))&&(pe.preventDefault(),q.focus()):(re===q||!ft.current.contains(re))&&(pe.preventDefault(),x.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[ot,Oe,ge,Z.length]),l.useLayoutEffect(()=>{qe(),Me.current=0,ee(0),D(null),j(!1),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),U(A=>{const pe=Math.max(0,Z.length-1);return Math.min(A,pe)})},[qe,t.length,R,Z.length]),l.useLayoutEffect(()=>{var d;const A=Math.max(0,Z.length-1),pe=Math.min(Math.max(0,a),A);Ve.current=pe,je.current=((d=Z[pe])==null?void 0:d.entryIndex)??0,U(pe)},[a]);const nt=Fe!==null?t[Fe]:null,an=F!==null?Z[F]:null,Vt=(B==null?void 0:B.title1)||(B==null?void 0:B.title2)||(B==null?void 0:B.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),jt=Sg(R,Z,t),ze=k!==null,vt=Vt||jt||ze,le=jt&&ze?{gap:te}:void 0,xe=`${e}-titles-stack${be?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${be?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,tt=(M??0)>0||o,bt=H(C),Te=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:z??hr.title3Width}),[$,S,z]),it=l.useMemo(()=>({title2MarginLeft:N,title3MarginLeft:L}),[N,L]),De=l.useMemo(()=>B?po(e,B,W,ue,h):[],[e,B,W,ue,h]),rt=l.useMemo(()=>De.map(A=>Te[A.widthKey]),[De,Te]),pt=l.useMemo(()=>Ro(De.length,rt),[De.length,rt]),kt=l.useMemo(()=>Er(De.length,rt),[De.length,rt]),St=l.useMemo(()=>De.filter(A=>A.prefix==="title1"),[De]),Be=l.useMemo(()=>De.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[De]),xt=l.useMemo(()=>mo(St,Te),[St,Te]),Ct=l.useMemo(()=>mo(Be,Te),[Be,Te]),wt=l.useCallback((A,pe)=>{const d=De.findIndex(x=>x.prefix===A.prefix);if(!be||pe==="single-row")return{effectiveWidth:kt[d]??0,resolvedWidth:pt[d]??0,maxWidth:Vn(d,pt)};if(pe==="two-row-top"){const x=St.findIndex(q=>q.prefix===A.prefix);return{effectiveWidth:xt.effective[x]??0,resolvedWidth:xt.resolved[x]??0,maxWidth:Vn(x,xt.resolved)}}const f=Be.findIndex(x=>x.prefix===A.prefix);return{effectiveWidth:Ct.effective[f]??0,resolvedWidth:Ct.resolved[f]??0,maxWidth:Vn(f,Ct.resolved)}},[De,Be,Ct,kt,pt,St,xt,be]),Dt=l.useCallback(A=>Cg(De,pt,it,A)+(be?0:M??0),[De,pt,it,be,M]),dt=l.useCallback(()=>be?0:M??0,[be,M]),Ot=l.useCallback(A=>Be.slice(0,A).reduce((pe,d,f)=>pe+(d.marginLeftKey?it[d.marginLeftKey]??0:0)+(Ct.resolved[f]??0),0),[Be,Ct.resolved,it]),Wt=l.useCallback(A=>{const pe=Be[A];return Ot(A)+(pe.marginLeftKey?it[pe.marginLeftKey]??0:0)+(Ct.resolved[A]??0)},[Be,Ct.resolved,Ot,it]),pn=l.useCallback((A,pe,d)=>{if(!be||d==="single-row"){const we=A.findIndex(Tt=>Tt.prefix===pe.prefix),ke=A.map(Tt=>Te[Tt.widthKey]),Ke=Ro(A.length,ke);return{effectiveWidth:Er(A.length,ke)[we]??0,resolvedWidth:Ke[we]??0,maxWidth:Vn(we,Ke)}}if(d==="two-row-top"){const we=A.filter(Tt=>Tt.prefix==="title1"),ke=we.findIndex(Tt=>Tt.prefix===pe.prefix),{resolved:Ke,effective:Pt}=mo(we,Te);return{effectiveWidth:Pt[ke]??0,resolvedWidth:Ke[ke]??0,maxWidth:Vn(ke,Ke)}}const f=A.filter(we=>we.prefix==="title2"||we.prefix==="title3"),x=f.findIndex(we=>we.prefix===pe.prefix),{resolved:q,effective:re}=mo(f,Te);return{effectiveWidth:re[x]??0,resolvedWidth:q[x]??0,maxWidth:Vn(x,q)}},[Te,be]),$n=(A,pe,d)=>{const f=A.marginLeftKey?it[A.marginLeftKey]??0:0,{effectiveWidth:x,resolvedWidth:q,maxWidth:re}=d??wt(A,pe),we=Math.max(f,gr),ke=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:H(x),...f>0?{marginLeft:H(f)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),ke&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(-f),width:H(we),height:"100%",pointerEvents:"auto"}}):null,ke?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ti/2),width:H(ti),height:"100%",pointerEvents:"auto"}}):null]},A.className)},mn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(M??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),qt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:wg(Z,ge,R,t)}),Xn=()=>jt?o&&ze?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${mr(te)} + ${te}))`,width:mr(te),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!jt&&!ze?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),ze?Jt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn():null,Zt(B),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),sn()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[jt||Vt?qt():null,tt?mn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Ie&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(fe||B)}),r.jsxs("div",{ref:Et,className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%",...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:Nn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(B)})]}),sn()]}),Yn()]}),Jt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:P.scalingValue(_??0,i),height:P.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":ne},children:[r.jsx("button",{ref:Ft,type:"button",className:`${e}-close-icon-inner`,onClick:Oe,"aria-label":"Close",children:r.jsx(nn,{url:k??"",fill:V,hoverFill:i&&!s?V:ne,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Ui=(A,pe)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[jt||Vt?qt():null,tt?mn():null,pe!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:pe},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Zt=A=>{if(!A)return null;const pe=po(e,A,W,ue,h);return r.jsx(r.Fragment,{children:pe.map(d=>$n(d,"single-row",pn(pe,d,"single-row")))})},gn=A=>{if(!A)return null;const pe=po(e,A,W,ue,h),d=pe.find(f=>f.prefix==="title1");return d?$n(d,"two-row-top",pn(pe,d,"two-row-top")):null},Tn=(A,pe=!1)=>{const d=A?po(e,A,W,ue,h):[],f=d.filter(re=>re.prefix==="title2"||re.prefix==="title3"),x=o&&pe;return f.length>0||x||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(re=>$n(re,"two-row-bottom",pn(d,re,"two-row-bottom"))),pe&&o?r.jsxs(r.Fragment,{children:[Uo(),Xo()]}):null]}):null,(C??0)>0||x?r.jsx("div",{"data-controls":x?"titleRowMarginBottom":void 0,"data-controls-axis":x?"y":void 0,"data-controls-reverse":x?"":void 0,className:x?`${e}-control`:void 0,style:{height:bt,width:"100%",flexShrink:0,pointerEvents:x?"auto":"none"}}):null]}):null},Fn=(A,pe=!1)=>r.jsxs(r.Fragment,{children:[Ui(gn(A)),Tn(A,pe)]}),Nn=A=>be?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Zt(A)}):null,Xi=()=>De.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=$g(De,pt,it,pe)+dt(),x=Math.max(d,gr);return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[pe]),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Yi=()=>De.map((A,pe)=>{const d=Vn(pe,pt),x=Dt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Uo=()=>Be.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=Ot(pe),x=Math.max(d,gr),{resolvedWidth:q}=wt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Xo=()=>Be.map((A,pe)=>{const{maxWidth:d}=wt(A,"two-row-bottom"),x=Wt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),sn=()=>!o||be?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=A=>{const pe=!A.objectFit&&xn(b);return{className:`${e}-slide-image-cell${pe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Y,maxHeight:O,...pe?{"--image-aspect-ratio":Do(b)}:{}}}},Ji=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:xn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=A=>{if(A.length===0)return null;const pe=A.length>1,d=mr(Q),f=`calc(-0.5 * (${d} + ${Q}))`;if(A.length===1){const x=A[0];return r.jsx("div",{...Jn(x),children:r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:pe?{gap:Q}:void 0,children:A.map((x,q)=>r.jsxs("div",{...Jn(x),children:[r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1}),o&&pe&&q<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${x.url}-${q}`))})},Zi=!!(B!=null&&B.title2||B!=null&&B.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(C??0)>0||o),Yo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(fe||B)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...Ie&&ie?{minHeight:ie}:void 0,...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%"},children:[nt&&Ie?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:gn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:gn(B)})]}),Ie&&ie?ie:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${be?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(B,!0)})]}):null]})]}),Jo=()=>{const A=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(B,!0)}),sn()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Oe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ze?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Je}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:yt,...We,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&Z.length>1?"true":"false",onPointerDown:ye?un:void 0,onPointerUp:ye?rn:void 0,onPointerCancel:ye?Wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[an&&E?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Qe(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(an.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${E?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:X?Hn(X.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ht,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ce,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...be?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${be?` ${e}-text-bar-cell-stacked`:""}`,style:be?void 0:{flex:1,minWidth:0,width:"100%"},children:be?w==="fade"?Yo():Jo():w==="fade"?Go():xi()})})})]})]})]})};function Ag(e){return`
10786
+ `,sg="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),zn={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 lg(e){const t={};return t[st(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[st(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[st(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[st(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[st(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[st(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[st(t,"fontFamily")]:"Goudy Bookletter 1911",[st(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[st(t,"letterSpacing")]:0,[st(t,"wordSpacing")]:0,[st(t,"textAlign")]:"left",[st(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[st(n,"fontSize")]=i),o!==void 0&&(t[st(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",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"]}},thumbnailActiveColor:{type:"string",scope:"common",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:"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"}},...cg,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:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${st(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",qo=na,Lr=`${na}-`,Ko=e=>`${na}-${e}`,ia=e=>e===qo||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Ko(e)));if(i)return i}const n=ns(t.get(qo));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Ko(t),String(e)):i.searchParams.set(qo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ko(e)||i===qo:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ko(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,mr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},$o=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sg=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,gr=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},po=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Ro=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ro(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)},mo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ro(e.length,n),effective:Er(e.length,n)}},$g=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Ig={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},go=(e,t)=>{const n=i=>{const o=lt(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[Ig[t]]}},ho=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},Rg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:R,coverFit:b,backgroundColor:I,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:z,title1MarginLeft:M=0,title2MarginLeft:N=0,title3MarginLeft:L=0,titleRowMarginBottom:C=0,titleHeaderLayout:J="single-row",countCloseGap:y=0,closeIcon:k,closeIconMaxWidth:_,closeIconColor:V,closeIconHoverColor:ne,contentMarginTop:me=0,iconMarginRight:K=0}=n,H=l.useCallback(A=>P.scalingValue(A,i??!1),[i]),Q=H(g??0),Y=`${v}%`,O=`${T}%`,te=H(y),ce=H(me),oe=H(K),W=ho("title1",go(n,"title1"),i),ue=ho("title2",go(n,"title2"),i),h=ho("title3",go(n,"title3"),i),ae=ho("count",go(n,"count"),i),be=J==="mobile",ye=!i||!!s,Ae=!o&&(!i||!!s),Z=l.useMemo(()=>$o(t,R),[t,R]),[ge,U]=l.useState(a),X=Z[ge],B=X==null?void 0:X.entry,[se,Ee]=l.useState(!1),[Fe,Re]=l.useState(null),[Ie,_e]=l.useState(!1),[F,D]=l.useState(null),[E,j]=l.useState(!1),[G,ee]=l.useState(0),[ie,he]=l.useState(),[Se,$e]=l.useState(),[fe,Ge]=l.useState(null),de=l.useRef(null),Me=l.useRef(0),je=l.useRef(0),Ve=l.useRef(0),at=l.useRef(!1),ht=l.useRef(null),Et=l.useRef(null),mt=l.useRef(null),ft=l.useRef(null),Ft=l.useRef(null),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useCallback(()=>{const A=Et.current;if(!A)return;const pe=A.closest(`.${e}-lightbox-content-area`);if(!pe)return A.getBoundingClientRect().width;const d=Array.from(pe.children).reduce((f,x)=>!(x instanceof HTMLElement)||x.contains(A)?f:f+x.getBoundingClientRect().width,0);return pe.getBoundingClientRect().width-d},[e]),qe=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Qe=l.useCallback(A=>{A===Me.current&&(D(null),j(!1))},[]),Oe=l.useCallback(()=>{o||at.current||(at.current=!0,m==null||m(),Ee(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),$t=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Je,mediaAreaStyle:Mt,overlayContentStyle:Ht,swipeHandlers:We,dismissAreaStyle:yt}=Zs({enabled:Ae,onClose:Oe,animMs:300,isBlockedTarget:$t}),et=l.useCallback(A=>{u&&tl(A+1,c,!0)},[u,c]),Xe=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),ot=l.useCallback(A=>{if(Z.length===0)return;const pe=(A%Z.length+Z.length)%Z.length;if(pe===ge)return;const d=Z[ge],f=Z[pe];Me.current+=1;const x=Me.current,q=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),re=Xe(mt.current),we=q?(()=>{const Ke=Ce();Ni.flushSync(()=>{Ge(f.entry)}),mt.current&&Ke&&(mt.current.style.width=`${Ke}px`);const Pt=Xe(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:Pt,incomingTitlesMeasureWidth:Ke}})():void 0,ke=Math.max(re??0,(we==null?void 0:we.measuredIncomingTitlesHeight)??0)||void 0;ee(x),D(ge),j(!0),U(pe),et(pe),Ve.current=pe,q?(qe(),ke&&he(ke),we!=null&&we.incomingTitlesMeasureWidth&&$e(we.incomingTitlesMeasureWidth),Re((d==null?void 0:d.entryIndex)??null),_e(!0),je.current=f.entryIndex,de.current=setTimeout(()=>{Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),de.current=null},400)):(qe(),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),je.current=f.entryIndex)},[ge,qe,Ce,Xe,Z,et,w]),ut=l.useCallback(()=>{Ue.current=null},[]),un=l.useCallback(A=>{!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Ue.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[ye,Z.length]),rn=l.useCallback(A=>{var Ke;if(!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(At){ut();return}const pe=Ue.current;if(!pe||pe.pointerId!==A.pointerId||(ut(),A.target.closest("[data-controls]")))return;const f=A.clientX-pe.startX,x=A.clientY-pe.startY,q=Math.abs(f),re=Math.abs(x);if(q>=gg&&q>re){ot(f>0?ge-1:ge+1);return}if(q>ts||re>ts)return;const we=(Ke=ft.current)==null?void 0:Ke.getBoundingClientRect(),ke=we?we.left+we.width/2:window.innerWidth/2;ot(A.clientX<ke?ge-1:ge+1)},[ge,ye,ot,At,ut,Z.length]),Wn=l.useCallback(A=>{const pe=Ue.current;(pe==null?void 0:pe.pointerId)===A.pointerId&&ut()},[ut]);Qs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{Ee(!0),requestAnimationFrame(()=>{Ft.current?Ft.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(A),ht.current&&clearTimeout(ht.current),de.current&&clearTimeout(de.current);const pe=It.current;pe&&document.contains(pe)&&pe.focus()}},[]),l.useEffect(()=>{var A;w!=="fade"&&(je.current=((A=Z[ge])==null?void 0:A.entryIndex)??0,qe(),Re(null),_e(!1),he(void 0),$e(void 0))},[ge,qe,Z,w]),l.useEffect(()=>{const A=pe=>{if(pe.key==="Escape"){Oe();return}if(pe.key==="ArrowLeft"&&Z.length>1){ot(ge-1);return}if(pe.key==="ArrowRight"&&Z.length>1){ot(ge+1);return}if(pe.key==="Tab"&&ft.current){const d=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(we=>!we.closest('[aria-hidden="true"]'));if(f.length===0)return;const x=f[0],q=f[f.length-1],re=document.activeElement;pe.shiftKey?(re===x||!ft.current.contains(re))&&(pe.preventDefault(),q.focus()):(re===q||!ft.current.contains(re))&&(pe.preventDefault(),x.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[ot,Oe,ge,Z.length]),l.useLayoutEffect(()=>{qe(),Me.current=0,ee(0),D(null),j(!1),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),U(A=>{const pe=Math.max(0,Z.length-1);return Math.min(A,pe)})},[qe,t.length,R,Z.length]),l.useLayoutEffect(()=>{var d;const A=Math.max(0,Z.length-1),pe=Math.min(Math.max(0,a),A);Ve.current=pe,je.current=((d=Z[pe])==null?void 0:d.entryIndex)??0,U(pe)},[a]);const nt=Fe!==null?t[Fe]:null,an=F!==null?Z[F]:null,Vt=(B==null?void 0:B.title1)||(B==null?void 0:B.title2)||(B==null?void 0:B.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),jt=Sg(R,Z,t),ze=k!==null,vt=Vt||jt||ze,le=jt&&ze?{gap:te}:void 0,xe=`${e}-titles-stack${be?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${be?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,tt=(M??0)>0||o,bt=H(C),Te=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:z??hr.title3Width}),[$,S,z]),it=l.useMemo(()=>({title2MarginLeft:N,title3MarginLeft:L}),[N,L]),De=l.useMemo(()=>B?po(e,B,W,ue,h):[],[e,B,W,ue,h]),rt=l.useMemo(()=>De.map(A=>Te[A.widthKey]),[De,Te]),pt=l.useMemo(()=>Ro(De.length,rt),[De.length,rt]),kt=l.useMemo(()=>Er(De.length,rt),[De.length,rt]),St=l.useMemo(()=>De.filter(A=>A.prefix==="title1"),[De]),Be=l.useMemo(()=>De.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[De]),xt=l.useMemo(()=>mo(St,Te),[St,Te]),Ct=l.useMemo(()=>mo(Be,Te),[Be,Te]),wt=l.useCallback((A,pe)=>{const d=De.findIndex(x=>x.prefix===A.prefix);if(!be||pe==="single-row")return{effectiveWidth:kt[d]??0,resolvedWidth:pt[d]??0,maxWidth:Vn(d,pt)};if(pe==="two-row-top"){const x=St.findIndex(q=>q.prefix===A.prefix);return{effectiveWidth:xt.effective[x]??0,resolvedWidth:xt.resolved[x]??0,maxWidth:Vn(x,xt.resolved)}}const f=Be.findIndex(x=>x.prefix===A.prefix);return{effectiveWidth:Ct.effective[f]??0,resolvedWidth:Ct.resolved[f]??0,maxWidth:Vn(f,Ct.resolved)}},[De,Be,Ct,kt,pt,St,xt,be]),Dt=l.useCallback(A=>Cg(De,pt,it,A)+(be?0:M??0),[De,pt,it,be,M]),dt=l.useCallback(()=>be?0:M??0,[be,M]),Ot=l.useCallback(A=>Be.slice(0,A).reduce((pe,d,f)=>pe+(d.marginLeftKey?it[d.marginLeftKey]??0:0)+(Ct.resolved[f]??0),0),[Be,Ct.resolved,it]),Wt=l.useCallback(A=>{const pe=Be[A];return Ot(A)+(pe.marginLeftKey?it[pe.marginLeftKey]??0:0)+(Ct.resolved[A]??0)},[Be,Ct.resolved,Ot,it]),pn=l.useCallback((A,pe,d)=>{if(!be||d==="single-row"){const we=A.findIndex(Tt=>Tt.prefix===pe.prefix),ke=A.map(Tt=>Te[Tt.widthKey]),Ke=Ro(A.length,ke);return{effectiveWidth:Er(A.length,ke)[we]??0,resolvedWidth:Ke[we]??0,maxWidth:Vn(we,Ke)}}if(d==="two-row-top"){const we=A.filter(Tt=>Tt.prefix==="title1"),ke=we.findIndex(Tt=>Tt.prefix===pe.prefix),{resolved:Ke,effective:Pt}=mo(we,Te);return{effectiveWidth:Pt[ke]??0,resolvedWidth:Ke[ke]??0,maxWidth:Vn(ke,Ke)}}const f=A.filter(we=>we.prefix==="title2"||we.prefix==="title3"),x=f.findIndex(we=>we.prefix===pe.prefix),{resolved:q,effective:re}=mo(f,Te);return{effectiveWidth:re[x]??0,resolvedWidth:q[x]??0,maxWidth:Vn(x,q)}},[Te,be]),$n=(A,pe,d)=>{const f=A.marginLeftKey?it[A.marginLeftKey]??0:0,{effectiveWidth:x,resolvedWidth:q,maxWidth:re}=d??wt(A,pe),we=Math.max(f,gr),ke=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:H(x),...f>0?{marginLeft:H(f)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),ke&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(-f),width:H(we),height:"100%",pointerEvents:"auto"}}):null,ke?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ti/2),width:H(ti),height:"100%",pointerEvents:"auto"}}):null]},A.className)},mn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(M??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),qt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:wg(Z,ge,R,t)}),Xn=()=>jt?o&&ze?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${mr(te)} + ${te}))`,width:mr(te),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!jt&&!ze?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),ze?Jt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn():null,Zt(B),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),sn()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[jt||Vt?qt():null,tt?mn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Ie&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(fe||B)}),r.jsxs("div",{ref:Et,className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%",...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:Nn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(B)})]}),sn()]}),Yn()]}),Jt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:P.scalingValue(_??0,i),height:P.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":ne},children:[r.jsx("button",{ref:Ft,type:"button",className:`${e}-close-icon-inner`,onClick:Oe,"aria-label":"Close",children:r.jsx(nn,{url:k??"",fill:V,hoverFill:i&&!s?V:ne,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Ui=(A,pe)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[jt||Vt?qt():null,tt?mn():null,pe!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:pe},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Zt=A=>{if(!A)return null;const pe=po(e,A,W,ue,h);return r.jsx(r.Fragment,{children:pe.map(d=>$n(d,"single-row",pn(pe,d,"single-row")))})},gn=A=>{if(!A)return null;const pe=po(e,A,W,ue,h),d=pe.find(f=>f.prefix==="title1");return d?$n(d,"two-row-top",pn(pe,d,"two-row-top")):null},Tn=(A,pe=!1)=>{const d=A?po(e,A,W,ue,h):[],f=d.filter(re=>re.prefix==="title2"||re.prefix==="title3"),x=o&&pe;return f.length>0||x||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(re=>$n(re,"two-row-bottom",pn(d,re,"two-row-bottom"))),pe&&o?r.jsxs(r.Fragment,{children:[Uo(),Xo()]}):null]}):null,(C??0)>0||x?r.jsx("div",{"data-controls":x?"titleRowMarginBottom":void 0,"data-controls-axis":x?"y":void 0,"data-controls-reverse":x?"":void 0,className:x?`${e}-control`:void 0,style:{height:bt,width:"100%",flexShrink:0,pointerEvents:x?"auto":"none"}}):null]}):null},Fn=(A,pe=!1)=>r.jsxs(r.Fragment,{children:[Ui(gn(A)),Tn(A,pe)]}),Nn=A=>be?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Zt(A)}):null,Xi=()=>De.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=$g(De,pt,it,pe)+dt(),x=Math.max(d,gr);return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[pe]),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Yi=()=>De.map((A,pe)=>{const d=Vn(pe,pt),x=Dt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Uo=()=>Be.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=Ot(pe),x=Math.max(d,gr),{resolvedWidth:q}=wt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Xo=()=>Be.map((A,pe)=>{const{maxWidth:d}=wt(A,"two-row-bottom"),x=Wt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),sn=()=>!o||be?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=A=>{const pe=!A.objectFit&&xn(b);return{className:`${e}-slide-image-cell${pe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Y,maxHeight:O,...pe?{"--image-aspect-ratio":Do(b)}:{}}}},Ji=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:xn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=A=>{if(A.length===0)return null;const pe=A.length>1,d=mr(Q),f=`calc(-0.5 * (${d} + ${Q}))`;if(A.length===1){const x=A[0];return r.jsx("div",{...Jn(x),children:r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:pe?{gap:Q}:void 0,children:A.map((x,q)=>r.jsxs("div",{...Jn(x),children:[r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1}),o&&pe&&q<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${x.url}-${q}`))})},Zi=!!(B!=null&&B.title2||B!=null&&B.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(C??0)>0||o),Yo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(fe||B)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...Ie&&ie?{minHeight:ie}:void 0,...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%"},children:[nt&&Ie?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:gn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:gn(B)})]}),Ie&&ie?ie:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${be?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(B,!0)})]}):null]})]}),Jo=()=>{const A=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(B,!0)}),sn()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Oe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ze?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Je}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:yt,...We,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&Z.length>1?"true":"false",onPointerDown:ye?un:void 0,onPointerUp:ye?rn:void 0,onPointerCancel:ye?Wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[an&&E?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Qe(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(an.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${E?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:X?Hn(X.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ht,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ce,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...be?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${be?` ${e}-text-bar-cell-stacked`:""}`,style:be?void 0:{flex:1,minWidth:0,width:"100%"},children:be?w==="fade"?Yo():Jo():w==="fade"?Go():xi()})})})]})]})]})};function Ag(e){return`
10787
10787
  .${e}-wrapper {
10788
10788
  position: relative;
10789
10789
  width: 100%;
@@ -12085,4 +12085,4 @@ export type LightboxJournalSettings = {
12085
12085
  closeIconColor: string;
12086
12086
  closeIconHoverColor: string;
12087
12087
  };
12088
- `,_g="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Dn={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 Wg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fg=Gi.reduce((e,t)=>({...e,...Wg(t)}),{}),Ng=Gi.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function as(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const Hg=Eg(),Og={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"}},...Fg,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:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_g,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ng,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...as({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},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,...as({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:[Hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"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",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Bg={element:Mg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Og,sourceCode:kg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${lt(e,"fontSettings")}`}))}},jg=[hd,Sd,du,bu,Pu,ju,Ku,Qu,xp,Sm,Am,mg,Bg];exports.components=jg;exports.isSchemaV1=al;
12088
+ `,_g="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Dn={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 Wg(e){const t={};return t[lt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[lt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[lt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[lt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[lt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[lt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[lt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fg=Gi.reduce((e,t)=>({...e,...Wg(t)}),{}),Ng=Gi.reduce((e,t)=>({...e,[lt(t,"fontFamily")]:"Goudy Bookletter 1911",[lt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[lt(t,"letterSpacing")]:0,[lt(t,"wordSpacing")]:0,[lt(t,"textAlign")]:"left",[lt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function as(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[lt(n,"fontSize")]=i),o!==void 0&&(t[lt(n,"lineHeight")]=o),t},{})}const Hg=Eg(),Og={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"}},...Fg,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:"https://cdn.cntrl.site/component-assets/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_g,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ng,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...as({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},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,...as({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:[Hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"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",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Bg={element:Mg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Og,sourceCode:kg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${lt(e,"fontSettings")}`}))}},jg=[hd,Sd,du,bu,Pu,ju,Ku,Qu,xp,Sm,Am,mg,Bg];exports.components=jg;exports.isSchemaV1=al;
package/dist/index.mjs CHANGED
@@ -9575,12 +9575,10 @@ type MarqueeProps = {
9575
9575
  version: 1,
9576
9576
  defaultSize: {
9577
9577
  d: {
9578
- width: "100%",
9579
- height: 400
9578
+ width: "100%"
9580
9579
  },
9581
9580
  m: {
9582
- width: 390,
9583
- height: 80
9581
+ width: 390
9584
9582
  }
9585
9583
  },
9586
9584
  preview: {
@@ -23178,8 +23176,7 @@ const ll = {
23178
23176
  icon: {
23179
23177
  type: ["string", "null"],
23180
23178
  scope: "common",
23181
- title: "Icon",
23182
- display: { type: "icon-switch-control" }
23179
+ display: { type: "settings-image-input" }
23183
23180
  },
23184
23181
  iconMaxWidth: {
23185
23182
  type: "number",
@@ -26321,7 +26318,7 @@ const $g = pg(), Cg = {
26321
26318
  }, Tg = {
26322
26319
  element: yg,
26323
26320
  id: "lightbox-strip",
26324
- name: "Lightbox Strip",
26321
+ name: "Strip",
26325
26322
  category: "galleries",
26326
26323
  version: 1,
26327
26324
  defaultSize: {
@@ -29452,7 +29449,7 @@ const Yg = Og(), Jg = {
29452
29449
  }, Zg = {
29453
29450
  element: qg,
29454
29451
  id: "lightbox-journal",
29455
- name: "Lightbox Journal",
29452
+ name: "Journal",
29456
29453
  category: "galleries",
29457
29454
  version: 1,
29458
29455
  defaultSize: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/components",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Custom components for control editor and public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",