@cntrl-site/components 1.0.116-alpha.0 → 1.0.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Burger-DyORh_vF.mjs → Burger-BkVgNMGU.mjs} +1 -1
- package/dist/{Burger-B4kXX9aY.js → Burger-C3yVbQcq.js} +1 -1
- package/dist/Chronicles-BNvvaFYY.mjs +744 -0
- package/dist/Chronicles-Dj1gvNjE.js +196 -0
- package/dist/ChroniclesComponent-CoOgQZx2.js +1 -0
- package/dist/{ChroniclesComponent-jh4v7wp6.mjs → ChroniclesComponent-Szt0H-op.mjs} +542 -491
- package/dist/Components/Chronicles/Chronicles.d.ts +7 -1
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +26 -2
- package/dist/Components/LightboxJournal/LightboxJournal.d.ts +1 -0
- package/dist/Components/LightboxStrip/LightboxStrip.d.ts +1 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +0 -7
- package/dist/{ControlSlider-DB4nbVLT.js → ControlSlider-C8ckUIDm.js} +1 -1
- package/dist/{ControlSlider-3w-bHQEg.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
- package/dist/{FAQ-GmiwRdFq.mjs → FAQ-CJHCMSBa.mjs} +1 -1
- package/dist/{FAQ-7HEkaoU6.js → FAQ-DLh63Utr.js} +1 -1
- package/dist/{Grid-BzarI5Mc.js → Grid-C4hO8KCr.js} +14 -9
- package/dist/{Grid-Z2JZyUdC.mjs → Grid-Dud7PLS9.mjs} +201 -196
- package/dist/{Hive-34KvKNsa.js → Hive-CzabuuCc.js} +1 -1
- package/dist/{Hive-7xHXyMM1.mjs → Hive-DyxYd5eg.mjs} +1 -1
- package/dist/{HiveLightboxTitles-BCoL46-V.mjs → HiveLightboxTitles-DhEeFKWs.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DEeyQGcf.js → HiveLightboxTitles-DlyptAaK.js} +1 -1
- package/dist/{Lightbox-DzPqgKP4.mjs → Lightbox-BY99NS14.mjs} +1 -1
- package/dist/{Lightbox-Cb7lyaNt.js → Lightbox-DZckgBzK.js} +1 -1
- package/dist/{LightboxJournal-C_q7_s-B.mjs → LightboxJournal-BDUs6T0B.mjs} +466 -434
- package/dist/LightboxJournal-Bf_rZzmz.js +555 -0
- package/dist/{LightboxStrip-BrNj7ipX.mjs → LightboxStrip-Cuhb2fIR.mjs} +459 -427
- package/dist/LightboxStrip-RA4ABUC-.js +418 -0
- package/dist/{Mercury-BmhtFYOw.js → Mercury-B-s2Kvuq.js} +1 -1
- package/dist/{Mercury-Q788wrYQ.mjs → Mercury-CCW0Es-s.mjs} +1 -1
- package/dist/{OnelinerForm-D8WIB9Qy.mjs → OnelinerForm-BEu7_sho.mjs} +1 -1
- package/dist/{OnelinerForm-CUmY-bXL.js → OnelinerForm-C2Y_XMCY.js} +1 -1
- package/dist/{SimpleButton-DTpzfmb6.mjs → SimpleButton-C-o2W9bS.mjs} +1 -1
- package/dist/{SimpleButton-DtaCYa3y.js → SimpleButton-nGEcO2gB.js} +1 -1
- package/dist/{Slider20-q0iGgnE3.js → Slider20-BOmjDRf2.js} +1 -1
- package/dist/{Slider20-CKngROrc.mjs → Slider20-DUi6qwnd.mjs} +1 -1
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/{TestimonialSingle-CpEUendN.js → TestimonialSingle-BORQom3u.js} +1 -1
- package/dist/{TestimonialSingle-Bax71Hyo.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
- package/dist/{Waterfall-znaoynn5.mjs → Waterfall-3kKioKh2.mjs} +1 -1
- package/dist/{Waterfall-B9YWMhrg.js → Waterfall-DII4-WV5.js} +1 -1
- package/dist/{components-C9Fu28pp.mjs → components-DSHc15vW.mjs} +29 -653
- package/dist/components-iORMB3kt.js +1 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +23 -24
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +38 -61
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/sources.js +143 -30
- package/dist/sources.mjs +150 -37
- package/dist/types/Component.d.ts +0 -7
- package/dist/types/SchemaV1.d.ts +3 -3
- package/package.json +1 -1
- package/dist/Chronicles-Cy2h3jlZ.mjs +0 -724
- package/dist/Chronicles-D0ojQzOP.js +0 -196
- package/dist/ChroniclesComponent-DYPJBI3d.js +0 -1
- package/dist/Components/PopupMenu/PopupMenu.d.ts +0 -73
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +0 -594
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +0 -203
- package/dist/Components/PopupMenu/popupMenuSnap.d.ts +0 -61
- package/dist/LightboxJournal-BFF5aKRz.js +0 -523
- package/dist/LightboxStrip-CC2e0_9A.js +0 -386
- package/dist/PopupMenu-CYdDyzEt.mjs +0 -1372
- package/dist/PopupMenu-Di1fHgho.js +0 -409
- package/dist/SvgImage-CwRq9-ec.mjs +0 -56
- package/dist/SvgImage-_QN8ngad.js +0 -1
- package/dist/components-6QFLq5OI.js +0 -1
- package/dist/loadSvgMaskUrl-B6kHUyof.js +0 -1
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +0 -39
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("react"),Lt=require("react-dom"),hi=require("./useScopedStyles-Bf6yohVQ.js"),G=require("./useLightboxSwipeDismiss-Br9uE5G0.js"),rt=require("./scalingValue-CSHYgTZl.js"),fi=require("./SvgImage-DFlmxAoL.js"),mi=require("./useLightboxScrollLock-Hf16Eq4g.js"),l=require("./utils-033j3qNL.js"),gi=({prefix:e,entries:z,settings:I,isEditor:w,isEditMode:f,isPreviewMode:ee,initialSlideIndex:U=0,enableUrlSync:j=!1,journalItemId:k=null,onBeforeClose:V,onClose:q})=>{const{type:C,coverFit:te,backgroundColor:_e,imageGap:De,maxWidth:Ae,maxHeight:H,textTransition:E,title1Width:ie,title2Width:re,title3Width:X,title1MarginLeft:R=0,title2MarginLeft:L=0,title3MarginLeft:pe=0,titleRowMarginBottom:$=0,titleHeaderLayout:ze="single-row",countCloseGap:Ee=0,closeIcon:ve,closeIconMaxWidth:b,closeIconColor:M,closeIconHoverColor:J,contentMarginTop:we=0,iconMarginRight:Ht=0}=I,m=o.useCallback(t=>rt.scalingValue(t,w??!1),[w]),Je=m(De??0),Mt=`${Ae}%`,_t=`${H}%`,ye=m(Ee),Dt=m(we),dt=m(Ht),ne=l.journalTextFieldsToCss("title1",l.resolveJournalTextFields(I,"title1"),w),ae=l.journalTextFieldsToCss("title2",l.resolveJournalTextFields(I,"title2"),w),ce=l.journalTextFieldsToCss("title3",l.resolveJournalTextFields(I,"title3"),w),At=l.journalTextFieldsToCss("count",l.resolveJournalTextFields(I,"count"),w),p=ze==="mobile",F=!w||!!ee,zt=!f&&(!w||!!ee),u=o.useMemo(()=>l.buildJournalSlides(z,C),[z,C]),[y,Fe]=o.useState(U),de=u[y],h=de==null?void 0:de.entry,[ut,ht]=o.useState(!1),[ft,ue]=o.useState(null),[T,he]=o.useState(!1),[mt,Be]=o.useState(null),[gt,Ke]=o.useState(!1),[Oe,xt]=o.useState(0),[oe,fe]=o.useState(),[be,me]=o.useState(),[$e,Te]=o.useState(null),Z=o.useRef(null),Se=o.useRef(0),Ie=o.useRef(0),pt=o.useRef(0),vt=o.useRef(!1),Ge=o.useRef(null),Ue=o.useRef(null),B=o.useRef(null),K=o.useRef(null),Ve=o.useRef(null),wt=o.useRef(null),je=o.useRef(null),yt=o.useCallback(()=>{const t=Ue.current;if(!t)return;const n=t.closest(`.${e}-lightbox-content-area`);if(!n)return t.getBoundingClientRect().width;const a=Array.from(n.children).reduce((s,r)=>!(r instanceof HTMLElement)||r.contains(t)?s:s+r.getBoundingClientRect().width,0);return n.getBoundingClientRect().width-a},[e]),Y=o.useCallback(()=>{Z.current&&(clearTimeout(Z.current),Z.current=null)},[]),Et=o.useCallback(t=>{t===Se.current&&(Be(null),Ke(!1))},[]),ge=o.useCallback(()=>{f||vt.current||(vt.current=!0,V==null||V(),ht(!1),Ge.current=setTimeout(()=>{q()},300))},[f,V,q]),Jt=o.useCallback(t=>!!(t.closest("[data-controls]")||t.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:qe,backdropStyle:Ft,mediaAreaStyle:Bt,overlayContentStyle:Kt,swipeHandlers:Ot,dismissAreaStyle:Gt}=G.useLightboxSwipeDismiss({enabled:zt,onClose:ge,animMs:300,isBlockedTarget:Jt}),bt=o.useCallback(t=>{j&&l.setJournalUrlParam(t+1,k,!0)},[j,k]),Xe=o.useCallback(t=>{if(t)return t.getBoundingClientRect().height},[]),le=o.useCallback(t=>{if(u.length===0)return;const n=(t%u.length+u.length)%u.length;if(n===y)return;const a=u[y],s=u[n];Se.current+=1;const r=Se.current,d=E==="fade"&&l.getEntryTitleKey(a==null?void 0:a.entry)!==l.getEntryTitleKey(s==null?void 0:s.entry),x=Xe(B.current),c=d?(()=>{const N=yt();Lt.flushSync(()=>{Te(s.entry)}),B.current&&N&&(B.current.style.width=`${N}px`);const Me=Xe(B.current);return B.current&&(B.current.style.width=""),{measuredIncomingTitlesHeight:Me,incomingTitlesMeasureWidth:N}})():void 0,S=Math.max(x??0,(c==null?void 0:c.measuredIncomingTitlesHeight)??0)||void 0;xt(r),Be(y),Ke(!0),Fe(n),bt(n),pt.current=n,d?(Y(),S&&fe(S),c!=null&&c.incomingTitlesMeasureWidth&&me(c.incomingTitlesMeasureWidth),ue((a==null?void 0:a.entryIndex)??null),he(!0),Ie.current=s.entryIndex,Z.current=setTimeout(()=>{ue(null),he(!1),fe(void 0),me(void 0),Te(null),Z.current=null},400)):(Y(),ue(null),he(!1),fe(void 0),me(void 0),Te(null),Ie.current=s.entryIndex)},[y,Y,yt,Xe,u,bt,E]),xe=o.useCallback(()=>{je.current=null},[]),Ut=o.useCallback(t=>{!F||u.length<=1||t.pointerType==="mouse"&&t.button!==0||t.target.closest("[data-controls]")||(je.current={startX:t.clientX,startY:t.clientY,pointerId:t.pointerId})},[F,u.length]),Vt=o.useCallback(t=>{var N;if(!F||u.length<=1||t.pointerType==="mouse"&&t.button!==0)return;if(qe){xe();return}const n=je.current;if(!n||n.pointerId!==t.pointerId||(xe(),t.target.closest("[data-controls]")))return;const s=t.clientX-n.startX,r=t.clientY-n.startY,d=Math.abs(s),x=Math.abs(r);if(d>=l.STRIP_NAV_SWIPE_MIN_PX&&d>x){le(s>0?y-1:y+1);return}if(d>l.STRIP_NAV_TAP_MAX_PX||x>l.STRIP_NAV_TAP_MAX_PX)return;const c=(N=K.current)==null?void 0:N.getBoundingClientRect(),S=c?c.left+c.width/2:window.innerWidth/2;le(t.clientX<S?y-1:y+1)},[y,F,le,qe,xe,u.length]),qt=o.useCallback(t=>{const n=je.current;(n==null?void 0:n.pointerId)===t.pointerId&&xe()},[xe]);mi.useLightboxScrollLock(),o.useEffect(()=>{wt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const t=requestAnimationFrame(()=>{ht(!0),requestAnimationFrame(()=>{Ve.current?Ve.current.focus():K.current&&K.current.focus()})});return()=>{cancelAnimationFrame(t),Ge.current&&clearTimeout(Ge.current),Z.current&&clearTimeout(Z.current);const n=wt.current;n&&document.contains(n)&&n.focus({preventScroll:!0})}},[]),o.useEffect(()=>{var t;E!=="fade"&&(Ie.current=((t=u[y])==null?void 0:t.entryIndex)??0,Y(),ue(null),he(!1),fe(void 0),me(void 0))},[y,Y,u,E]),o.useEffect(()=>{const t=n=>{if(n.key==="Escape"){ge();return}if(n.key==="ArrowLeft"&&u.length>1){le(y-1);return}if(n.key==="ArrowRight"&&u.length>1){le(y+1);return}if(n.key==="Tab"&&K.current){const a=K.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),s=Array.from(a).filter(c=>!c.closest('[aria-hidden="true"]'));if(s.length===0)return;const r=s[0],d=s[s.length-1],x=document.activeElement;n.shiftKey?(x===r||!K.current.contains(x))&&(n.preventDefault(),d.focus()):(x===d||!K.current.contains(x))&&(n.preventDefault(),r.focus())}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[le,ge,y,u.length]),o.useLayoutEffect(()=>{Y(),Se.current=0,xt(0),Be(null),Ke(!1),ue(null),he(!1),fe(void 0),me(void 0),Te(null),Fe(t=>{const n=Math.max(0,u.length-1);return Math.min(t,n)})},[Y,z.length,C,u.length]),o.useLayoutEffect(()=>{var a;const t=Math.max(0,u.length-1),n=Math.min(Math.max(0,U),t);pt.current=n,Ie.current=((a=u[n])==null?void 0:a.entryIndex)??0,Fe(n)},[U]);const g=ft!==null?z[ft]:null,$t=mt!==null?u[mt]:null,Re=(h==null?void 0:h.title1)||(h==null?void 0:h.title2)||(h==null?void 0:h.title3)||(g==null?void 0:g.title1)||(g==null?void 0:g.title2)||(g==null?void 0:g.title3),Q=l.shouldShowCounter(C,u,z),se=ve!==null,Xt=Re||Q||se,Zt=Q&&se?{gap:ye}:void 0,We=`${e}-titles-stack${p?` ${e}-titles-stack-stacked`:""}`,Tt=`${e}-titles-layer-out${p?` ${e}-titles-layer-out-stacked`:""}`,Yt=`${e}-titles-layer-out`,Ze=(R??0)>0||f,Qt=m($),W=o.useMemo(()=>({title1Width:ie??l.DEFAULT_JOURNAL_TITLE_WIDTHS.title1Width,title2Width:re??l.DEFAULT_JOURNAL_TITLE_WIDTHS.title2Width,title3Width:X??l.DEFAULT_JOURNAL_TITLE_WIDTHS.title3Width}),[ie,re,X]),_=o.useMemo(()=>({title2MarginLeft:L,title3MarginLeft:pe}),[L,pe]),v=o.useMemo(()=>h?l.buildJournalTitleSlots(e,h,ne,ae,ce):[],[e,h,ne,ae,ce]),Ne=o.useMemo(()=>v.map(t=>W[t.widthKey]),[v,W]),D=o.useMemo(()=>l.resolveJournalTitleWidths(v.length,Ne),[v.length,Ne]),St=o.useMemo(()=>l.getEffectiveJournalTitleWidths(v.length,Ne),[v.length,Ne]),ke=o.useMemo(()=>v.filter(t=>t.prefix==="title1"),[v]),A=o.useMemo(()=>v.filter(t=>t.prefix==="title2"||t.prefix==="title3"),[v]),Ce=o.useMemo(()=>l.getRowScopedJournalTitleWidths(ke,W),[ke,W]),O=o.useMemo(()=>l.getRowScopedJournalTitleWidths(A,W),[A,W]),Ye=o.useCallback((t,n)=>{const a=v.findIndex(r=>r.prefix===t.prefix);if(!p||n==="single-row")return{effectiveWidth:St[a]??0,resolvedWidth:D[a]??0,maxWidth:l.getJournalTitleMaxWidth(a,D)};if(n==="two-row-top"){const r=ke.findIndex(d=>d.prefix===t.prefix);return{effectiveWidth:Ce.effective[r]??0,resolvedWidth:Ce.resolved[r]??0,maxWidth:l.getJournalTitleMaxWidth(r,Ce.resolved)}}const s=A.findIndex(r=>r.prefix===t.prefix);return{effectiveWidth:O.effective[s]??0,resolvedWidth:O.resolved[s]??0,maxWidth:l.getJournalTitleMaxWidth(s,O.resolved)}},[v,A,O,St,D,ke,Ce,p]),Pt=o.useCallback(t=>l.getJournalTitleBoundaryOffset(v,D,_,t)+(p?0:R??0),[v,D,_,p,R]),ei=o.useCallback(()=>p?0:R??0,[p,R]),Qe=o.useCallback(t=>A.slice(0,t).reduce((n,a,s)=>n+(a.marginLeftKey?_[a.marginLeftKey]??0:0)+(O.resolved[s]??0),0),[A,O.resolved,_]),ti=o.useCallback(t=>{const n=A[t];return Qe(t)+(n.marginLeftKey?_[n.marginLeftKey]??0:0)+(O.resolved[t]??0)},[A,O.resolved,Qe,_]),Pe=o.useCallback((t,n,a)=>{if(!p||a==="single-row"){const c=t.findIndex(P=>P.prefix===n.prefix),S=t.map(P=>W[P.widthKey]),N=l.resolveJournalTitleWidths(t.length,S);return{effectiveWidth:l.getEffectiveJournalTitleWidths(t.length,S)[c]??0,resolvedWidth:N[c]??0,maxWidth:l.getJournalTitleMaxWidth(c,N)}}if(a==="two-row-top"){const c=t.filter(P=>P.prefix==="title1"),S=c.findIndex(P=>P.prefix===n.prefix),{resolved:N,effective:Me}=l.getRowScopedJournalTitleWidths(c,W);return{effectiveWidth:Me[S]??0,resolvedWidth:N[S]??0,maxWidth:l.getJournalTitleMaxWidth(S,N)}}const s=t.filter(c=>c.prefix==="title2"||c.prefix==="title3"),r=s.findIndex(c=>c.prefix===n.prefix),{resolved:d,effective:x}=l.getRowScopedJournalTitleWidths(s,W);return{effectiveWidth:x[r]??0,resolvedWidth:d[r]??0,maxWidth:l.getJournalTitleMaxWidth(r,d)}},[W,p]),et=(t,n,a)=>{const s=t.marginLeftKey?_[t.marginLeftKey]??0:0,{effectiveWidth:r,resolvedWidth:d,maxWidth:x}=a??Ye(t,n),c=Math.max(s,l.TITLE_PADDING_HANDLE_WIDTH),S=f&&n==="two-row-top";return i.jsxs("div",{className:`${e}-title-cell`,"data-title":t.prefix,style:{width:m(r),...s>0?{marginLeft:m(s)}:{}},children:[i.jsx("p",{className:t.className,style:t.style,children:t.text}),S&&t.marginLeftKey?i.jsx("div",{"data-controls":t.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(d),style:{position:"absolute",top:0,left:m(-s),width:m(c),height:"100%",pointerEvents:"auto"}}):null,S?i.jsx("div",{"data-controls":t.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,right:m(-l.TITLE_RESIZE_HANDLE_WIDTH/2),width:m(l.TITLE_RESIZE_HANDLE_WIDTH),height:"100%",pointerEvents:"auto"}}):null]},t.className)},tt=(t="two-row")=>{const n=v.findIndex(r=>r.prefix==="title1"),a=n>=0?D[n]:W.title1Width,s=t==="two-row"&&f;return i.jsx("div",{...s?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(a)}:{},style:{width:m(R??0),flexShrink:0,alignSelf:"stretch",...s?{pointerEvents:"auto"}:{}}})},it=()=>i.jsx("span",{className:`${e}-titles-baseline-strut`,style:ne,"aria-hidden":"true",children:" "}),It=()=>i.jsx("span",{className:`${e}-entry-counter`,style:At,"aria-live":"polite","aria-atomic":"true",children:l.formatSlideCounter(u,y,C,z)}),ii=()=>Q?f&&se?i.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[It(),i.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${l.getGapControlSize(ye)} + ${ye}))`,width:l.getGapControlSize(ye),height:"100%",pointerEvents:"auto",zIndex:3}})]}):It():null,nt=()=>!Q&&!se?null:i.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Zt,children:[ii(),se?li():null]}),ni=()=>i.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Q||Re?it():null,Ze?tt("single-row"):null,Rt(h),i.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),nt(),st()]}),oi=()=>i.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Q||Re?it():null,Ze?tt("single-row"):null,i.jsxs("div",{className:`${e}-titles-row-titles`,style:T&&oe?{minHeight:oe}:void 0,children:[i.jsx("div",{ref:B,className:We,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:He($e||h)}),i.jsxs("div",{ref:Ue,className:We,style:{position:T?"absolute":"relative",inset:T?0:void 0,width:"100%",...T&&be?{width:be,maxWidth:"100%"}:void 0},children:[g&&T?i.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:He(g)}):null,i.jsx("div",{className:`${e}-titles-layer-in${T?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:He(h)})]})]}),nt(),st()]}),li=()=>i.jsxs("div",{className:`${e}-close-icon`,style:{width:rt.scalingValue(b??0,w),height:rt.scalingValue(b??0,w),marginRight:dt,"--close-icon-hover-color":J},children:[i.jsx("button",{ref:Ve,type:"button",className:`${e}-close-icon-inner`,onClick:ge,"aria-label":"Close",children:i.jsx(fi.SvgImage,{url:ve??"",fill:M,hoverFill:w&&!ee?M:J,className:`${e}-close-icon-img`})}),f&&i.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:dt,height:"100%",pointerEvents:"auto"}})]}),jt=(t,n)=>i.jsxs("div",{className:`${e}-titles-row-top`,children:[Q||Re?it():null,Ze?tt("two-row"):null,n!==void 0?i.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:n},children:t}):i.jsxs(i.Fragment,{children:[t,i.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),nt()]}),Rt=t=>{if(!t)return null;const n=l.buildJournalTitleSlots(e,t,ne,ae,ce);return i.jsx(i.Fragment,{children:n.map(a=>et(a,"single-row",Pe(n,a,"single-row")))})},ot=t=>{if(!t)return null;const n=l.buildJournalTitleSlots(e,t,ne,ae,ce),a=n.find(s=>s.prefix==="title1");return a?et(a,"two-row-top",Pe(n,a,"two-row-top")):null},lt=(t,n=!1)=>{const a=t?l.buildJournalTitleSlots(e,t,ne,ae,ce):[],s=a.filter(x=>x.prefix==="title2"||x.prefix==="title3"),r=f&&n;return s.length>0||r||($??0)>0?i.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[s.length>0?i.jsxs("div",{className:`${e}-titles-row-bottom`,children:[s.map(x=>et(x,"two-row-bottom",Pe(a,x,"two-row-bottom"))),n&&f?i.jsxs(i.Fragment,{children:[ai(),ci()]}):null]}):null,($??0)>0||r?i.jsx("div",{"data-controls":r?"titleRowMarginBottom":void 0,"data-controls-axis":r?"y":void 0,"data-controls-reverse":r?"":void 0,className:r?`${e}-control`:void 0,style:{height:Qt,width:"100%",flexShrink:0,pointerEvents:r?"auto":"none"}}):null]}):null},Le=(t,n=!1)=>i.jsxs(i.Fragment,{children:[jt(ot(t)),lt(t,n)]}),He=t=>p?i.jsx("div",{className:`${e}-titles-row-two-row`,children:Le(t)}):t?i.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Rt(t)}):null,si=()=>{const t=p?-1:v.findIndex(s=>s.prefix==="title1"),n=!p&&(f||(R??0)>0)?(()=>{const s=R??0,r=t>=0?D[t]:W.title1Width,d=Math.max(s,l.TITLE_PADDING_HANDLE_WIDTH);return i.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(r),style:{position:"absolute",top:0,left:0,width:m(d),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,a=v.flatMap((s,r)=>{if(!s.marginLeftKey)return[];const d=_[s.marginLeftKey]??0,x=l.getJournalTitleOffsetBeforeSlot(v,D,_,r)+ei(),c=Math.max(d,l.TITLE_PADDING_HANDLE_WIDTH);return i.jsx("div",{"data-controls":s.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(D[r]),style:{position:"absolute",top:0,left:m(x),width:m(c),height:"100%",pointerEvents:"auto"}},s.marginLeftKey)});return n?[n,...a]:a},ri=()=>v.map((t,n)=>{const a=l.getJournalTitleMaxWidth(n,D),r=Pt(n)-l.TITLE_RESIZE_HANDLE_WIDTH/2;return i.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:i.jsx("div",{"data-controls":t.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(a),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:m(r),width:m(l.TITLE_RESIZE_HANDLE_WIDTH),height:"100%",pointerEvents:"auto"}})},`${t.widthKey}-junction`)}),ai=()=>A.flatMap((t,n)=>{if(!t.marginLeftKey)return[];const a=_[t.marginLeftKey]??0,s=Qe(n),r=Math.max(a,l.TITLE_PADDING_HANDLE_WIDTH),{resolvedWidth:d}=Ye(t,"two-row-bottom");return i.jsx("div",{"data-controls":t.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(d),style:{position:"absolute",top:0,left:m(s),width:m(r),height:"100%",pointerEvents:"auto"}},t.marginLeftKey)}),ci=()=>A.map((t,n)=>{const{maxWidth:a}=Ye(t,"two-row-bottom"),r=ti(n)-l.TITLE_RESIZE_HANDLE_WIDTH/2;return i.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:i.jsx("div",{"data-controls":t.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(a),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:m(r),width:m(l.TITLE_RESIZE_HANDLE_WIDTH),height:"100%",pointerEvents:"auto"}})},`${t.widthKey}-junction`)}),st=()=>!f||p?null:i.jsxs(i.Fragment,{children:[si(),ri()]}),Wt=t=>{const n=!t.objectFit&&G.isImageRatioCover(te);return{className:`${e}-slide-image-cell${n?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Mt,maxHeight:_t,...n?{"--image-aspect-ratio":G.getAspectRatio(te)}:{}}}},Nt=t=>t.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":t.objectFit}}:G.isImageRatioCover(te)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},kt=t=>{if(t.length===0)return null;const n=t.length>1,a=l.getGapControlSize(Je),s=`calc(-0.5 * (${a} + ${Je}))`;if(t.length===1){const r=t[0];return i.jsx("div",{...Wt(r),children:i.jsx("img",{...Nt(r),src:r.assetId,alt:r.name??"",draggable:!1})})}return i.jsx("div",{className:`${e}-slide-inner`,style:n?{gap:Je}:void 0,children:t.map((r,d)=>i.jsxs("div",{...Wt(r),children:[i.jsx("img",{...Nt(r),src:r.assetId,alt:r.name??"",draggable:!1}),f&&n&&d<t.length-1&&i.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:s,width:a,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${r.assetId}-${d}`))})},Ct=!!(h!=null&&h.title2||h!=null&&h.title3||g!=null&&g.title2||g!=null&&g.title3||($??0)>0||f),di=()=>i.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[i.jsx("div",{ref:B,className:We,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Le($e||h)}),i.jsxs("div",{ref:Ue,className:`${e}-titles-row-two-row`,style:{...T&&oe?{minHeight:oe}:void 0,...T&&be?{width:be,maxWidth:"100%"}:void 0},children:[jt(i.jsxs("div",{className:We,style:{position:T?"absolute":"relative",inset:T?0:void 0,width:"100%"},children:[g&&T?i.jsx("div",{className:`${Yt} ${e}-titles-fade-out`,children:ot(g)}):null,i.jsx("div",{className:`${e}-titles-layer-in${T?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ot(h)})]}),T&&oe?oe:void 0),Ct?i.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[g&&T?i.jsx("div",{className:`${Tt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:lt(g)}):null,i.jsx("div",{className:`${e}-titles-layer-in${T?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${p?` ${e}-titles-layer-in-stacked`:""}`,children:lt(h,!0)})]}):null]})]}),ui=()=>{const t=Ct;return i.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...t?{flex:1,height:"100%"}:{}},children:[i.jsx("div",{className:`${e}-titles-row-two-row`,style:t?void 0:{flex:"0 0 auto",height:"auto"},children:Le(h,!0)}),st()]})};return i.jsxs("div",{ref:K,"data-selection":"none",className:`${e}-lightbox${w?` ${e}-lightbox-editor`:""}${f?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{qe||ge()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:se?void 0:-1,style:{opacity:ut?1:0,transition:"opacity 300ms ease",pointerEvents:ut?"auto":"none"},children:[i.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:_e,...Ft}}),i.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Gt,...Ot,children:[i.jsx("div",{className:`${e}-lightbox-content`,style:Bt,onClick:t=>t.stopPropagation(),children:i.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":F&&u.length>1?"true":"false",onPointerDown:F?Ut:void 0,onPointerUp:F?Vt:void 0,onPointerCancel:F?qt:void 0,children:i.jsxs("div",{className:`${e}-slide-stack`,children:[$t&>?i.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:t=>{t.target===t.currentTarget&&Et(Oe)},children:i.jsx("div",{className:`${e}-slide-area`,children:kt($t.images)})},`slide-out-${Oe}`):null,i.jsx("div",{className:`${e}-slide-layer-in${gt?` ${e}-slide-fade-in`:""}`,children:i.jsx("div",{className:`${e}-slide-area`,children:de?kt(de.images):null})},`slide-in-${Oe}-${y}`)]})})}),i.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Kt,children:[i.jsx("div",{"data-controls":f?"contentMarginTop":void 0,className:f?`${e}-control`:void 0,style:{height:Dt,width:"100%"}}),i.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...p?{flex:1,minHeight:0}:{}},children:i.jsx("div",{className:`${e}-lightbox-content-area${p?` ${e}-lightbox-content-area-stacked`:""}`,children:Xt&&i.jsx("div",{className:`${e}-text-bar-cell${p?` ${e}-text-bar-cell-stacked`:""}`,style:p?void 0:{flex:1,minWidth:0,width:"100%"},children:p?E==="fade"?di():ui():E==="fade"?oi():ni()})})})]})]})]})},at=400,ct="cubic-bezier(0.25, 0.1, 0.25, 1)",xi=1.1;function pi(e){return`
|
|
2
|
+
.${e}-wrapper {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.${e}-cover {
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
pointer-events: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.${e}-ratio-wrapper-cover {
|
|
17
|
+
aspect-ratio: var(--image-aspect-ratio);
|
|
18
|
+
height: auto;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.${e}-ratio-wrapper-fit {
|
|
24
|
+
height: 100%;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${e}-cover-image {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${e}-cover-image-cover {
|
|
33
|
+
object-fit: cover;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
max-width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.${e}-cover-image-fit {
|
|
40
|
+
object-fit: contain;
|
|
41
|
+
width: auto;
|
|
42
|
+
height: auto;
|
|
43
|
+
max-width: 100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@property --${e}-hover-zoom {
|
|
47
|
+
syntax: '<number>';
|
|
48
|
+
inherits: false;
|
|
49
|
+
initial-value: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.${e}-hover-zoom-in .${e}-cover-image {
|
|
53
|
+
transform: scale(var(--${e}-hover-zoom));
|
|
54
|
+
clip-path: inset(calc(50% - 50% / var(--${e}-hover-zoom)));
|
|
55
|
+
transition: --${e}-hover-zoom ${at}ms ${ct};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.${e}-hover-scale-down .${e}-cover-image {
|
|
59
|
+
transition: transform ${at}ms ${ct};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.${e}-hover-greyscale .${e}-cover-image {
|
|
63
|
+
transition: filter ${at}ms ${ct};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (hover: hover) {
|
|
67
|
+
.${e}-hover-zoom-in .${e}-cover:hover .${e}-cover-image {
|
|
68
|
+
--${e}-hover-zoom: ${xi};
|
|
69
|
+
}
|
|
70
|
+
.${e}-hover-scale-down .${e}-cover:hover .${e}-cover-image {
|
|
71
|
+
transform: scale(0.9);
|
|
72
|
+
}
|
|
73
|
+
.${e}-hover-greyscale .${e}-cover:hover .${e}-cover-image {
|
|
74
|
+
filter: grayscale(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.${e}-lightbox {
|
|
79
|
+
position: fixed;
|
|
80
|
+
inset: 0;
|
|
81
|
+
z-index: 9997;
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
overscroll-behavior: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.${e}-lightbox-editor {
|
|
90
|
+
inset: auto;
|
|
91
|
+
top: var(--cntrl-article-top, 0);
|
|
92
|
+
left: var(--cntrl-article-left, 0);
|
|
93
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
94
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.${e}-lightbox-edit-mode {
|
|
98
|
+
z-index: 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.${e}-lightbox-content {
|
|
102
|
+
position: relative;
|
|
103
|
+
z-index: 1;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
width: 100%;
|
|
109
|
+
height: 100%;
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.${e}-lightbox-backdrop {
|
|
114
|
+
position: absolute;
|
|
115
|
+
inset: 0;
|
|
116
|
+
pointer-events: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.${e}-lightbox-dismiss-area {
|
|
120
|
+
position: relative;
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.${e}-lightbox-strip {
|
|
126
|
+
position: relative;
|
|
127
|
+
flex: 1;
|
|
128
|
+
width: 100%;
|
|
129
|
+
min-height: 0;
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
max-width: 100%;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.${e}-lightbox-strip[data-desktop-nav="true"]::before,
|
|
139
|
+
.${e}-lightbox-strip[data-desktop-nav="true"]::after {
|
|
140
|
+
content: '';
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 0;
|
|
143
|
+
bottom: 0;
|
|
144
|
+
width: 50%;
|
|
145
|
+
z-index: 2;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.${e}-lightbox-strip[data-desktop-nav="true"]::before {
|
|
149
|
+
left: 0;
|
|
150
|
+
cursor: w-resize;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.${e}-lightbox-strip[data-desktop-nav="true"]::after {
|
|
154
|
+
right: 0;
|
|
155
|
+
cursor: e-resize;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.${e}-slide-stack {
|
|
159
|
+
position: relative;
|
|
160
|
+
width: 100%;
|
|
161
|
+
height: 100%;
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.${e}-slide-layer-out {
|
|
168
|
+
position: absolute;
|
|
169
|
+
inset: 0;
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.${e}-slide-layer-in {
|
|
177
|
+
position: absolute;
|
|
178
|
+
inset: 0;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
z-index: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes ${e}-slide-fade-in {
|
|
186
|
+
from { opacity: 0; }
|
|
187
|
+
to { opacity: 1; }
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@keyframes ${e}-slide-fade-out {
|
|
191
|
+
from { opacity: 1; }
|
|
192
|
+
to { opacity: 0; }
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.${e}-slide-fade-in {
|
|
196
|
+
opacity: 0;
|
|
197
|
+
animation: ${e}-slide-fade-in 300ms ease-in-out forwards;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.${e}-slide-fade-out {
|
|
201
|
+
animation: ${e}-slide-fade-out 300ms ease-in-out forwards;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.${e}-slide-area {
|
|
205
|
+
position: relative;
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: 100%;
|
|
208
|
+
min-width: 0;
|
|
209
|
+
min-height: 0;
|
|
210
|
+
box-sizing: border-box;
|
|
211
|
+
display: flex;
|
|
212
|
+
justify-content: center;
|
|
213
|
+
align-items: center;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.${e}-slide-inner {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
width: 100%;
|
|
222
|
+
height: 100%;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.${e}-slide-image-cell {
|
|
227
|
+
position: relative;
|
|
228
|
+
min-width: 0;
|
|
229
|
+
height: 100%;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.${e}-slide-image-cell-cover {
|
|
233
|
+
aspect-ratio: var(--image-aspect-ratio);
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
height: auto;
|
|
236
|
+
width: 100%;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.${e}-slide-image {
|
|
240
|
+
display: block;
|
|
241
|
+
user-select: none;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.${e}-slide-image-cover {
|
|
245
|
+
object-fit: cover;
|
|
246
|
+
width: 100%;
|
|
247
|
+
height: 100%;
|
|
248
|
+
max-width: 100%;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.${e}-slide-image-fit {
|
|
252
|
+
object-fit: contain;
|
|
253
|
+
width: auto;
|
|
254
|
+
height: auto;
|
|
255
|
+
max-width: 100%;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.${e}-slide-image-custom {
|
|
259
|
+
object-fit: var(--image-object-fit);
|
|
260
|
+
max-width: 100%;
|
|
261
|
+
height: 100%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.${e}-close-icon {
|
|
265
|
+
position: relative;
|
|
266
|
+
flex-shrink: 0;
|
|
267
|
+
align-self: center;
|
|
268
|
+
pointer-events: auto;
|
|
269
|
+
z-index: 2;
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
border: none;
|
|
274
|
+
background-color: transparent;
|
|
275
|
+
padding: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.${e}-close-icon-inner {
|
|
279
|
+
all: unset;
|
|
280
|
+
position: relative;
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
width: 100%;
|
|
283
|
+
height: 100%;
|
|
284
|
+
pointer-events: auto;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.${e}-close-icon-img {
|
|
288
|
+
position: absolute;
|
|
289
|
+
top: 50%;
|
|
290
|
+
left: 50%;
|
|
291
|
+
transform: translate(-50%, -50%);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.${e}-titles-row {
|
|
295
|
+
position: relative;
|
|
296
|
+
flex: 0 1 auto;
|
|
297
|
+
z-index: 2;
|
|
298
|
+
box-sizing: border-box;
|
|
299
|
+
pointer-events: none;
|
|
300
|
+
word-break: break-word;
|
|
301
|
+
min-width: 0;
|
|
302
|
+
display: flex;
|
|
303
|
+
flex-direction: row;
|
|
304
|
+
align-items: baseline;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.${e}-titles-row-header {
|
|
308
|
+
flex: 1;
|
|
309
|
+
align-items: baseline;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.${e}-titles-row-header-controls {
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-direction: row;
|
|
315
|
+
align-items: baseline;
|
|
316
|
+
flex-shrink: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.${e}-titles-baseline-strut {
|
|
320
|
+
width: 0;
|
|
321
|
+
overflow: hidden;
|
|
322
|
+
flex-shrink: 0;
|
|
323
|
+
pointer-events: none;
|
|
324
|
+
white-space: nowrap;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.${e}-titles-row-titles {
|
|
328
|
+
position: relative;
|
|
329
|
+
flex: 1;
|
|
330
|
+
min-width: 0;
|
|
331
|
+
align-self: flex-start;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.${e}-titles-row-two-row {
|
|
335
|
+
display: flex;
|
|
336
|
+
flex: 1;
|
|
337
|
+
height: 100%;
|
|
338
|
+
min-height: 0;
|
|
339
|
+
align-self: stretch;
|
|
340
|
+
flex-direction: column;
|
|
341
|
+
width: 100%;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.${e}-titles-row-top {
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: row;
|
|
347
|
+
align-items: baseline;
|
|
348
|
+
width: 100%;
|
|
349
|
+
flex-shrink: 0;
|
|
350
|
+
margin-bottom: 0;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.${e}-titles-row-top .${e}-title-cell[data-title="title1"] {
|
|
354
|
+
flex: 0 0 auto;
|
|
355
|
+
min-width: 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.${e}-titles-row-bottom-wrap {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
width: 100%;
|
|
362
|
+
margin-top: auto;
|
|
363
|
+
flex-shrink: 0;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.${e}-titles-row-bottom-area {
|
|
367
|
+
position: relative;
|
|
368
|
+
flex: 1;
|
|
369
|
+
min-height: 0;
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-direction: column;
|
|
372
|
+
width: 100%;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.${e}-titles-row-bottom {
|
|
376
|
+
position: relative;
|
|
377
|
+
display: flex;
|
|
378
|
+
flex-direction: row;
|
|
379
|
+
align-items: flex-end;
|
|
380
|
+
width: 100%;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.${e}-titles-row-bottom .${e}-title-cell {
|
|
384
|
+
flex: 0 0 auto;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.${e}-title-cell {
|
|
388
|
+
position: relative;
|
|
389
|
+
flex: 0 0 auto;
|
|
390
|
+
min-width: 0;
|
|
391
|
+
box-sizing: border-box;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.${e}-text-bar-cell {
|
|
395
|
+
position: relative;
|
|
396
|
+
flex: 0 1 auto;
|
|
397
|
+
min-width: 0;
|
|
398
|
+
display: flex;
|
|
399
|
+
align-items: baseline;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.${e}-title1,
|
|
403
|
+
.${e}-title2,
|
|
404
|
+
.${e}-title3 {
|
|
405
|
+
margin: 0;
|
|
406
|
+
min-width: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.${e}-title-resize-handle {
|
|
410
|
+
background: transparent;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.${e}-titles-stack {
|
|
414
|
+
position: relative;
|
|
415
|
+
display: flex;
|
|
416
|
+
flex-direction: row;
|
|
417
|
+
align-items: baseline;
|
|
418
|
+
align-self: flex-start;
|
|
419
|
+
min-width: 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.${e}-titles-stack-stacked {
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
align-items: stretch;
|
|
425
|
+
height: 100%;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.${e}-titles-layer-out {
|
|
429
|
+
position: absolute;
|
|
430
|
+
inset: 0;
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-direction: row;
|
|
433
|
+
align-items: baseline;
|
|
434
|
+
z-index: 1;
|
|
435
|
+
overflow: visible;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.${e}-titles-layer-out-stacked {
|
|
439
|
+
flex-direction: column;
|
|
440
|
+
align-items: stretch;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.${e}-titles-layer-out-bottom {
|
|
444
|
+
justify-content: flex-end;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.${e}-titles-layer-in {
|
|
448
|
+
position: relative;
|
|
449
|
+
display: flex;
|
|
450
|
+
flex-direction: row;
|
|
451
|
+
align-items: baseline;
|
|
452
|
+
min-width: 0;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.${e}-titles-layer-in-stacked {
|
|
456
|
+
flex-direction: column;
|
|
457
|
+
align-items: stretch;
|
|
458
|
+
flex: 1;
|
|
459
|
+
min-height: 0;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.${e}-titles-layer-in-fading {
|
|
463
|
+
position: absolute;
|
|
464
|
+
inset: 0;
|
|
465
|
+
z-index: 0;
|
|
466
|
+
overflow: visible;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.${e}-titles-fade-in,
|
|
470
|
+
.${e}-titles-fade-out {
|
|
471
|
+
overflow: visible;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
@keyframes ${e}-titles-fade-in {
|
|
475
|
+
from { opacity: 0; }
|
|
476
|
+
to { opacity: 1; }
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
@keyframes ${e}-titles-fade-out {
|
|
480
|
+
from { opacity: 1; }
|
|
481
|
+
to { opacity: 0; }
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.${e}-titles-fade-in {
|
|
485
|
+
opacity: 0;
|
|
486
|
+
animation: ${e}-titles-fade-in 400ms ease-in-out forwards;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.${e}-titles-fade-out {
|
|
490
|
+
animation: ${e}-titles-fade-out 400ms ease-in-out forwards;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.${e}-lightbox-overlay-content {
|
|
494
|
+
position: absolute;
|
|
495
|
+
inset: 0;
|
|
496
|
+
z-index: 3;
|
|
497
|
+
pointer-events: none;
|
|
498
|
+
display: flex;
|
|
499
|
+
flex-direction: column;
|
|
500
|
+
isolation: isolate;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.${e}-lightbox-content-area {
|
|
504
|
+
position: relative;
|
|
505
|
+
display: flex;
|
|
506
|
+
flex-direction: row;
|
|
507
|
+
align-items: flex-start;
|
|
508
|
+
flex: 1;
|
|
509
|
+
min-width: 0;
|
|
510
|
+
min-height: 0;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.${e}-lightbox-content-area-stacked {
|
|
514
|
+
align-items: stretch;
|
|
515
|
+
align-self: stretch;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.${e}-text-bar-cell-stacked {
|
|
519
|
+
align-self: stretch;
|
|
520
|
+
flex: 1;
|
|
521
|
+
min-width: 0;
|
|
522
|
+
min-height: 0;
|
|
523
|
+
height: 100%;
|
|
524
|
+
flex-direction: column;
|
|
525
|
+
align-items: stretch;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.${e}-entry-counter {
|
|
529
|
+
position: relative;
|
|
530
|
+
z-index: 2;
|
|
531
|
+
pointer-events: none;
|
|
532
|
+
white-space: nowrap;
|
|
533
|
+
flex-shrink: 0;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.${e}-control {
|
|
537
|
+
position: relative;
|
|
538
|
+
z-index: 2;
|
|
539
|
+
pointer-events: auto;
|
|
540
|
+
flex-shrink: 0;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.${e}-control::before {
|
|
544
|
+
content: "";
|
|
545
|
+
position: absolute;
|
|
546
|
+
top: 0;
|
|
547
|
+
left: 0;
|
|
548
|
+
width: 100%;
|
|
549
|
+
height: 100%;
|
|
550
|
+
min-width: 20px;
|
|
551
|
+
min-height: 20px;
|
|
552
|
+
pointer-events: auto;
|
|
553
|
+
z-index: 10;
|
|
554
|
+
}
|
|
555
|
+
`}const vi=({settings:e,content:z,isEditor:I,isEditMode:w,isPreviewMode:f,portalId:ee,metadata:U})=>{const{prefix:j}=hi.useScopedStyles(),k=(U==null?void 0:U.itemId)??null,{cover:V,coverFit:q,type:C,hover:te="none"}=e,_e=te!=="none"&&(!I||f)?` ${j}-hover-${te}`:"",De=o.useRef(null),[Ae,H]=o.useState(!1),[E,ie]=o.useState(0),re=o.useRef(!1),X=o.useRef(!1),R=o.useRef(!1),L=o.useMemo(()=>(z??[]).filter(b=>l.getEntryImages(b).length>0),[z]),pe=Ae&&L.length>0,$=!I,ze=o.useCallback(()=>{$&&(R.current=!0,l.removeJournalUrlParam(X.current,k),X.current=!1)},[$,k]),Ee=(b=0)=>{if(L.length===0||I&&!w&&!f)return;const M=l.buildJournalSlides(L,C),J=Math.max(0,Math.min(b,M.length-1));if(ie(J),$){const we=l.hasJournalUrlParam();l.setJournalUrlParam(J+1,k,we),X.current=!we}H(!0)},ve=o.useCallback(()=>{H(!1),R.current=!1},[]);return o.useEffect(()=>{!I||w||f||H(!1)},[I,w,f]),o.useEffect(()=>{if(!$||typeof window>"u")return;const b=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=b}},[$]),o.useEffect(()=>{if(!$||re.current)return;re.current=!0;const b=l.findJournalUrlSlideNumber(k);if(!b)return;const M=l.slideNumberToIndex(b,l.buildJournalSlides(L,C).length);M<0||(ie(M),H(!0))},[L,k,$,C]),o.useEffect(()=>{if(!$)return;const b=()=>{if(R.current){R.current=!1,H(!1);return}const M=l.findJournalUrlSlideNumber(k);if(!M){H(!1);return}const J=l.slideNumberToIndex(M,l.buildJournalSlides(L,C).length);if(J<0){H(!1);return}X.current=!1,ie(J),H(!0)};return window.addEventListener("popstate",b),()=>window.removeEventListener("popstate",b)},[L,k,$,C]),i.jsxs(i.Fragment,{children:[i.jsxs("div",{ref:De,className:`${j}-wrapper${_e}`,children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:pi(j)}}),V?i.jsx("button",{type:"button",className:`${j}-cover ${G.isImageRatioCover(q)?`${j}-ratio-wrapper-cover`:`${j}-ratio-wrapper-fit`}`,onClick:()=>Ee(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:I&&!w&&!f?"none":void 0,...G.isImageRatioCover(q)?{"--image-aspect-ratio":G.getAspectRatio(q)}:{}},"aria-label":"Open journal gallery",children:i.jsx("img",{className:`${j}-cover-image ${G.isImageRatioCover(q)?`${j}-cover-image-cover`:`${j}-cover-image-fit`}`,src:V,alt:"cover"})}):null]}),pe&&typeof document<"u"&&(()=>{const b=(ee?document.getElementById(ee):null)??document.body;return Lt.createPortal(i.jsx(gi,{prefix:j,entries:L,settings:e,isEditor:I,isEditMode:w,isPreviewMode:f,initialSlideIndex:E,enableUrlSync:$,journalItemId:k,onBeforeClose:ze,onClose:ve}),b)})()]})};exports.LightboxJournal=vi;
|