LocalCDN-Firefox-Chrome-Brave/resources/mootools/1.6.0/mootools-core.min.jsm

5 lines
116 KiB
JavaScript
Raw Normal View History

2020-03-17 07:37:28 +01:00
/*! MooTools: the javascript framework. license: MIT-style license. copyright: Copyright (c) 2006-2015 [Valerio Proietti](http://mad4milk.net/).*/
!function(){function forEachObjectEnumberableKey(object,fn,bind){if(enumerables)for(var i=enumerables.length;i--;){var k=enumerables[i];hasOwnProperty.call(object,k)&&fn.call(bind,k,object[k])}}this.MooTools={version:"1.6.0",build:"529422872adfff401b901b8b6c7ca5114ee95e2b"};var typeOf=this.typeOf=function(item){if(null==item)return"null";if(null!=item.$family)return item.$family();if(item.nodeName){if(1==item.nodeType)return"element";if(3==item.nodeType)return/\S/.test(item.nodeValue)?"textnode":"whitespace"}else if("number"==typeof item.length){if("callee"in item)return"arguments";if("item"in item)return"collection"}return typeof item},hasOwnProperty=(this.instanceOf=function(item,object){if(null==item)return!1;for(var constructor=item.$constructor||item.constructor;constructor;){if(constructor===object)return!0;constructor=constructor.parent}return item.hasOwnProperty?item instanceof object:!1},Object.prototype.hasOwnProperty),enumerables=!0;for(var i in{toString:1})enumerables=null;enumerables&&(enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]);var Function=this.Function;Function.prototype.overloadSetter=function(usePlural){var self=this;return function(a,b){if(null==a)return this;if(usePlural||"string"!=typeof a){for(var k in a)self.call(this,k,a[k]);forEachObjectEnumberableKey(a,self,this)}else self.call(this,a,b);return this}},Function.prototype.overloadGetter=function(usePlural){var self=this;return function(a){var args,result;if("string"!=typeof a?args=a:arguments.length>1?args=arguments:usePlural&&(args=[a]),args){result={};for(var i=0;i<args.length;i++)result[args[i]]=self.call(this,args[i])}else result=self.call(this,a);return result}},Function.prototype.extend=function(key,value){this[key]=value}.overloadSetter(),Function.prototype.implement=function(key,value){this.prototype[key]=value}.overloadSetter();var slice=Array.prototype.slice;Array.convert=function(item){return null==item?[]:Type.isEnumerable(item)&&"string"!=typeof item?"array"==typeOf(item)?item:slice.call(item):[item]},Function.convert=function(item){return"function"==typeOf(item)?item:function(){return item}},Number.convert=function(item){var number=parseFloat(item);return isFinite(number)?number:null},String.convert=function(item){return item+""},Function.from=Function.convert,Number.from=Number.convert,String.from=String.convert,Function.implement({hide:function(){return this.$hidden=!0,this},protect:function(){return this.$protected=!0,this}});var Type=this.Type=function(name,object){if(name){var lower=name.toLowerCase(),typeCheck=function(item){return typeOf(item)==lower};Type["is"+name]=typeCheck,null!=object&&(object.prototype.$family=function(){return lower}.hide())}return null==object?null:(object.extend(this),object.$constructor=Type,object.prototype.$constructor=object,object)},toString=Object.prototype.toString;Type.isEnumerable=function(item){return null!=item&&"number"==typeof item.length&&"[object Function]"!=toString.call(item)};var hooks={},hooksOf=function(object){var type=typeOf(object.prototype);return hooks[type]||(hooks[type]=[])},implement=function(name,method){if(!method||!method.$hidden){for(var hooks=hooksOf(this),i=0;i<hooks.length;i++){var hook=hooks[i];"type"==typeOf(hook)?implement.call(hook,name,method):hook.call(this,name,method)}var previous=this.prototype[name];null!=previous&&previous.$protected||(this.prototype[name]=method),null==this[name]&&"function"==typeOf(method)&&extend.call(this,name,function(item){return method.apply(item,slice.call(arguments,1))})}},extend=function(name,method){if(!method||!method.$hidden){var previous=this[name];null!=previous&&previous.$protected||(this[name]=method)}};Type.implement({implement:implement.overloadSetter(),extend:extend.overloadSetter(),alias:function(name,existing){implement.call(this,name,this.prototype[existing])}.overloadSetter(),mirror:function(hook){return hooksOf(this).push(hook),this}}),new Type("Type",Type);var force=function(name,object,methods){var isType=object!=Object,prototype=obje
}exp.reverse().push(last)}return expression},escapeRegExp=function(string){return string.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(match){return"\\"+match})},regexp=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+escapeRegExp(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Slick=this.Slick||{};Slick.parse=function(expression){return parse(expression)},Slick.escapeRegExp=escapeRegExp,this.Slick||(this.Slick=Slick)}.apply("undefined"!=typeof exports?exports:this),function(){var local={},featuresCache={},toString=Object.prototype.toString;local.isNativeCode=function(fn){return/\{\s*\[native code\]\s*\}/.test(""+fn)},local.isXML=function(document){return!!document.xmlVersion||!!document.xml||"[object XMLDocument]"==toString.call(document)||9==document.nodeType&&"HTML"!=document.documentElement.nodeName},local.setDocument=function(document){var nodeType=document.nodeType;if(9==nodeType);else if(nodeType)document=document.ownerDocument;else{if(!document.navigator)return;document=document.document}if(this.document!==document){this.document=document;var feature,root=document.documentElement,rootUid=this.getUIDXML(root),features=featuresCache[rootUid];if(features)for(feature in features)this[feature]=features[feature];else{features=featuresCache[rootUid]={},features.root=root,features.isXMLDocument=this.isXML(document),features.brokenStarGEBTN=features.starSelectsClosedQSA=features.idGetsName=features.brokenMixedCaseQSA=features.brokenGEBCN=features.brokenCheckedQSA=features.brokenEmptyAttributeQSA=features.isHTMLDocument=features.nativeMatchesSelector=!1;var starSelectsClosed,starSelectsComments,brokenSecondClassNameGEBCN,cachedGetElementsByClassName,brokenFormAttributeGetter,selected,id="slick_uniqueid",testNode=document.createElement("div"),testRoot=document.body||document.getElementsByTagName("body")[0]||root;testRoot.appendChild(testNode);try{testNode.innerHTML='<a id="'+id+'"></a>',features.isHTMLDocument=!!document.getElementById(id)}catch(e){}if(features.isHTMLDocument){testNode.style.display="none",testNode.appendChild(document.createComment("")),starSelectsComments=testNode.getElementsByTagName("*").length>1;try{testNode.innerHTML="foo</foo>",selected=testNode.getElementsByTagName("*"),starSelectsClosed=selected&&!!selected.length&&"/"==selected[0].nodeName.charAt(0)}catch(e){}features.brokenStarGEBTN=starSelectsComments||starSelectsClosed;try{testNode.innerHTML='<a name="'+id+'"></a><b id="'+id+'"></b>',features.idGetsName=document.getElementById(id)===testNode.firstChild}catch(e){}if(testNode.getElementsByClassName){try{testNode.innerHTML='<a class="f"></a><a class="b"></a>',testNode.getElementsByClassName("b").length,testNode.firstChild.className="b",cachedGetElementsByClassName=2!=testNode.getElementsByClassName("b").length}catch(e){}try{testNode.innerHTML='<a class="a"></a><a class="f b a"></a>',brokenSecondClassNameGEBCN=2!=testNode.getElementsByClassName("a").length}catch(e){}features.brokenGEBCN=cachedGetElementsByClassName||brokenSecondClassNameGEBCN}if(testNode.querySelectorAll){try{testNode.innerHTML="foo</foo>",selected=testNode.querySelectorAll("*"),features.starSelectsClosedQSA=selected&&!!selected.length&&"/"==selected[0].nodeName.charAt(0)}catch(e){}try{testNode.innerHTML='<a class="MiX"></a>',features.brokenMixedCaseQSA=!testNode.querySelectorAll(".MiX").length}catch(e){}try{testNode.innerHTML='<select><option selected="selected">a</option></select>',features.brokenCheckedQSA=0==testNode.querySelectorAll(":checked").length}catch(e){}try{testNode.innerHTML='<a class=""></a>',features.brokenEmptyAttributeQSA=0!=testNode.querySelectorAll('[class*=""]').length}catch(e){}}try{testNode.innerHTML='<form action="s"><input id="action"/></form>'
},style:function(node,value){node.style?node.style.cssText=value:node.setAttribute("style",value)},value:function(node,value){node.value=null!=value?value:""}}),propertyGetters["class"]=function(node){return"className"in node?node.className||null:node.getAttribute("class")};var el=document.createElement("button");try{el.type="button"}catch(e){}"button"!=el.type&&(propertySetters.type=function(node,value){node.setAttribute("type",value)}),el=null;var volatileInputValue,html5InputSupport,canChangeStyleHTML=function(){var div=document.createElement("style"),flag=!1;try{div.innerHTML="#justTesing{margin: 0px;}",flag=!!div.innerHTML}catch(e){}return flag}(),input=document.createElement("input");input.value="t",input.type="submit",volatileInputValue="t"!=input.value;try{input.value="",input.type="email",html5InputSupport="email"==input.type}catch(e){}input=null,(volatileInputValue||!html5InputSupport)&&(propertySetters.type=function(node,type){try{var value=node.value;node.type=type,node.value=value}catch(e){}});var pollutesGetAttribute=function(div){return div.random="attribute","attribute"==div.getAttribute("random")}(document.createElement("div")),hasCloneBug=function(test){return test.innerHTML='<object><param name="should_fix" value="the unknown" /></object>',1!=test.cloneNode(!0).firstChild.childNodes.length}(document.createElement("div")),hasClassList=!!document.createElement("div").classList,classes=function(className){var classNames=(className||"").clean().split(" "),uniques={};return classNames.filter(function(className){return""===className||uniques[className]?void 0:uniques[className]=className})},addToClassList=function(name){this.classList.add(name)},removeFromClassList=function(name){this.classList.remove(name)};Element.implement({setProperty:function(name,value){var setter=propertySetters[name.toLowerCase()];if(setter)setter(this,value);else{var attributeWhiteList;pollutesGetAttribute&&(attributeWhiteList=this.retrieve("$attributeWhiteList",{})),null==value?(this.removeAttribute(name),pollutesGetAttribute&&delete attributeWhiteList[name]):(this.setAttribute(name,""+value),pollutesGetAttribute&&(attributeWhiteList[name]=!0))}return this},setProperties:function(attributes){for(var attribute in attributes)this.setProperty(attribute,attributes[attribute]);return this},getProperty:function(name){var getter=propertyGetters[name.toLowerCase()];if(getter)return getter(this);if(pollutesGetAttribute){var attr=this.getAttributeNode(name),attributeWhiteList=this.retrieve("$attributeWhiteList",{});if(!attr)return null;if(attr.expando&&!attributeWhiteList[name]){var outer=this.outerHTML;if(outer.substr(0,outer.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(name)<0)return null;attributeWhiteList[name]=!0}}var result=Slick.getAttribute(this,name);return result||Slick.hasAttribute(this,name)?result:null},getProperties:function(){var args=Array.convert(arguments);return args.map(this.getProperty,this).associate(args)},removeProperty:function(name){return this.setProperty(name,null)},removeProperties:function(){return Array.each(arguments,this.removeProperty,this),this},set:function(prop,value){var property=Element.Properties[prop];property&&property.set?property.set.call(this,value):this.setProperty(prop,value)}.overloadSetter(),get:function(prop){var property=Element.Properties[prop];return property&&property.get?property.get.apply(this):this.getProperty(prop)}.overloadGetter(),erase:function(prop){var property=Element.Properties[prop];return property&&property.erase?property.erase.apply(this):this.removeProperty(prop),this},hasClass:hasClassList?function(className){return this.classList.contains(className)}:function(className){return classes(this.className).contains(className)},addClass:hasClassList?function(className){return classes(className).forEach(addToClassList,this),this}:function(className){return this.className=classes(className+" "+this.className).join(" "),this},removeClass:hasClassList?function(className){return classes(className).forEach(removeFromClassList,this),this}:function(className){var classNames=classes(this.
},getLeft:function(){return this.getPosition().x}}),function(){var Fx=this.Fx=new Class({Implements:[Chain,Events,Options,Class.Thenable],options:{fps:60,unit:!1,duration:500,frames:null,frameSkip:!0,link:"ignore"},initialize:function(options){this.subject=this.subject||this,this.setOptions(options)},getTransition:function(){return function(p){return-(Math.cos(Math.PI*p)-1)/2}},step:function(now){if(this.options.frameSkip){var diff=null!=this.time?now-this.time:0,frames=diff/this.frameInterval;this.time=now,this.frame+=frames}else this.frame++;if(this.frame<this.frames){var delta=this.transition(this.frame/this.frames);this.set(this.compute(this.from,this.to,delta))}else this.frame=this.frames,this.set(this.compute(this.from,this.to,1)),this.stop()},set:function(now){return now},compute:function(from,to,delta){return Fx.compute(from,to,delta)},check:function(){if(!this.isRunning())return!0;switch(this.options.link){case"cancel":return this.cancel(),!0;case"chain":return this.chain(this.caller.pass(arguments,this)),!1}return!1},start:function(from,to){if(!this.check(from,to))return this;this.from=from,this.to=to,this.frame=this.options.frameSkip?0:-1,this.time=null,this.transition=this.getTransition();var frames=this.options.frames,fps=this.options.fps,duration=this.options.duration;return this.duration=Fx.Durations[duration]||duration.toInt(),this.frameInterval=1e3/fps,this.frames=frames||Math.round(this.duration/this.frameInterval),"pending"!==this.getThenableState()&&this.resetThenable(this.subject),this.fireEvent("start",this.subject),pushInstance.call(this,fps),this},stop:function(){return this.isRunning()&&(this.time=null,pullInstance.call(this,this.options.fps),this.frames==this.frame?(this.fireEvent("complete",this.subject),this.callChain()||this.fireEvent("chainComplete",this.subject)):this.fireEvent("stop",this.subject),this.resolve(this.subject===this?null:this.subject)),this},cancel:function(){return this.isRunning()&&(this.time=null,pullInstance.call(this,this.options.fps),this.frame=this.frames,this.fireEvent("cancel",this.subject).clearChain(),this.reject(this.subject)),this},pause:function(){return this.isRunning()&&(this.time=null,pullInstance.call(this,this.options.fps)),this},resume:function(){return this.isPaused()&&pushInstance.call(this,this.options.fps),this},isRunning:function(){var list=instances[this.options.fps];return list&&list.contains(this)},isPaused:function(){return this.frame<this.frames&&!this.isRunning()}});Fx.compute=function(from,to,delta){return(to-from)*delta+from},Fx.Durations={"short":250,normal:500,"long":1e3};var instances={},timers={},loop=function(){for(var now=Date.now(),i=this.length;i--;){var instance=this[i];instance&&instance.step(now)}},pushInstance=function(fps){var list=instances[fps]||(instances[fps]=[]);list.push(this),timers[fps]||(timers[fps]=loop.periodical(Math.round(1e3/fps),list))},pullInstance=function(fps){var list=instances[fps];list&&(list.erase(this),!list.length&&timers[fps]&&(delete instances[fps],timers[fps]=clearInterval(timers[fps])))}}(),Fx.CSS=new Class({Extends:Fx,prepare:function(element,property,values){values=Array.convert(values);var from=values[0],to=values[1];if(null==to){to=from,from=element.getStyle(property);var unit=this.options.unit;if(unit&&from&&"string"==typeof from&&from.slice(-unit.length)!=unit&&0!=parseFloat(from)){element.setStyle(property,to+unit);var value=element.getComputedStyle(property);if(!/px$/.test(value)&&(value=element.style[("pixel-"+property).camelCase()],null==value)){var left=element.style.left;element.style.left=to+unit,value=element.style.pixelLeft,element.style.left=left}from=(to||1)/(parseFloat(value)||1)*(parseFloat(from)||0),element.setStyle(property,from+unit)}}return{from:this.parse(from),to:this.parse(to)}},parse:function(value){return value=Function.convert(value)(),value="string"==typeof value?value.split(" "):Array.convert(value),value.map(function(val){val=String(val);var found=!1;return Object.each(Fx.CSS.Parsers,function(parser){if(!found){var parsed=parser.parse(val);(parsed||0===parsed)&&(found={v