var K=this.K||{};K.Resource=K.Resource||{};K.error=function(a,b){b=b||Error;throw new b(a);};K.global=this;K.log=function(){if(K.__debug)if("console"in window&&"log"in window.console){var a=arguments.length;if(a==1)window.console.log(arguments[0]);else a==2&&window.console.log(arguments[0],arguments[1])}else window.opera&&window.opera.postError&&window.opera.postError.apply(window.opera,arguments)};

(function(e){var i=Array.prototype,l=i.slice,u=Object.prototype.hasOwnProperty,m=i.forEach,n=i.map,o=i.reduce,p=i.reduceRight,q=i.filter,r=i.every,s=i.some,j=i.indexOf,t=i.lastIndexOf,k={};e.forEach=function(a,c,b){if(a!=null)if(m&&a.forEach===m)a.forEach(c,b);else if(e.isNumber(a.length))for(var d=0,f=a.length;d<f;d++){if(c.call(b,a[d],d,a)==k)return}else for(d in a)if(u.call(a,d))if(c.call(b,a[d],d,a)===k)return};e.map=function(a,c,b){var d=[];if(a==null)return d;if(n&&a.map===n)return a.map(c,
b);e.forEach(a,function(f,g,h){d[d.length]=c.call(b,f,g,h)});return d};e.reduce=function(a,c,b,d){var f=b!==void 0;if(a==null)a=[];if(o&&a.reduce===o){if(d)c=e.bind(c,d);return f?a.reduce(c,b):a.reduce(c)}e.forEach(a,function(g,h,v){if(!f&&h===0){b=g;f=true}else b=c.call(d,b,g,h,v)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return b};e.reduceRight=function(a,c,b,d){if(a==null)a=[];if(p&&a.reduceRight===p){if(d)c=e.bind(c,d);return b!==void 0?a.reduceRight(c,b):a.reduceRight(c)}a=
(_.isArray(a)?a.slice():_.toArray(a)).reverse();return _.reduce(a,c,b,d)};e.detect=function(a,c,b){var d;e.some(a,function(f,g,h){if(c.call(b,f,g,h)){d=f;return true}});return d};e.filter=function(a,c,b){var d=[];if(a==null)return d;if(q&&a.filter===q)return a.filter(c,b);e.forEach(a,function(f,g,h){if(c.call(b,f,g,h))d[d.length]=f});return d};e.every=function(a,c,b){var d=true;if(a==null)return d;if(r&&a.every===r)return a.every(c,b);e.forEach(a,function(f,g,h){if(!(d=d&&c.call(b,f,g,h)))return k});
return d};e.some=function(a,c,b){c||(c=e.identity);var d=false;if(a==null)return d;if(s&&a.some===s)return a.some(c,b);e.forEach(a,function(f,g,h){if(c.call(b,f,g,h)){d=true;return k}});return d};e.contains=function(a,c){var b=false;if(a==null)return b;if(j&&a.indexOf===j)return a.indexOf(c)!=-1;e.some(a,function(d){if(b=d===c)return true});return b};e.pluck=function(a,c){return e.map(a,function(b){return b[c]})};e.sortBy=function(a,c,b){return e.pluck(e.map(a,function(d,f,g){return{value:d,criteria:c.call(b,
d,f,g)}}).sort(function(d,f){var g=d.criteria,h=f.criteria;return g<h?-1:g>h?1:0}),"value")};e.sortedIndex=function(a,c,b){b||(b=e.identity);for(var d=0,f=a.length;d<f;){var g=d+f>>1;b(a[g])<b(c)?d=g+1:f=g}return d};e.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(_.isArray(a))return a;if(_.isArguments(a))return l.call(a);return e.values(a)};e.last=function(a){var c=a.length;return c>0?a[c-1]:undefined};e.compact=function(a){return e.filter(a,function(c){return!!c})};e.flatten=
function(a){return e.reduce(a,function(c,b){if(e.isArray(b))return c.concat(e.flatten(b));c[c.length]=b;return c},[])};e.without=function(a){var c=l.call(arguments,1);return e.filter(a,function(b){return!e.contains(c,b)})};e.unique=function(a,c){return e.reduce(a,function(b,d,f){if(0==f||(c===true?e.last(b)!=d:!e.contains(b,d)))b[b.length]=d;return b},[])};e.intersect=function(a){var c=l.call(arguments,1);return e.filter(e.unique(a),function(b){return e.every(c,function(d){return e.indexOf(d,b)>=
0})})};e.indexOf=function(a,c,b){if(a==null)return-1;var d;if(b){b=e.sortedIndex(a,c);return a[b]===c?b:-1}if(j&&a.indexOf===j)return a.indexOf(c);b=0;for(d=a.length;b<d;b++)if(a[b]===c)return b;return-1};e.lastIndexOf=function(a,c){if(a==null)return-1;if(t&&a.lastIndexOf===t)return a.lastIndexOf(c);for(var b=a.length;b--;)if(a[b]===c)return b;return-1}})(K);

(function(c){var f=Object.create;c.extend=function(a,d){var b=function(){};b.prototype=d.prototype;var e=a.prototype;a.prototype=new b;a.$super=d;c.mix(a.prototype,e,true);return a};c.create=f||function(a,d){var b=function(e){e&&c.mix(this,e,true)};b.prototype=a;return new b(d)}})(K);

(function(c){c.bind=function(a,b){var e=Array.prototype.slice.call(arguments,2);return function(){b=b||(this==c.global?false:this);var d=e.concat(Array.prototype.slice.call(arguments));if(typeof a=="string"&&b[a])b[a].apply(b,d);else if(c.isFunction(a))return a.apply(b,d);else c.log("not function",a)}};c.methodize=function(a,b){if(b)return function(){return a.apply(null,[this[b]].concat([].slice.call(arguments)))};return function(){return a.apply(null,[this].concat([].slice.call(arguments)))}};c.delay=
function(a,b){var e=slice.call(arguments,2);return setTimeout(function(){return a.apply(a,e)},b)};c.defer=function(a){return c.delay.apply(c,[a,1].concat(slice.call(arguments,1)))};var f=function(){};c.Helper={methodize:function(a,b){var e=new f;for(var d in a)if(typeof a[d]=="function"&&!/^_/.test(d))e[d]=c.methodize(a[d],b);return e}}})(K);

(function(b){var e=Object.prototype,g=Array.prototype.slice,h=e.toString,f=e.hasOwnProperty;e=Array.isArray;b.keys=Object.keys||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[];for(var d in a)if(f.call(a,d))c[c.length]=d;return c};b.values=function(a){return b.map(a,b.identity)};b.methods=function(a){return b.filter(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.mix=function(a){b.forEach(g.call(arguments,1),function(c){for(var d in c)if(c[d]!==void 0)a[d]=c[d]});
return a};b.clone=function(a){return b.isArray(a)?a.slice():b.mix({},a)};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(f.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=e||function(a){return h.call(a)==="[object Array]"};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===""||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return!!(a===0||a&&a.toExponential&&
a.toFixed)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&a.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!a.concat&&!a.substr&&!a.apply&&!Object.prototype.propertyIsEnumerable.call(a,"length")};b.provide=
function(a,c){c=c||{};b[a]||(b[a]=c);return b[a]}})(K);

(function(c){c.trim=function(a){return a.replace(/^[\s\xa0\u3000]+|[\u3000\xa0\s]+$/g,"")};c.byteLen=function(a){return a.replace(/[^\x00-\xff]/g,"--").length};c.subByte=function(a,b,d){if(c.byteLen(a)<b)return a;d=d||"";b-=c.byteLen(d);return a.substr(0,b).replace(/([^\x00-\xff])/g,"$1 ").substr(0,b).replace(/[^\x00-\xff]$/,"").replace(/([^\x00-\xff]) /g,"$1")+d};c.encode4JS=function(a){return a.replace(/\\/g,"\\u005C").replace(/"/g,"\\u0022").replace(/'/g,"\\u0027").replace(/\//g,"\\u002F").replace(/\r/g,
"\\u000A").replace(/\n/g,"\\u000D").replace(/\t/g,"\\u0009")};c.encode4HTTP=function(a){return a.replace(/[\u0000-\u0020\u0080-\u00ff\s"'#\/\|\\%<>\[\]\{\}\^~;\?\:@=&]/,function(b){return encodeURIComponent(b)})};c.encode4Html=function(a){return a.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};c.encode4HtmlValue=function(a){return c.encode4Html(a).replace(/"/g,"&quot;").replace(/'/g,
"&#039;")};c.stripTags=function(a){return a.replace(/<[^>]*>/gi,"")};c.formatDate=function(a,b){b=b||"yyyy-MM-dd";var d=a.getFullYear(),e={M:a.getMonth()+1,d:a.getDate(),h:a.getHours(),m:a.getMinutes(),s:a.getSeconds()};b=b.replace(/(y+)/ig,function(h,g){return(d+"").substr(4-Math.min(4,g.length))});for(var f in e)b=b.replace(RegExp("("+f+"+)","g"),function(h,g){return e[f]<10&&g.length>1?"0"+e[f]:e[f]});return b}})(K);

(function(b,c){function g(){b.windowFocused=true}function i(){b.windowFocused=false}b.Browser=function(){var d=c.navigator,h=d.userAgent.toLowerCase(),a={platform:d.platform};h.replace(/(msie|webkit|gecko|presto|opera|safari|firefox|chrome|maxthon)[ \/]([\d.]+)/ig,function(e,f,k){e=f.toLowerCase();a[e]=k});a.opera&&h.replace(/opera.*version\/([\d.]+)/,function(e,f){a.opera=f});if(a.msie){a.ie=a.msie;d=parseInt(a.msie,10);a["ie"+d]=true}if(a.safari&&a.chrome)a.safari=false;return a}();if(b.Browser.ie)try{c.document.execCommand("BackgroundImageCache",
false,true)}catch(j){}if(b.Browser.ie){c.document.attachEvent("onfocusin",g);c.document.attachEvent("onfocusout",i)}else{c.addEventListener("focus",g,false);c.addEventListener("blur",i,false)}})(K,this);
(function(b,c){var g;b.isSupportTouch=function(){if(g===c){b.log("detecting touch support");for(var i=["touchstart","touchmove","touchend"],j=true,d=document.createElement("div"),h=0,a=i.length;h<a;h++){var e="on"+i[h],f=e in d;if(!f){d.setAttribute(e,"return;");f=typeof d[e]=="function"}if(!f){j=false;break}}g=j}return g}})(K);

(function(e){var f=function(){this.__callbacks__={}};e.mix(f.prototype,{on:function(b,a,d){if(d)a=e.bind(a,d);var c=this.__callbacks__[b];if(c&&c.fired===true)a.apply(d,c.args);else{this.__callbacks__[b]=this.__callbacks__[b]||[];this.__callbacks__[b].push(a);return[b,a]}},un:function(b){var a=b[0],d=b[1];if(a in this.__callbacks__){var c=this.__callbacks__[a];e.forEach(c,function(g,h){if(d==g)c[h]=null})}},once:function(b,a,d){var c=this,g=this.on(b,function(){a.apply(d,arguments);c.un(g)})},fire:function(b){if(b in
this.__callbacks__){var a=this.__callbacks__[b],d=Array.prototype.slice.call(arguments,1);e.forEach(a,function(c){if(typeof c!="function")return null;return c.apply(null,d)})}},fireReady:function(b){var a=this.__callbacks__[b];a||(a=this.__callbacks__[b]=[]);var d=Array.prototype.slice.call(arguments,1);e.forEach(a,function(c){if(typeof c!="function")return null;return c.apply(null,d)});a.fired=true;a.args=d}});e.Pubsub=f;e.mix(e,new f)})(K);

(function(c,k,t){function l(e,j,n){if(c.indexOf(j,e)>=0)throw Error("Module:"+e+" could't depends on itself!");this.id=e;this.dependancy=j;this.factory=n}var s={},u={};l.createRequire=function(e,j){function n(m,b){if(!b&&c.indexOf(e,m)==-1)throw Error(m+" counld't be required in "+j+", as you not declared to depend it ");var h=s[m];if(!h)return null;if(!h.exports){var f=h.factory;if(c.isFunction(f)){h.exports={};if(f=f(l.createRequire(h.dependancy,h.id),h.exports,h))h.exports=f}else if(f!==undefined)h.exports=
f}return h.exports}n.async=function(m,b,h){m=c.isString(m)?[m]:m;var f=c.unique(m);f=l.getDependancy(f);l.load(f);l.wait(f,function(){for(var o=[],q=0,p=m.length;q<p;q++)o.push(n(m[q],true));b.apply(h||t,o)})};return n};l.getDependancy=function(e){return k.getDependancy(e)};l.load=function(e){e=c.isString(e)?[e]:e;c.forEach(e,function(j){k.loadModule(j)})};l.defined=function(){return s};l.waiting=function(){return c.keys(u)};l.check=function(e,j){e=c.trim(e);if(e.length==0||s[e])j&&j();else{u[e]=
true;c.on("Module:"+e+":Ready",j)}};l.wait=function(e,j){e=[].concat(e);if(e.length>0){var n=e.shift();l.check(n,function(){l.wait(e,j)})}else j&&j()};t.define=c.define=function(e,j,n){if(arguments.length<2)throw Error("module has invalid parameters");if(!c.isString(e))throw Error("module must have a ID");if(c.isFunction(j)){n=j;j=[]}else if(!c.isArray(j)){var m=j;n=function(){return m};j=[]}if(s[e])throw Error(e+" has defined");var b=c.unique(j);b=l.getDependancy(b);l.wait(b,function(){var h=new l(e,
j,n);s[e]=h;try{delete u[e]}catch(f){}c.fire("Module:"+e+":Ready")})};t.Module=c.Module=l})(K,K.Resource,this);
(function(c,k){var t=k.resourceMap={},l=k.dependsMap={},s=k.resourceBasePath="http://s.kaixin001.com.cn/",u=/\.js$/i,e={},j={},n=[],m=[],b;k.addResourceMap=function(a){c.mix(t,a)};k.addResourceDepends=function(a){c.mix(l,a)};k.setBasePath=function(a){s=a};k.getDependancy=function(a,d){var g=[];a=c.isString(a)?[a]:a;d=d||[];c.forEach(a,function(i){i=i.replace(u,"");d=d.concat(g);c.indexOf(d,i)==-1&&g.unshift(i);if(i=l[i+".js"]){i=k.getDependancy(i,d);i.length&&g.unshift.apply(g,i)}});return g};var h=
/^\/+|\/+$/ig;k.loadModule=function(a){a=a.replace(h,"");a.indexOf("core/")==0||a.indexOf("apps/")==0||(a=a.indexOf("/")==-1?"core/"+a:"apps/"+a);u.test(a)||(a+=".js");(a=t[a])&&k.loadJS(s+a)};k.canonicalURI=function(a){if(/^\/\/\/?/.test(a))a=location.protocol+a;return a};var f=function(){for(var a=document.getElementsByTagName("link"),d=a.length,g;d;){g=a[--d];if((g.rel=="stylesheet"||g.type=="text/css")&&g.href)e[k.canonicalURI(g.href)]=true}a=document.getElementsByTagName("script");for(d=a.length;d;){g=
a[--d];if((!g.type||g.type=="text/javascript")&&g.src)e[k.canonicalURI(g.src)]=true}f=function(){}},o=function(a){var d,g;delete j[a];e[a]=true;for(g=0;g<n.length;g++){d=n[g];delete d.resources[a];if(c.isEmpty(d.resources)){d.callback&&d.callback();n.splice(g--,1)}}},q=function(){for(var a=document.styleSheets,d=a.length;d--;){var g=a[d],i=false;if(c.Browser.firefox)try{if(g.cssRules)i=true}catch(w){if(w.code==1E3)i=true}else i=true;if(i){g=g.ownerNode||g.owningElement;i=m.length;if(g)for(;i--;)if(g==
m[i]){o(m[i]["data-href"]);m.splice(i,1)}}}if(!m.length){clearInterval(b);b=null}},p=function(a){var d=document.createElement("script"),g=function(){d.onload=d.onerror=d.onreadystatechange=null;o(a)};c.mix(d,{type:"text/javascript",src:a});d.onload=d.onerror=g;d.onreadystatechange=function(){var i=this.readyState;if(i=="complete"||i=="loaded")g()};document.getElementsByTagName("head")[0].appendChild(d)},r=function(a){var d=document.createElement("link");c.mix(d,{type:"text/css",rel:"stylesheet",href:a,
"data-href":a});document.getElementsByTagName("head")[0].appendChild(d);if(d.attachEvent)d.onload=function(){o(a)};else{m.push(d);b||(b=setInterval(q,20))}},v=function(a,d){var g={},i;f();a=c.isArray(a)?a:[a];for(var w=0,x=a.length;w<x;w++){i=k.canonicalURI(a[w]);g[i]=true;if(e[i])setTimeout(c.bind(o,null,i),0);else if(!j[i]){j[i]=true;i.indexOf(".css")>-1?r(i):p(i)}}d&&n.push({resources:g,callback:d})};k.loadJS=function(a,d){v(a,d)};k.loadCSS=function(a,d){v(a,d)}})(K,K.Resource);
(function(c,k){function t(b,h,f){if(j[b])throw Error("App:"+b+" has defined");j[b]=this;this.id=b;this.requiredModList=["jQuery"].concat(h);this.execBeforeDomready=f}function l(b,h){var f;if(!b.container)b.container=document.body;f=h(b.container);if(!f.length||f.length>1)f=h(document.body);b.container=f;b.getContainer=function(){return f};return f}function s(b,h,f){c.map(b.events,function(o,q){var p=q.match(n),r=p[1];p=p[2];var v=h.proxy(b[o],b);p?f.delegate(p,r,h.proxy(b[o],b)):f.bind(r,v)})}function u(b){return c.detect(b,
function(h){return c.isArray(h)})||[]}var e="require getContainer".split(/\s+/ig),j={};c.mix(t.prototype,{define:function(b){var h=c.unique(this.requiredModList),f=k.getDependancy(h),o=this,q=function(){c.fire("App:"+o.id+":Ready",o)};k.load(f);k.wait(f,function(){var p=k.createRequire(h,o.id);if(c.isFunction(b))b=b.call({require:k.createRequire(h,o.id)},p);if(b){var r,v,a;r=0;for(v=e.length;r<v;r++){a=e[r];if(b[a])throw Error(a+" is a reserve method or property");}b.require=p;p=b.require("jQuery");
o.__jQuery__=p;if(!(b.container&&p(b.container).length==0)){r=l(b,p);b.events&&s(b,p,r);if(c.isFunction(b.main))if(o.execBeforeDomready){b.main();q()}else c.ready(function(){b.main();q()});else q()}}})}});var n=/^([\w\.]+)(?:\s+(.*))?$/,m=0;c.App=function(){var b;if((b=arguments[0])&&c.isString(b)){if(c.last(b.split(/\//ig)).charAt(0)!="A")throw Error(b+" is a invalid name for a App");}else b="__APP__"+m++;b=b;var h=u(arguments),f;f=c.last(arguments);f=c.isBoolean(f)?f:false;return new t(b,h,f)};
c.App.get=function(b){return j[b]||null}})(K,K.Module);

(function(d){var f=d.mix,i=d.indexOf,g=d.CustEvent=function(a,c,b){this.target=a;this.type=c;f(this,b||{})};f(g.prototype,{target:null,currentTarget:null,type:null,returnValue:undefined,preventDefault:function(){this.returnValue=false}});d.CustEventTargetH={on:function(a,c,b){a=a.__custListeners&&a.__custListeners[c]||d.error("unknown event type",TypeError);if(i(a,b)>-1)return false;a.push(b);return true},un:function(a,c,b){a=a.__custListeners&&a.__custListeners[c]||d.error("unknown event type",TypeError);
if(b){b=i(a,b);if(b<0)return false;a.splice(b,1)}else a.length=0;return true},fire:function(a,c,b){if(c instanceof g){b=f(c,b);c=c.type}else b=new g(a,c,b);var e=a.__custListeners&&a.__custListeners[c]||d.error("unknown event type",TypeError);if(c!="*")e=e.concat(a.__custListeners["*"]||[]);b.returnValue=undefined;b.currentTarget=a;if((a=b.currentTarget)&&a["on"+b.type])var j=a["on"+b.type].call(a,b);for(c=0;c<e.length;c++)e[c].call(a,b);return b.returnValue!==false||j===false&&b.returnValue===undefined},
createEvents:function(a,c){c=c||[];if(typeof c=="string")c=c.split(",");var b=a.__custListeners;if(!b)b=a.__custListeners={};for(var e=0;e<c.length;e++)b[c[e]]=b[c[e]]||[];b["*"]=b["*"]||[];return a}};var h=d.CustEventTarget=function(){this.__custListeners={}},k=d.Helper.methodize(d.CustEventTargetH,null,{on:"operator",un:"operator"});f(h.prototype,k);d.CustEvent.createEvents=h.createEvents=function(a,c){d.CustEventTargetH.createEvents(a,c);return f(a,h.prototype)}})(K);

(function(b){b.Env={IS_LITE:/kx00[145]\.com/.test(location.host)||/kaixin00[128]\.cc/.test(location.host),KX_HOST:"www.kaixin001.com",IMG_HOST:"img1.kaixin001.com.cn"};b.mix(b.Env,{getDomain:function(){var c;c=b.Env.THIS_HOST;var a=(window.location+"").match(/:\/\/[^\/]+\.(kaixin|kx)(00[^\/])(\.com|\.cc)/i);if(a&&a[1]&&a[2]&&a[3])c="."+a[1]+a[2]+a[3];return c},getDomainND:function(){return b.Env.getDomain().substr(1)}})})(K);

(function(c){c.identity=function(g){return g};var e=0;c.uniqueId=function(g){var f=e++;return g?g+f:f}})(K);
(function(c){var e=false,g=false;c.ready=function(a){e?a():c.on("Onload:DomContentLoaded",a)};var f=function(){if(!e){e=true;c.fire("Onload:DomContentLoaded")}},h;if(document.addEventListener)h=function(){document.removeEventListener("DOMContentLoaded",h,false);f()};else if(document.attachEvent)h=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",h);f()}};var j=function(){if(!e){try{document.documentElement.doScroll("left")}catch(a){setTimeout(j,1);return}document.detachEvent("onreadystatechange",
h);f()}};(function(){var a=c.global,b=a.document,d=function(){if(!e){e=true;f()}if(!g){g=true;c.fire("Onload:Loaded")}};if(b.readyState=="complete")setTimeout(f,0);else if(b.addEventListener){b.addEventListener("DOMContentLoaded",h,false);a.addEventListener("load",d,false)}else if(b.attachEvent){b.attachEvent("onreadystatechange",h);a.attachEvent("onload",d);d=false;try{d=!a.frameElement}catch(i){}b.documentElement.doScroll&&d&&j()}})()})(K);
(function(c){c.onbeforeunload=function(e){if(e)if(typeof window.onbeforeunload=="function"){var g=window.onbeforeunload;window.onbeforeunload=function(){var f=e.apply(null,arguments),h=g.apply(null,arguments);return h?h:f}}else window.onbeforeunload=e}})(K);
(function(c){c.Perf=c.Performance={timing:{},marks:{}};var e=window.performance||window.msPerformance||window.webkitPerformance||window.mozPerformance;if(e&&e.timing)c.Performance.timing=e.timing;else c.ready(function(){c.Performance.timing={responseStart:c.global.g_st_time,domContentLoadedEventStart:(new Date).getTime()}});c.Perf.markTime=function(g,f,h){if(h||!c.Perf.marks[g])c.Perf.marks[g]=f||new Date*1;else throw Error("K.markTime: "+g+" \u91cd\u590d\uff01");};c.Perf.getMarks=function(){var g=
[];for(var f in c.Perf.marks)c.Perf.marks.hasOwnProperty(f)&&g.push(f+"="+(c.Perf.marks[f]-c.global.g_st_time));return g.join("&")};c.ready(function(){c.Perf.markTime("wpo_domready")})})(K);
(function(c){var e=function(a,b){for(b=b.toUpperCase();a&&a.nodeName!=b;)a=a.parentNode;return a},g=function(a){a:if("hasAttribute"in a)a=a.getAttribute("data-app");else{if("getAttributeNode"in a)if(a=a.getAttributeNode("data-app")){a=a.value;break a}a=void 0}var b;if(b=a){if(b=a.length){b=a;if(!("App"in c)||!c.App.get(b)){c.log(b,"not ready");b=false}else b=true;b=!b}b=b}if(b)return a;return false},f=function(a,b,d){var i=g(a),l;if(i){c.once("App:"+i+":Ready",function(k){k.__jQuery__(d||a)[b]()});
return false}else if(b=="click")if((i=a.getAttribute("data-ajax"))&&i.length){l=a.getAttribute("data-ajax-url")||a.href;switch(i){case "dialog-post":case "dialog":c.Module.createRequire().async("core/panel/AsyncDialog",function(k){k.load(l,a)});break;case "request-post":case "request":c.Module.createRequire().async("core/async/Request",function(k){k.load(l,a)});break;default:return}return false}},h=function(a){a=e(a,"FORM")||a;return f(a,"submit")},j=function(){var a=document.createElement("div"),
b="onsubmit"in a;if(!b){a.setAttribute("onsubmit","return;");b=typeof a.onsubmit==="function"}return b}();(function(){var a=c.global.document.documentElement,b=null;a.onclick=function(d){d=d||window.event;b=d.target||d.srcElement;if(!j){d=b.type;if(d=="submit"||d=="image")return h(b)}d=b;var i=e(d,"A")||d;return f(i,"click",d)};if(!j)a.onkeypress=function(d){d=d||window.event;b=d.target||d.srcElement;var i=b.type;if((i=="text"||i=="password")&&d.keyCode==13)return h(b)};if(j)a.onsubmit=function(d){d=
d||window.event;return h(d.target||d.srcElement)}})()})(K);

