(function(){var c=false,e=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;var a="OPTS";var b=false;this.Class=function(){};Class.extend=function(l,o){var m=this.prototype;c=true;var k=new this();c=false;for(var j in o){var n=null;if(typeof o[j]=="function"&&typeof m[j]=="function"&&e.test(o[j])){n=(function(p,q){return function(){var s=this._super;this._super=m[p];var r=q.apply(this,arguments);this._super=s;return r}})(j,o[j])}else{if(typeof o[j]=="function"){n=o[j]}else{if(j==a){var i={};i=jQuery.extend({},i,m[j]||{});i=jQuery.extend({},i,o[j]);n=i}else{n=o[j]}}}k[j]=n}function h(){if(!c&&this.init){if(b){try{this.init.apply(this,arguments)}catch(p){console.error(p)}}else{this.init.apply(this,arguments)}}}h.prototype=k;h.prototype.constructor=h;h.extend=arguments.callee;k.getClassName=function(){return l};h.impl=function(){if(arguments.length>0){var t=k.getClassName();for(var s=0,p=arguments.length;s<p;s++){var u=arguments[s];if(!u._isInterfaceType){throw new Error(t+".impl()第"+(s+1)+"个参数必须是接口类型")}for(var r=0,q=u.methods.length;r<q;r++){var v=u.methods[r];if(!k[v]||typeof k[v]!=="function"){throw new Error("类"+t+"没有实现接口中的["+v+"]方法")}}}}return h};return h};var d=function(k){if(arguments.length!=1){throw new Error("创建接口参数只能有一个,并且为数组类型")}this.methods=[];this._isInterfaceType=true;for(var j=0,h=k.length;j<h;j++){if(typeof k[j]!=="string"){throw new Error("定义接口中的方法必须为字符串类型")}this.methods.push(k[j])}};var g=0;var f={copy:function(i,j){if(i&&j&&typeof j=="object"){for(var h in j){i[h]=j[h]}}return i},copyNew:function(j,k){var h={};if(j&&k&&typeof k=="object"){for(var i in j){h[i]=j[i]}for(var i in k){h[i]=k[i]}}return h},Interface:function(j,h){var i=new d(h);i.className=j;this[j]=i;return i},Class:function(j,i,h){h=h||Class;var k=h.extend(j,i);this[j]=k;return k},format:function(j,i){for(var h in i){j=j.replace(new RegExp("\\{\\s*"+h+"\\s*\\}","g"),i[h])}return j},log:function(h){if(window.console){this.log=function(i){console.log(i)}}this.log(h)},getId:function(){return g++}};f.log("About JUI:https://gitee.com/durcframework/jui");window.JUI=f.copy(window.JUI||{},f)})();