"use strict";(self.webpackChunkUmbracoVuePrototype=self.webpackChunkUmbracoVuePrototype||[]).push([[6031],{8858:(t,i,n)=>{n.d(i,{Z:()=>r});var e=n(7537),o=n.n(e),s=n(3645),a=n.n(s)()(o());a.push([t.id,".divider hr{margin-top:0px;margin-bottom:0px}.divider .dashed{border-top:3px dashed #bbb}","",{version:3,sources:["webpack://./Scripts/src/vue-components/_misc/divider/style.scss"],names:[],mappings:"AACE,YACE,cAAA,CACA,iBAAA,CAEF,iBACE,0BAAA",sourcesContent:[".divider {\r\n hr {\r\n margin-top: 0px;\r\n margin-bottom: 0px;\r\n }\r\n .dashed {\r\n border-top: 3px dashed #bbb;\r\n }\r\n}\r\n"],sourceRoot:""}]);const r=a},6031:(t,i,n)=>{n.r(i),n.d(i,{default:()=>C});var e=n(6252),o=n(3577);var s=n(4437),a=n(8159);const r=(0,e.aZ)({mixins:[a.Z],data:()=>({componentModel:{},dividerStyle:{}}),mounted(){const t=(0,s.G)().size(this.componentModel.borderWidth,"3px"),i=(0,s.G)().colour(this.componentModel.colour,"var(--secondary-colour)"),n=(0,s.G)().string(this.componentModel.style,"solid");this.dividerStyle={borderTop:t+" "+n+" "+i}}});var m=n(3379),l=n.n(m),h=n(7795),d=n.n(h),y=n(569),c=n.n(y),p=n(3565),u=n.n(p),A=n(9216),b=n.n(A),g=n(4589),v=n.n(g),x=n(8858),S={};S.styleTagTransform=v(),S.setAttributes=u(),S.insert=c().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=b();l()(x.Z,S);x.Z&&x.Z.locals&&x.Z.locals;const C=(0,n(3744).Z)(r,[["render",function(t,i,n,s,a,r){return(0,e.wg)(),(0,e.iD)("div",{class:"divider component-margins",style:(0,o.j5)(t.entryAnimationStyle)},[(0,e._)("hr",{style:(0,o.j5)(t.dividerStyle)},null,4)],4)}]])},8159:(t,i,n)=>{n.d(i,{Z:()=>m});var e=n(655),o=n(6252),s=n(4437);class a{constructor(t){this.animationEnable=(0,s.G)().boolean(t.animationEnable,!1),this.animationAlwaysRunOnLoad=(0,s.G)().boolean(t.animationAlwaysRunOnLoad,!1),this.animationDelay=(0,s.G)().number(t.animationDelay,.2),this.animationDuration=(0,s.G)().number(t.animationDuration,.3),this.animationDirection=(0,s.G)().string(t.animationDirection,"bottom")}}var r=n(4572);const m=(0,o.aZ)({data:()=>({backgroundUrl:"",componentModel:{},componentWidth:0,isDesktopSize:!0,themeId:"",elementContainer:{},entryAnimations:{},entryAnimationStyle:{},loadState:{},observer:{},observerFirstRun:!0}),watch:{loadState(t,i){1==t&&this.entryAnimations.animationEnable&&this.setupEntryAnimationObserver(this.runEntryAnimations)}},beforeUnmount:function(){window.removeEventListener("resize",this.handleResize)},mounted(){const t=this.$el.parentElement.getAttribute("umbracomodel");this.componentModel="null"!==t&&null!=t?JSON.parse(t):{},this.componentModel.entryAnimations||(this.componentModel.entryAnimations={}),this.initiateEntryAnimations(),this.elementContainer=this.$el.closest(".component-margins");const i=window.innerWidth;this.initiateMargins(i),this.initiatePadding(i),this.initiateHeight(),this.initiateResizeListener(),(0,r.y)().addLoadedModule(),this.loadState=(0,r.y)().getLoadState()},onUnmounted(){if(this.entryAnimations.animationEnable)try{this.observer.unobserve(this.elementContainer)}catch(t){}},methods:{delay(t){return(0,e.mG)(this,void 0,void 0,(function*(){return new Promise((i=>setTimeout(i,t)))}))},handleResize(t){this.componentWidth=this.$el.clientWidth,this.resizeWindow()},resizeWindow(){const t=window.innerWidth;t>991!==this.isDesktopSize&&(this.initiateMargins(t),this.initiatePadding(t),this.calculateSize(t))},initiateResizeListener(){window.addEventListener("resize",this.handleResize),this.$el&&(this.componentWidth=this.$el.clientWidth);const t=window.innerWidth;this.calculateSize(t)},calculateSize(t){this.isDesktopSize=t>991},initiateMargins(t){t>991?this.setMargins(this.componentModel.moduleMargin):this.setMargins(this.componentModel.moduleMarginMobile)},initiatePadding(t){t>991?this.setPadding(this.componentModel.modulePadding):this.setPadding(this.componentModel.modulePaddingMobile)},setMargins(t){null!==this.elementContainer&&t&&(this.elementContainer.style.marginTop=t.top?(0,s.G)().size(t.top,"0px"):"0px",this.elementContainer.style.marginBottom=t.bottom?(0,s.G)().size(t.bottom,"0px"):"0px",this.elementContainer.style.marginLeft=t.left?(0,s.G)().size(t.left,"0px"):"0px",this.elementContainer.style.marginRight=t.right?(0,s.G)().size(t.right,"0px"):"0px")},setPadding(t){null!==this.elementContainer&&t&&(this.elementContainer.style.paddingTop=t.top?(0,s.G)().size(t.top,"0px"):"0px",this.elementContainer.style.paddingBottom=t.bottom?(0,s.G)().size(t.bottom,"0px"):"0px",this.elementContainer.style.paddingLeft=t.left?(0,s.G)().size(t.left,"0px"):"0px",this.elementContainer.style.paddingRight=t.right?(0,s.G)().size(t.right,"0px"):"0px")},initiateHeight(){if(null!==this.elementContainer){let t;t=this.componentModel.moduleHeight?(0,s.G)().size(this.componentModel.moduleHeight,"auto"):"auto",this.elementContainer.style.height=t,(t.includes("vh")||t.includes("vmax"))&&(this.elementContainer.style.maxHeight="2300px"),this.elementContainer.style.overflow="hidden"}},initiateEntryAnimations(){if(this.entryAnimations=new a(this.componentModel.entryAnimations),this.entryAnimations.animationEnable)switch(this.entryAnimationStyle.opacity="0!important",this.entryAnimations.animationDirection){case"bottom":this.entryAnimationStyle.bottom="-20vh";break;case"top":this.entryAnimationStyle.top="-20vh";break;case"left":this.entryAnimationStyle.left="-20vw";break;case"right":this.entryAnimationStyle.right="-20vw"}},setupEntryAnimationObserver(){return(0,e.mG)(this,void 0,void 0,(function*(){this.entryAnimations.animationAlwaysRunOnLoad&&(this.observerFirstRun=!1),this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.runEntryAnimations(),this.observerFirstRun=!1}),{threshold:[.3]}),this.observer.observe(this.elementContainer)}))},runEntryAnimations(){return(0,e.mG)(this,void 0,void 0,(function*(){switch(this.observerFirstRun?this.entryAnimationStyle.transition="none!important":this.entryAnimationStyle.transition="opacity "+this.entryAnimations.animationDuration+"s ease-in-out "+this.entryAnimations.animationDelay+"s,bottom "+this.entryAnimations.animationDuration+"s ease-in-out "+this.entryAnimations.animationDelay+"s,top "+this.entryAnimations.animationDuration+"s ease-in-out "+this.entryAnimations.animationDelay+"s,left "+this.entryAnimations.animationDuration+"s ease-in-out "+this.entryAnimations.animationDelay+"s,right "+this.entryAnimations.animationDuration+"s ease-in-out "+this.entryAnimations.animationDelay+"s",this.entryAnimationStyle.opacity="1",this.entryAnimations.animationDirection){case"bottom":this.entryAnimationStyle.bottom="0px";break;case"top":this.entryAnimationStyle.top="-0px";break;case"left":this.entryAnimationStyle.left="-0px";break;case"right":this.entryAnimationStyle.right="-0px"}this.observer.unobserve(this.elementContainer);try{let t=this.entryAnimations.animationDuration+this.entryAnimations.animationDelay;yield this.delay(1e3*t),this.entryAnimationStyle={}}catch(t){this.entryAnimationStyle={},console.log("Core mixin addition failed.")}}))}}})}}]); //# sourceMappingURL=source-maps-1.2/6031.75fc2d432cf42f601099.map