import generateCSSUnit from '@Controls/generateCSSUnit';
/**
* Generate the Box Shadow or Text Shadow CSS.
*
* For Text Shadow CSS:
* { spread, position } should not be sent as params during the function call.
* { spreadUnit } will have no effect.
*
* For Box/Text Shadow Hover CSS:
* { altColor } should be set as the attribute used for { color } in Box/Text Shadow Normal CSS.
*
* @param {Object} shadowProperties The object of properties used to generate the Box/Text Shadow CSS.
* @param {number|undefined} shadowProperties.horizontal The horizontal value.
* @param {number|undefined} shadowProperties.vertical The vertical value.
* @param {number|undefined} shadowProperties.blur The blur value.
* @param {number|undefined} shadowProperties.spread The spread value.
* @param {string} shadowProperties.horizontalUnit The horizontal unit, defaults to 'px'.
* @param {string} shadowProperties.verticalUnit The vertical unit, defaults to 'px'.
* @param {string} shadowProperties.blurUnit The blur unit, defaults to 'px'.
* @param {string} shadowProperties.spreadUnit The spread unit, defaults to 'px'.
* @param {string|undefined} shadowProperties.color The shadow color.
* @param {string} shadowProperties.position The inset/outset position.
* @param {string} shadowProperties.altColor An alternate color to use for hover if color is undefined.
* @return {string} The generated css, or empty string if required properties aren't set.
*
* @since 2.5.0
*/
const generateShadowCSS = ( shadowProperties ) => {
let {
horizontal,
vertical,
blur,
spread = undefined,
horizontalUnit = 'px',
verticalUnit = 'px',
blurUnit = 'px',
spreadUnit = 'px',
color,
position = 'outset',
altColor = '',
} = shadowProperties;
// Although optional, color is required for Sarafi on PC. Return early if color isn't set.
if ( ! color && ! altColor ) {
return '';
}
// Get the CSS units for the number properties.
horizontal = generateCSSUnit( horizontal, horizontalUnit );
if ( '' === horizontal ) {
horizontal = 0;
}
vertical = generateCSSUnit( vertical, verticalUnit );
if ( '' === vertical ) {
vertical = 0;
}
blur = generateCSSUnit( blur, blurUnit );
if ( '' === blur ) {
blur = 0;
}
spread = generateCSSUnit( spread, spreadUnit );
if ( '' === spread ) {
spread = 0;
}
// If all numeric unit values are exactly 0, don't render the CSS.
if ( 0 === horizontal && 0 === vertical && 0 === blur && 0 === spread ) {
return '';
}
// Return the CSS with horizontal, vertical, blur, and color - and conditionally render spread and position.
return `${ horizontal } ${ vertical } ${ blur }${ spread ? ` ${ spread }` : '' } ${ color ? color : altColor }${
'outset' === position ? '' : ` ${ position }`
}`;
};
export default generateShadowCSS;
/*! elementor-pro - v3.13.2 - 22-05-2023 */
(()=>{var e={6998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PageTransition",{enumerable:!0,get:function(){return a.PageTransition}}),Object.defineProperty(t,"Preloader",{enumerable:!0,get:function(){return i.Preloader}});var a=r(4961),i=r(5171)},3302:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=/.*#[\w\-/$.+()*@?~!&',;=:%]*$/;var a={isDisabled:e=>Object.prototype.hasOwnProperty.call(e.dataset,"eDisablePageTransition"),isEmptyHref:e=>!e.getAttribute("href"),isTargetBlank:e=>"_blank"===e.target,notSameOrigin:e=>!e.href.startsWith(window.location.origin),hasFragment:e=>!!e.href.match(r),isPopup:e=>"true"===e.getAttribute("aria-haspopup")&&"false"===e.getAttribute("aria-expanded"),isWoocommerce:e=>{const t=e.href.match(/\?add-to-cart=/),r=e.href.match(/\?remove_item=/),a=e.href.match(/\?undo_item=/),i=e.href.match(/\?product-page=/),n=e.href.match(/\?elementor_wc_logout=/),o=e.parentElement?.classList.contains("woocommerce-MyAccount-navigation-link");return t||r||a||i||n||o},isExcluded:(e,t)=>e.href.match(new RegExp(t))};t.default=a},4961:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PageTransition=void 0;var i=a(r(4808)),n=a(r(3302));class PageTransition extends HTMLElement{constructor(){super(),this.classes=this.getClasses(),this.elements=this.getElements(),this.bindEvents()}getClasses(){return{preloader:"e-page-transition--preloader",entering:"e-page-transition--entering",exiting:"e-page-transition--exiting",entered:"e-page-transition--entered",preview:"e-page-transition--preview"}}getStyle(){return``}static get observedAttributes(){return["preloader-type","preloader-icon","preloader-image-url","preloader-animation-type","disabled"]}getElements(){const e=this.getAttribute("triggers")||'a:not( [data-elementor-open-lightbox="yes"] )';return{links:document.querySelectorAll(e)}}shouldPageTriggerTransition(e){return Object.values(n.default).every((t=>!t(e,this.getAttribute("exclude"))))}onPageShow(){this.classList.contains(this.classes.exiting)&&(this.classList.add(this.classes.entered),this.classList.remove(this.classes.exiting)),this.animateState("entering").then((()=>{this.classList.add(this.classes.entered)}))}onLinkClick(e){if(!this.shouldPageTriggerTransition(e.currentTarget))return;e.preventDefault();const t=e.currentTarget.href;this.classList.remove(this.classes.entered),this.animateState("exiting",this.getPreloaderDelay()).then((()=>{this.classList.add(this.classes.exiting),location.href=t}))}prerender(e){if(document.querySelector(`link[href="${e}"]`))return;const t=document.createElement("link");t.setAttribute("rel","prerender"),t.setAttribute("href",e),document.head.appendChild(t)}onLinkMouseEnter(e){this.shouldPageTriggerTransition(e.currentTarget)&&this.prerender(e.currentTarget.href)}bindEvents(){window.addEventListener("pageshow",this.onPageShow.bind(this)),window.addEventListener("DOMContentLoaded",(()=>{this.elements=this.getElements(),this.elements.links.forEach((e=>{e.addEventListener("click",this.onLinkClick.bind(this)),e.addEventListener("mouseenter",this.onLinkMouseEnter.bind(this)),e.addEventListener("touchstart",this.onLinkMouseEnter.bind(this))}))}))}escapeHTML(e){const t={"&":"&","<":"<",">":">","'":"'",'"':"""};return e.replace(/[&<>'"]/g,(e=>t[e]||e))}getIconLoader(){const e=this.getAttribute("preloader-icon")||"";return`\n\t\t\t\n\t\t`}getImageLoader(){const e=this.getAttribute("preloader-image-url")||"";return`\n\t\t\t\n\t\t`}getAnimationLoader(){const e=this.getAttribute("preloader-animation-type");return e?`\n\t\t\t\n\t\t`:""}render(){if(this.hasAttribute("disabled"))return void(this.innerHTML="");switch(this.getAttribute("preloader-type")){case"icon":this.innerHTML=this.getIconLoader();break;case"image":this.innerHTML=this.getImageLoader();break;case"animation":this.innerHTML=this.getAnimationLoader();break;default:this.innerHTML=""}this.innerHTML+=this.getStyle()}getCssVar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"e-page-transition-";return window.getComputedStyle(this).getPropertyValue(`--${t}${e}`)}getAnimationDuration(){return parseInt(this.getCssVar("animation-duration"))||0}getPreloaderDelay(){return parseInt(this.getCssVar("delay","e-preloader-"))||0}animate(){if(this.isAnimating)return new Promise(((e,t)=>{t("Animation is already in progress.")}));this.isAnimating=!0;const e=this.getPreloaderDelay()+1500;return this.classList.remove(this.classes.entered),new Promise((t=>{setTimeout((()=>{this.animateState("exiting",e).then((()=>{this.animateState("entering").then((()=>{this.classList.add(this.classes.entered),this.isAnimating=!1,t()}))}))}))}))}animateState(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.classes?.[e];if(!r)return new Promise(((t,r)=>{r(e)}));this.classList.remove(r),this.classList.add(r);const a=this.getAnimationDuration();return new Promise((i=>{setTimeout((()=>{this.classList.remove(r),i(e)}),a+t)}))}attributeChangedCallback(){this.render()}connectedCallback(){this.render()}}t.PageTransition=PageTransition;var o=PageTransition;t.default=o},5171:(e,t,r)=>{"use strict";var a=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Preloader=void 0;var i=a(r(2956));class Preloader extends HTMLElement{static get observedAttributes(){return["type"]}attributeChangedCallback(){this.render()}getStyle(){return``}render(){const e=this.getAttribute("type");this.innerHTML="",e&&(["bouncing-dots","pulsing-dots"].includes(e)&&(this.innerHTML+="\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t"),this.innerHTML+=this.getStyle())}connectedCallback(){this.render()}}t.Preloader=Preloader;var n=Preloader;t.default=n},4808:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var a=r(3476),i=r.n(a)()((function(e){return e[1]}));i.push([e.id,"e-page-transition{--preloader-fade-duration: .5s;--preloader-delay: calc( var( --e-page-transition-animation-duration, 0s ) + var( --e-preloader-delay, 0s ) );--page-transition-delay: var( --preloader-fade-duration );position:fixed;inset:0;display:grid;place-items:center;z-index:10000;background:#fff;animation-fill-mode:both;animation-duration:var(--e-page-transition-animation-duration)}e-page-transition[disabled]{display:none}e-page-transition e-preloader,e-page-transition .e-page-transition--preloader{opacity:0}e-page-transition .e-page-transition--preloader{position:absolute;font-size:var(--e-preloader-size);color:var(--e-preloader-color);fill:var(--e-preloader-color);width:var(--e-preloader-width);max-width:var(--e-preloader-max-width);transform:rotate(var(--e-preloader-rotate, 0deg));animation-name:var(--e-preloader-animation);animation-duration:var(--e-preloader-animation-duration, 1000ms);animation-iteration-count:infinite;animation-timing-function:linear}e-page-transition svg.e-page-transition--preloader{width:var(--e-preloader-size)}.e-page-transition--entering{animation-name:var(--e-page-transition-entrance-animation);animation-delay:var(--preloader-fade-duration, 0s)}.e-page-transition--entering e-preloader,.e-page-transition--entering .e-page-transition--preloader{animation:var(--e-preloader-animation, none) var(--e-preloader-animation-duration, 0s) linear infinite,e-page-transition-fade-out var(--preloader-fade-duration) both;transition:none}.e-page-transition--exiting{animation-name:var(--e-page-transition-exit-animation)}.e-page-transition--exiting e-preloader,.e-page-transition--exiting .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1);transition:var(--preloader-fade-duration) all;transition-delay:var(--preloader-delay, 0s)}.e-page-transition--entered:not(.e-page-transition--preview){display:none}.e-page-transition--preview{animation-fill-mode:initial}.e-page-transition--preview.e-page-transition--entered e-preloader,.e-page-transition--preview.e-page-transition--entered .e-page-transition--preloader{opacity:var(--e-preloader-opacity, 1)}@media(prefers-reduced-motion: reduce){e-page-transition{display:none}}@keyframes e-page-transition-fade-in{from{opacity:0}to{opacity:1}}@keyframes e-page-transition-fade-in-down{from{opacity:0;transform:translate3d(0, -100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-left{from{opacity:0;transform:translate3d(-100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-right{from{opacity:0;transform:translate3d(100%, 0, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-fade-in-up{from{opacity:0;transform:translate3d(0, 100%, 0)}to{opacity:1;transform:none}}@keyframes e-page-transition-zoom-in{from{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}50%{opacity:1}}@keyframes e-page-transition-slide-in-down{from{transform:translate3d(0, -100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-left{from{transform:translate3d(-100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-right{from{transform:translate3d(100%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-slide-in-up{from{transform:translate3d(0, 100%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes e-page-transition-fade-out{from{opacity:1}to{opacity:0}}@keyframes e-page-transition-fade-out-up{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, -100%, 0)}}@keyframes e-page-transition-fade-out-left{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(-100%, 0, 0)}}@keyframes e-page-transition-fade-out-right{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(100%, 0, 0)}}@keyframes e-page-transition-fade-out-down{from{opacity:1;transform:none}to{opacity:0;transform:translate3d(0, 100%, 0)}}@keyframes e-page-transition-slide-out-up{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, -100%, 0);visibility:visible}}@keyframes e-page-transition-slide-out-left{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(-100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-right{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0);visibility:visible}}@keyframes e-page-transition-slide-out-down{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(0, 100%, 0);visibility:visible}}@keyframes e-page-transition-zoom-out{from{opacity:1}50%{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}}",""]);const n=i},2956:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var a=r(3476),i=r.n(a)()((function(e){return e[1]}));i.push([e.id,'e-preloader{--default-duartion: 1000ms;--duration: var( --e-preloader-animation-duration, var( --default-duration ) );display:block;font-size:var(--e-preloader-size)}e-preloader[type=circle],e-preloader[type=circle-dashed],e-preloader[type=spinners]{--e-preloader-animation: e-preloader-spin;height:1em;width:1em;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);border-radius:100%;animation:var(--duration) var(--e-preloader-animation) linear infinite}e-preloader[type=circle-dashed]{border:.1em solid rgba(255,255,255,.3);border-top-color:var(--e-preloader-color)}e-preloader[type=spinners]{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=bouncing-dots],e-preloader[type=pulsing-dots]{display:flex;gap:1em}e-preloader[type=bouncing-dots] i,e-preloader[type=pulsing-dots] i{height:1em;width:1em;border-radius:100%;background-color:var(--e-preloader-color)}e-preloader[type=bouncing-dots] i:nth-child(2),e-preloader[type=pulsing-dots] i:nth-child(2){animation-delay:var(--delay)}e-preloader[type=bouncing-dots] i:nth-child(3),e-preloader[type=pulsing-dots] i:nth-child(3){animation-delay:calc(var(--delay)*2)}e-preloader[type=bouncing-dots] i:nth-child(4),e-preloader[type=pulsing-dots] i:nth-child(4){animation-delay:calc(var(--delay)*3)}e-preloader[type=bouncing-dots] i{--delay: calc( var( --duration ) / 10 );animation:var(--duration) e-preloader-bounce linear infinite}e-preloader[type=pulsing-dots] i{--delay: calc( var( --duration ) / 6 );animation:var(--duration) e-preloader-pulsing-dots linear infinite}e-preloader[type=pulse]{height:1em;width:1em;position:relative}e-preloader[type=pulse]::before,e-preloader[type=pulse]::after{content:"";position:absolute;inset:0;border:.05em solid var(--e-preloader-color);border-radius:100%;animation:1.2s e-preloader-pulse infinite both ease-out}e-preloader[type=pulse]::after{animation-delay:.6s}e-preloader[type=overlap]{height:1em;width:1em;position:relative}e-preloader[type=overlap]::before,e-preloader[type=overlap]::after{content:"";inset:0;position:absolute;background:var(--e-preloader-color);border-radius:100%;opacity:.5;animation:2s e-preloader-overlap infinite both ease-in-out}e-preloader[type=overlap]::after{animation-delay:-1s;animation-direction:reverse}e-preloader[type=nested-spinners],e-preloader[type=opposing-nested-spinners],e-preloader[type=opposing-nested-rings]{height:1em;width:1em;position:relative}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::before,e-preloader[type=opposing-nested-rings]::after{content:"";display:block;position:absolute;border-radius:100%;border:.1em solid var(--e-preloader-color);border-top-color:rgba(0,0,0,0);animation:var(--duration) e-preloader-spin linear infinite}e-preloader[type=nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-rings]::before{inset:-0.3em}e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::after,e-preloader[type=opposing-nested-rings]::after{animation-duration:calc(var(--duration) - .2s);inset:0;opacity:.5}e-preloader[type=nested-spinners]::before,e-preloader[type=nested-spinners]::after,e-preloader[type=opposing-nested-spinners]::before,e-preloader[type=opposing-nested-spinners]::after{border-bottom-color:rgba(0,0,0,0)}e-preloader[type=opposing-nested-rings]::after,e-preloader[type=opposing-nested-spinners]::after{animation-direction:reverse}e-preloader[type=progress-bar],e-preloader[type=two-way-progress-bar],e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-progress-bar;height:.05em;width:5em;max-width:50vw;background:var(--e-preloader-color);animation:var(--duration) var(--e-preloader-animation) linear infinite both}e-preloader[type=progress-bar]{transform-origin:0 50%}e-preloader[type=repeating-bar]{--e-preloader-animation: e-preloader-repeating-bar}@media(prefers-reduced-motion: reduce){e-preloader{display:none}}@keyframes e-preloader-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes e-preloader-bounce{0%,40%,100%{transform:translateY(0)}20%{transform:translateY(-80%)}}@keyframes e-preloader-pulsing-dots{0%,40%,100%{transform:scale(1)}20%{transform:scale(1.5)}}@keyframes e-preloader-pulse{from{transform:scale(0);opacity:1}to{transform:scale(1);opacity:0}}@keyframes e-preloader-overlap{0%,100%{transform:scale(0.2)}50%{transform:scale(1)}}@keyframes e-preloader-progress-bar{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes e-preloader-repeating-bar{0%{transform:scaleX(0);transform-origin:0 50%}49%{transform-origin:0 50%}50%{transform:scaleX(1);transform-origin:100% 50%}100%{transform:scaleX(0);transform-origin:100% 50%}}',""]);const n=i},3476:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function toString(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,a){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(a)for(var n=0;n{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function __webpack_require__(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};(()=>{"use strict";var e=__webpack_require__(6998);class PageTransitionsFrontend{constructor(){customElements.define("e-preloader",e.Preloader),customElements.define("e-page-transition",e.PageTransition)}}new PageTransitionsFrontend})()})();
Publication – Artificial Intelligence center ITB