distill_difference

Erstellt Diff läuft nie ab
163 Entfernungen
714 Zeilen
196 Hinzufügungen
701 Zeilen
// ZIM - https://zimjs.com - DISTILLED NON-MINIFIED
// ZIM - https://zimjs.com - DISTILLED NON-MINIFIED


var WW = window||{}; var createjs = WW.createjs; if (zogr) {zogr("ZIM - duplicate creation of zim (remove import if using a distilled version)");}; var zimDefaultFrame; var zog = console.log.bind(console); if (typeof zon === "undefined") zon = false; if (typeof zns == "undefined") zns = false; var z_i; function zot(v) {return v==null;}
var WW = window||{}; var createjs = WW.createjs; if (zogr) {zogr("ZIM - duplicate creation of zim (remove import if using a distilled version)");}; var zimDefaultFrame; var zog = console.log.bind(console); if (typeof zon === "undefined") zon = false; if (typeof zns == "undefined") zns = false; var z_i; function zot(v) {return v==null;}
WW.zapp_scaling = WW.zapp_width = WW.zapp_height = WW.zapp_color = WW.zapp_outerColor = WW.zapp_assets = WW.zapp_path = WW.zapp_progress = WW.zapp_gpu = WW.zapp_gpuObj = WW.zapp_maxNum = WW.zapp_singleTouch = null;
WW.zapp_scaling = WW.zapp_width = WW.zapp_height = WW.zapp_color = WW.zapp_outerColor = WW.zapp_assets = WW.zapp_path = WW.zapp_progress = WW.zapp_gpu = WW.zapp_gpuObj = WW.zapp_maxNum = WW.zapp_singleTouch = null;
function zid(s) {
function zid(s) {
return document.getElementById(s);
return document.getElementById(s);
}
}


function zil() {
function zil() {
var a = function(e) {if (!e) e = event; if (e.keyCode && (e.keyCode >= 32 && e.keyCode <= 40)) e.preventDefault();};
if (WW.zilK) { // do not double apply
var b = function(e) {if (!e) e = event; e.preventDefault();};
WW.removeEventListener("keydown", WW.zilK);
var c = b;
WW.removeEventListener("wheel", WW.zilW);
window.addEventListener("keydown", a, {passive:false});
WW.removeEventListener("DOMMouseScroll", WW.zilS);
window.addEventListener("wheel", b, {passive:false});
}
window.addEventListener("DOMMouseScroll", c, {passive:false});
WW.zilK = function(e) {if (!e) e = event; if (e.keyCode && (e.keyCode >= 32 && e.keyCode <= 40)) e.preventDefault();};
return [a, b, c];
WW.zilW = function(e) {if (!e) e = event; e.preventDefault();};
WW.zilS = WW.zilW;
WW.addEventListener("keydown", WW.zilK, {passive:false});
WW.addEventListener("wheel", WW.zilW, {passive:false});
WW.addEventListener("DOMMouseScroll", WW.zilS, {passive:false});
return [WW.zilK, WW.zilW, WW.zilS];
}
}


