PageSourceSearch

https://www.online-pen.de/theme/200e3198f4a62b932a0f1fd275be9252/j…/moorl-foundation.moorl-animation.c014cd.js

js online-pen.de collected 2026-09-24 08:29:19 UTC 9,559 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[18004],{857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function s(t,e,i){return t.concat(e).map(function(t){return n(t,i)})}function r(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=n;var c,h,d=Array.isArray(i);return d!==Array.isArray(t)?n(i,l):d?l.arrayMerge(t,i,l):(h={},(c=l).isMergeableObject(t)&&r(t).forEach(function(e){h[e]=n(t[e],c)}),r(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,c)(t[e],i[e],c):h[e]=n(i[e],c))}),h)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a},49:(t,e,i)=>{i.d(e,{Z:()=>s});var n=i(140);class s{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!s.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===s.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.replace(/^data(|-)/,""),o=n.Z.toLowerCamelCase(r,"-");if(!s.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return n.Z.parsePrimitive(a)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!s.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelector(e)||!1;if(i&&!1===n)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return n}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!s.isNode(t))throw Error("The parent node is not a valid HTML Node!");let n=t.querySelectorAll(e);if(0===n.length&&(n=!1),i&&!1===n)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return n}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},830:(t,e,i)=>{i.d(e,{Z:()=>n});class n{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(n),n}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,s=t.split("."),r=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=r;r=function(i){n.unsubscribe(t),e(i)}}return this.el.addEventListener(s[0],r),this.listeners.push({splitEventName:s,opts:i,cb:r}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}
1reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}},140:(t,e,i)=>{i.d(e,{Z:()=>n});class n{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=n.toUpperCamelCase(t,e);return n.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>n.ucFirst(t.toLowerCase())).join(""):n.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},568:(t,e,i)=>{i.d(e,{Z:()=>l});var n=i(857),s=i.n(n),r=i(49),o=i(140),a=i(830);class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=o.Z.toDashCase(this._pluginName),i=r.Z.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),n=r.Z.getAttribute(this.el,"data-".concat(e,"-options"),!1),a=[this.constructor.options,this.options,t];i&&a.push(window.PluginConfigManager.get(this._pluginName,i));try{n&&a.push(JSON.parse(n))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return s().all(a.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},i=!1){if(!r.Z.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new a.Z(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}},4:(t,e,i)=>{i.r(e),i.d(e,{default:()=>s});var n=i(568);class s extends n.Z{init(){var t;this.el.dataset.moorlAnimation?this.config=JSON.parse(this.el.dataset.moorlAnimation):this.config=this.options,this.activeAnimation=null,this.zIndex=parseInt((t=window.moorlAnimationZIndex)!==null&&void 0!==t?t:"9000"),this.animateInit(),this.animate(),this._registerEvents()}_registerEvents(){let t=this;window.addEventListener("scroll",function(){t.animate()},!1),this.el.addEventListener("mouseenter",()=>{!t.activeAnimation&&t.config.hover&&t.config.hover.active&&t.animateHover()}),this.el.addEventListener("animationstart",()=>{"in"===t.activeAnimation&&t.el.classList.remove("moorl-animation-hidden")}),this.el.addEventListener("animationend",()=>{"out"===t.activeAnimation&&t.el.classList.add("moorl-animation-hidden"),t.el.style={},t.activeAnimation=null,t.animate()})}_ms(t){return t.toString()+"ms"}_visible(t){return"isLoaded"===t||("isOverBottom"===t?this._isOverBottom():"isInViewport"===t?this._isInViewport():void 0)}_isInViewport(){return this.el.getBoundingClientRect().bottom<=(window.innerHeight||document.documentElement.clientHeight)}_isOverBottom(){return this.el.getBoundingClientRect().top<=(window.innerHeight||document.documentElement.clientHeight)}animateHover(){let t=this.config.hover;!this.el.classList.contains("moorl-animation-hidden")&&this._visible(t.condition)&&(this.activeAnimation="hover",this.el.style.animation=t.name,this.el.style.zIndex=this.zIndex,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration))}animateIn(){let t=this.config.in;this.el.classList.contains("moorl-animation-hidden")&&this._visible(t.condition)&&(this.activeAnimation="in",this.el.style.animation=t.name,this.el.style.zIndex=this.zIndex,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration))}animateOut(){let t=this.config.out;
1!this.el.classList.contains("moorl-animation-hidden")&&(this._visible(t.condition)||(this.activeAnimation="out",this.el.style.animation=t.name,this.el.style.animationDelay=this._ms(t.delay),this.el.style.animationDuration=this._ms(t.duration)))}animateInit(){let t=this.config;t.in&&t.in.active&&(this._visible(t.in.condition)?"isLoaded"===t.in.condition&&this.el.classList.add("moorl-animation-hidden"):this.el.classList.add("moorl-animation-hidden"))}animate(){!this.activeAnimation&&(this.config.in&&this.config.in.active&&this.animateIn(),this.config.out&&this.config.out.active&&this.animateOut())}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.