@cntrl-site/components 1.0.19-alpha.7 → 1.0.19
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/index.js +2 -1
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
|
|
|
3845
3845
|
pointer-events: auto;
|
|
3846
3846
|
z-index: 10;
|
|
3847
3847
|
}
|
|
3848
|
-
`}const st=500,Cd=750,wt="cubic-bezier(0.22, 1, 0.36, 1)",Sd=72,wd=50;function $d(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Td(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Ld(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ed(e){return!Array.isArray(e)||e.length===0?[]:$d(e)?e.flatMap(t=>{const n=Td(t);if(!n)return[];const r=Ld(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Rn(e){return e.type==="video"}function Pd(e){e.pause(),e.removeAttribute("src"),e.load()}function co({media:e,className:t,style:n,onMediaClick:r}){return Rn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function ar(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ad(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function _d({src:e,phase:t,mediaRef:n,mediaStyle:r,onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d}){return c.useEffect(()=>{const s=n.current;if(s)return()=>{Pd(s)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d,style:r})}function Rd({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:d,counterClassName:s,counterStyle:p}){const u=n==="cover",E=c.useRef(null),S=c.useRef(null),$=c.useRef(null),g=c.useRef(null),h=c.useRef(0),x=c.useRef(0),f=c.useRef("none"),b=c.useRef(!1),y=c.useRef(!1),H=c.useRef(!1),L=c.useRef(null),[F,C]=c.useState(null),[T,j]=c.useState(r?"opening":"open"),[P,M]=c.useState(!0),[_,V]=c.useState(0),[Y,oe]=c.useState(0),[I,O]=c.useState(!1),[q,z]=c.useState(!1),[R,G]=c.useState(!1),J=c.useRef(t),Z=e[t],A=Z?Rn(Z):!1,ne=Y!==0||I,m=c.useCallback(W=>{H.current=W,O(W)},[]),Q=c.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ye=c.useCallback(()=>{Q(),L.current=window.setTimeout(()=>{Q(),m(!1)},st+32)},[Q,m]),ce=c.useCallback(()=>{const W=S.current,v=$.current;if(!W)return;const k=W.getBoundingClientRect(),N=k.width,K=k.height;if(!N||!K)return;if(n==="cover"){C({width:N,height:K,left:k.left,top:k.top});return}if(!v){C(ar(W));return}const{width:ae,height:se}=Ad(v);if(!ae||!se){C(ar(W));return}const he=ae/se,ge=N/K;if(he>ge){const ue=N/he;C({width:N,height:ue,left:k.left,top:k.top+(K-ue)/2})}else{const ue=K*he;C({width:ue,height:K,left:k.left+(N-ue)/2,top:k.top})}},[n]);c.useEffect(()=>{ce();const W=S.current;if(!W)return;const v=new ResizeObserver(()=>ce());return v.observe(W),()=>v.disconnect()},[ce,t]),c.useEffect(()=>{T==="opening"&&F&&j("open")},[T,F]),c.useEffect(()=>{if(T!=="closing")return;const W=setTimeout(()=>l(),st);return()=>clearTimeout(W)},[T,l]),c.useEffect(()=>()=>{Q()},[Q]),c.useLayoutEffect(()=>{if(J.current===t)return;Q(),M(!1),V(0),oe(0),m(!1),G(!1),z(!1),h.current=0,x.current=0,f.current="none",b.current=!1,g.current=null,y.current=!1;const W=S.current;W&&C(ar(W)),J.current=t},[t,m,Q]),c.useEffect(()=>{if(T!=="open")return;const W=()=>{const se=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",se,!0)};document.addEventListener("click",se,!0)},v=se=>{Q(),H.current=!1,O(!1),oe(0),z(!1),b.current=!1,x.current=0,f.current="none",M(!1);const he=S.current;he&&C(ar(he)),se<0?d():i()},k=se=>{if(Math.abs(se)>wd&&e.length>1){v(se);return}m(!0),oe(0),ye()},N=se=>{if(se.touches.length!==1||H.current)return;const he=se.touches[0];y.current=!0,g.current={x:he.clientX,y:he.clientY},f.current="none",x.current=0,b.current=!1},K=se=>{if(!g.current||se.touches.length!==1||H.current)return;const he=se.touches[0],ge=he.clientX-g.current.x,ue=he.clientY-g.current.y;if(f.current==="none"){if(Math.abs(ge)<10&&Math.abs(ue)<10)return;if(Math.abs(ge)>Math.abs(ue)){if(e.length<=1)return;f.current="horizontal"}else if(ue>0)f.current="vertical";else return}if(f.current==="horizontal"){b.current=!0,z(!0),x.current=ge,oe(ge),se.preventDefault();return}f.current==="vertical"&&(b.current=!0,z(!0),h.current=ue,V(ue),se.preventDefault())},ae=()=>{if(!g.current)return;const se=f.current,he=b.current;if(he&&se==="horizontal")k(x.current),W();else if(he&&se==="vertical"){if(h.current>Sd){const ue=window.innerHeight;h.current=ue,G(!0),V(ue),j("closing")}else h.current=0,V(0);W()}else se==="horizontal"&&Math.abs(x.current)>0&&(k(x.current),W());g.current=null,f.current="none",x.current=0,b.current=!1,z(!1)};return document.addEventListener("touchstart",N,{passive:!0}),document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",N),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae)}},[T,e.length,d,i,m,ye]),c.useEffect(()=>{const W=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),T!=="closing"&&j("closing"))};return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[T]);const xe=()=>{T!=="closing"&&j("closing")},re=T==="open",de=T==="closing",D=de&&o&&!!r&&!R,U=_>0?Math.max(0,1-_/500):1,X=_>0?Math.max(.35,1-_/500):1,ee=T==="opening"?r??F:D?r:F,be=W=>{if(W.stopPropagation(),y.current){y.current=!1;return}if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientY-v.top,N=Math.min(52,v.height*.2);if(!(k>v.height-N)){if(W.clientX-v.left<v.width/2){i();return}d()}},$e=W=>{if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientX-v.left,N=W.clientY-v.top,K=Math.min(52,v.height*.2);if(N>v.height-K){W.currentTarget.style.cursor="default";return}W.currentTarget.style.cursor=k<v.width/2?"w-resize":"e-resize"},Ce=c.useCallback(W=>{W.propertyName!=="transform"||!H.current||(Q(),m(!1))},[Q,m]),Le=ne?`translateX(${Y}px)`:_>0?`translateY(${_}px)`:void 0,Ee={position:"fixed",top:ee==null?void 0:ee.top,left:ee==null?void 0:ee.left,width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:n==="cover"?"cover":"contain",transform:Le,opacity:_>0?X:de&&!D?0:1,transition:q&&!I?"none":I?`transform ${st}ms ${wt}`:R?`transform ${st}ms ${wt}, opacity ${st}ms ${wt}`:de&&!D?`opacity ${st}ms ${wt}`:D||P?`top ${st}ms ${wt}, left ${st}ms ${wt}, width ${st}ms ${wt}, height ${st}ms ${wt}`:"none",pointerEvents:A&&re&&!ne?"auto":"none",touchAction:A&&re?"none":void 0,zIndex:9998},B=F?{position:"fixed",top:F.top,height:F.height,width:F.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:E,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:T==="open"?"none":void 0},onClick:xe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:re?U:0,transition:q?"none":`opacity ${st}ms ${wt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:S,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),ee&&Z&&(A?a.jsx(_d,{src:Z.url,phase:T,mediaRef:$,mediaStyle:Ee,onLoadedMetadata:ce,onClick:be,onMouseMove:$e,onTransitionEnd:Ce},`${t}-${Z.url}`):a.jsx("img",{ref:$,src:Z.url,alt:Z.name,onLoad:ce,onTransitionEnd:Ce,style:Ee},`${t}-${Z.url}`)),re&&B&&e.length>1&&!A&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:F.left,cursor:"w-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),i()}}),a.jsx("div",{style:{...B,left:F.left+F.width/2,cursor:"e-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),d()}})]})]})}function Md(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Id({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:d}){const{prefix:s}=w.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:E=100,verticalGap:S,entriesCount:$,lightbox:g,imageDisplay:h,lightboxImageDisplay:x,slider:f,sliderTiming:b,direction:y,transition:H,titleMarginTop:L,subtitleMarginTop:F,titleColor:C,subtitleColor:T,lightboxCounterColor:j,titleFontFamily:P,titleFontSettings:M,titleFontSize:_,titleLineHeight:V,titleLetterSpacing:Y,titleWordSpacing:oe,titleTextAppearance:I,subtitleFontFamily:O,subtitleFontSettings:q,subtitleFontSize:z,subtitleLineHeight:R,subtitleLetterSpacing:G,subtitleWordSpacing:J,subtitleTextAppearance:Z,lightboxCounterFontFamily:A,lightboxCounterFontSettings:ne,lightboxCounterFontSize:m,lightboxCounterLineHeight:Q,lightboxCounterLetterSpacing:ye,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:xe,showText:re="always",alignEntries:de="off"}=e,D={fontSettings:{fontFamily:P,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:_??.01,lineHeight:V,letterSpacing:Y??0,wordSpacing:oe??0,textAppearance:I,color:C},X={...vt(et(D,n))},ee={fontSettings:{fontFamily:O,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:z??.01,lineHeight:R,letterSpacing:G??0,wordSpacing:J??0,textAppearance:Z,color:T},$e={...vt(et(ee,n))},Ce={fontSettings:{fontFamily:A,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:m??.01,lineHeight:Q,letterSpacing:ye??0,wordSpacing:ce??0,textAppearance:xe,color:j},Ee={...vt(et(Ce,n)),...Kr(m,Q,s,n)},B=qr(_,V,`${s}-item-title`,`${s}-text-tight-leading`),W=qr(z,R,`${s}-item-subtitle`,`${s}-text-tight-leading`),v=Kr(_,V,s,n),k=Kr(z,R,s,n),N=qr(m,Q,`${s}-lightbox-counter`,`${s}-text-tight-leading`),K=w.buildColorVars(s,{titleColor:C,subtitleColor:T,lightboxCounterColor:j},kd,Fd),he=`${i&&i!=="default"?`${s}-state-${i}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ge=$===0?1/0:$,ue=(t??[]).slice(0,ge),ke=u.entryWidth??.2,le=(h==null?void 0:h.display)==="cover",Se=(h==null?void 0:h.ratioValue)??"1:1",Me=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=Se.split(":").map(Number),ct=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,Ct=w.scalingValue(ke??0,n),_t=!le&&f!=="off",dt={width:Ct,...le?{aspectRatio:ct,height:"auto",overflow:"hidden"}:{height:"auto"}},Rt=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),fe=p==="c",He=fe&&de==="on",Oe=`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`,Ue=w.scalingValue(ke*E/100,n),St=le?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Dt,ut]=c.useState("ltr"),[Mt,Pn]=c.useState(0),Te=c.useRef(null);c.useEffect(()=>{const Fe=Te.current;if(!Fe)return;const pt=new ResizeObserver(te=>{Pn(Math.round(te[0].contentRect.width))});return pt.observe(Fe),()=>pt.disconnect()},[]);const Qe=(()=>{const Fe={...K},pt=Te.current?getComputedStyle(Te.current).getPropertyValue("--cntrl-article-width").trim():"";return pt&&(Fe["--cntrl-article-width"]=pt),Fe})(),[qe,De]=c.useState(!1),[ot,Zn]=c.useState([]),[Fr,sn]=c.useState(0),[Wr,Qn]=c.useState(null),Jn=g==="on"&&(!n||r),er=(Fe,pt,te)=>{if(n&&!r||g==="off")return;const pe=Fe.currentTarget.getBoundingClientRect();Qn({top:pe.top,left:pe.left,width:pe.width,height:pe.height}),Zn(pt),sn(te),De(!0)};c.useEffect(()=>{if(!qe||g!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,g]),c.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Nr=c.useMemo(()=>xd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:K,children:a.jsx("div",{ref:Te,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${he}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:w.scalingValue(S??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:w.scalingValue(S??0,n)}:{}},children:ue.map((Fe,pt)=>{var ht;const te=lo(Fe.title),pe=lo(Fe.subtitle),ve=(((ht=Fe.link)==null?void 0:ht.length)??0)>0&&g==="off"?Fe.link:void 0,Pe=Math.floor(pt/u.columnsCount)===Math.ceil(ue.length/u.columnsCount)-1,Ke=fe?a.jsxs("div",{className:`${s}-item-text-block`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}}),pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,Xe=fe?a.jsxs("div",{className:`${s}-item-title-row`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}})]}):null,Ae=fe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,mt=ve?a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-text-link`,children:[Xe,Ae]}):a.jsxs(a.Fragment,{children:[Xe,Ae]}),Ye=Ed(Fe.gallery),Ge=Ye.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:Rt,style:dt,children:Ye.length===0?null:f==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Ye[0],It=tt?Ge.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&It>=0?Je=>er(Je,Ge,It):void 0})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ye.map(({displayMedia:We})=>Rn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Ei,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:b*1e3,width:"100%",height:"100%",speed:Cd,type:H==="fade"?"fade":"loop",rewind:H==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:H==="fade"?"ltr":y!=="random"?y==="horizontal"?"ltr":"ttb":Dt},onMoved:We=>{if(y!=="random"||H==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";ut(tt),setTimeout(()=>{We.refresh()},0)},children:Ye.map(({displayMedia:We,lightboxMedia:tt},It)=>{const Je=tt?Ge.findIndex(zt=>zt.url===tt.url):-1;return a.jsx(Pi,{children:a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&Je>=0?zt=>er(zt,Ge,Je):void 0})},It)})},`${H}-${ke}-${y}-${b}-${Mt}-${d}`)]})}),gt=fe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&te?"titleMarginTop":void 0,className:o&&te?`${s}-control`:void 0,style:{height:te?w.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),a.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${s}-control`:void 0,style:{height:pe?w.scalingValue(F??0,n):0,width:Ue}}),a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&Pe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(E??0)>100?`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`:w.scalingValue(ke??0,n)},children:He?a.jsxs(a.Fragment,{children:[mt,a.jsx("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,gt]})})},pt)})})}),(!n||r)&&qe&&typeof document<"u"&&g==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Rd,{items:ot,index:Fr,imageDisplay:Md(x),originRect:Wr,reverseClose:f==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:N,counterStyle:Ee})}),document.body)]})}const kd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Fd=["hover","focus","filled","success","error"],Wd=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3848
|
+
`}const st=500,Cd=750,wt="cubic-bezier(0.22, 1, 0.36, 1)",Sd=72,wd=50;function $d(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Td(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Ld(e){const[t]=e.media;return t!=null&&t.url?t:null}function Ed(e){return!Array.isArray(e)||e.length===0?[]:$d(e)?e.flatMap(t=>{const n=Td(t);if(!n)return[];const r=Ld(t);return[{displayMedia:n,lightboxMedia:r!=null&&r.url?r:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Rn(e){return e.type==="video"}function Pd(e){e.pause(),e.removeAttribute("src"),e.load()}function co({media:e,className:t,style:n,onMediaClick:r}){return Rn(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:r?"pointer":"default"},muted:!0,loop:!0,playsInline:!0,onClick:r}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:r?"pointer":"default"},onClick:r})}function ar(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ad(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function _d({src:e,phase:t,mediaRef:n,mediaStyle:r,onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d}){return c.useEffect(()=>{const s=n.current;if(s)return()=>{Pd(s)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:l,onMouseMove:i,onTransitionEnd:d,style:r})}function Rd({items:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:d,counterClassName:s,counterStyle:p}){const u=n==="cover",E=c.useRef(null),S=c.useRef(null),$=c.useRef(null),g=c.useRef(null),h=c.useRef(0),x=c.useRef(0),f=c.useRef("none"),b=c.useRef(!1),y=c.useRef(!1),H=c.useRef(!1),L=c.useRef(null),[F,C]=c.useState(null),[T,j]=c.useState(r?"opening":"open"),[P,M]=c.useState(!0),[_,V]=c.useState(0),[Y,oe]=c.useState(0),[I,O]=c.useState(!1),[q,z]=c.useState(!1),[R,G]=c.useState(!1),J=c.useRef(t),Z=e[t],A=Z?Rn(Z):!1,ne=Y!==0||I,m=c.useCallback(W=>{H.current=W,O(W)},[]),Q=c.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ye=c.useCallback(()=>{Q(),L.current=window.setTimeout(()=>{Q(),m(!1)},st+32)},[Q,m]),ce=c.useCallback(()=>{const W=S.current,v=$.current;if(!W)return;const k=W.getBoundingClientRect(),N=k.width,K=k.height;if(!N||!K)return;if(n==="cover"){C({width:N,height:K,left:k.left,top:k.top});return}if(!v){C(ar(W));return}const{width:ae,height:se}=Ad(v);if(!ae||!se){C(ar(W));return}const he=ae/se,ge=N/K;if(he>ge){const ue=N/he;C({width:N,height:ue,left:k.left,top:k.top+(K-ue)/2})}else{const ue=K*he;C({width:ue,height:K,left:k.left+(N-ue)/2,top:k.top})}},[n]);c.useEffect(()=>{ce();const W=S.current;if(!W)return;const v=new ResizeObserver(()=>ce());return v.observe(W),()=>v.disconnect()},[ce,t]),c.useEffect(()=>{T==="opening"&&F&&j("open")},[T,F]),c.useEffect(()=>{if(T!=="closing")return;const W=setTimeout(()=>l(),st);return()=>clearTimeout(W)},[T,l]),c.useEffect(()=>()=>{Q()},[Q]),c.useLayoutEffect(()=>{if(J.current===t)return;Q(),M(!1),V(0),oe(0),m(!1),G(!1),z(!1),h.current=0,x.current=0,f.current="none",b.current=!1,g.current=null,y.current=!1;const W=S.current;W&&C(ar(W)),J.current=t},[t,m,Q]),c.useEffect(()=>{if(T!=="open")return;const W=()=>{const se=he=>{he.stopPropagation(),he.preventDefault(),document.removeEventListener("click",se,!0)};document.addEventListener("click",se,!0)},v=se=>{Q(),H.current=!1,O(!1),oe(0),z(!1),b.current=!1,x.current=0,f.current="none",M(!1);const he=S.current;he&&C(ar(he)),se<0?d():i()},k=se=>{if(Math.abs(se)>wd&&e.length>1){v(se);return}m(!0),oe(0),ye()},N=se=>{if(se.touches.length!==1||H.current)return;const he=se.touches[0];y.current=!0,g.current={x:he.clientX,y:he.clientY},f.current="none",x.current=0,b.current=!1},K=se=>{if(!g.current||se.touches.length!==1||H.current)return;const he=se.touches[0],ge=he.clientX-g.current.x,ue=he.clientY-g.current.y;if(f.current==="none"){if(Math.abs(ge)<10&&Math.abs(ue)<10)return;if(Math.abs(ge)>Math.abs(ue)){if(e.length<=1)return;f.current="horizontal"}else if(ue>0)f.current="vertical";else return}if(f.current==="horizontal"){b.current=!0,z(!0),x.current=ge,oe(ge),se.preventDefault();return}f.current==="vertical"&&(b.current=!0,z(!0),h.current=ue,V(ue),se.preventDefault())},ae=()=>{if(!g.current)return;const se=f.current,he=b.current;if(he&&se==="horizontal")k(x.current),W();else if(he&&se==="vertical"){if(h.current>Sd){const ue=window.innerHeight;h.current=ue,G(!0),V(ue),j("closing")}else h.current=0,V(0);W()}else se==="horizontal"&&Math.abs(x.current)>0&&(k(x.current),W());g.current=null,f.current="none",x.current=0,b.current=!1,z(!1)};return document.addEventListener("touchstart",N,{passive:!0}),document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",ae),document.addEventListener("touchcancel",ae),()=>{document.removeEventListener("touchstart",N),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",ae),document.removeEventListener("touchcancel",ae)}},[T,e.length,d,i,m,ye]),c.useEffect(()=>{const W=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),T!=="closing"&&j("closing"))};return window.addEventListener("keydown",W,!0),()=>window.removeEventListener("keydown",W,!0)},[T]);const xe=()=>{T!=="closing"&&j("closing")},re=T==="open",de=T==="closing",D=de&&o&&!!r&&!R,U=_>0?Math.max(0,1-_/500):1,X=_>0?Math.max(.35,1-_/500):1,ee=T==="opening"?r??F:D?r:F,be=W=>{if(W.stopPropagation(),y.current){y.current=!1;return}if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientY-v.top,N=Math.min(52,v.height*.2);if(!(k>v.height-N)){if(W.clientX-v.left<v.width/2){i();return}d()}},$e=W=>{if(e.length<=1)return;const v=W.currentTarget.getBoundingClientRect(),k=W.clientX-v.left,N=W.clientY-v.top,K=Math.min(52,v.height*.2);if(N>v.height-K){W.currentTarget.style.cursor="default";return}W.currentTarget.style.cursor=k<v.width/2?"w-resize":"e-resize"},Ce=c.useCallback(W=>{W.propertyName!=="transform"||!H.current||(Q(),m(!1))},[Q,m]),Le=ne?`translateX(${Y}px)`:_>0?`translateY(${_}px)`:void 0,Ee={position:"fixed",top:ee==null?void 0:ee.top,left:ee==null?void 0:ee.left,width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:n==="cover"?"cover":"contain",transform:Le,opacity:_>0?X:de&&!D?0:1,transition:q&&!I?"none":I?`transform ${st}ms ${wt}`:R?`transform ${st}ms ${wt}, opacity ${st}ms ${wt}`:de&&!D?`opacity ${st}ms ${wt}`:D||P?`top ${st}ms ${wt}, left ${st}ms ${wt}, width ${st}ms ${wt}, height ${st}ms ${wt}`:"none",pointerEvents:A&&re&&!ne?"auto":"none",touchAction:A&&re?"none":void 0,zIndex:9998},B=F?{position:"fixed",top:F.top,height:F.height,width:F.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:E,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:T==="open"?"none":void 0},onClick:xe,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:re?U:0,transition:q?"none":`opacity ${st}ms ${wt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:S,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:S,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:re?1:0,transition:`opacity ${st}ms ${wt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),ee&&Z&&(A?a.jsx(_d,{src:Z.url,phase:T,mediaRef:$,mediaStyle:Ee,onLoadedMetadata:ce,onClick:be,onMouseMove:$e,onTransitionEnd:Ce},`${t}-${Z.url}`):a.jsx("img",{ref:$,src:Z.url,alt:Z.name,onLoad:ce,onTransitionEnd:Ce,style:Ee},`${t}-${Z.url}`)),re&&B&&e.length>1&&!A&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...B,left:F.left,cursor:"w-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),i()}}),a.jsx("div",{style:{...B,left:F.left+F.width/2,cursor:"e-resize",pointerEvents:ne?"none":"auto"},onClick:W=>{if(y.current){y.current=!1;return}W.stopPropagation(),d()}})]})]})}function Md(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Id({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:l,activeEvent:i,layoutId:d}){const{prefix:s}=w.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:E=100,verticalGap:S,entriesCount:$,lightbox:g,imageDisplay:h,lightboxImageDisplay:x,slider:f,sliderTiming:b,direction:y,transition:H,titleMarginTop:L,subtitleMarginTop:F,titleColor:C,subtitleColor:T,lightboxCounterColor:j,titleFontFamily:P,titleFontSettings:M,titleFontSize:_,titleLineHeight:V,titleLetterSpacing:Y,titleWordSpacing:oe,titleTextAppearance:I,subtitleFontFamily:O,subtitleFontSettings:q,subtitleFontSize:z,subtitleLineHeight:R,subtitleLetterSpacing:G,subtitleWordSpacing:J,subtitleTextAppearance:Z,lightboxCounterFontFamily:A,lightboxCounterFontSettings:ne,lightboxCounterFontSize:m,lightboxCounterLineHeight:Q,lightboxCounterLetterSpacing:ye,lightboxCounterWordSpacing:ce,lightboxCounterTextAppearance:xe,showText:re="always",alignEntries:de="off"}=e,D={fontSettings:{fontFamily:P,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:_??.01,lineHeight:V,letterSpacing:Y??0,wordSpacing:oe??0,textAppearance:I,color:C},X={...vt(et(D,n))},ee={fontSettings:{fontFamily:O,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:z??.01,lineHeight:R,letterSpacing:G??0,wordSpacing:J??0,textAppearance:Z,color:T},$e={...vt(et(ee,n))},Ce={fontSettings:{fontFamily:A,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:m??.01,lineHeight:Q,letterSpacing:ye??0,wordSpacing:ce??0,textAppearance:xe,color:j},Ee={...vt(et(Ce,n)),...Kr(m,Q,s,n)},B=qr(_,V,`${s}-item-title`,`${s}-text-tight-leading`),W=qr(z,R,`${s}-item-subtitle`,`${s}-text-tight-leading`),v=Kr(_,V,s,n),k=Kr(z,R,s,n),N=qr(m,Q,`${s}-lightbox-counter`,`${s}-text-tight-leading`),K=w.buildColorVars(s,{titleColor:C,subtitleColor:T,lightboxCounterColor:j},kd,Fd),he=`${i&&i!=="default"?`${s}-state-${i}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ge=$===0?1/0:$,ue=(t??[]).slice(0,ge),ke=u.entryWidth??.2,le=(h==null?void 0:h.display)==="cover",Se=(h==null?void 0:h.ratioValue)??"1:1",Me=(h==null?void 0:h.reversed)??!1,[Ie,Ve]=Se.split(":").map(Number),ct=`${Me?Ve:Ie} / ${Me?Ie:Ve}`,Ct=w.scalingValue(ke??0,n),_t=!le&&f!=="off",dt={width:Ct,...le?{aspectRatio:ct,height:"auto",overflow:"hidden"}:{height:"auto"}},Rt=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),fe=p==="c",He=fe&&de==="on",Oe=`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`,Ue=w.scalingValue(ke*E/100,n),St=le?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Dt,ut]=c.useState("ltr"),[Mt,Pn]=c.useState(0),Te=c.useRef(null);c.useEffect(()=>{const Fe=Te.current;if(!Fe)return;const pt=new ResizeObserver(te=>{Pn(Math.round(te[0].contentRect.width))});return pt.observe(Fe),()=>pt.disconnect()},[]);const Qe=(()=>{const Fe={...K},pt=Te.current?getComputedStyle(Te.current).getPropertyValue("--cntrl-article-width").trim():"";return pt&&(Fe["--cntrl-article-width"]=pt),Fe})(),[qe,De]=c.useState(!1),[ot,Zn]=c.useState([]),[Fr,sn]=c.useState(0),[Wr,Qn]=c.useState(null),Jn=g==="on"&&(!n||r),er=(Fe,pt,te)=>{if(n&&!r||g==="off")return;const pe=Fe.currentTarget.getBoundingClientRect();Qn({top:pe.top,left:pe.left,width:pe.width,height:pe.height}),Zn(pt),sn(te),De(!0)};c.useEffect(()=>{if(!qe||g!=="on"||typeof document>"u")return;const Fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Fe}},[qe,g]),c.useEffect(()=>{!n||r||(De(!1),Qn(null))},[n,r]);const Nr=c.useMemo(()=>xd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:K,children:a.jsx("div",{ref:Te,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${he}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:w.scalingValue(S??0,n),columnGap:w.scalingValue(u.horizontalGap??0,n),width:w.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:w.scalingValue(S??0,n)}:{}},children:ue.map((Fe,pt)=>{var ht;const te=lo(Fe.title),pe=lo(Fe.subtitle),ve=(((ht=Fe.link)==null?void 0:ht.length)??0)>0&&g==="off"?Fe.link:void 0,Pe=Math.floor(pt/u.columnsCount)===Math.ceil(ue.length/u.columnsCount)-1,Ke=fe?a.jsxs("div",{className:`${s}-item-text-block`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}}),pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,Xe=fe?a.jsxs("div",{className:`${s}-item-title-row`,children:[te&&a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),te&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(L??0,n),width:Ue}})]}):null,Ae=fe?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[pe&&a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle}),pe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:w.scalingValue(F??0,n),width:Ue}})]}):null,mt=ve?a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-text-link`,children:[Xe,Ae]}):a.jsxs(a.Fragment,{children:[Xe,Ae]}),Ye=Ed(Fe.gallery),Ge=Ye.filter(We=>We.lightboxMedia).map(We=>We.lightboxMedia),at=a.jsx("div",{className:Rt,style:dt,children:Ye.length===0?null:f==="off"?(()=>{const{displayMedia:We,lightboxMedia:tt}=Ye[0],It=tt?Ge.findIndex(Je=>Je.url===tt.url):-1;return a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&It>=0?Je=>er(Je,Ge,It):void 0})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ye.map(({displayMedia:We})=>Rn(We)?a.jsx("video",{src:We.url,muted:!0,playsInline:!0},`sizer-${We.url}`):a.jsx("img",{src:We.url,alt:""},`sizer-${We.url}`))}),a.jsx(Ei,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:b*1e3,width:"100%",height:"100%",speed:Cd,type:H==="fade"?"fade":"loop",rewind:H==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:H==="fade"?"ltr":y!=="random"?y==="horizontal"?"ltr":"ttb":Dt},onMoved:We=>{if(y!=="random"||H==="fade")return;const tt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";ut(tt),setTimeout(()=>{We.refresh()},0)},children:Ye.map(({displayMedia:We,lightboxMedia:tt},It)=>{const Je=tt?Ge.findIndex(zt=>zt.url===tt.url):-1;return a.jsx(Pi,{children:a.jsx(co,{media:We,className:`${s}-item-${Rn(We)?"video":"image"}`.trim(),style:St,onMediaClick:Jn&&Je>=0?zt=>er(zt,Ge,Je):void 0})},It)})},`${H}-${ke}-${y}-${b}-${Mt}-${d}`)]})}),gt=fe?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&te?"titleMarginTop":void 0,className:o&&te?`${s}-control`:void 0,style:{height:te?w.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:B,style:{width:Oe,...X,...v},children:Fe.title}),a.jsx("div",{"data-controls":o&&pe?"subtitleMarginTop":void 0,className:o&&pe?`${s}-control`:void 0,style:{height:pe?w.scalingValue(F??0,n):0,width:Ue}}),a.jsx("p",{className:W,style:{width:Oe,...$e,...k},children:Fe.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${o?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&Pe?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(E??0)>100?`calc(${w.scalingValue(ke??0,n)} * (${E} / 100))`:w.scalingValue(ke??0,n)},children:He?a.jsxs(a.Fragment,{children:[mt,a.jsx("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:at})]}):a.jsxs("a",{href:ve,target:"_blank",className:`${s}-item-image-link`,children:[Ke,at,gt]})})},pt)})})}),(!n||r)&&qe&&typeof document<"u"&&g==="on"&&_o.createPortal(a.jsx("div",{style:Qe,"data-selection":"none",children:a.jsx(Rd,{items:ot,index:Fr,imageDisplay:Md(x),originRect:Wr,reverseClose:f==="off",onClose:()=>De(!1),onPrev:()=>sn(Fe=>(Fe-1+ot.length)%ot.length),onNext:()=>sn(Fe=>(Fe+1)%ot.length),counterClassName:N,counterStyle:Ee})}),document.body)]})}const kd={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Fd=["hover","focus","filled","success","error"],Wd=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3849
3849
|
import '@splidejs/react-splide/css/core';
|
|
3850
3850
|
import { CommonComponentProps } from '../props';
|
|
3851
3851
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -4290,6 +4290,7 @@ function LightboxVideo({
|
|
|
4290
4290
|
src={src}
|
|
4291
4291
|
controls={phase === 'open'}
|
|
4292
4292
|
playsInline
|
|
4293
|
+
preload='auto'
|
|
4293
4294
|
onLoadedMetadata={onLoadedMetadata}
|
|
4294
4295
|
onClick={onClick}
|
|
4295
4296
|
onMouseMove={onMouseMove}
|
package/dist/index.mjs
CHANGED
|
@@ -12817,6 +12817,7 @@ function Dd({
|
|
|
12817
12817
|
src: e,
|
|
12818
12818
|
controls: t === "open",
|
|
12819
12819
|
playsInline: !0,
|
|
12820
|
+
preload: "auto",
|
|
12820
12821
|
onLoadedMetadata: o,
|
|
12821
12822
|
onClick: s,
|
|
12822
12823
|
onMouseMove: i,
|
|
@@ -13971,6 +13972,7 @@ function LightboxVideo({
|
|
|
13971
13972
|
src={src}
|
|
13972
13973
|
controls={phase === 'open'}
|
|
13973
13974
|
playsInline
|
|
13975
|
+
preload='auto'
|
|
13974
13976
|
onLoadedMetadata={onLoadedMetadata}
|
|
13975
13977
|
onClick={onClick}
|
|
13976
13978
|
onMouseMove={onMouseMove}
|