function zet(selector) {
function zet(selector, first) {
function Zet() {
function Zet() {
var that = this;
var that = this;
this.on = function(type, call) {
this.on = function(type, call) {
if (zot(selector) || zot(type) || zot(call)) return;
if (zot(selector) || zot(type) || zot(call)) return;
var tags = that.tags;
var tags = that.tags;
for (var i=0; i<tags.length; i++) {
for (var i=0; i<tags.length; i++) {
tags[i].addEventListener(type, call);
tags[i].addEventListener(type, call);
}
}
};
};
this.off = function(type, call) {
this.off = function(type, call) {
if (zot(selector) || zot(type) || zot(call)) return;
if (zot(selector) || zot(type) || zot(call)) return;
var tags = that.tags;
var tags = that.tags;
for (var i=0; i<tags.length; i++) {
for (var i=0; i<tags.length; i++) {
tags[i].removeEventListener(type, call);
tags[i].removeEventListener(type, call);
}
}
};
};
Object.defineProperty(that, 'tags', {
Object.defineProperty(that, 'tags', {
get: function() {
get: function() {
if (zot(selector)) return [];
if (zot(selector)) return [];
if (typeof selector == 'string' || selector instanceof String) {
if (typeof selector == 'string' || selector instanceof String) {
return document.querySelectorAll(selector);
if (first) zogo(selector, document.querySelector(selector))
if (first) return [document.querySelector(selector)];
else return document.querySelectorAll(selector);
} else { // selector is already an object - assume a tag
} else { // selector is already an object - assume a tag
if (typeof (selector).innerHTML == "string") return [selector];
if (typeof (selector).innerHTML == "string") return [selector];
return [];
return [];
}
}
},
},
set: function() {
set: function() {
}
}
});
});
this.css = function(property, value) {
this.css = function(property, value) {
// if property is object then assign all props in object
// if property is object then assign all props in object
var tags = that.tags;
var tags = that.tags;
for (var i=0; i<tags.length; i++) {
for (var i=0; i<tags.length; i++) {
if (arguments.length == 1 && arguments[0].constructor === {}.constructor) {
if (arguments.length == 1 && arguments[0].constructor === {}.constructor) {
for (var p in property) {
for (var p in property) {
tags[i].style[p] = property[p];
tags[i].style[p] = property[p];
}
}
} else if (arguments.length == 1) {
} else if (arguments.length == 1) {
return that.tags[0].style[property];
return that.tags[0].style[property];
} else {
} else {
tags[i].style[property] = value;
tags[i].style[property] = value;
}
}
}
}
};
};
this.prop = function(property, value) {
this.prop = function(property, value) {
if (zot(property)) return;
if (zot(property)) return;
var tags = that.tags;
var tags = that.tags;
var a = [];
var a = [];
for (var i=0; i<tags.length; i++) {
for (var i=0; i<tags.length; i++) {
if (zot(value)) {
if (zot(value)) {
if (property.constructor === {}.constructor) {
if (property.constructor === {}.constructor) {
for (var p in property) {
for (var p in property) {
tags[i][p] = property[p];
tags[i][p] = property[p];
}
}
} else {
} else {
a.push(tags[i][property]);
a.push(tags[i][property]);
}
}
} else {
} else {
tags[i][property] = value;
tags[i][property] = value;
}
}
}
}
if (zot(value)) return a;
if (zot(value)) return a;
};
};
}
}
return new Zet();
return new Zet();
}
}


function zik(v) {
function zik(v) {
if (zot(v)) return;
if (zot(v)) return;
return zim.Pick.choose(v);
return zim.Pick.choose(v);
}
}
var zogr=zogb=zogp=zogy=zogo=zogl=zogd=zog;
var zogr=zogb=zogp=zogy=zogo=zogl=zogd=zog;
function isDUO(a) {return a.length == 1 && a[0] != undefined && a[0].constructor === {}.constructor;}
function isDUO(a) {return a.length == 1 && a[0] != undefined && a[0].constructor === {}.constructor;}
function zob(func, args, sig, scope) {
function zob(func, args, sig, scope) {
var zimon = (zim && (zim.ZIMONON || window.ZIMONON));
var zimon = (zim && (zim.ZIMONON || window.ZIMONON));
if (isDUO(args)) {
if (isDUO(args)) {
var zp = args[0];
var zp = args[0];
var za = (zot(sig))?func.toString().split(/\n/,1)[0].match(/\((.*)\)/)[1].replace(/\s+/g,"").split(","):sig.replace(/\s+/g,"").split(",");
var za = (zot(sig))?func.toString().split(/\n/,1)[0].match(/\((.*)\)/)[1].replace(/\s+/g,"").split(","):sig.replace(/\s+/g,"").split(",");
var zv = []; var zi; var zt;
var zv = []; var zi; var zt;
for (zi=0; zi<za.length; zi++) {zt=za[zi].split("=")[0]; za[zi]=zt; zv.push(zp[zt]);}
for (zi=0; zi<za.length; zi++) {zt=za[zi].split("=")[0]; za[zi]=zt; zv.push(zp[zt]);}
for (zi in zp) {if (za.indexOf(zi)<0) {if (zon) zog(func,"bad argument "+zi);}};
for (zi in zp) {if (za.indexOf(zi)<0) {if (zon) zog(func,"bad argument "+zi);}};
var zr; if (zr=(func.prototype.isPrototypeOf(scope))?new (func.bind.apply(func,[null].concat(zv)))():func.apply(null,zv)) {if (zimon && !zr.arguments) {zr.arguments = [zp]}; return zr;} else {return true;}
var zr; if (zr=(func.prototype.isPrototypeOf(scope))?new (func.bind.apply(func,[null].concat(zv)))():func.apply(null,zv)) {if (zimon && !zr.arguments) {zr.arguments = [zp]}; return zr;} else {return true;}
} else {
} else {
if (zimon && scope && args && zot(scope.arguments)) {
if (zimon && scope && args && zot(scope.arguments)) {
scope.arguments = Array.prototype.slice.call(args);
scope.arguments = Array.prototype.slice.call(args);
}
}
}
}