Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zeanium/core

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeanium/core - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

2

dist/minx/core/fix.js

@@ -1,1 +0,1 @@

!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=decodeURIComponent(e.replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t))))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=(e=e.replace(/%/g,"%25")).replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t)),e=decodeURIComponent(e))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
var __isServer="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0),zn={VERSION:"1.0.8",DEBUG:!0,ZN_PATH:"",PATH:"",GLOBAL:function(){return __isServer?global:window}.call(null),isServer:__isServer};if(zn.GLOBAL.zn=zn,__isServer)zn.ZN_PATH=__dirname,zn.PATH=process.cwd(),module.exports=zn;else{var _zn_url="";try{__a__=__b__}catch(r){r.fileName?_zn_url=r.fileName:r.sourceURL?_zn_url=r.sourceURL:r.stacktrace?console.error(r.stacktrace):r.stack?_zn_url=(_zn_url=(_zn_url=r.stack.split("\n")[1]).replace(/\s/g,"")).substring(2,_zn_url.length):console.error(r.toString())}if(!_zn_url)for(var _node,_scripts=document.getElementsByTagName("script"),_src="",i=0,_len=scripts.length;i<_len;i++)if((_node=scripts[i]).getAttribute&&("zn.js"===(_src=_node.getAttribute("src")||"").slice(-5)||"zn.minx.js"===_src.slice(-10))){_zn_url=_src;break}if(!_zn_url)throw new Error("zn.js has not been included, please do it first.");zn.ZN_PATH=_zn_url.substring(0,_zn_url.lastIndexOf("/")+1)}
!function(g){var c=Object.prototype.toString,o={timeout:function(e){return new Promise(function(t){setTimeout(t,e)})},truncate:function(t,e){if(t.length<=e)return"["+t+" ".repeat(e-t.length)+"]";var n=e/2;return"["+t.substring(0,n-3)+"..."+t.substring(t.length-n)+"]"},formatFieldData:function(t,e,n,r){var i=null,o={},a=r||{},c=e||[],s=n||[];for(var u in t)if((!c.length||-1!==c.indexOf(u))&&-1==s.indexOf(u)){switch(i=t[u],g.type(i)){case"object":case"array":i=JSON.stringify(i);break;case"function":i=i(u,t)}if(g.is(i,"string")&&(i=(i=i.replace(/'/g,"")).replace(/\n/g,"")),a[u])switch(a[u]){case"string":i=i.toString();break;case"int":i=parseInt(i||0);break;case"float":i=parseFloat(i||0).toFixed(2);break;case"datetime":switch(g.type(i)){case"date":i=g.date.dateFormat("yyyy-MM-dd hh:mm:ss",i);break;case"string":i=i||null}}o[u]=i}return o},sliceArrayData:function(t,e){var n=[],r=[];if(t.length<e+1)return[t];for(;0<t.length;)r.length==e&&(n.push(r),r=[]),r.push(t.shift()),0==t.length&&n.push(r);return n},splitArrayData:function(t,e){for(var n=t.length,r=Math.ceil(n/e),i=[],o=0;o<r;o++)i[o]=t.slice(o*e,Math.min((o+1)*e,n));return i},isNull:function(t){return null==t},isNotNull:function(t){return null!=t},idle:function(){},idleArray:function(){return[]},idleObject:function(){return{}},format:function(){var t,e=arguments,n=null;return e.length<2?e[0]:(n=(n=e[0]).toString?n.toString():n,t=e[1],s.each(t,function(t,e){null!=t&&(t=s.is(t,"object")?JSON.stringify(t):t.toString?t.toString():t,n=decodeURIComponent(n.replace(new RegExp("\\{"+e+"\\}","gi"),encodeURIComponent(t))))}),n)},uuid:function(t){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return t&&t.ifUpperCase&&(e=e.toUpperCase()),e},fix:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&"function"!=typeof e[o]&&(e[o]=i[o])}return e},extend:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e},isJson:function(t){return"object"==typeof t&&"[object object]"==c.call(t).toLowerCase()&&0==t.constructor.toString().indexOf("function Object() {")},deepAssign:function(t,e){var n,r=null;switch(c.call(e)){case"[object Object]":if(!o.isJson(e))return t;for(var i in e)if(n=t[i],r=e[i],e.hasOwnProperty(i))switch(c.call(r)){case"[object Object]":if(!o.isJson(r))continue;r=this.deepAssign({},r),"[object Object]"==c.call(n)?t[i]=o.deepAssign(n,r):t[i]=r;break;case"[object Array]":"[object Array]"==c.call(n)?t[i]=t[i].concat(r):t[i]=r;break;case"[object Null]":case"[object Boolean]":case"[object Function]":case"[object Number]":case"[object String]":t[i]=r}break;case"[object Array]":e.unshift(t),o.deepAssigns.apply(o.deepAssigns,e)}return t},callOnce:function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},deepAssigns:function(){for(var t=arguments[0],e=1,n=arguments.length;e<n;e++)o.deepAssign(t,arguments[e]);return t},convertArrayArgv:function(t,e){for(var n,r=[],i=g.extend({prefix:"--"},e).prefix,o={},a=null,c={},s=!1,u=0,f=t.length;u<f;u++)if(-1!==(a=t[u]).indexOf(i))o[n=a.replace(i,"")]=!0,c[u+1]=n,s=s||!0;else if(s)if(c[u])o[c[u]]=a;else{for(var _,l=u-1;!c[l]&&0<l;)--l;c[l]&&(null!=(_=o[c[l]])?"string"==typeof _?o[c[l]]=[_,a]:"object"==typeof _&&o[c[l]].push(a):o[c[l]]=a)}else r.push(a);return{env:r,argv:o}},overwrite:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&void 0===e[o]&&(e[o]=i[o])}return e},path:function(t,e,n){var r=t||{};if(e){var i,o=e.split("."),a=o.length,c=0;if(arguments.length<3)for(;r&&c<a;c++)i=o[c],r.__get__?r.__get__(i)?r=r.__get__(i):r[i]&&(r=r[i]):r=r[i];else{for(--a;r&&c<a;c++)i=o[c],r=r.__get__?r.__get__(i):r[i]=r[i]||{};i=o[c],r&&(r.__set__?r.__set__(i,n):r[i]=n,r=n)}}return r},invoke:function(t,e,n){var r,i,o;t&&e&&(0<(r=e.lastIndexOf("."))?(i=g.path(t,e.substring(0,r)))&&(o=i[e.substring(r+1)]):o=(i=t)[e],o&&o.apply(i,n))},deepEachObject:function(t,e,n){if(s.is(t,"object")){var r,i;for(var o in t)r=t[o],s.is(r,"object")?this.deepEachObject(r,e,n):null!=(i=e&&e.call(n,r,o,t))&&(t[o]=i)}return t},arrayValueToObject:function(t,e,n){if(s.is(t,"array")){for(var r,i,o={},a=0,c=t.length;a<c;a++)r=t[a],null!=(i=e&&e.call(n,r,a,t,o))&&(o[r]=i);t=o}return t}},s={toString:function(t){return t&&t.toString?t.toString():c.call(t)},each:function(t,e,n){if(t&&e)if(t.__each__)t.__each__(e,n);else{var r=t.length,i=null;if(0<r&&"[object Array]"===c.call(t)){for(var o=0;o<r;o++)if(!1===(i=e.call(n,t[o],o)))return!1}else for(var a in t)if(t.hasOwnProperty(a)){if(!1===(i=e.call(n,t[a],a)))return!1;if(-1===i)continue}}},clone:function(t){if(t){if(t.__clone__)return t.__clone__();if(g.is(t,"array"))return t.slice(0);var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}return t},type:function(t){return t&&t.__type__?t.__type__:c.call(t).slice(8,-1).toLowerCase()},is:function(t,e){if(t&&t.__is__)return t.__is__(e);if("string"==typeof e)switch(e.toLowerCase()){case"plain":return t&&t.constructor===Object;case"function":return t&&("Function"==t.constructor.name||"AsyncFunction"==t.constructor.name);case"asyncfunction":return t&&"AsyncFunction"==t.constructor.name;default:return this.type(t)===e}else if("function"==typeof e)return t instanceof e},may:function(t,e){return!!t&&(t.__may__?t.__may__(e):t.hasOwnProperty("on"+e))},can:function(t,e){return!!t&&(t.__can__?t.__can__(e):"function"==typeof t[e])},has:function(t,e){return!!t&&(t.__has__?t.__has__(e):t.hasOwnProperty(e))},get:function(t,e){if(t)return t.__get__?t.__get__(e):t[e]},set:function(t,e,n){t&&(t.__set__?t.__set__(e,n):t[e]=n)},gets:function(t){if(t){if(t.__gets__)return t.__gets__();var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},sets:function(t,e){if(t&&e)if(t.__sets__)t.__sets__(e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}};o.extend(g,o),o.extend(g,s)}(zn);
!function(f){var o=f.GLOBAL,a=Array.prototype.slice,_=1,l=1,p={fixTargetCtor:function(t){return t instanceof d?t.constructor:t},fixTargetKey:function(t){return"@"+t},defineEvent:function(t,n,e){var r=p.fixTargetCtor(t),i=p.fixTargetKey(n),_=i in r,s={};return _||(s=Object.defineProperty(t,"on"+n.toLowerCase(),{get:function(){var t=this.__handlers__[n];return t?t[0].handler:null},set:function(t){var e=this.__handlers__;(e[n]=e[n]||[])[0]={owner:this,handler:t,context:null}}})),r[i]={name:n,type:"event",meta:e,descriptor:s},_},defineProperty:function(t,e,n){var r,i,_,s,o,a,h,u=p.fixTargetCtor(t),c=p.fixTargetKey(e),l=c in u;return h="value"in n?(i=n.value,_="_"+e,s=n.get,o=n.set,a=s||function(){return _ in this?this[_]:f.is(i,"function")?i.call(this):i},n.readonly?function(t,e){if(!e||!e.force)return!1;this[_]=t}:o||function(t){this[_]=t}):(a=n.get||function(){},n.set||function(){return!1}),l&&(a.__super__=u[c].getter,h.__super__=u[c].setter),r=Object.defineProperty(t,e,{get:a,set:h,configurable:!0}),u[c]={name:e,type:"property",meta:n,getter:a,setter:h,descriptor:r},l},defineMethod:function(t,e,n){var r=p.fixTargetCtor(t),i=p.fixTargetKey(e),_=i in r;return r[i]={name:e,type:"method",meta:n},e in t&&(n.value||(n.value=function(){}),n.value.__super__=t[e]),t[e]=n.value,_}},s={__handlers__:{},member:function(t,e){var n=p.fixTargetCtor(e||this),r=n[p.fixTargetKey(t)];return r||n===d?r:this.member(t,n._super_)},may:function(t){var e=this.member(t);return e&&"event"==e.type},has:function(t){var e=this.member(t);return e&&"property"==e.type},can:function(t){var e=this.member(t);return e&&"method"==e.type},get:function(t,e){var n=this.member(t);if(n&&n.getter)return n.getter.call(this,e)},set:function(t,e,n){var r=this.member(t);return r&&r.setter&&r.setter.call(this,e,n),this},gets:function(e){var n={},t=p.fixTargetCtor(this)._properties_;return f.each(t,function(t){n[t]=this.get(t,e)},this),n},sets:function(t,e,n){if(t){var r;for(var i in t)t.hasOwnProperty(i)&&(r=t[i],!1!==(n&&n(r,i,e))&&this.set(i,r,e))}return this},each:function(t,e){for(var n=p.fixTargetCtor(this)._properties_,r=0,i=n.length;r<i;r++){var _=n[r];if(!1===t.call(e,_,r,this.member(_),this.get(_)))return!1}return this},__may__:function(t){return this.may(t)},__has__:function(t){return this.has(t)},__can__:function(t){return this.can(t)},__get__:function(t){return this.get(t)},__gets__:function(){return this.gets()},__set__:function(t,e){this.set(t,e)},__sets__:function(t){this.sets(t)},__each__:function(t,e){return this.each(t,e)}},h={toJson:function(){return{ClassName:this._name_||"Anonymous",ClassID:this._id_}},info:function(){return{_id_:this._id_,_name_:this._name_,_super_:this._super_,_events_:this._events_,_properties_:this._properties_,_methods_:this._methods_,_meta_:this._meta_}},createSelf:function(){return this.__ctor__.apply(this,Array.prototype.slice.call(arguments))},createInstance:function(){return this.__ctor__.apply(this,Array.prototype.slice.call(arguments))},getProperties:function(r,i,t){var _={},s=t||{};if(!this.getMeta||"ZNObject"==this._name_)return _;var e=this._super_,n=this._mixins_;return e&&f.extend(_,e.getProperties(r,i,s)),n&&n.length&&f.each(n,function(t){t&&f.extend(_,t.getProperties(r,i,s))}),f.each(this.getMeta("properties"),function(t,e){if(s[e])return-1;s[e]=t;var n=r&&r.call(i||this,t,e,_);if(!1===n||-1===n)return n;t.hidden||(_[e]=t)},this),_},getProperty:function(n){var r=null;return n&&this.getProperties(function(t,e){return n==e&&(r=field),-1}),r},existProperty:function(t){return!!this.getProperty(t)},getMeta:function(t){return t?this._meta_[t]:this._meta_},setMeta:function(t,e){return t&&e&&(this._meta_[t]=e),this},defineEvent:function(t,e,n){return p.defineEvent(n||this.prototype,t,e)||(-1===this._meta_.events.indexOf(t)&&this._meta_.events.push(t),-1===this._events_.indexOf(t)&&this._events_.push(t)),this},defineProperty:function(t,e,n){return p.defineProperty(n||this.prototype,t,e)||(this._meta_.properties[t]||(this._meta_.properties[t]=e),-1===this._properties_.indexOf(t)&&this._properties_.push(t)),this},defineMethod:function(t,e,n){return p.defineMethod(n||this.prototype,t,e)||(this._meta_.methods[t]||(this._meta_.methods[t]=e),-1===this._methods_.indexOf(t)&&this._methods_.push(t)),this}},u={toString:function(){var t={ClassName:this.__name__||"Anonymous",InstanceID:this.__id__,Meta:this.constructor._meta_};return JSON.stringify(t)},toJson:function(){var n={};return f.each(this.constructor.getProperties(),function(t,e){n[e]=this.get(e)},this),n},getProperties:function(){return this.constructor.getProperties.apply(this,arguments)},getPropertie:function(t){return this.constructor.getPropertie(t)},upon:function(t,e,n){var r;return e&&(((r=this.__handlers__)[t]=r[t]||[])[0]=f.extend({owner:this,handler:e},n)),this},on:function(t,e,n){var r,i;return!e||(i=(r=this.__handlers__)[t]=r[t]||[{owner:null,handler:null,context:null}]).push&&"function"==typeof i.push&&i.push(f.extend({owner:this,handler:e},n)),this},hasEventHandler:function(t){return!!(this.__handlers__[t]||[]).length},off:function(t,e,n){var r,i=this.__handlers__[t]||[],_=n&&n.context;if(e)for(var s=i.length-1;0<=s;s--)(r=i[s]).handler!==e||_&&r.context!==_||this.__handlers__[t].splice(s,1);else this.__handlers__[t]=[{owner:null,handler:null,context:null}];return this},offs:function(t){var e=Array.prototype.slice.call(arguments);return e.length?f.each(e,function(t){this.__handlers__[t]&&(this.__handlers__[t]=[{owner:null,handler:null,context:null}])}.bind(this)):this.__handlers__={},this},fire:function(t,e,n){var r,i=this.__handlers__[t],_=null,s=null;if(i)for(var o=0,a=i.length;o<a;o++)if((r=i[o])&&r.handler){if(!1===(s=n&&"apply"==n.method?(n.ownerFirst&&(e=Array.from(e)).unshift(r.owner),r.handler.apply(r.context||r.owner,e)):r.handler.call(r.context||r.owner,r.owner,e,n)))return!1;if(-1===s)continue;if(n&&n.overwrite)_=s;else if(null!=s)return s}return _},fireApply:function(){var t=a.call(arguments),e=t.shift();if(!e)return this;var n,r,i=this.__handlers__[e];if(i)for(var _=0,s=i.length;_<s;_++)if((n=i[_])&&n.handler){if(!1===(r=n.handler.apply(n.context||n.owner,t)))return!1;if(-1===r)continue;if(null!=r)return r}return null},dispose:function(){for(var n in this.__id__=null,delete this.__id__,this.__handlers__)this.__handlers__[n]=null,this.__handlers__[n]&&this.__handlers__[n].length&&this.__handlers__[n].forEach(function(t,e){this.__handlers__[n][e]=null,delete this.__handlers__[n][e]}),delete this.__handlers__[n];this.__handlers__=null,delete this.__handlers__,this.__initializing__=null,delete this.__initializing__,this.__super__=null,delete this.__super__,this.__afters__=null,delete this.__afters__},destroy:function(){this.dispose()},super:function(){var t=this.super.caller.__super__;if(t)return t.apply(this,arguments)},is:function(t){if("string"==typeof t&&(t=f.path(o,t)),t){if(this instanceof t)return!0;for(var e=this.constructor._mixins_,n=0,r=e.length;n<r;n++){if(t===e[n])return!0}}return!1},__is__:function(t){return this.is(t)},__clone__:function(){}};function d(){}f.extend(d,s,h,{_id_:0,_name_:"ZNObject",_statics_:{},_events_:[],_properties_:[],_methods_:[],_mixins_:[],_meta_:{}}),f.extend(d.prototype,s,u),f.isZNObject=function(t){return t instanceof d},f.isZNFunction=function(t){return"function"==typeof t&&new t instanceof d};var m={_arguments:function(){var t,e,n,r=arguments,i=r.length,_=r[0];if(3===i){if(t=_,e=r[1],n=r[2],!f.is(e,"function"))throw new Error("Invalid _super class.")}else if(2===i){if(f.is(_,"string"))t=_,e=null;else{if(!f.is(_,"function"))throw new Error("Invalid _super class.");t=null,e=_}n=r[1]}else{if(1!==i)throw new Error("Invalid arguments.");if(e=t=null,n=_,!f.is(n,"object"))throw new Error("The meta argument must be an object.")}return{name:t=t||"",super:e=e||d,meta:n=f.overwrite(n||{},{static:!1,statics:[],partial:!1,abstract:!1,final:!1,mixins:[],events:[],properties:[],methods:[]})}},_meta:function(n,t){var e=t.name,r=t.super,i=t.meta;return f.extend(n,s,h,{_id_:_++,_name_:e,_super_:r,_partial_:i.partial,_abstract_:i.abstract,_static_:i.static,_final_:i.final,_statics_:f.extend({},r._statics_,i.statics),_events_:r._events_.slice(0),_properties_:r._properties_.slice(0),_methods_:r._methods_.slice(0),_mixins_:r._mixins_.concat(i.mixins),_meta_:i}),f.extend(n,n._statics_),i.static?(f.each(i.events,function(t){n.defineEvent(t,{},n)}),f.each(i.properties,function(t,e){n.defineProperty(e,f.is(t,"object")?t:{value:t},n)}),f.each(i.methods,function(t,e){n.defineMethod(e,f.is(t,"function")?{value:t}:t,n)}),i.methods.init&&i.methods.init.call(n,n)):(f.each(i.mixins,function(t){var e;t&&(e=t.prototype,f.each(t._events_,function(t){n.defineEvent(t,e.member(t).meta)}),f.each(t._properties_,function(t){n.defineProperty(t,e.member(t).meta)}),f.each(t._methods_,function(t){s[t]||u[t]||n.defineMethod(t,e.member(t).meta)}))}),f.each(i.events,function(t){n.defineEvent(t,{})}),f.each(i.properties,function(t,e){n.defineProperty(e,f.is(t,"object")?t:{value:t})}),f.each(i.methods,function(t,e){n.defineMethod(e,f.is(t,"function")?{value:t}:t)})),n}},v=function(t,e,n){if(t&&t!==d){var r=t.member("init"),i=t._mixins_,_=null;return r&&r.meta.after&&e.__afters__.push({context:e,handler:r.meta.after}),i.length&&f.each(i,function(t){t&&t["@init"]&&(_=t["@init"].meta,_=f.is(_,"function")?_:_.value,v(t.prototype.__super__,t.prototype,n),_&&_.call(e))}),r&&r.meta.auto&&r.meta.value.apply(e,n),arguments.callee(t._super_,e)}};f.Class=function(){var c,t,e,n=m._arguments.apply(this,arguments),r=n.name,i=n.super,_=n.meta,s=_.methods.init;if(_.properties=_.properties||_.props,_.props=null,delete _.props,i._static_)throw new Error("Static class cannot be inherited.");if(i._final_)throw new Error("Final class cannot be inherited.");if(r&&_.partial&&(c=f.path(o,r)),_.static){if(c){if(!c._static_)throw new Error('Partial class "'+r+'" must be static.')}else c=function(){throw new Error("Cannot instantiate static class.")};e=c.prototype}else{if(c){if(c._static_)throw new Error('Partial class "'+r+'" must not be static.');if(c._super_!==i&&c._super_!==d)throw new Error('Partial class "'+r+'" must have consistent super class.')}else((c=_.abstract?function(){throw new Error("Cannot instantiate abstract class.")}:function(){var t=c._mixins_||[],e=c._ctors_||[],n=null,r=arguments;this.__id__=l++,this.__handlers__={},this.__initializing__=!0,this.__afters__=[];for(var i,_=null,s=0,o=t.length;s<o;s++)(i=t[s])&&(i["@init"]?(_=i["@init"].meta,_=f.is(_,"function")?_:_.value,v(i.prototype.__super__,this,r),_&&_.call(this)):v(i.prototype.__super__,this,r));v(this.__super__,this,r);for(var a=0,h=e.length;a<h;a++)n=e[a],(n=f.is(n,"function")?n:n.value)&&n.apply(this,r);for(;0<this.__afters__.length;){var u=this.__afters__.pop();u.handler.apply(u.context,r)}this.__afters__=null,delete this.__afters__,this.__initializing__=!1}).__ctor__=c)._ctors_=[];c._super_!==i?((t=function(){}).prototype=i.prototype,(e=new t).constructor=c,e.__type__=r||"Anonymous(ZNClass)",e.__super__=i,c.prototype=e):e=c.prototype,e.class=e.constructor,s&&(c._ctors_.push(s),e.__ctor__||(e.__ctor__=s))}return m._meta(c,n),e.__define__&&e.__define__.call(c),r&&f.path(o,r,c),c}}(zn);
!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=decodeURIComponent(e.replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t))))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=(e=e.replace(/%/g,"%25")).replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t)),e=decodeURIComponent(e))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
var __isServer="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0),zn={VERSION:"1.0.8",DEBUG:!0,ZN_PATH:"",PATH:"",GLOBAL:function(){return __isServer?global:window}.call(null),isServer:__isServer};if(zn.GLOBAL.zn=zn,__isServer)zn.ZN_PATH=__dirname,zn.PATH=process.cwd(),module.exports=zn;else{var _zn_url="";try{__a__=__b__}catch(r){r.fileName?_zn_url=r.fileName:r.sourceURL?_zn_url=r.sourceURL:r.stacktrace?console.error(r.stacktrace):r.stack?_zn_url=(_zn_url=(_zn_url=r.stack.split("\n")[1]).replace(/\s/g,"")).substring(2,_zn_url.length):console.error(r.toString())}if(!_zn_url)for(var _node,_scripts=document.getElementsByTagName("script"),_src="",i=0,_len=scripts.length;i<_len;i++)if((_node=scripts[i]).getAttribute&&("zn.js"===(_src=_node.getAttribute("src")||"").slice(-5)||"zn.minx.js"===_src.slice(-10))){_zn_url=_src;break}if(!_zn_url)throw new Error("zn.js has not been included, please do it first.");zn.ZN_PATH=_zn_url.substring(0,_zn_url.lastIndexOf("/")+1)}
!function(g){var c=Object.prototype.toString,o={timeout:function(e){return new Promise(function(t){setTimeout(t,e)})},truncate:function(t,e){if(t.length<=e)return"["+t+" ".repeat(e-t.length)+"]";var n=e/2;return"["+t.substring(0,n-3)+"..."+t.substring(t.length-n)+"]"},formatFieldData:function(t,e,n,r){var i=null,o={},a=r||{},c=e||[],s=n||[];for(var u in t)if((!c.length||-1!==c.indexOf(u))&&-1==s.indexOf(u)){switch(i=t[u],g.type(i)){case"object":case"array":i=JSON.stringify(i);break;case"function":i=i(u,t)}if(g.is(i,"string")&&(i=(i=i.replace(/'/g,"")).replace(/\n/g,"")),a[u])switch(a[u]){case"string":i=i.toString();break;case"int":i=parseInt(i||0);break;case"float":i=parseFloat(i||0).toFixed(2);break;case"datetime":switch(g.type(i)){case"date":i=g.date.dateFormat("yyyy-MM-dd hh:mm:ss",i);break;case"string":i=i||null}}o[u]=i}return o},sliceArrayData:function(t,e){var n=[],r=[];if(t.length<e+1)return[t];for(;0<t.length;)r.length==e&&(n.push(r),r=[]),r.push(t.shift()),0==t.length&&n.push(r);return n},splitArrayData:function(t,e){for(var n=t.length,r=Math.ceil(n/e),i=[],o=0;o<r;o++)i[o]=t.slice(o*e,Math.min((o+1)*e,n));return i},isNull:function(t){return null==t},isNotNull:function(t){return null!=t},idle:function(){},idleArray:function(){return[]},idleObject:function(){return{}},format:function(){var t,e=arguments,n=null;return e.length<2?e[0]:(n=(n=e[0]).toString?n.toString():n,t=e[1],s.each(t,function(t,e){null!=t&&(t=s.is(t,"object")?JSON.stringify(t):t.toString?t.toString():t,n=decodeURIComponent(n.replace(new RegExp("\\{"+e+"\\}","gi"),encodeURIComponent(t))))}),n)},uuid:function(t){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)});return t&&t.ifUpperCase&&(e=e.toUpperCase()),e},fix:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&"function"!=typeof e[o]&&(e[o]=i[o])}return e},extend:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e},isJson:function(t){return"object"==typeof t&&"[object object]"==c.call(t).toLowerCase()&&0==t.constructor.toString().indexOf("function Object() {")},deepAssign:function(t,e){var n,r=null;switch(c.call(e)){case"[object Object]":if(!o.isJson(e))return t;for(var i in e)if(n=t[i],r=e[i],e.hasOwnProperty(i))switch(c.call(r)){case"[object Object]":if(!o.isJson(r))continue;r=this.deepAssign({},r),"[object Object]"==c.call(n)?t[i]=o.deepAssign(n,r):t[i]=r;break;case"[object Array]":"[object Array]"==c.call(n)?t[i]=t[i].concat(r):t[i]=r;break;case"[object Null]":case"[object Boolean]":case"[object Function]":case"[object Number]":case"[object String]":t[i]=r}break;case"[object Array]":e.unshift(t),o.deepAssigns.apply(o.deepAssigns,e)}return t},callOnce:function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},deepAssigns:function(){for(var t=arguments[0],e=1,n=arguments.length;e<n;e++)o.deepAssign(t,arguments[e]);return t},convertArrayArgv:function(t,e){for(var n,r=[],i=g.extend({prefix:"--"},e).prefix,o={},a=null,c={},s=!1,u=0,f=t.length;u<f;u++)if(-1!==(a=t[u]).indexOf(i))o[n=a.replace(i,"")]=!0,c[u+1]=n,s=s||!0;else if(s)if(c[u])o[c[u]]=a;else{for(var _,l=u-1;!c[l]&&0<l;)--l;c[l]&&(null!=(_=o[c[l]])?"string"==typeof _?o[c[l]]=[_,a]:"object"==typeof _&&o[c[l]].push(a):o[c[l]]=a)}else r.push(a);return{env:r,argv:o}},overwrite:function(t){for(var e=t||{},n=1,r=arguments.length;n<r;n++){var i=arguments[n];for(var o in i)i.hasOwnProperty(o)&&void 0===e[o]&&(e[o]=i[o])}return e},path:function(t,e,n){var r=t||{};if(e){var i,o=e.split("."),a=o.length,c=0;if(arguments.length<3)for(;r&&c<a;c++)i=o[c],r.__get__?r.__get__(i)?r=r.__get__(i):r[i]&&(r=r[i]):r=r[i];else{for(--a;r&&c<a;c++)i=o[c],r=r.__get__?r.__get__(i):r[i]=r[i]||{};i=o[c],r&&(r.__set__?r.__set__(i,n):r[i]=n,r=n)}}return r},invoke:function(t,e,n){var r,i,o;t&&e&&(0<(r=e.lastIndexOf("."))?(i=g.path(t,e.substring(0,r)))&&(o=i[e.substring(r+1)]):o=(i=t)[e],o&&o.apply(i,n))},deepEachObject:function(t,e,n){if(s.is(t,"object")){var r,i;for(var o in t)r=t[o],s.is(r,"object")?this.deepEachObject(r,e,n):null!=(i=e&&e.call(n,r,o,t))&&(t[o]=i)}return t},arrayValueToObject:function(t,e,n){if(s.is(t,"array")){for(var r,i,o={},a=0,c=t.length;a<c;a++)r=t[a],null!=(i=e&&e.call(n,r,a,t,o))&&(o[r]=i);t=o}return t}},s={toString:function(t){return t&&t.toString?t.toString():c.call(t)},each:function(t,e,n){if(t&&e)if(t.__each__)t.__each__(e,n);else{var r=t.length,i=null;if(0<r&&"[object Array]"===c.call(t)){for(var o=0;o<r;o++)if(!1===(i=e.call(n,t[o],o)))return!1}else for(var a in t)if(t.hasOwnProperty(a)){if(!1===(i=e.call(n,t[a],a)))return!1;if(-1===i)continue}}},clone:function(t){if(t){if(t.__clone__)return t.__clone__();if(g.is(t,"array"))return t.slice(0);var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}return t},type:function(t){return t&&t.__type__?t.__type__:c.call(t).slice(8,-1).toLowerCase()},is:function(t,e){if(t&&t.__is__)return t.__is__(e);if("string"==typeof e)switch(e.toLowerCase()){case"plain":return t&&t.constructor===Object;case"function":return t&&("Function"==t.constructor.name||"AsyncFunction"==t.constructor.name);case"asyncfunction":return t&&"AsyncFunction"==t.constructor.name;default:return this.type(t)===e}else if("function"==typeof e)return t instanceof e},may:function(t,e){return!!t&&(t.__may__?t.__may__(e):t.hasOwnProperty("on"+e))},can:function(t,e){return!!t&&(t.__can__?t.__can__(e):"function"==typeof t[e])},has:function(t,e){return!!t&&(t.__has__?t.__has__(e):t.hasOwnProperty(e))},get:function(t,e){if(t)return t.__get__?t.__get__(e):t[e]},set:function(t,e,n){t&&(t.__set__?t.__set__(e,n):t[e]=n)},gets:function(t){if(t){if(t.__gets__)return t.__gets__();var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},sets:function(t,e){if(t&&e)if(t.__sets__)t.__sets__(e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}};o.extend(g,o),o.extend(g,s)}(zn);
!function(f){var o=f.GLOBAL,a=Array.prototype.slice,_=1,l=1,p={fixTargetCtor:function(t){return t instanceof d?t.constructor:t},fixTargetKey:function(t){return"@"+t},defineEvent:function(t,n,e){var r=p.fixTargetCtor(t),i=p.fixTargetKey(n),_=i in r,s={};return _||(s=Object.defineProperty(t,"on"+n.toLowerCase(),{get:function(){var t=this.__handlers__[n];return t?t[0].handler:null},set:function(t){var e=this.__handlers__;(e[n]=e[n]||[])[0]={owner:this,handler:t,context:null}}})),r[i]={name:n,type:"event",meta:e,descriptor:s},_},defineProperty:function(t,e,n){var r,i,_,s,o,a,h,u=p.fixTargetCtor(t),c=p.fixTargetKey(e),l=c in u;return h="value"in n?(i=n.value,_="_"+e,s=n.get,o=n.set,a=s||function(){return _ in this?this[_]:f.is(i,"function")?i.call(this):i},n.readonly?function(t,e){if(!e||!e.force)return!1;this[_]=t}:o||function(t){this[_]=t}):(a=n.get||function(){},n.set||function(){return!1}),l&&(a.__super__=u[c].getter,h.__super__=u[c].setter),r=Object.defineProperty(t,e,{get:a,set:h,configurable:!0}),u[c]={name:e,type:"property",meta:n,getter:a,setter:h,descriptor:r},l},defineMethod:function(t,e,n){var r=p.fixTargetCtor(t),i=p.fixTargetKey(e),_=i in r;return r[i]={name:e,type:"method",meta:n},e in t&&(n.value||(n.value=function(){}),n.value.__super__=t[e]),t[e]=n.value,_}},s={__handlers__:{},member:function(t,e){var n=p.fixTargetCtor(e||this),r=n[p.fixTargetKey(t)];return r||n===d?r:this.member(t,n._super_)},may:function(t){var e=this.member(t);return e&&"event"==e.type},has:function(t){var e=this.member(t);return e&&"property"==e.type},can:function(t){var e=this.member(t);return e&&"method"==e.type},get:function(t,e){var n=this.member(t);if(n&&n.getter)return n.getter.call(this,e)},set:function(t,e,n){var r=this.member(t);return r&&r.setter&&r.setter.call(this,e,n),this},gets:function(e){var n={},t=p.fixTargetCtor(this)._properties_;return f.each(t,function(t){n[t]=this.get(t,e)},this),n},sets:function(t,e,n){if(t){var r;for(var i in t)t.hasOwnProperty(i)&&(r=t[i],!1!==(n&&n(r,i,e))&&this.set(i,r,e))}return this},each:function(t,e){for(var n=p.fixTargetCtor(this)._properties_,r=0,i=n.length;r<i;r++){var _=n[r];if(!1===t.call(e,_,r,this.member(_),this.get(_)))return!1}return this},__may__:function(t){return this.may(t)},__has__:function(t){return this.has(t)},__can__:function(t){return this.can(t)},__get__:function(t){return this.get(t)},__gets__:function(){return this.gets()},__set__:function(t,e){this.set(t,e)},__sets__:function(t){this.sets(t)},__each__:function(t,e){return this.each(t,e)}},h={toJson:function(){return{ClassName:this._name_||"Anonymous",ClassID:this._id_}},info:function(){return{_id_:this._id_,_name_:this._name_,_super_:this._super_,_events_:this._events_,_properties_:this._properties_,_methods_:this._methods_,_meta_:this._meta_}},createSelf:function(){return this.__ctor__.apply(this,Array.prototype.slice.call(arguments))},createInstance:function(){return this.__ctor__.apply(this,Array.prototype.slice.call(arguments))},getProperties:function(r,i,t){var _={},s=t||{};if(!this.getMeta||"ZNObject"==this._name_)return _;var e=this._super_,n=this._mixins_;return e&&f.extend(_,e.getProperties(r,i,s)),n&&n.length&&f.each(n,function(t){t&&f.extend(_,t.getProperties(r,i,s))}),f.each(this.getMeta("properties"),function(t,e){if(s[e])return-1;s[e]=t;var n=r&&r.call(i||this,t,e,_);if(!1===n||-1===n)return n;t.hidden||(_[e]=t)},this),_},getProperty:function(n){var r=null;return n&&this.getProperties(function(t,e){return n==e&&(r=field),-1}),r},existProperty:function(t){return!!this.getProperty(t)},getMeta:function(t){return t?this._meta_[t]:this._meta_},setMeta:function(t,e){return t&&e&&(this._meta_[t]=e),this},defineEvent:function(t,e,n){return p.defineEvent(n||this.prototype,t,e)||(-1===this._meta_.events.indexOf(t)&&this._meta_.events.push(t),-1===this._events_.indexOf(t)&&this._events_.push(t)),this},defineProperty:function(t,e,n){return p.defineProperty(n||this.prototype,t,e)||(this._meta_.properties[t]||(this._meta_.properties[t]=e),-1===this._properties_.indexOf(t)&&this._properties_.push(t)),this},defineMethod:function(t,e,n){return p.defineMethod(n||this.prototype,t,e)||(this._meta_.methods[t]||(this._meta_.methods[t]=e),-1===this._methods_.indexOf(t)&&this._methods_.push(t)),this}},u={toString:function(){var t={ClassName:this.__name__||"Anonymous",InstanceID:this.__id__,Meta:this.constructor._meta_};return JSON.stringify(t)},toJson:function(){var n={};return f.each(this.constructor.getProperties(),function(t,e){n[e]=this.get(e)},this),n},getProperties:function(){return this.constructor.getProperties.apply(this,arguments)},getPropertie:function(t){return this.constructor.getPropertie(t)},upon:function(t,e,n){var r;return e&&(((r=this.__handlers__)[t]=r[t]||[])[0]=f.extend({owner:this,handler:e},n)),this},on:function(t,e,n){var r,i;return!e||(i=(r=this.__handlers__)[t]=r[t]||[{owner:null,handler:null,context:null}]).push&&"function"==typeof i.push&&i.push(f.extend({owner:this,handler:e},n)),this},hasEventHandler:function(t){return!!(this.__handlers__[t]||[]).length},off:function(t,e,n){var r,i=this.__handlers__[t]||[],_=n&&n.context;if(e)for(var s=i.length-1;0<=s;s--)(r=i[s]).handler!==e||_&&r.context!==_||this.__handlers__[t].splice(s,1);else this.__handlers__[t]=[{owner:null,handler:null,context:null}];return this},offs:function(t){var e=Array.prototype.slice.call(arguments);return e.length?f.each(e,function(t){this.__handlers__[t]&&(this.__handlers__[t]=[{owner:null,handler:null,context:null}])}.bind(this)):this.__handlers__={},this},fire:function(t,e,n){var r,i=this.__handlers__[t],_=null,s=null;if(i)for(var o=0,a=i.length;o<a;o++)if((r=i[o])&&r.handler){if(!1===(s=n&&"apply"==n.method?(n.ownerFirst&&(e=Array.from(e)).unshift(r.owner),r.handler.apply(r.context||r.owner,e)):r.handler.call(r.context||r.owner,r.owner,e,n)))return!1;if(-1===s)continue;if(n&&n.overwrite)_=s;else if(null!=s)return s}return _},fireApply:function(){var t=a.call(arguments),e=t.shift();if(!e)return this;var n,r,i=this.__handlers__[e];if(i)for(var _=0,s=i.length;_<s;_++)if((n=i[_])&&n.handler){if(!1===(r=n.handler.apply(n.context||n.owner,t)))return!1;if(-1===r)continue;if(null!=r)return r}return null},dispose:function(){for(var n in this.__id__=null,delete this.__id__,this.__handlers__)this.__handlers__[n]=null,this.__handlers__[n]&&this.__handlers__[n].length&&this.__handlers__[n].forEach(function(t,e){this.__handlers__[n][e]=null,delete this.__handlers__[n][e]}),delete this.__handlers__[n];this.__handlers__=null,delete this.__handlers__,this.__initializing__=null,delete this.__initializing__,this.__super__=null,delete this.__super__,this.__afters__=null,delete this.__afters__},destroy:function(){this.dispose()},super:function(){var t=this.super.caller.__super__;if(t)return t.apply(this,arguments)},is:function(t){if("string"==typeof t&&(t=f.path(o,t)),t){if(this instanceof t)return!0;for(var e=this.constructor._mixins_,n=0,r=e.length;n<r;n++){if(t===e[n])return!0}}return!1},__is__:function(t){return this.is(t)},__clone__:function(){}};function d(){}f.extend(d,s,h,{_id_:0,_name_:"ZNObject",_statics_:{},_events_:[],_properties_:[],_methods_:[],_mixins_:[],_meta_:{}}),f.extend(d.prototype,s,u),f.isZNObject=function(t){return t instanceof d},f.isZNFunction=function(t){return"function"==typeof t&&new t instanceof d};var m={_arguments:function(){var t,e,n,r=arguments,i=r.length,_=r[0];if(3===i){if(t=_,e=r[1],n=r[2],!f.is(e,"function"))throw new Error("Invalid _super class.")}else if(2===i){if(f.is(_,"string"))t=_,e=null;else{if(!f.is(_,"function"))throw new Error("Invalid _super class.");t=null,e=_}n=r[1]}else{if(1!==i)throw new Error("Invalid arguments.");if(e=t=null,n=_,!f.is(n,"object"))throw new Error("The meta argument must be an object.")}return{name:t=t||"",super:e=e||d,meta:n=f.overwrite(n||{},{static:!1,statics:[],partial:!1,abstract:!1,final:!1,mixins:[],events:[],properties:[],methods:[]})}},_meta:function(n,t){var e=t.name,r=t.super,i=t.meta;return f.extend(n,s,h,{_id_:_++,_name_:e,_super_:r,_partial_:i.partial,_abstract_:i.abstract,_static_:i.static,_final_:i.final,_statics_:f.extend({},r._statics_,i.statics),_events_:r._events_.slice(0),_properties_:r._properties_.slice(0),_methods_:r._methods_.slice(0),_mixins_:r._mixins_.concat(i.mixins),_meta_:i}),f.extend(n,n._statics_),i.static?(f.each(i.events,function(t){n.defineEvent(t,{},n)}),f.each(i.properties,function(t,e){n.defineProperty(e,f.is(t,"object")?t:{value:t},n)}),f.each(i.methods,function(t,e){n.defineMethod(e,f.is(t,"function")?{value:t}:t,n)}),i.methods.init&&i.methods.init.call(n,n)):(f.each(i.mixins,function(t){var e;t&&(e=t.prototype,f.each(t._events_,function(t){n.defineEvent(t,e.member(t).meta)}),f.each(t._properties_,function(t){n.defineProperty(t,e.member(t).meta)}),f.each(t._methods_,function(t){s[t]||u[t]||n.defineMethod(t,e.member(t).meta)}))}),f.each(i.events,function(t){n.defineEvent(t,{})}),f.each(i.properties,function(t,e){n.defineProperty(e,f.is(t,"object")?t:{value:t})}),f.each(i.methods,function(t,e){n.defineMethod(e,f.is(t,"function")?{value:t}:t)})),n}},v=function(t,e,n){if(t&&t!==d){var r=t.member("init"),i=t._mixins_,_=null;return r&&r.meta.after&&e.__afters__.push({context:e,handler:r.meta.after}),i.length&&f.each(i,function(t){t&&t["@init"]&&(_=t["@init"].meta,_=f.is(_,"function")?_:_.value,v(t.prototype.__super__,t.prototype,n),_&&_.call(e))}),r&&r.meta.auto&&r.meta.value.apply(e,n),arguments.callee(t._super_,e)}};f.Class=function(){var c,t,e,n=m._arguments.apply(this,arguments),r=n.name,i=n.super,_=n.meta,s=_.methods.init;if(_.properties=_.properties||_.props,_.props=null,delete _.props,i._static_)throw new Error("Static class cannot be inherited.");if(i._final_)throw new Error("Final class cannot be inherited.");if(r&&_.partial&&(c=f.path(o,r)),_.static){if(c){if(!c._static_)throw new Error('Partial class "'+r+'" must be static.')}else c=function(){throw new Error("Cannot instantiate static class.")};e=c.prototype}else{if(c){if(c._static_)throw new Error('Partial class "'+r+'" must not be static.');if(c._super_!==i&&c._super_!==d)throw new Error('Partial class "'+r+'" must have consistent super class.')}else((c=_.abstract?function(){throw new Error("Cannot instantiate abstract class.")}:function(){var t=c._mixins_||[],e=c._ctors_||[],n=null,r=arguments;this.__id__=l++,this.__handlers__={},this.__initializing__=!0,this.__afters__=[];for(var i,_=null,s=0,o=t.length;s<o;s++)(i=t[s])&&(i["@init"]?(_=i["@init"].meta,_=f.is(_,"function")?_:_.value,v(i.prototype.__super__,this,r),_&&_.call(this)):v(i.prototype.__super__,this,r));v(this.__super__,this,r);for(var a=0,h=e.length;a<h;a++)n=e[a],(n=f.is(n,"function")?n:n.value)&&n.apply(this,r);for(;0<this.__afters__.length;){var u=this.__afters__.pop();u.handler.apply(u.context,r)}this.__afters__=null,delete this.__afters__,this.__initializing__=!1}).__ctor__=c)._ctors_=[];c._super_!==i?((t=function(){}).prototype=i.prototype,(e=new t).constructor=c,e.__type__=r||"Anonymous(ZNClass)",e.__super__=i,c.prototype=e):e=c.prototype,e.class=e.constructor,s&&(c._ctors_.push(s),e.__ctor__||(e.__ctor__=s))}return m._meta(c,n),e.__define__&&e.__define__.call(c),r&&f.path(o,r,c),c}}(zn);
!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=decodeURIComponent(e.replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t))))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
!function(n){var e=Array.prototype.slice,t=(Object.prototype.hasOwnProperty,Object.prototype.toString),r={format:function(){var t=arguments,e=this;return 1==t.length&&"object"==typeof t[0]&&(t=t[0]),n.each(t,function(t,r){null!=t&&(t="object"==n.type(t)?JSON.stringify(t):t.toString?t.toString():t,e=(e=e.replace(/%/g,"%25")).replace(new RegExp("\\{"+r+"\\}","gi"),encodeURIComponent(t)),e=decodeURIComponent(e))}),e.toString()},firstUpperCase:function(t){return t.replace(/\b(\w)(\w*)/g,function(t,r,e){return r.toUpperCase()+e})}},i={isArray:function(t){return t&&"[object Array]"===n.toString(t)&&t.constructor===Array}},o={format:function(t,r){var e="\\d(?=(\\d{"+(r||3)+"})+"+(0<t?"\\.":"$")+")";return this.toFixed(Math.max(0,~~t)).replace(new RegExp(e,"g"),"$&,")},sectionThree:function(){return this.toString().replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},price:function(t){var r=n.extend({unit:1e4,unitText:"万",prefix:"",decimal:2,sections:3},t);return 1<this/r.unit&&this%100==0?(this/r.unit).sectionThree()+r.unitText:this.format(r.decimal,r.sections)}},s={bind:function(t){var r=this;return function(){return r.apply(t,e.call(arguments,1))}}};var u,a,c,f;u=t,a=Array.isArray,c={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},f=/[\\"\u0000-\u001F\u2028\u2029]/g;function p(t){return c[t]||"\\u"+(t.charCodeAt(0)+65536).toString(16).substr(1)}var h={format:function(t){var r={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var e in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[e]:("00"+r[e]).substr((""+r[e]).length)));return t}};n.fix(Array,i),n.fix(Array.prototype,{forEach:function(t,r){if(!t)return!1;for(var e=0,n=this.length;e<n;e++)t.call(r,this[e],e);return this},indexOf:function(t){for(var r=0,e=this.length;r<e;r++)if(this[r]===t)return r;return-1},lastIndexOf:function(t){for(var r=this.length-1;0<=r;r--)if(this[r]===t)return r;return-1}}),n.fix(Function.prototype,s),n.fix(String.prototype,r),n.fix(Number.prototype,o),n.fix(Date.prototype,h)}(zn);
!function(i){var a=Array.prototype.slice,c=0,o=1,s=2,l=i.Class({events:["complete"],properties:{promise:null},methods:{init:function(t,e){this._promise=new u,t&&this.resolve(t),e&&this.reject(e)},resolve:function(){var e=a.call(arguments);try{var t=this.get("promise"),n=this;if(t.get("readyState")!=c)return;t.set("readyState",o),t.set("data",e),i.each(t.get("resolves"),function(t){t.apply(n,e)})}catch(t){h.catch(t,this)}this.fire("complete",e)},reject:function(){var t=a.call(arguments);try{var e=this.get("promise");if(e.get("readyState")!=c)return;e.set("readyState",s),e.set("reason",t);var n=e.get("rejects")[0];n&&n.apply(this,t)}catch(t){h.catch(t,this)}this.fire("complete",t)}}}),u=i.Class({statics:{isPromise:function(t){return null!=t&&"function"==typeof t.then},defer:null},properties:{resolves:null,rejects:null,data:null,reason:null,readyState:null},methods:{init:function(t){this.set("resolves",[]),this.set("rejects",[]),this.set("exceptions",[]),this.set("readyState",c)},then:function(n,t){var e,s=new l;function r(){var t=a.call(arguments),e=n?n.apply(this,t):t;return u.isPromise(e)?e.then(function(){s.resolve.apply(s,a.call(arguments))}):s.resolve.apply(s,e),e}return this.get("readyState")===c?(this.get("resolves").push(r),t?this.get("rejects").push(t):this.get("rejects").push(function(){s.reject.apply(s,a.call(arguments))})):this.get("readyState")===o&&(e=this,setTimeout(function(){r.apply(e,e.get("data"))})),s.promise},catch:function(t){return h.exception(t)},finally:function(t){return h.finally(t)},otherwise:function(t){return this.then(void 0,t)}}}),h=i.async=i.Class({static:!0,methods:{init:function(t){this._exceptions=[],this._finallys=[],this._count=0,this._currIndex=0,this._dataArray=[]},exception:function(t){return this._exceptions.push(t),this},catch:function(e,n){return i.each(this._exceptions,function(t){t.call(n,e)}),this},finally:function(t){return this._finallys.push(t),this},defer:function(t,e){var n=this,s=new l(t,e);return s.on("complete",function(t,e){n._currIndex++,n._dataArray.push(e),n._currIndex==n._count&&(i.each(n._finallys,function(t){try{t(n._dataArray)}catch(t){i.error(t.message)}}),n._finallys=[])}),n._count++,s},all:function(e){var n=h.defer(),s=0,r=[];return i.each(e,function(t){t.then(function(t){r.push(t),++s>=e.length&&n.resolve(r)})}),n.promise},any:function(t){var e=h.defer();return i.each(t,function(t){t.then(function(t){e.resolve(t)})}),e.promise}}})}(zn);

@@ -6,0 +6,0 @@ !function(t){var r=[97,123],n=[65,91];t.char=t.Class({static:!0,methods:{trim:function(r,t){var n=r.attr(t);return n=n?n.trim():""},trimLeft:function(r,t){return r&&r.startsWith(t)&&(r=r.substr(t.length)),r},trimRight:function(r,t){return r&&r.endsWith(t)&&(r=r.substr(0,r.length-t.length)),r},getRandomChar:function(){return this.getUppercaseLetters()[Math.floor(26*Math.random())]},lowercase:function(r){return t.is(r,"string")?r.replace(/[A-Z]/g,function(r){return String.fromCharCode(32|r.charCodeAt(0))}):r},uppercase:function(r){return t.is(r,"string")?r.replace(/[a-z]/g,function(r){return String.fromCharCode(-33&r.charCodeAt(0))}):r},toUnicode:function(r){for(var t=[],n=0,e=r.length;n<e;n++)t.push(r.charCodeAt(n));return t},toChar:function(r,t){for(var n=[],e=r;e<t;e++)n.push(String.fromCharCode(e));return n},getLowercaseLetters:function(){return this.toChar(r[0],r[1])},getUppercaseLetters:function(){return this.toChar(n[0],n[1])},getStringFromChar:function(r,t){for(var n=r||"A",e=t||26,o=[],i=0;i<e;i++)o.push(String.fromCharCode(n.charCodeAt(0)+i));return o.join("")}}})}(zn);

{
"name": "@zeanium/core",
"version": "1.3.2",
"version": "1.3.3",
"description": "Javascript OOP framework for Node.js and Browser, React Native.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc