"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9713],{69713:function(t,e,i){i.r(e),i.d(e,{default:function(){return C}});var n=i(59499),l=i(67294),s=i(60564),a=i(68930),o=i(15590),r=i(18200),c=i(35773),h=i(53637),u=i(27041),d=i(44819),m=i(87664),g=i(76731),v=i(85893);function f(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function p(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?f(Object(i),!0).forEach(function(e){(0,n.Z)(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}class C extends o.Po{constructor(t){super(t),(0,n.Z)(this,"validationResult",{columnWrap:!1}),(0,n.Z)(this,"manualWidthColumnsOnLargeDevices",new Map),(0,n.Z)(this,"manualWidthColumnsOnMediumDevices",new Map),(0,n.Z)(this,"manualWidthColumnsOnSmallDevices",new Map),(0,n.Z)(this,"wrappedColumnsOnLargeDevices",new Set),(0,n.Z)(this,"wrappedColumnsOnMediumDevices",new Set),(0,n.Z)(this,"wrappedColumnsOnSmallDevices",new Set),(0,n.Z)(this,"contentDirection","vertical"===this.getPropSingle("contentDirection","")?"flex-column":"flex-row"),this.validationResult={};var e=this.getProp("columns",[]).filter(t=>t.content&&t.content.length>0),i=this.getColumnsFilteredForConditions(e);this.validationResult=this.validateAndCalculateColumnWidths(i)}getHorizontalColumnAlign(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex-row";if(t.horizontalAlign){if("flex-row"===e){if("left"===t.horizontalAlign)return"justify-content-start";if("center"===t.horizontalAlign)return"justify-content-center";if("right"===t.horizontalAlign)return"justify-content-end"}else if("flex-column"===e){if("left"===t.horizontalAlign)return"align-items-start";if("center"===t.horizontalAlign)return"align-items-center";if("right"===t.horizontalAlign)return"align-items-end"}}return null}getVerticalColumnAlign(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex-row";if(t.verticalAlign){if("flex-row"===e){if("top"===t.verticalAlign)return"align-items-start";if("middle"===t.verticalAlign)return"align-items-center";if("bottom"===t.verticalAlign)return"align-items-end"}else if("flex-column"===e){if("top"===t.verticalAlign)return"justify-content-start";if("middle"===t.verticalAlign)return"justify-content-center";if("bottom"===t.verticalAlign)return"justify-content-end"}}return null}renderColumns(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.map((t,i)=>{var n,o,c,h,m=!!t.contentDirection;Array.isArray(t.contentDirection)&&0===t.contentDirection.length&&(m=!1);var f={horizontalAlign:t.horizontalAlign?t.horizontalAlign[0]:null,verticalAlign:t.verticalAlign?t.verticalAlign[0]:null},C=m?({horizontal:"flex-row",vertical:"flex-column"})[t.contentDirection[0]]:"flex-row",b=f.horizontalAlign||f.verticalAlign||m?"d-flex":"",D=this.getHorizontalColumnAlign(f,C)?this.getHorizontalColumnAlign(f,C):"",x=this.getVerticalColumnAlign(f,C)?this.getVerticalColumnAlign(f,C):"",O=null===(n=this.validationResult)||void 0===n?void 0:n.fallbackColSize,y=this.manualWidthColumnsOnSmallDevices.has(t._id)?this.manualWidthColumnsOnSmallDevices.get(t._id):null===(o=this.validationResult)||void 0===o?void 0:o.colSizePerAutoRowOnSmallDevices,W=this.manualWidthColumnsOnMediumDevices.has(t._id)?this.manualWidthColumnsOnMediumDevices.get(t._id):null===(c=this.validationResult)||void 0===c?void 0:c.colSizePerAutoRowOnMediumDevices,A=this.manualWidthColumnsOnLargeDevices.has(t._id)?this.manualWidthColumnsOnLargeDevices.get(t._id):null===(h=this.validationResult)||void 0===h?void 0:h.colSizePerAutoRowOnLargeDevices;!0===this.validationResult.columnWrap&&(this.wrappedColumnsOnLargeDevices.has(t._id)&&(A=O),this.wrappedColumnsOnMediumDevices.has(t._id)&&(W=O),this.wrappedColumnsOnSmallDevices.has(t._id)&&(y=O));var S=(0,d.Uq)(t.themeStyle),w=this.removeSpaces("col-".concat(O," col-sm-").concat(y," col-md-").concat(W," col-lg-").concat(A," ").concat(b," ").concat(D," ").concat(x," ").concat(C," ").concat(S," ").concat((0,r.getDisplayClasses)(t.cssAttributes))),_=this.removeSpaces("".concat(D," ").concat(x," ").concat(C," ").concat(S," ").concat((0,r.getDisplayClasses)(t.cssAttributes))),j=t.cssAttributes?t.cssAttributes:{},M=this.getProp("cssAttributes.disableColumnResizing");return(0,v.jsxs)(l.Fragment,{children:[!e&&(0,v.jsx)(r.default,p(p({id:"".concat(this.getId(),"_").concat(i)},(0,a.$f)(this.props)),{},{forceChildStyle:"*",attributes:j,className:w,customStyles:{flex:M?"0 0 auto":"1 1 auto"},children:(0,g.Th)((0,v.jsx)(u.default,{animation:t.animation,className:w,children:(0,v.jsx)(s.R,p(p({},(0,a.hC)(this.props)),{},{layout:this.props.layout,content:t.content}))}),this.props.editorElement?this.props.editorElement:t)})),e&&(0,l.createElement)(r.default,p(p({id:"".concat(this.getId(),"_").concat(i),forceChildStyle:"*"},(0,a.$f)(this.props)),{},{attributes:j,className:_,key:t._id,customStyles:{flex:M?"0 0 auto":"1 1 auto"}}),(0,g.Th)((0,v.jsx)(u.default,{animation:t.animation,children:(0,v.jsx)(s.R,p(p({},(0,a.hC)(this.props)),{},{layout:this.props.layout,content:t.content}))}),this.props.editorElement?this.props.editorElement:t))]},"".concat(this.getId(),"_").concat(i))})}isEditorMode(){return!!(this.props.website.path&&this.props.website.path.includes("editor="))}calculateTotalSpaceUsageOfManualWidthColumns(t){var e=0,i=0;return t.forEach(t=>{isNaN(e=Number(t))||(i+=e)}),i}validateAndCalculateColumnWidths(t){this.manualWidthColumnsOnLargeDevices=new Map(t.filter(t=>{var e;return(null===(e=t.columnWidthOnLargeDevices)||void 0===e?void 0:e.length)>0}).map(t=>[t._id,t.columnWidthOnLargeDevices[0].split("x")[1]])),this.manualWidthColumnsOnMediumDevices=new Map(t.filter(t=>{var e;return(null===(e=t.columnWidthOnMediumDevices)||void 0===e?void 0:e.length)>0}).map(t=>[t._id,t.columnWidthOnMediumDevices[0].split("x")[1]])),this.manualWidthColumnsOnSmallDevices=new Map(t.filter(t=>{var e;return(null===(e=t.columnWidthOnSmallDevices)||void 0===e?void 0:e.length)>0}).map(t=>[t._id,t.columnWidthOnSmallDevices[0].split("x")[1]]));var e=t.filter(t=>!this.manualWidthColumnsOnLargeDevices.has(t._id)).map(t=>t._id),i=t.filter(t=>!this.manualWidthColumnsOnMediumDevices.has(t._id)).map(t=>t._id),n=t.filter(t=>!this.manualWidthColumnsOnSmallDevices.has(t._id)).map(t=>t._id),l=this.calculateTotalSpaceUsageOfManualWidthColumns(this.manualWidthColumnsOnLargeDevices),s=this.calculateTotalSpaceUsageOfManualWidthColumns(this.manualWidthColumnsOnMediumDevices),a=this.calculateTotalSpaceUsageOfManualWidthColumns(this.manualWidthColumnsOnSmallDevices),o=t.length-this.manualWidthColumnsOnLargeDevices.size,r=t.length-this.manualWidthColumnsOnMediumDevices.size,c=t.length-this.manualWidthColumnsOnSmallDevices.size,h=12-l,u=12-s,d=12-a,m="flex-column"===this.contentDirection||0===o?12:Math.floor(h/o),g="flex-column"===this.contentDirection||0===o?12:Math.floor(u/r),v="flex-column"===this.contentDirection||0===o?12:Math.floor(d/c),f=!1;if((l>12||h/o<2)&&m<2){for(var p=m,C=o,b=e.length-1;p<2;b--)this.wrappedColumnsOnLargeDevices.add(e[b]),p=Math.floor(h/--C);f=!0,m=p}if((s>12||u/r<2)&&g<2){for(var D=g,x=r,O=i.length-1;D<2;O--)this.wrappedColumnsOnMediumDevices.add(i[O]),D=Math.floor(u/--x);f=!0,g=D}if((a>12||d/c<2)&&v<2){for(var y=v,W=c,A=n.length-1;y<2;A--)this.wrappedColumnsOnSmallDevices.add(n[A]),y=Math.floor(d/--W);f=!0,v=y}return{columnWrap:f,colSizePerAutoRowOnLargeDevices:m,colSizePerAutoRowOnMediumDevices:g,colSizePerAutoRowOnSmallDevices:v,fallbackColSize:12}}getColumnsFilteredForConditions(t){return t.filter(t=>!!this.hasAnyVisibleContent(t))}render(){var t=this.getProp("cssAttributes",{}),e=(0,d.Qe)(this.getProp("themeStyle","")),i=this.getPropSingle("themeStyle.background")?"theme-bg-".concat(this.getPropSingle("themeStyle.background")):"",n=this.getProp("fullWidth"),l=this.getProp("fullWidthContent"),s={horizontalAlign:this.getPropSingle("horizontalAlign"),verticalAlign:this.getPropSingle("verticalAlign")},o=this.getProp("renderWithoutColumns",!1),g=this.getProp("animation"),f=this.removeSpaces("ColumnContainer container ".concat((0,r.getDisplayClasses)(t)," ").concat(e)),C=this.removeSpaces("ColumnContainer container-fluid ".concat((0,r.getDisplayClasses)(t)," ").concat(e)),b=this.removeSpaces("\n        d-flex\n        ".concat(s.horizontalAlign?this.getHorizontalColumnAlign(s,this.contentDirection):"","\n        ").concat(s.verticalAlign?this.getVerticalColumnAlign(s,this.contentDirection):"","\n        ").concat(this.contentDirection)),D=this.getProp("columns",[]).filter(t=>t.content&&t.content.length>0),x=this.isEditorMode(),O=D.filter(t=>!!x||!!this.hasAnyVisibleContent(t));return(0,v.jsx)(v.Fragment,{children:O.length>0&&(0,v.jsx)(m.Z,{whenVisible:!0,className:"u20-hydrate",children:(0,v.jsxs)(u.default,{animation:g,className:b,children:[n&&l&&(0,v.jsxs)(r.default,p(p({id:this.getId(),forceChildStyle:"*"},(0,a.$f)(this.props)),{},{attributes:t,className:this.removeSpaces("".concat(C," ").concat(i)),children:[!o&&(0,v.jsx)(c.Z,{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)}),o&&(0,v.jsx)("div",{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)})]}),this.getId()),n&&!l&&(0,v.jsx)(r.default,p(p({id:this.getId(),forceChildStyle:"*"},(0,a.$f)(this.props)),{},{attributes:t,className:this.removeSpaces("".concat(C," ").concat(i)),children:(0,v.jsxs)(h.Z,{className:f,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:[!o&&(0,v.jsx)(c.Z,{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)}),o&&(0,v.jsx)("div",{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)})]})}),this.getId()),!n&&(0,v.jsxs)(r.default,p(p({id:this.getId(),forceChildStyle:"*"},(0,a.$f)(this.props)),{},{attributes:t,className:this.removeSpaces("".concat(f," ").concat(i)),children:[!o&&(0,v.jsx)(c.Z,{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)}),o&&(0,v.jsx)("div",{className:b,style:{height:t.css_height?t.css_height:null,flexWrap:this.camelToKebab(t.css_flexWrap)},children:this.renderColumns(O,o)})]}),this.getId())]})},this.getId()+"_cond")})}}},27041:function(t,e,i){i.r(e),i.d(e,{default:function(){return a}});var n=i(67294),l=i(18357),s=i(85893);function a(t){if(!t.animation&&!t.animationTarget)return t.children;var e=null!=t&&null!==(u=t.animation)&&void 0!==u&&u.duration?parseInt(null==t?void 0:null===(d=t.animation)||void 0===d?void 0:d.duration,10):3,i=null!=t&&null!==(m=t.animation)&&void 0!==m&&m.delay?parseInt(null==t?void 0:null===(g=t.animation)||void 0===g?void 0:g.delay,10):0,a=null!==(v=null==t?void 0:null===(f=t.animation)||void 0===f?void 0:f.isScrollBased)&&void 0!==v&&v,o=null==t||null===(p=t.animation)||void 0===p||!p.doNotTriggerOnce,r=null==t?void 0:null===(C=t.animation)||void 0===C?void 0:null===(b=C.animation)||void 0===b?void 0:b[0];if(!a){var{ref:c,inView:h}=(0,l.YD)({threshold:.5,rootMargin:"0px",triggerOnce:o});return(0,s.jsx)("div",{style:{width:"auto",height:"auto",display:"block"},ref:c,className:null==t?void 0:t.className,children:(0,s.jsx)("div",{style:{width:"auto",height:"auto",transitionDuration:"".concat(e,"s"),transitionDelay:"".concat(i,"s")},className:"".concat(r," ").concat(h?"animation-visible":""),children:t.children})})}if(a){var u,d,m,g,v,f,p,C,b,D,x,O,y,W,A,S=(0,n.useRef)(null);D=null!==(O=null==t?void 0:null===(y=t.animation)||void 0===y?void 0:y.transformX)&&void 0!==O?O:0,x=null!==(W=null==t?void 0:null===(A=t.animation)||void 0===A?void 0:A.transformY)&&void 0!==W?W:0;var w=()=>{if(S.current){var t=S.current.getBoundingClientRect(),e=window.scrollY,i=t.top+e,n=window.innerHeight;if(e+n>i&&e<i+t.height){var l=(e+n-i)/(n+t.height);S.current.style.transform="translate(".concat(D*l,"px , ").concat(x*l,"px)")}}},_=()=>{requestAnimationFrame(w)};return(0,n.useEffect)(()=>(window.addEventListener("scroll",_),()=>{window.removeEventListener("scroll",_)}),[]),(0,s.jsx)("div",{style:{width:"100%",height:"100%"},ref:S,className:"".concat(null==t?void 0:t.className),children:t.children})}}},44819:function(t,e,i){i.d(e,{C1:function(){return n},Qe:function(){return l},Uq:function(){return s}}),i(67294),i(15590),i(85893);var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,i=e.props.className?e.props.className+" ":"";return t&&t.background&&t.background.length>0&&(i+="theme-bg-"+t.background[0]),i},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e="";return t&&t.design&&t.design.length>0&&(e="theme-"+t.design[0]),e},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e="";return t&&t.background&&t.background.length>0&&(e="theme-bg-".concat(t.background[0])),e}}}]);