// source --> https://www.federicamurru.it/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=5.1.9 ( function( $ ) { 'use strict'; if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) { return; } wpcf7 = $.extend( { cached: 0, inputs: [] }, wpcf7 ); $( function() { wpcf7.supportHtml5 = ( function() { var features = {}; var input = document.createElement( 'input' ); features.placeholder = 'placeholder' in input; var inputTypes = [ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each( inputTypes, function( index, value ) { input.setAttribute( 'type', value ); features[ value ] = input.type !== 'text'; } ); return features; } )(); $( 'div.wpcf7 > form' ).each( function() { var $form = $( this ); wpcf7.initForm( $form ); if ( wpcf7.cached ) { wpcf7.refill( $form ); } } ); } ); wpcf7.getId = function( form ) { return parseInt( $( 'input[name="_wpcf7"]', form ).val(), 10 ); }; wpcf7.initForm = function( form ) { var $form = $( form ); $form.submit( function( event ) { if ( ! wpcf7.supportHtml5.placeholder ) { $( '[placeholder].placeheld', $form ).each( function( i, n ) { $( n ).val( '' ).removeClass( 'placeheld' ); } ); } if ( typeof window.FormData === 'function' ) { wpcf7.submit( $form ); event.preventDefault(); } } ); $( '.wpcf7-submit', $form ).after( '' ); wpcf7.toggleSubmit( $form ); $form.on( 'click', '.wpcf7-acceptance', function() { wpcf7.toggleSubmit( $form ); } ); // Exclusive Checkbox $( '.wpcf7-exclusive-checkbox', $form ).on( 'click', 'input:checkbox', function() { var name = $( this ).attr( 'name' ); $form.find( 'input:checkbox[name="' + name + '"]' ).not( this ).prop( 'checked', false ); } ); // Free Text Option for Checkboxes and Radio Buttons $( '.wpcf7-list-item.has-free-text', $form ).each( function() { var $freetext = $( ':input.wpcf7-free-text', this ); var $wrap = $( this ).closest( '.wpcf7-form-control' ); if ( $( ':checkbox, :radio', this ).is( ':checked' ) ) { $freetext.prop( 'disabled', false ); } else { $freetext.prop( 'disabled', true ); } $wrap.on( 'change', ':checkbox, :radio', function() { var $cb = $( '.has-free-text', $wrap ).find( ':checkbox, :radio' ); if ( $cb.is( ':checked' ) ) { $freetext.prop( 'disabled', false ).focus(); } else { $freetext.prop( 'disabled', true ); } } ); } ); // Placeholder Fallback if ( ! wpcf7.supportHtml5.placeholder ) { $( '[placeholder]', $form ).each( function() { $( this ).val( $( this ).attr( 'placeholder' ) ); $( this ).addClass( 'placeheld' ); $( this ).focus( function() { if ( $( this ).hasClass( 'placeheld' ) ) { $( this ).val( '' ).removeClass( 'placeheld' ); } } ); $( this ).blur( function() { if ( '' === $( this ).val() ) { $( this ).val( $( this ).attr( 'placeholder' ) ); $( this ).addClass( 'placeheld' ); } } ); } ); } if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.date ) { $form.find( 'input.wpcf7-date[type="date"]' ).each( function() { $( this ).datepicker( { dateFormat: 'yy-mm-dd', minDate: new Date( $( this ).attr( 'min' ) ), maxDate: new Date( $( this ).attr( 'max' ) ) } ); } ); } if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.number ) { $form.find( 'input.wpcf7-number[type="number"]' ).each( function() { $( this ).spinner( { min: $( this ).attr( 'min' ), max: $( this ).attr( 'max' ), step: $( this ).attr( 'step' ) } ); } ); } // Character Count wpcf7.resetCounter( $form ); // URL Input Correction $form.on( 'change', '.wpcf7-validates-as-url', function() { var val = $.trim( $( this ).val() ); if ( val && ! val.match( /^[a-z][a-z0-9.+-]*:/i ) && -1 !== val.indexOf( '.' ) ) { val = val.replace( /^\/+/, '' ); val = 'http://' + val; } $( this ).val( val ); } ); }; wpcf7.submit = function( form ) { if ( typeof window.FormData !== 'function' ) { return; } var $form = $( form ); $( '.ajax-loader', $form ).addClass( 'is-active' ); wpcf7.clearResponse( $form ); var formData = new FormData( $form.get( 0 ) ); var detail = { id: $form.closest( 'div.wpcf7' ).attr( 'id' ), status: 'init', inputs: [], formData: formData }; $.each( $form.serializeArray(), function( i, field ) { if ( '_wpcf7' == field.name ) { detail.contactFormId = field.value; } else if ( '_wpcf7_version' == field.name ) { detail.pluginVersion = field.value; } else if ( '_wpcf7_locale' == field.name ) { detail.contactFormLocale = field.value; } else if ( '_wpcf7_unit_tag' == field.name ) { detail.unitTag = field.value; } else if ( '_wpcf7_container_post' == field.name ) { detail.containerPostId = field.value; } else if ( field.name.match( /^_wpcf7_\w+_free_text_/ ) ) { var owner = field.name.replace( /^_wpcf7_\w+_free_text_/, '' ); detail.inputs.push( { name: owner + '-free-text', value: field.value } ); } else if ( field.name.match( /^_/ ) ) { // do nothing } else { detail.inputs.push( field ); } } ); wpcf7.triggerEvent( $form.closest( 'div.wpcf7' ), 'beforesubmit', detail ); var ajaxSuccess = function( data, status, xhr, $form ) { detail.id = $( data.into ).attr( 'id' ); detail.status = data.status; detail.apiResponse = data; var $message = $( '.wpcf7-response-output', $form ); switch ( data.status ) { case 'validation_failed': $.each( data.invalidFields, function( i, n ) { $( n.into, $form ).each( function() { wpcf7.notValidTip( this, n.message ); $( '.wpcf7-form-control', this ).addClass( 'wpcf7-not-valid' ); $( '[aria-invalid]', this ).attr( 'aria-invalid', 'true' ); } ); } ); $message.addClass( 'wpcf7-validation-errors' ); $form.addClass( 'invalid' ); wpcf7.triggerEvent( data.into, 'invalid', detail ); break; case 'acceptance_missing': $message.addClass( 'wpcf7-acceptance-missing' ); $form.addClass( 'unaccepted' ); wpcf7.triggerEvent( data.into, 'unaccepted', detail ); break; case 'spam': $message.addClass( 'wpcf7-spam-blocked' ); $form.addClass( 'spam' ); wpcf7.triggerEvent( data.into, 'spam', detail ); break; case 'aborted': $message.addClass( 'wpcf7-aborted' ); $form.addClass( 'aborted' ); wpcf7.triggerEvent( data.into, 'aborted', detail ); break; case 'mail_sent': $message.addClass( 'wpcf7-mail-sent-ok' ); $form.addClass( 'sent' ); wpcf7.triggerEvent( data.into, 'mailsent', detail ); break; case 'mail_failed': $message.addClass( 'wpcf7-mail-sent-ng' ); $form.addClass( 'failed' ); wpcf7.triggerEvent( data.into, 'mailfailed', detail ); break; default: var customStatusClass = 'custom-' + data.status.replace( /[^0-9a-z]+/i, '-' ); $message.addClass( 'wpcf7-' + customStatusClass ); $form.addClass( customStatusClass ); } wpcf7.refill( $form, data ); wpcf7.triggerEvent( data.into, 'submit', detail ); if ( 'mail_sent' == data.status ) { $form.each( function() { this.reset(); } ); wpcf7.toggleSubmit( $form ); wpcf7.resetCounter( $form ); } if ( ! wpcf7.supportHtml5.placeholder ) { $form.find( '[placeholder].placeheld' ).each( function( i, n ) { $( n ).val( $( n ).attr( 'placeholder' ) ); } ); } $message.html( '' ).append( data.message ).slideDown( 'fast' ); $message.attr( 'role', 'alert' ); $( '.screen-reader-response', $form.closest( '.wpcf7' ) ).each( function() { var $response = $( this ); $response.html( '' ).attr( 'role', '' ).append( data.message ); if ( data.invalidFields ) { var $invalids = $( '' ); $.each( data.invalidFields, function( i, n ) { if ( n.idref ) { var $li = $( '
  • ' ).append( $( '' ).attr( 'href', '#' + n.idref ).append( n.message ) ); } else { var $li = $( '
  • ' ).append( n.message ); } $invalids.append( $li ); } ); $response.append( $invalids ); } $response.attr( 'role', 'alert' ).focus(); } ); }; $.ajax( { type: 'POST', url: wpcf7.apiSettings.getRoute( '/contact-forms/' + wpcf7.getId( $form ) + '/feedback' ), data: formData, dataType: 'json', processData: false, contentType: false } ).done( function( data, status, xhr ) { ajaxSuccess( data, status, xhr, $form ); $( '.ajax-loader', $form ).removeClass( 'is-active' ); } ).fail( function( xhr, status, error ) { var $e = $( '
    ' ).text( error.message ); $form.after( $e ); } ); }; wpcf7.triggerEvent = function( target, name, detail ) { var $target = $( target ); /* DOM event */ var event = new CustomEvent( 'wpcf7' + name, { bubbles: true, detail: detail } ); $target.get( 0 ).dispatchEvent( event ); /* jQuery event */ $target.trigger( 'wpcf7:' + name, detail ); $target.trigger( name + '.wpcf7', detail ); // deprecated }; wpcf7.toggleSubmit = function( form, state ) { var $form = $( form ); var $submit = $( 'input:submit', $form ); if ( typeof state !== 'undefined' ) { $submit.prop( 'disabled', ! state ); return; } if ( $form.hasClass( 'wpcf7-acceptance-as-validation' ) ) { return; } $submit.prop( 'disabled', false ); $( '.wpcf7-acceptance', $form ).each( function() { var $span = $( this ); var $input = $( 'input:checkbox', $span ); if ( ! $span.hasClass( 'optional' ) ) { if ( $span.hasClass( 'invert' ) && $input.is( ':checked' ) || ! $span.hasClass( 'invert' ) && ! $input.is( ':checked' ) ) { $submit.prop( 'disabled', true ); return false; } } } ); }; wpcf7.resetCounter = function( form ) { var $form = $( form ); $( '.wpcf7-character-count', $form ).each( function() { var $count = $( this ); var name = $count.attr( 'data-target-name' ); var down = $count.hasClass( 'down' ); var starting = parseInt( $count.attr( 'data-starting-value' ), 10 ); var maximum = parseInt( $count.attr( 'data-maximum-value' ), 10 ); var minimum = parseInt( $count.attr( 'data-minimum-value' ), 10 ); var updateCount = function( target ) { var $target = $( target ); var length = $target.val().length; var count = down ? starting - length : length; $count.attr( 'data-current-value', count ); $count.text( count ); if ( maximum && maximum < length ) { $count.addClass( 'too-long' ); } else { $count.removeClass( 'too-long' ); } if ( minimum && length < minimum ) { $count.addClass( 'too-short' ); } else { $count.removeClass( 'too-short' ); } }; $( ':input[name="' + name + '"]', $form ).each( function() { updateCount( this ); $( this ).keyup( function() { updateCount( this ); } ); } ); } ); }; wpcf7.notValidTip = function( target, message ) { var $target = $( target ); $( '.wpcf7-not-valid-tip', $target ).remove(); $( '' ).attr( { 'class': 'wpcf7-not-valid-tip', 'role': 'alert', 'aria-hidden': 'true', } ).text( message ).appendTo( $target ); if ( $target.is( '.use-floating-validation-tip *' ) ) { var fadeOut = function( target ) { $( target ).not( ':hidden' ).animate( { opacity: 0 }, 'fast', function() { $( this ).css( { 'z-index': -100 } ); } ); }; $target.on( 'mouseover', '.wpcf7-not-valid-tip', function() { fadeOut( this ); } ); $target.on( 'focus', ':input', function() { fadeOut( $( '.wpcf7-not-valid-tip', $target ) ); } ); } }; wpcf7.refill = function( form, data ) { var $form = $( form ); var refillCaptcha = function( $form, items ) { $.each( items, function( i, n ) { $form.find( ':input[name="' + i + '"]' ).val( '' ); $form.find( 'img.wpcf7-captcha-' + i ).attr( 'src', n ); var match = /([0-9]+)\.(png|gif|jpeg)$/.exec( n ); $form.find( 'input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]' ).attr( 'value', match[ 1 ] ); } ); }; var refillQuiz = function( $form, items ) { $.each( items, function( i, n ) { $form.find( ':input[name="' + i + '"]' ).val( '' ); $form.find( ':input[name="' + i + '"]' ).siblings( 'span.wpcf7-quiz-label' ).text( n[ 0 ] ); $form.find( 'input:hidden[name="_wpcf7_quiz_answer_' + i + '"]' ).attr( 'value', n[ 1 ] ); } ); }; if ( typeof data === 'undefined' ) { $.ajax( { type: 'GET', url: wpcf7.apiSettings.getRoute( '/contact-forms/' + wpcf7.getId( $form ) + '/refill' ), beforeSend: function( xhr ) { var nonce = $form.find( ':input[name="_wpnonce"]' ).val(); if ( nonce ) { xhr.setRequestHeader( 'X-WP-Nonce', nonce ); } }, dataType: 'json' } ).done( function( data, status, xhr ) { if ( data.captcha ) { refillCaptcha( $form, data.captcha ); } if ( data.quiz ) { refillQuiz( $form, data.quiz ); } } ); } else { if ( data.captcha ) { refillCaptcha( $form, data.captcha ); } if ( data.quiz ) { refillQuiz( $form, data.quiz ); } } }; wpcf7.clearResponse = function( form ) { var $form = $( form ); $form.removeClass( 'invalid spam sent failed' ); $form.siblings( '.screen-reader-response' ).html( '' ).attr( 'role', '' ); $( '.wpcf7-not-valid-tip', $form ).remove(); $( '[aria-invalid]', $form ).attr( 'aria-invalid', 'false' ); $( '.wpcf7-form-control', $form ).removeClass( 'wpcf7-not-valid' ); $( '.wpcf7-response-output', $form ) .hide().empty().removeAttr( 'role' ) .removeClass( 'wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked' ); }; wpcf7.apiSettings.getRoute = function( path ) { var url = wpcf7.apiSettings.root; url = url.replace( wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path ); return url; }; } )( jQuery ); /* * Polyfill for Internet Explorer * See https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent */ ( function () { if ( typeof window.CustomEvent === "function" ) return false; function CustomEvent ( event, params ) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = document.createEvent( 'CustomEvent' ); evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); return evt; } CustomEvent.prototype = window.Event.prototype; window.CustomEvent = CustomEvent; } )(); // source --> https://www.federicamurru.it/wp-content/plugins/cookie-notice/js/front.min.js?ver=1.3.2 !function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}(),function(){function t(e){return new RegExp("(^| )"+e+"( |$)")}function e(e,t,n){for(var i=0;iparseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.adjustOffset=function(){var e=r.getElementById("coronabar"),t=r.getElementById("wpadminbar"),n=0,i=0;"top"===cnArgs.position&&null!==t&&(i=t.offsetHeight,this.noticeContainer.style.top=i+"px"),null!==e&&(n=e.offsetHeight-1,"top"===cnArgs.position?(e.style.top=i+"px",this.noticeContainer.style.top=n+i+"px"):this.noticeContainer.style.bottom=n+"px")},this.getClosest=function(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1 https://www.federicamurru.it/wp-content/themes/flatsome/inc/extensions/flatsome-instant-page/flatsome-instant-page.js?ver=1.2.1 // modified to work without type="module" ;(function () { /*! instant.page v1.2.2 - (C) 2019 Alexandre Dieulot - https://instant.page/license */ var urlToPreload var mouseoverTimer var lastTouchTimestamp var prefetcher = document.createElement('link') var isSupported = prefetcher.relList && prefetcher.relList.supports && prefetcher.relList.supports('prefetch') var isDataSaverEnabled = navigator.connection && navigator.connection.saveData var allowQueryString = 'instantAllowQueryString' in document.body.dataset var allowExternalLinks = 'instantAllowExternalLinks' in document.body.dataset if (isSupported && !isDataSaverEnabled) { prefetcher.rel = 'prefetch' document.head.appendChild(prefetcher) var eventListenersOptions = { capture: true, passive: true } document.addEventListener('touchstart', touchstartListener, eventListenersOptions) document.addEventListener('mouseover', mouseoverListener, eventListenersOptions) } function touchstartListener (event) { /* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp` * must be assigned on touchstart to be measured on mouseover. */ lastTouchTimestamp = performance.now() var linkElement = event.target.closest('a') if (!isPreloadable(linkElement)) { return } linkElement.addEventListener('touchcancel', touchendAndTouchcancelListener, { passive: true }) linkElement.addEventListener('touchend', touchendAndTouchcancelListener, { passive: true }) urlToPreload = linkElement.href preload(linkElement.href) } function touchendAndTouchcancelListener () { urlToPreload = undefined stopPreloading() } function mouseoverListener (event) { if (performance.now() - lastTouchTimestamp < 1100) { return } var linkElement = event.target.closest('a') if (!isPreloadable(linkElement)) { return } linkElement.addEventListener('mouseout', mouseoutListener, { passive: true }) urlToPreload = linkElement.href mouseoverTimer = setTimeout(function () { preload(linkElement.href) mouseoverTimer = undefined }, 65) } function mouseoutListener (event) { if (event.relatedTarget && event.target.closest('a') === event.relatedTarget.closest('a')) { return } if (mouseoverTimer) { clearTimeout(mouseoverTimer) mouseoverTimer = undefined } else { urlToPreload = undefined stopPreloading() } } function isPreloadable (linkElement) { if (!linkElement || !linkElement.href) { return } if (urlToPreload === linkElement.href) { return } var preloadLocation = new URL(linkElement.href) if (!allowExternalLinks && preloadLocation.origin !== location.origin && !('instant' in linkElement.dataset)) { return } if (!['http:', 'https:'].includes(preloadLocation.protocol)) { return } if (preloadLocation.protocol === 'http:' && location.protocol === 'https:') { return } if (!allowQueryString && preloadLocation.search && !('instant' in linkElement.dataset)) { return } if (preloadLocation.hash && preloadLocation.pathname + preloadLocation.search === location.pathname + location.search) { return } if ('noInstant' in linkElement.dataset) { return } return true } function preload (url) { prefetcher.href = url } function stopPreloading () { prefetcher.removeAttribute('href') } })(); // source --> https://www.federicamurru.it/wp-includes/js/hoverIntent.min.js?ver=1.8.1 /*! This file is auto-generated */ !function(a){a.fn.hoverIntent=function(e,t,n){var o,r,v,i,u={interval:100,sensitivity:6,timeout:0};u="object"==typeof e?a.extend(u,e):a.isFunction(t)?a.extend(u,{over:e,out:t,selector:n}):a.extend(u,{over:e,out:e,selector:t});function s(e){o=e.pageX,r=e.pageY}function h(e){var t=a.extend({},e),n=this;n.hoverIntent_t&&(n.hoverIntent_t=clearTimeout(n.hoverIntent_t)),"mouseenter"===e.type?(v=t.pageX,i=t.pageY,a(n).on("mousemove.hoverIntent",s),n.hoverIntent_s||(n.hoverIntent_t=setTimeout(function(){I(t,n)},u.interval))):(a(n).off("mousemove.hoverIntent",s),n.hoverIntent_s&&(n.hoverIntent_t=setTimeout(function(){!function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,u.out.apply(t,[e])}(t,n)},u.timeout)))}var I=function(e,t){if(t.hoverIntent_t=clearTimeout(t.hoverIntent_t),Math.sqrt((v-o)*(v-o)+(i-r)*(i-r)) https://www.federicamurru.it/wp-content/themes/flatsome/assets/js/flatsome.js?ver=3.11.3 !function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){t.exports=i(13)},,,,,,,,,,,,,function(t,e,i){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}var n=i(14),o=e(n);i(15),i(17),i(18),i(19),i(20),i(21),i(22),i(23),i(91),i(92),i(95),i(96),i(97),i(99),i(100),i(101),i(103),i(104),i(105),i(106),i(107),i(108),i(109),i(110),i(111),i(112),i(113),i(114),i(115),i(116),i(118),i(119),i(120),jQuery(function(){return t.Flatsome.attach(document)}),t.cookie=o.default}).call(e,function(){return this}())},function(t,e,i){(function(e){/*! cookie function. get, set, or forget a cookie. [c]2014 @scottjehl, Filament Group, Inc. Licensed MIT */ !function(e){var i=function(t,i,n){if(void 0===i){var o="; "+e.document.cookie,r=o.split("; "+t+"=");return 2===r.length?r.pop().split(";").shift():null}i===!1&&(n=-1);var s="";if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),s="; expires="+a.toGMTString()}e.document.cookie=t+"="+i+s+"; path=/"};t.exports=i}("undefined"!=typeof e?e:this)}).call(e,function(){return this}())},function(t,e,i){var n,o,r,s,r,a,r,l,n,c,n,u,r,h,n,d,n,p,n,f,n,m,n,g,n,v,n,y,n,b,n,w,n,x,n,S,n,r,k,r,n,o,n,C,n,o;/*! * Flickity PACKAGED v2.1.2 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use * or Flickity Commercial License for commercial use * * https://flickity.metafizzy.co * Copyright 2015-2018 Metafizzy */ !function(r,s){n=[i(16)],o=function(t){return s(r,t)}.apply(e,n),!(void 0!==o&&(t.exports=o))}(window,function(t,e){"use strict";function i(i,r,a){function l(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,l){var c=a.data(l,i);if(!c)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var u=c[e];if(!u||"_"==e.charAt(0))return void s(r+" is not a valid method");var h=u.apply(c,n);o=void 0===o?h:o}),void 0!==o?o:t}function c(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return l(this,t,e)}return c(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(n,o){r=o,!(s="function"==typeof r?r.call(e,i,e,t):r)}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o