-
Notifications
You must be signed in to change notification settings - Fork 141
/
cardkit-standalone.min.js
5 lines (5 loc) · 132 KB
/
cardkit-standalone.min.js
1
2
3
4
5
!function(a,b){function c(a){return"[object Function]"===i.call(a)}function d(a){return"[object Array]"===i.call(a)}function e(a){return"setInterval"in a}function f(a){function b(){}return b.prototype=a,new b}(!b||a.window)&&(b={});var g,h,i=Object.prototype.toString,j=/(.*)!(.+)/,k=/\Wrequire\((['"]).+?\1\)/g,l=/\.(js|json)$/,m=/^\.+?\/.+/,n=/(^|\/)\.\//g,o=/[^\/\.]+\/\.\.\//,p=/^([\w\-]+)\//,q={require:1,exports:1,module:1,host:1,finish:1},r={mods:{}},s={},t={},u={},v={},w={},x=Array.prototype.forEach||function(a,b){for(var c=0,d=this.length;d>c;c++)c in this&&a.call(b,this[c],c,this)};b.define=function(f,h,i){var j="string"==typeof i;i||(h?d(h)?i=b.filesuffix(b.realname(b.basename(f))):(i=h,h=null):(i=f,f=""),"string"!=typeof f?(h=f,f=""):(j="string"==typeof i,j||h||(h=b.seek(i)))),f=f&&b.realname(f);var k=f&&r.mods[f];if(r.debug||!k||!k.name||!(j&&2==k.loaded||k.exports)){j&&r.enable_ozma&&(h=null);var l=e(this)?this:a;if(k=r.mods[f]={name:f,url:k&&k.url,host:l,deps:h||[]},""===f&&(g=k),"string"!=typeof i)k.block=i,k.loaded=2;else{var m=r.aliases;m&&(i=i.replace(/\{(\w+)\}/g,function(a,b){return m[b]||""})),k.url=i}k.block&&!c(k.block)&&(k.exports=i)}},b.define.amd={},b.require=function(c,d,f){if("string"==typeof c){if(!d)return c=b.realname(b.basename(c,h)),(r.mods[c]||{}).exports;c=[c]}else d||(d=c,c=b.seek(d));var i=e(this)?this:a;f||(f={url:h&&h.url});for(var j,k=0,l=b.scan.call(i,c,f),m=0,n=l.length;n>m;m++)j=l[m],j.is_reset&&(j=r.mods[j.name]),j.url&&2!==j.loaded&&(k++,j.loaded=1,b.fetch(j,function(){this.loaded=2;var a=g;a&&(a.name=this.name,a.url=this.url,r.mods[this.name]=a,g=null),--k<=0&&b.require.call(i,c,d,f)}));k||(f.deps=c,f.host=i,f.block=d,setTimeout(function(){b.tidy(c,f),l.push(f),b.exec(l.reverse())},0))},b.require.config=function(a){for(var c in a)if("aliases"===c){r[c]||(r[c]={});for(var d in a[c])r[c][d]=a[c][d];var e=r.mods;for(var f in e)e[f].name=b.realname(f),e[e[f].name]=e[f]}else r[c]=a[c]},b.exec=function(a){for(var c,d,e,g,i,j,k,l,m,n,o=v;c=a.pop();)if(c.is_reset?(n=f(r.mods[c.name]),n.host=c.host,n.newname=c.newname,c=n,w[c.newname]||(w[c.newname]=[]),w[c.newname].push(c),c.exports=void 0):c.name&&(c=r.mods[c.name]||c),c.block&&(c.running||void 0===c.exports)){k=[],l={},m={id:c.name,filename:c.url,exports:l},j=c.deps.slice(),j[c.block.hiddenDeps?"unshift":"push"]("require","exports","module");for(var p=0,q=j.length;q>p;p++)switch(d=j[p]){case"require":k.push(b.require);break;case"exports":k.push(l);break;case"module":k.push(m);break;case"host":k.push(c.host);break;case"finish":e=c.name,o[e]?o[e].push(a):o[e]=[a],k.push(function(a){setTimeout(function(){void 0!==a&&(c.exports=a),o[e]&&(x.call(o[e],function(a){this(a)},b.exec),delete o[e],c.running=0)},0)}),i=1;break;default:k.push(((w[d]||[]).pop()||r.mods[b.realname(d)]||{}).exports)}if(!c.running){h=c,g=c.block.apply(c.host,k)||null,h=!1,l=m.exports,c.exports=void 0!==g?g:l;for(var s in l){s&&(c.exports=l);break}}if(i)return c.running=1,!1}return!0},b.fetch=function(c,d){var e=c.url,f=s[e];if(f)1===f?d.call(c):f.push([d,c]);else{var g=c.name,h=t;if(c.deps&&c.deps.length&&1!==h[g]){if(h[g]=[c.deps.length,d],x.call(c.deps,function(a){var d=r.mods[b.realname(a)];1!==this[a]&&d.url&&2!==d.loaded?(this[a]||(this[a]=[]),this[a].push(c)):h[g][0]--},u),h[g][0]>0)return;h[g]=1}f=s[e]=[[d,c]];var i=/^\w+:\/\//.test(e)?e:(r.enable_ozma&&r.distUrl||r.baseUrl||"")+(r.enableAutoSuffix?b.namesuffix(e):e);b.load.call(c.host||a,i,function(){x.call(f,function(a){a[0].call(a[1])}),s[e]=1,u[g]&&1!==u[g]&&(x.call(u[g],function(a){var c=this[a.name];--c[0]<=0&&(this[a.name]=1,b.fetch(a,c[1]))},h),u[g]=1)})}},b.load=function(b,d){var f=e(this)?this.document:a.document,g=f.createElement("script");g.type="text/javascript",g.async="async",d?c(d)&&(d={callback:d}):d={},d.charset&&(g.charset=d.charset),g.src=b;var h=f.getElementsByTagName("head")[0];g.onload=g.onreadystatechange=function(a,b){(b||!g.readyState||/loaded|complete/.test(g.readyState))&&(g.onload=g.onreadystatechange=null,h&&g.parentNode&&h.removeChild(g),g=void 0,!b&&d.callback&&d.callback())},h.insertBefore(g,h.firstChild)},b.scan=function(a,c,d){if(d=d||[],!a[0])return d;var e,f=d.history;if(f||(f=d.history={}),a[1])e=a,a=!1;else{var g,h=a[0],i=j.exec(h);i&&(h=i[2],i=i[1]);var k=b.realname(h);if(!r.mods[k]&&!q[k]){var l=b.realname(b.basename(h,c));k!==l&&(r.mods[c.url+":"+k]=l,k=l),r.mods[l]||b.define(l,b.filesuffix(l))}if(a=c=r.mods[k],!a)return d;if("new"===i?a={is_reset:!0,deps:a.deps,name:k,newname:i+"!"+k,host:this}:g=a.name,f[g])return d;f[g]?e=[]:(e=a.deps||[],g&&(f[g]=!0))}for(var m=e.length-1;m>=0;m--)f[e[m]]||b.scan.call(this,[e[m]],c,d);return a&&(b.tidy(e,a),d.push(a)),d},b.seek=function(a){var b=a.hiddenDeps||[];if(!a.hiddenDeps){var c=a.toString(),d=null;for(b=a.hiddenDeps=[];d=k.exec(c);)b.push(d[0].slice(10,-2))}return b.slice()},b.tidy=function(a,c){x.call(a.slice(),function(d,e){var f=this[c.url+":"+b.realname(d)];"string"==typeof f&&(a[e]=f)},r.mods)},b.namesuffix=function(a){return a.replace(/(.+?)(_src.*)?(\.\w+)$/,function(a,b,c,d){return b+(c&&"_combo"||"_pack")+d})},b.filesuffix=function(a){return l.test(a)?a:a+".js"},b.realname=function(a){var b=r.aliases;return b&&(a=a.replace(p,function(c,d){var e=b[d];return e&&0!==a.indexOf(e)?e:d+"/"})),a},b.basename=function(a,c){var d=m.exec(a);return d&&c&&(a=(c.url||"").replace(/[^\/]+$/,"")+d[0]),b.resolvename(a)},b.resolvename=function(a){for(a=a.replace(n,"$1");o.test(a);)a=a.replace(o,"/").replace(/(^|[^:])\/\/+/g,"$1/");return a.replace(/^\//,"")};var y={};for(var z in b)y[z]=b[z];b.origin=y,b.cfg=r,a.oz=b,a.define=b.define,a.require=b.require}(this,"undefined"!=typeof exports&&exports),require.config({enable_ozma:!0}),define("mo/lang/es5",[],function(){function a(){}var b=this,c=b.Array,d=b.String,e=b.Object,f=b.Function,g=e.prototype,h=c.prototype,i=f.prototype;i.bind||(i.bind=function(b){var c=this,d=h.slice.call(arguments,1),f=function(){var a=d.concat(h.slice.call(arguments));if(this instanceof f){var g=c.apply(this,a);return e(g)===g?g:this}return c.apply(b,a)};return c.prototype&&(a.prototype=c.prototype,f.prototype=new a,a.prototype=null),f});var j=i.call,k=j.bind(g.hasOwnProperty),l=j.bind(g.toString);h.filter||(h.filter=function(a,b){for(var c=[],d=0,e=this.length;e>d;d++)d in this&&a.call(b,this[d],d,this)&&c.push(this[d]);return c}),h.forEach||(h.forEach=function(a,b){for(var c=0,d=this.length;d>c;c++)c in this&&a.call(b,this[c],c,this)}),h.map||(h.map=function(a,b){for(var c=0,d=[],e=this.length;e>c;c++)c in this&&(d[c]=a.call(b,this[c],c,this));return d}),h.reduce||(h.reduce=function(a,b){for(var c=1,d=this[0],e=this.length;e>c;c++)c in this&&(d=a.call(b,d,this[c],c,this));return d}),h.some||(h.some=function(a,b){for(var c=0,d=this.length;d>c;c++)if(c in this&&a.call(b,this[c],c,this))return!0;return!1}),h.every||(h.every=function(a,b){for(var c=0,d=this.length;d>c;c++)if(c in this&&!a.call(b,this[c],c,this))return!1;return!0}),h.indexOf||(h.indexOf=function(a,b){var c=this.length;for(b=parseInt(b,10)||0,0>b&&(b+=c);c>b;b++)if(b in this&&this[b]===a)return b;return-1}),h.lastIndexOf||(h.lastIndexOf=function(a,b){var c=this.length;for(b=parseInt(b,10)||c-1,0>b&&(b+=c);b>-1;b--)if(b in this&&this[b]===a)return b;return-1}),c.isArray||(c.isArray=function(a){return"[object Array]"===l(a)});var m=/\S/,n=/^\s+/,o=/\s+$/;m.test(" ")&&(n=/^[\s\xA0]+/,o=/[\s\xA0]+$/),d.prototype.trim||(d.prototype.trim=function(){return this.replace(n,"").replace(o,"")}),e.keys||(e.keys=function(a){var b=[];for(var c in a)k(a,c)&&b.push(c);return b}),e.create||(e.create=function(a){function b(){}return b.prototype=a,new b}),e.getPrototypeOf||(e.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype})}),define("mo/lang/type",["mo/lang/es5"],function(a,b,c){function d(a){return null==a?String(a):g[e.call(a)]||"object"}var e=Object.prototype.toString,f=Array.prototype,g={};f.forEach.call("Boolean Number String Function Array Date RegExp Object".split(" "),function(a){this["[object "+a+"]"]=a.toLowerCase()},g),c.type=d,c.isFunction=function(a){return"[object Function]"===e.call(a)},c.isWindow=function(a){return a&&a===a.window},c.isEmptyObject=function(a){for(var b in a)return b=null,!1;return!0},c.isArraylike=function(a){var b=a.length;return!c.isWindow(a)&&("function"!=typeof a||a.constructor!==Function)&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}}),define("mo/lang/mix",["mo/lang/es5","mo/lang/type"],function(a,b,c,d){function e(a){var b,c,d,f,g=arguments,h=g.length,i={number:1,"boolean":2,string:3};"object"!=typeof g[h-1]?(c=g[h-1]||0,h--):c=0;for(var j=1;h>j;j++)if(b=g[j],Array.isArray(b))for(a=!i[typeof a]&&a||[],f=b.length,d=0;f>d;d++)a[d]=c>=1&&b[d]&&"object"==typeof b[d]?e(a[d],b[d],c-1):b[d];else{a=!i[typeof a]&&a||{};for(d in b)a[d]=c>=1&&b[d]&&"object"==typeof b[d]?e(a[d],b[d],c-1):b[d]}return a}function f(a){var b,c,d,e,g,i,j,k=arguments,l=k.length,m={object:1,array:2};"object"!=typeof k[l-1]?(c=k[l-1]||0,l--):c=0;for(var n=1;l>n;n++)if(b=k[n],"object"==typeof b)if(Array.isArray(a)){if(!Array.isArray(b))continue;a=a||[],g={},i=[],j="__oz_uniqmark_"+(+new Date+Math.random()),b=b.concat(a),a.length=0,b.forEach(function(b){b&&"object"==typeof b?b[j]||(a.push(c>=1&&Array.isArray(b)?f(b,[],c-1):b),b[j]=1,i.push(b)):(e=typeof b+"_"+b,this[e]||(a.push(b),this[e]=1))},g),i.forEach(function(a){delete a[j]})}else{a=a||{};for(d in b)a.hasOwnProperty(d)?c>=1&&d&&m[h(a[d])]+0===m[h(b[d])]+0&&(a[d]=f(a[d],b[d],c-1)):a[d]=b[d]}return a}function g(a){var b,c,d,e,f,i,j,k=arguments,l=k.length,m={object:1,array:2};"object"!=typeof k[l-1]?(c=k[l-1]||0,l--):c=0;for(var n=1;l>n;n++)if(b=k[n],"object"==typeof b)if(Array.isArray(a)){if(!Array.isArray(b))continue;a=a||[],f={},i=[],j="__oz_uniqmark_"+(+new Date+Math.random()),a.forEach(function(a){a&&"object"==typeof a&&!a[j]?(a[j]=1,i.push(a)):(e=typeof a+"_"+a,this[e]=1)},f),a.length=0,b.forEach(function(b){b&&"object"==typeof b?1===b[j]&&(a.push(b),b[j]=2):(e=typeof b+"_"+b,1===this[e]&&(a.push(b),this[e]=2))},f),i.forEach(function(a){delete a[j]})}else{a=a||{};for(d in a)b.hasOwnProperty(d)?c>=1&&d&&m[h(a[d])]+0===m[h(b[d])]+0&&(a[d]=g(a[d],b[d],c-1)):delete a[d]}return a}var h=b.type;d.mix=e,d.merge=f,d.interset=g,d.copy=function(a,b){return e(null,a,b)},d.occupy=function(a,b,c){return e(g(a,b,c),b,c)},d.defaults=f,d.config=function(a,b,c,d){return e(f(a,c,d),g(e(null,b,d),c,d),d)},d.unique=function(a,b){return f(a,[],b)},d.each=function(a,c,d){var e,f=0,g=a.length;if(b.isArraylike(a))for(;g>f&&(e=c.call(d,a[f],f),e!==!1);f++);else for(f in a)if(e=c.call(d,a[f],f),e===!1)break;return a}}),define("mo/lang/struct",["mo/lang/es5","mo/lang/mix"],function(a,b,c,d){var e=b.mix;d.index=function(a,b){for(var c,d={},e=0,f=a.length;f>e;e++)c=a[e],b&&"object"==typeof c?d[c[b]]=c:d[c]=!0;return d},d.fnQueue=function(){function a(a){return function(){var b,d;for(c=this.slice().reverse();d=c.pop();)b=d[a].apply(d,arguments);return c=!1,b}}var b=[],c=!1;return e(b,{call:a("call"),apply:a("apply"),clear:function(a){if(a){for(var b=this.length,d=b-c.length,e=this.length-1;e>=0;e--)this[e]===a&&(this.splice(e,1),c&&e>=d&&c.splice(b-e-1,1));if(0>e)return!1}else this.length=0;return!0}}),b}}),define("eventmaster",["mo/lang/es5","mo/lang/mix","mo/lang/struct"],function(a,b,c){function d(a){var b=this;a&&(this.subject=a.subject,this.trace=a.trace,this.traceStack=a.traceStack||[]),this.doneHandlers=j(),this.failHandlers=j(),this.observeHandlers=j(),this._alterQueue=j(),this._lastDoneQueue=[],this._lastFailQueue=[],this.status=0,this._argsCache=[],this.pipe={},l.forEach(function(a){this[a]=function(){return b[a].call(b,k.call(arguments))}},this.pipe)}function e(){var a=[],b=[],c=new d;return c._when=[],c._count=c._total=arguments.length,Array.prototype.forEach.call(arguments,function(c,d){function e(c){b[d]||(b[d]=!0,a[d]=c,0===--f._count&&(b.length=0,f._count=f._total,f.resolve.call(f,a)))}var f=this;f._when.push(c.bind(e))},c),c}function f(a,b){return a&&a.then?a.then(b.pipe.resolve,b.pipe.reject).progress(b.pipe.notify):void 0!==a&&b.resolve([a]),a}function g(a){return function(b){var c=this.lib[b];return c||(c=this.lib[b]=new d({subject:b,trace:this.trace,traceStack:this.traceStack})),c[a].apply(c,k.call(arguments,1)),this}}function h(a){a&&(this.trace=a.trace,this.traceStack=a.traceStack),this.lib={}}function i(a){return new h(a)}var j=c.fnQueue,k=Array.prototype.slice,l=["notify","fire","error","resolve","reject","reset","disable","enable"],m=d.prototype={then:function(a,b){var c=this.status;return b?2===c?this._resultCache=b.apply(this,this._argsCache):c||(this.failHandlers.push(b),this._lastFailQueue=this.failHandlers):this._lastFailQueue=[],a?1===c?this._resultCache=a.apply(this,this._argsCache):c||(this.doneHandlers.push(a),this._lastDoneQueue=this.doneHandlers):this._lastDoneQueue=[],this},done:function(a){return this.then(a)},fail:function(a){return this.then(!1,a)},cancel:function(a,b){return a&&this.doneHandlers.clear(a),b&&this.failHandlers.clear(b),this},bind:function(a){return this.status&&a.apply(this,this._argsCache),this.observeHandlers.push(a),this},unbind:function(a){return this.observeHandlers.clear(a),this},progress:function(a){var b=this;return this.observeHandlers.push(function(){b.status||a.apply(this,arguments)}),this},notify:function(a){return this._disalbed?this:(this.status=0,this.observeHandlers.apply(this,a||[]),this)},fire:function(a){if(this._disalbed)return this;this.trace&&this._trace(),a=a||[];var b=this.doneHandlers;return this.doneHandlers=this._alterQueue,this.failHandlers.length=0,this.observeHandlers.apply(this,a),b.apply(this,a),b.length=0,this._alterQueue=b,this},error:function(a){if(this._disalbed)return this;this.trace&&this._trace(),a=a||[];var b=this.failHandlers;return this.failHandlers=this._alterQueue,this.doneHandlers.length=0,this.observeHandlers.apply(this,a),b.apply(this,a),b.length=0,this._alterQueue=b,this},resolve:function(a){return this.status=1,this._argsCache=a||[],this.fire(a)},reject:function(a){return this.status=2,this._argsCache=a||[],this.error(a)},reset:function(){return this.status=0,this._argsCache=[],this.doneHandlers.length=0,this.failHandlers.length=0,this},disable:function(){this._disalbed=!0},enable:function(){this._disalbed=!1},merge:function(a){b.merge(this.doneHandlers,a.doneHandlers),b.merge(this.failHandlers,a.failHandlers),b.merge(this.observeHandlers,a.observeHandlers);var c=a.subject;b.mix(a,this),a.subject=c},_trace:function(){this.traceStack.unshift(this.subject),this.traceStack.length>this.trace&&this.traceStack.pop()},follow:function(){var a=new d;if(a._prevActor=this,this.status)f(this._resultCache,a);else{var b=this._lastDoneQueue.pop();b&&this._lastDoneQueue.push(function(){return f(b.apply(this,arguments),a)});var c=this._lastFailQueue.pop();c&&this._lastFailQueue.push(function(){return f(c.apply(this,arguments),a)})}return a},end:function(){return this._prevActor},all:function(){var a=e.apply(this,this._when);return a},any:function(){var a=e.apply(this,this._when);return a._count=a._total=1,a},some:function(a){var b=e.apply(this,this._when);return b._count=b._total=a,b}},n=h.prototype=function(a){for(var b in m)a[b]=g(b);return a}({});return n.once=n.wait=n.then,n.on=n.bind,n.off=n.unbind,n.promise=function(a){var b=this.lib[a];return b||(b=this.lib[a]=new d({subject:a,trace:this.trace,traceStack:this.traceStack})),b},n.when=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(this.promise(arguments[b]));return e.apply(this,a)},i.Promise=d,i.Event=h,i.when=e,i.pipe=f,i.VERSION="2.1.0",i}),define("cardkit/bus",["eventmaster"],function(a){return a()}),define("mo/browsers",[],function(){var a,b,c,d,e,f,g=this.navigator.userAgent.toLowerCase(),h={"360ee":2,"maxthon/3":2,qqbrowser:2,metasr:2,"360se":1,theworld:1,maxthon:1,tencenttraveler:-1};try{var i=/(windows) nt ([\w.]+)/,j=/(mac) os \w+ ([\w.]+)/,k=/(windows phone)[\sos]* ([\w.]+)/,l=/(iphone).*? os ([\w.]+)/,m=/(ipad).*? os ([\w.]+)/,n=/(android)[ ;]([\w.]*)/,o=/(\w+)[ \/]([\w.]+)[ \/]mobile/,p=/(\w+)[ \/]([\w.]+)[ \/]safari/,q=/[ \/]mobile.*safari/,r=/[ \/]mobile/,s=/ touch/,t=/(webkit)[ \/]([\w.]+)/,u=/(opera)(?:.*version)?[ \/]([\w.]+)/,v=/(msie) ([\w.]+)/,w=/(trident).*? rv:([\w.]+)/,x=/(mozilla)(?:.*? rv:([\w.]+))?/,y=/(360se)/,z=/(360ee)/,A=/(360) \w+phone/,B=/(theworld)/,C=/(maxthon\/3)/,D=/(maxthon)/,E=/(tencenttraveler)/,F=/(qqbrowser)/,G=/(baidubrowser)/,H=/(ucbrowser)/,I=/(sogou\w*browser)/,J=/(metasr)/;if(c=l.exec(g)||m.exec(g)||n.exec(g)||j.exec(g)||k.exec(g)||i.exec(g)||[],b=y.exec(g)||z.exec(g)||A.exec(g)||H.exec(g)||B.exec(g)||C.exec(g)||D.exec(g)||E.exec(g)||F.exec(g)||G.exec(g)||I.exec(g)||J.exec(g)||[],a=t.exec(g)||u.exec(g)||v.exec(g)||w.exec(g)||g.indexOf("compatible")<0&&x.exec(g)||[],d=q.exec(g)||(f=r.exec(g)),e=s.exec(g),"trident"===a[1]&&(a[1]="msie"),"webkit"===a[1]){var K=(d?o.exec(g):p.exec(g))||[];a[3]=a[1],a[4]=a[2],a[1]="version"===K[1]&&(("iphone"===c[1]||"ipad"===c[1])&&"mobilesafari"||"android"===c[1]&&"aosp"||"safari")||b[1]||f&&"webview"||K[1],a[2]=K[2]}}catch(L){a=[],b=[]}var M={browser:a[1]||b[1]||"",version:a[2]||"0",engine:a[3],engineversion:a[4]||"0",os:c[1],osversion:c[2]||"0",isMobile:"iphone"===c[1]||"windows phone"===c[1]||"android"===c[1]&&!!d,isTouch:"iphone"===c[1]||"windows phone"===c[1]||"android"===c[1]||"windows"===c[1]&&e,skin:b[1]||"",ua:g};return a[1]&&(M[a[1]]=parseInt(M.version,10)||!0),b[1]&&(M.rank=h[M.skin]||0),M.shell=M.skin,M}),define("cardkit/supports",["mo/browsers"],function(a){var b={touch:a.isTouch,webview:a.webview,noBugWhenFixed:"android"!==a.os||"ucbrowser"!==a.shell};return b}),define("mo/template/string",[],function(a,b){b.format=function(a,b){return a.replace(/\{\{(\w+)\}\}/g,function(a,c){return null!=b[c]?b[c]:""})},b.escapeHTML=function(a){a=a||"";var b={"<":"<",">":">","'":"'",'"':""","{":"{","}":"}","@":"@"};return a.replace(/[<>'"\{\}@]/g,function(a){return b[a]})},b.substr=function(a,b,c){if(!a||"string"!=typeof a)return"";var d=a.substr(0,b).replace(/([^\x00-\xff])/g,"$1 ").substr(0,b).replace(/([^\x00-\xff])\s/g,"$1");return c?c.call(d,d):a.length>d.length?d+"...":d},b.strsize=function(a){return a.replace(/([^\x00-\xff]|[A-Z])/g,"$1 ").length}}),define("dollar/origin",["mo/lang/es5","mo/lang/mix","mo/lang/type"],function(a,b,c){function d(a,b){if(a){if(a.constructor===d)return a;if("string"!=typeof a){var e=new d;return c.isArraylike(a)&&1!==a.nodeType?T.apply(e,U.call(a)):T.call(e,a),e}return a=a.trim(),J.test(a)?d.createNodes(a):b?d(b).find(a):X.find(a)}return R(this)?new d:void 0}function e(a){return a}function f(a,b){return function(c){return b&&(c=c[b]),d.matches(c,a)&&this.push(c),c}}function g(a){return function(c){return d(b.unique([void 0,A,null].concat(this._map(c?function(b){var e=b[a];return e&&d.matches(e,c)?e:void 0}:function(b){return b[a]}))).slice(3))}}function h(a,c,e){return function(f,g){e||(g=f);var h=new d;return this.forEach(function(b){var h,i=c?b.parentNode[c]:b;e&&(h=d(f,b.parentNode));do{if(h&&h.indexOf(i)>-1)break;b===i||g&&!d.matches(i,g)||this.push(i)}while(i=i[a])},h),b.unique(h)}}function i(a,b,c,d){if(null===a||void 0===a)return this;var e=Q(a);return this.forEach(function(f,g){if(f){var h=e?a.call(this,g,c&&c.call(this,f,d)):a;b.call(this,f,d||h,h)}},this),this}function j(a,b){return function(c){return arguments.length>0?i.call(this,c,a,b):this[0]?b.call(this,this[0]):void 0}}function k(a,b,c){return function(d,e){if("object"!=typeof d)return arguments.length>1?i.call(this,e,a,b,d):this[0]?b.call(this,this[0],d):void 0;if(c)c.call(this,d);else for(var f in d)this.forEach(function(b){b&&a.call(this,b,f,d[f])},this);return this}}function l(a){function b(c,e){if("object"==typeof c)for(var f in c)b.call(this,[f,c[f]]);else e&&(c=d.Event.aliases[c]||c,this.forEach(function(b){b[a+"EventListener"](c,this,!1)},e));return this}return b}function m(a,c,e){return this===d?a=d(a):(e=c,c=a,a=this),"string"==typeof c&&(c=d.Event(c)),b.mix(c,e),a.forEach(H[c.type]&&!c.defaultPrevented?function(a){a[c.type]()}:function(a){"dispatchEvent"in a&&a.dispatchEvent(this)},c),this}function n(a){return a.replace(L,o)}function o(a,b){return b?b.toUpperCase():""}function p(a){return a.replace(O,"/").replace(N,"$1_$2").replace(M,"$1_$2").replace(P,"-").toLowerCase()}function q(a,b){return"number"==typeof b&&!I[a]&&b+"px"||b}function r(a){var b=V[a];if(!b){var c=document.createElement(a);A.body.appendChild(c),b=d.getPropertyValue(c,"display"),c.parentNode.removeChild(c),"none"===b&&(b="block"),V[a]=b}return b}function s(a){return function(){var b=this[0];if(b)return R(b)?b["inner"+a]:9===b.nodeType?b.documentElement["offset"+a]:(this.offset()||{})[a.toLowerCase()]}}function t(a){var b="Top",c="page"+(a?"Y":"X")+"Offset";return function(){var a=this[0];if(a)return R(a)?a[c]:a[b]}}function u(a,b,c){switch("SCRIPT"!==b.nodeName.toUpperCase()||b.type&&"text/javascript"!==b.type||z.eval.call(z,b.innerHTML),c){case 1:a.appendChild(b);break;case 2:a.parentNode.insertBefore(b,a);break;case 3:a.insertBefore(b,a.firstChild);break;case 4:a.parentNode.insertBefore(b,a.nextSibling)}}function v(a,b){var c=b?function(b){u(b,this,a)}:function(b){u(this,b,a)};return function(a){return this.forEach(function(a){this.forEach(c,a)},b||"string"!=typeof a||J.test(a)?d(a):d.createNodes(a)),this}}function w(a){return v(a,!0)}function x(a){return v(a)}function y(a){return S.call(a,function(a){return"object"==typeof a?a._slice():a})}var z=this,A=z.document,B="nextElementSibling",C="previousElementSibling",D="firstElementChild",E=["webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","matchesSelector"].map(function(a){return this[a]&&a},A.body).filter(e)[0],F={click:1,mousedown:1,mouseup:1,mousemove:1},G={touchstart:1,touchmove:1,touchend:1,touchcancel:1},H={submit:1,focus:1,blur:1},I={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},J=/^\s*<(\w+|!)[^>]*>/,K=/^#[\w_]+$/,L=/-+(.)?/g,M=/([a-z\d])([A-Z])/g,N=/([A-Z]+)([A-Z][a-z])/g,O=/::/g,P=/_/g,Q=c.isFunction,R=c.isWindow,S=Array.prototype.map,T=Array.prototype.push,U=Array.prototype.slice,V={},W={},X=d.fn=d.prototype=[];["map","filter","slice","reverse","sort"].forEach(function(a){var b=this["_"+a]=this[a];this[a]=function(){return d(b.apply(this,arguments))}},X);var Y=X._concat=X.concat;X.concat=function(){return d(Y.apply(this._slice(),y(arguments)))};var Z=X._splice=X.splice;return X.splice=function(){return d(Z.apply(this,y(arguments)))},b.mix(X,{constructor:d,toString:function(){return this.join(",")},find:function(a){var b,c=new d;if(this===X?b=[A]:c.prevObject=b=this,K.test(a)){b=b[0],a=a.substr(1);var e=b!==A&&b&&b.getElementById,f=e?e.call(b,a):A.getElementById(a);f&&c.push(f)}else b[1]?b.forEach(function(b){T.apply(this,d._querySelector(b,a))},c):b[0]&&T.apply(c,d._querySelector(b[0],a));return c},eq:function(a){return a=parseInt(a,10),-1===a?this.slice(-1):this.slice(a,a+1)},not:function(a){return this.filter(function(b){return b&&!this(b,a)},d.matches)},matches:function(a){return this.filter(function(b){return b&&this(b,a)},d.matches)},has:function(a){return this.filter(function(b){return b?"string"==typeof a?d(a,b).length:d.contains(b,d(a)[0]):!1})},parent:g("parentNode"),parents:function(a){for(var b=new d,c=this,e=a?f(a,"parentNode"):function(a){return this[this.push(a.parentNode)-1]};c.length;)c=c.map(e,b);return b},closest:function(a){for(var b=new d,c=this,e=f(a,"parentNode");c.length&&!b.length;)c=c.map(e,b);return b.length&&b||this},siblings:h(B,D),next:g(B),nextAll:h(B),nextUntil:h(B,!1,!0),prev:g(C),prevAll:h(C),prevUntil:h(C,!1,!0),children:function(){var a=new d;return this.forEach(function(a){T.apply(this,U.call(a.children))},a),a},contents:function(){var a=new d;return this.forEach(function(a){T.apply(this,U.call(a.childNodes))},a),a},is:function(a){return this.some(function(b){return b&&d.matches(b,a)})},hasClass:function(a){for(var b=0,c=this.length;c>b;b++)if(this[b].classList.contains(a))return!0;return!1},addClass:function(a){return i.call(this,a,function(a,b){a.classList.add(b)},function(a){return a.className})},removeClass:function(a){return i.call(this,a,function(a,b){a.classList.remove(b)},function(a){return a.className})},toggleClass:function(a,b){return i.call(this,a,function(a,c){a.classList[void 0===b&&"toggle"||b&&"add"||"remove"](c)},function(a){return a.className})},attr:k(function(a,b,c){a.setAttribute(b,c)},function(a,b){return a.getAttribute(b)}),removeAttr:function(a){return this.forEach(function(a){a.removeAttribute(this)},a),this},prop:k(function(a,b,c){a[b]=c},function(a,b){return a[b]}),removeProp:function(a){return this.forEach(function(a){delete a[this]},a),this},data:k(function(a,b,c){a.dataset[n(b)]=c},function(a,c){var d=a.dataset;if(d)return c?d[n(c)]:b.mix({},d)}),removeData:function(a){return this.forEach(function(a){delete a.dataset[this]},a),this},val:j(function(a,b){a.value=b},function(a){return this.multiple?d("option",this).filter(function(a){return a.selected}).map(function(a){return a.value}):a.value}),empty:function(){return this.forEach(function(a){a.innerHTML=""}),this},html:j(function(a,b){J.test(b)?d(a).empty().append(b):a.innerHTML=b},function(a){return a.innerHTML}),text:j(function(a,b){a.textContent=b},function(a){return a.textContent}),clone:function(){return this.map(function(a){return a.cloneNode(!0)})},css:k(function(a,b,c){var d=p(b);c||0===c?a.style.cssText+=";"+d+":"+q(d,c):a.style.removeProperty(d)},function(a,b){return a.style[n(b)]||d.getPropertyValue(a,b)},function(a){var b,c,d="";for(var e in a)c=a[e],b=p(e),c||0===c?d+=b+":"+q(b,c)+";":this.forEach(function(a){a.style.removeProperty(this)},b);this.forEach(function(a){a.style.cssText+=";"+this},d)}),hide:function(){return this.css("display","none")},show:function(){return this.forEach(function(a){"none"===a.style.display&&(a.style.display=null),"none"===this(a,"display")&&(a.style.display=r(a.nodeName))},d.getPropertyValue),this},offset:function(){if(this[0]){var a=this[0].getBoundingClientRect();return{left:a.left+z.pageXOffset,top:a.top+z.pageYOffset,width:a.width,height:a.height}}},width:s("Width"),height:s("Height"),scrollLeft:t(),scrollTop:t(!0),appendTo:w(1),append:x(1),prependTo:w(3),prepend:x(3),insertBefore:w(2),before:x(2),insertAfter:w(4),after:x(4),replaceAll:function(a){var b=d(a);return this.insertBefore(b),b.remove(),this},replaceWith:function(a){return d(a).replaceAll(this)},wrap:function(a){return i.call(this,a,function(a,b){d(b).insertBefore(a).append(a)})},wrapAll:function(a){return d(a).insertBefore(this.eq(0)).append(this),this},wrapInner:function(a){return i.call(this,a,function(a,b){d(a).contents().wrapAll(b)})},unwrap:function(){return this.parent().forEach(function(a){this(a).children().replaceAll(a)},d),this},remove:function(){return this.forEach(function(a){var b=a.parentNode;b&&b.removeChild(a)}),this},on:l("add"),off:l("remove"),once:function(a,b){var c=function(){return d(this).off(a,c),b.apply(this,arguments)};return d(this).on(a,c)},trigger:m,end:function(){return this.prevObject||new d},each:function(a){for(var b=0,c=this.length;c>b;b++){var d=a.call(this[b],b);if(d===!1)break}return this}}),X.bind=X.on,X.unbind=X.off,X.one=X.once,d.find=d,d._querySelector=function(a,b){try{return U.call(a.querySelectorAll(b))}catch(c){return[]}},d.matches=d.matchesSelector=function(a,b){return a&&1===a.nodeType&&a[E](b)},d.contains=function(a,b){return a!==b&&a.contains(b)},d.createNodes=function(a,b){var c=(J.exec(a)||[])[0]||a,e=W[c];e||(e=W[c]="tr"===c&&document.createElement("tbody")||("tbody"===c||"thead"===c||"tfoot"===c)&&document.createElement("table")||("td"===c||"th"===c)&&document.createElement("tr")||document.createElement("div")),e.innerHTML=a;var f=new d;if(T.apply(f,U.call(e.childNodes)),f.forEach(function(a){this.removeChild(a)},e),b)for(var g in b)f.attr(g,b[g]);return f},d.getStyles=z.getComputedStyle&&function(a){return z.getComputedStyle(a,null)}||document.documentElement.currentStyle&&function(a){return a.currentStyle},d.getPropertyValue=function(a,b){var c=d.getStyles(a);return c.getPropertyValue&&c.getPropertyValue(b)||c[b]},d.Event=function(a,c){var e=d.Event.aliases[a]||a,f=!0,g=G[a],h=document.createEvent(g&&"TouchEvent"||F[a]&&"MouseEvents"||"Events");return c&&("bubbles"in c&&(f=!!c.bubbles,delete c.bubbles),b.mix(h,c)),h[g&&"initTouchEvent"||"initEvent"](e,f,!0),h},d.Event.aliases={},d.trigger=m,d.camelize=n,d.dasherize=p,d._vAccess=j,d._kvAccess=k,d._nodesAccess=i,d}),define("dollar",["dollar/origin"],function(a){return a}),define("mo/lang/oop",["mo/lang/es5","mo/lang/mix"],function(a,b,c,d){function e(a,b,c){a.apply(b,c)}var f=b.mix;d.construct=function(a,b,c){function d(){var b=a.__constructor,c=a.__superMethod;a.__constructor=j,a.__superMethod=j.__superMethod,e.prototype=a.prototype;var f=new e(a,this,arguments);for(var g in f)this[g]||(this[g]=h[g]=f[g]);a.__constructor=b,a.__superMethod=c,this.superConstructor=d}b&&!Array.isArray(b)&&(c=b,b=null),c||(c=function(){this.superConstructor.apply(this,arguments)}),a.__constructor||(a.__constructor=a,a.__supr=a.prototype);var g=Object.create(a.prototype),h=Object.create(a.prototype),i={};h.__super=a.__supr,h.__self=a.prototype;var j=function(){return this.superMethod=j.__superMethod,this.superConstructor=d,this.constructor=j.__constructor,this.superClass=h,c.apply(this,arguments)};return j.__supr=h,j.__constructor=j,j.__superMethod=function(a,b){var c={},d=c,e=i[a];return e?(i[a]=e.__super,e.__self.hasOwnProperty(a)||(d=this.superMethod.apply(this,arguments))):(i[a]=h,j.prototype.hasOwnProperty(a)||(d=this.superMethod.apply(this,arguments))),d===c&&(d=i[a][a].apply(this,b)),i[a]=e,d},j.prototype=g,b&&(b=f.apply(this,b),f(g,b),f(h,b)),j}}),define("mo/lang",["mo/lang/es5","mo/lang/type","mo/lang/mix","mo/lang/struct","mo/lang/oop"],function(a,b,c,d,e,f,g){var h=this,i=h.window;c.mix(g,b,c,d,e),g.ns=function(a,b,c){for(var d,e=c||i,f=a.split(".").reverse();(d=f.pop())&&f.length>0;){if("undefined"==typeof e[d])e[d]={};else if("object"!=typeof e[d])return!1;e=e[d]}return"undefined"!=typeof b&&(e[d]=b),e[d]}}),define("moui/overlay",["mo/lang","dollar","eventmaster","mo/template/string"],function(a,b,c,d){function e(a){this.init(a),this.set(this._config)}function f(a){return new f.Overlay(a)}var g=b("body"),h="mouiOverlay",i='<div id="{{id}}" class="{{cname}}"> <header><h2></h2></header> <article></article> </div>',j='<span class="loading"><i>.</i><i>.</i><i>.</i></span>',k="Loading...",l=0,m={title:"",content:"",className:"moui-overlay",parent:g,openDelay:50,closeDelay:0,event:{}};return e.prototype={_ns:h,_template:i,_defaults:m,init:function(e){return this.id=this._ns+ ++l,this.event=c(),this._config=a.config({},e,this._defaults),g.append(d.format(this._template,{id:this.id,cname:this._config.className})),this._node=b("#"+this.id),this._header=this._node.find("header").eq(0),this._title=this._header.find("h1"),this._content=this._node.find("article").eq(0),this},set:function(b){return b?(a.config(this._config,b,this._defaults),"string"==typeof b.title&&this.setTitle(b.title),void 0!==b.content&&this.setContent(b.content),void 0!==b.className&&(this._node[0].className=b.className),this):this},setTitle:function(a){return this._title.html(a),this},setContent:function(a){return this._content.html(a),this},insertNode:function(a){this._node.appendTo(a||this._config.parent)},showLoading:function(a){return this._node.addClass("loading"),this._title.html((a||k)+j),this},hideLoading:function(){return this._node.removeClass("loading"),this._title.html(this._config.title),this},open:function(){if(clearTimeout(this._actimer),this.isOpened)return this.cancelClose(),this;var a=this,b=arguments;return this.prepareOpen.apply(a,b),this._actimer=setTimeout(function(){a.applyOpen.apply(a,b)},this._config.openDelay),this},close:function(){if(clearTimeout(this._actimer),!this.isOpened)return this.cancelOpen(),this;
var a=this,b=arguments;return this.prepareClose.apply(a,b),this._actimer=setTimeout(function(){a.applyClose.apply(a,b)},this._config.closeDelay),this},prepareOpen:function(){this.insertNode(),this._node.addClass("rendered"),this.event.fire("prepareOpen",[this])},prepareClose:function(){this.event.fire("prepareClose",[this]),this._node.removeClass("active")},cancelOpen:function(){this._node.removeClass("rendered"),this.event.fire("cancelOpen",[this])},cancelClose:function(){this._node.addClass("active"),this.event.fire("cancelClose",[this])},applyOpen:function(){this.isOpened=!0,this._node.addClass("active"),this.event.fire("open",[this])},applyClose:function(){this.isOpened=!1,this.hideLoading(),this.beforeClose(),this._node.removeClass("rendered"),this.event.fire("close",[this])},beforeClose:function(){},destroy:function(){return this._node.remove(),this.event.fire("destroy",[this]),this}},f.Overlay=e,f}),define("mo/template/micro",["mo/lang","mo/template/string"],function(a,b,c,d){function e(b,c,g){var h,i=d.tplSettings,j=g?"#"+g:"";if(/[\t\r\n% ]/.test(b)){var k=new Function(g||"obj","api","var __p=[];"+(g?"":"with(obj){")+"var mix=api.mix,escapeHTML=api.escapeHTML,substr=api.substr,include=api.include,has=api._has("+(g||"obj")+");__p.push('"+b.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(i.comment,"").replace(i.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(i.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');"+(g?"":"}")+"return __p.join('');");h=function(b,c){return k.call(this,b,a.mix({},d.tplHelpers,c))}}else if(h=i._cache[b+j],!h){var l=f.getElementById(b);l&&(h=i._cache[b+j]=e(l.innerHTML,!1,g))}return h?c?h(c):h:""}var f=this.document;d.tplSettings={_cache:{},comment:/\{\*([\s\S]+?)\*\}/g,evaluate:/\{%([\s\S]+?)%\}/g,interpolate:/\{%=([\s\S]+?)%\}/g},d.tplHelpers={mix:a.mix,escapeHTML:b.escapeHTML,substr:b.substr,include:e,_has:function(b){return function(c){return a.ns(c,void 0,b)}}},d.convertTpl=e,d.reloadTpl=function(a){delete d.tplSettings._cache[a]}}),define("mo/template",["mo/lang","mo/template/string","mo/template/micro"],function(a,b,c,d,e){a.mix(e,b,c),e.str2html=function(a){var b=document.createElement("div");b.innerHTML=a;var c=b.firstChild;if(1==b.childNodes.length)return c;var d=document.createDocumentFragment();do d.appendChild(c);while(c=b.firstChild);return d}}),define("moui/growl",["dollar","mo/lang","mo/template","moui/overlay"],function(a,b,c,d){function e(a){a._exptimer=setTimeout(function(){a.close()},a._config.expires)}function f(a){return new f.Growl(a)}var g="mouiGrowl",h='<div id="{{id}}" class="moui-growl"> <header><h2></h2></header> <article></article> </div>',i="corner-",j={className:"moui-growl",closeDelay:300,corner:"center",expires:1400,keepalive:!1},k=b.construct(d.Overlay);return b.mix(k.prototype,{_ns:g,_template:h,_defaults:b.mix({},k.prototype._defaults,j),set:function(a){var b=this;return b.superMethod("set",[a]),a.corner&&a.corner!==b._currentCorner&&(b._currentCorner&&b._node.removeClass(i+b._currentCorner),b._node.addClass(i+a.corner),b._currentCorner=a.corner),void 0!==a.expires&&(clearTimeout(b._exptimer),b.isOpened&&e(b)),b},applyOpen:function(){return clearTimeout(this._exptimer),-1!=this._config.expires&&e(this),this.superMethod("applyOpen",arguments)},applyClose:function(){this.isOpened=!1,this._node.removeClass("rendered"),this.event.fire("close",[this]),this._config.keepalive||this.destroy()}}),f.Growl=k,f}),define("cardkit/ui/growl",["mo/lang","dollar","moui/growl"],function(a,b,c){function d(h,i){var j,k={corner:"bottom"};h.nodeName?(h=b(h),j=h[0][e],j&&g[j]&&g[j].close(),j=h[0][e]=++f,i=a.mix(k,h.data(),i)):i=a.mix(k,h),i.className="ck-growl",a.merge(i,d.defaultOptions);var l=c(i);return j&&(g[j]=l),l}var e="_ckGrowlUid",f=0,g={};return d.defaultOptions={},d}),define("mo/network/ajax",[],function(a,b){function c(){}function d(a){var b,c=eval;a&&(/^[^\S]*use strict/.test(a)?(b=document.createElement("script"),b.text=a,document.head.appendChild(b).parentNode.removeChild(b)):c(a))}var e=/\?/,f=/#.*$/,g=/^(?:GET|HEAD)$/,h=!window.XMLHttpRequest||"file:"===window.location.protocol&&window.ActiveXObject?function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}:function(){return new window.XMLHttpRequest};b.params=function(a){var b=[];if(a.constructor==Array)for(var c=0;c<a.length;c++)b.push(a[c].name+"="+encodeURIComponent(a[c].value));else for(var d in a)b.push(d+"="+encodeURIComponent(a[d]));return b.join("&").replace(/%20/g,"+")},b.parseJSON=function(a){a=a.replace(/^.*?(\{|\[)/,"$1").replace(/(\]|\})[^\]\}]*$/,"$1");try{a=window.JSON&&window.JSON.parse?window.JSON.parse(a):new Function("return "+a)()}catch(b){a=!1}return a},b.ajax=function(a){function i(a){try{return!a.status&&"file:"==location.protocol||a.status>=200&&a.status<300||304===a.status||1223===a.status||0===a.status}catch(b){}return!1}function j(a,c){var e=a.getResponseHeader("content-type")||"",f="xml"===c||!c&&e&&e.indexOf("xml")>=0,g=f?a.responseXML:a.responseText;if(f&&"parsererror"===g.documentElement.tagName)throw"parsererror";return"json"===c||!c&&e.indexOf("json")>=0?g=b.parseJSON(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&d(g),g}var k={type:a.type||"GET",url:a.url||"",data:a.data||null,dataType:a.dataType,contentType:a.contentType===!1?!1:a.contentType||"application/x-www-form-urlencoded",username:a.username||null,password:a.password||null,timeout:a.timeout||0,processData:void 0===a.processData?!0:a.processData,beforeSend:a.beforeSend||null,complete:a.complete||function(){},handleError:a.handleError||function(){},success:a.success||function(){},xhrFields:a.xhrFields||null,headers:a.headers||{},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},l=k.type.toUpperCase(),m=g.test(l);k.url=k.url.replace(f,""),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=this.params(k.data)),k.data&&m&&(k.url+=(e.test(k.url)?"&":"?")+k.data,k.data=null);var n,o,p=!1,q=h();if(q){k.username?q.open(l,k.url,!0,k.username,k.password):q.open(l,k.url,!0);try{var r;if(k.xhrFields)for(r in k.xhrFields)q[r]=k.xhrFields[r];k.data&&!m&&k.contentType!==!1&&q.setRequestHeader("Content-Type",k.contentType),q.setRequestHeader("X-Requested-With","XMLHttpRequest"),q.setRequestHeader("Accept",k.dataType&&k.accepts[k.dataType]?k.accepts[k.dataType]+", */*; q=0.01":k.accepts._default);for(r in k.headers)q.setRequestHeader(r,k.headers[r])}catch(s){}k.beforeSend&&k.beforeSend(q);var t=q.onreadystatechange=function(a){if(q&&0!==q.readyState&&"abort"!==a){if(!p&&q&&(4===q.readyState||"timeout"===a)){p=!0,q.onreadystatechange=c,n="timeout"===a?"timeout":i(q)?"success":"error";var b;if("success"===n){try{o=j(q,k.dataType)}catch(d){n="parsererror",b=d}k.success(o)}else k.handleError(q,n,b);k.complete(q),"timeout"===a&&q.abort(),q=null}}else p||k.complete(q),p=!0,q&&(q.onreadystatechange=c)};try{var u=q.abort;q.abort=function(){q&&Function.prototype.call.call(u,q),t("abort")}}catch(s){}k.timeout>0&&setTimeout(function(){q&&!p&&t("timeout")},k.timeout);try{q.send(m||null==k.data?null:k.data)}catch(v){k.handleError(q,null,v),k.complete(q)}return q}}}),define("mo/network",["mo/lang","mo/network/ajax"],function(a,b){var c=this,d=1;b.getScript=function(b,c){var d=a.isWindow(this)?this.document:document,e=d.createElement("script");e.type="text/javascript",e.async="async",c?a.isFunction(c)&&(c={callback:c}):c={},c.charset&&(e.charset=c.charset),e.src=b;var f=d.getElementsByTagName("head")[0];e.onload=e.onreadystatechange=function(a,b){(b||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,f&&e.parentNode&&f.removeChild(e),e=void 0,!b&&c.callback&&c.callback())},f.insertBefore(e,f.firstChild)},b.getStyle=function(a){var b=this.document||document,c=b.createElement("link");c.setAttribute("type","text/css"),c.setAttribute("rel","stylesheet"),c.setAttribute("href",a);var d=b.getElementsByTagName("head")[0];d.appendChild(c)};var e=/https?\:\/\/(.+?)\//;return b.getJSON=function(f,g,h,i){var j=f.match(e);if((!g||a.isFunction(g))&&(i=h,h=g,g={}),h&&!(i&&i.isScript||j&&j[1]!==c.location.host))return b.ajax({url:f,data:g,success:h,error:i&&i.error,dataType:"json"}),!0;i=a.mix({charset:"utf-8",callback:"__oz_jsonp"+ ++d},i||{}),i.random&&(g[i.random]=+new Date);var k=i.callbackName||"jsoncallback";g[k]=i.callback,f=[f,/\?/.test(f)?"&":"?",b.params(g)].join(""),h&&a.ns(i.callback,h),delete i.callback,b.getScript(f,i)},b.getRequest=function(a,c){var d=new Image;d.onload=function(){d=null},d.src=c?[a,/\?/.test(a)?"&":"?","string"==typeof c?c:b.params(c)].join(""):a},b.httpParam=b.params,b}),define("cardkit/ui/util",["mo/lang","dollar","mo/network"],function(a,b,c){var d={flag:"_ckViewUid",forceOptions:{},defaultOptions:{},customOptions:{},config:function(){},extend:function(){}},e={singleton:function(c){function e(d,h){var i=d;"object"==typeof d?(d=b(d),i=d[0][c.flag]):d=!1;var j=i&&g[i];return j?h&&c.config(j,h):(d&&(i=d[0][c.flag]=++f),h=a.merge(a.mix(h||{},e.forceOptions,c.forceOptions),c.defaultOptions,e.defaultOptions),j=g[i]=c.factory(d,h),a.merge(j._config,a.merge(a.interset(h,c.customOptions),c.customOptions)),c.extend(j,d)),j}var f=0,g={};return c=a.merge(c,d),e.forceOptions={},e.defaultOptions={},e.gc=function(a){for(var b in g)a(g[b])&&delete g[b]},e},request:function(a){var b=a.config,d=b.jsonUrl||b.url;if(d){var e;d=d.replace(/\?(.+)$/,function(a,b){return e=b.replace(/#.*/,""),""}),c.ajax({url:d,data:e,type:b.method||"post",dataType:b.jsonUrl?"json":"text",beforeSend:a.before,handleError:a.callback,success:a.callback})}else a.callback()}};return e}),define("moui/control",["mo/lang","dollar","eventmaster"],function(a,b,c){function d(a,b){this.init(a,b),this.set(this._config)}function e(a){if(!a.innerHTML){if(a.innerHTML=" ",!a.innerHTML)return!0;a.innerHTML=""}return!1}function f(a,b){return new f.Control(a,b)}var g={field:null,label:null,numField:null,numStep:1,enableVal:1,disableVal:0,enableLabel:"",disableLabel:"",loadingLabel:"Loading..."};return d.prototype={_defaults:g,init:function(d,f){this.event=c();var g=this._node=b(d);g.hasClass("enabled")&&(this.isEnabled=!0),this._numField=[],f=a.mix({field:g,label:g},this.data(),f),this.setNodes(f),this._label[0]&&(this._isLabelClose=e(this._label[0])),this._numField[0]&&(this._isNumFieldClose=e(this._numField[0])),void 0===f.enableVal&&(f.enableVal=this.val()),void 0===f.enableLabel&&(f.enableLabel=this.label()),void 0===f.disableVal&&(f.disableVal=this.val()),void 0===f.disableLabel&&(f.disableLabel=this.label()),this._disableAttrs={},this._enableAttrs={},a.each(f,function(a,b){var c;(c=/^enableAttr([A-Z]\w*)/.exec(b))?(c=c[1].toLowerCase(),this._disableAttrs[c]=g.attr(c),this._enableAttrs[c]||(this._enableAttrs[c]=a)):(c=/^disableAttr([A-Z]\w*)/.exec(b))&&(c=c[1].toLowerCase(),this._enableAttrs[c]=g.attr(c),this._disableAttrs[c]||(this._disableAttrs[c]=a))},this),this._config=a.config({},f,this._defaults)},set:function(b){return b?(a.mix(this._config,b),this.setNodes(b),this):this},setNodes:function(a){return void 0!==a.field&&(this._field=a.field?b(a.field,"string"==typeof a.field&&this._node).eq(0):[]),void 0!==a.label&&(this._label=a.label?b(a.label,"string"==typeof a.label&&this._node).eq(0):[]),void 0!==a.numField&&(this._numField=a.numField?b(a.numField,"string"==typeof a.numField&&this._node).eq(0):[]),this},val:function(){var a=this._field;if(a[0]){var b,c=[].slice.call(arguments);return"A"===a[0].nodeName?(c.unshift("href"),b=a.attr.apply(a,c),b===a?a[0].href:b):(b=a.val.apply(a,c),b===a?a.val():b)}},label:function(){var a=this._label;if(a[0]){var b=[].slice.call(arguments),c=this._isLabelClose?"val":"html",d=a[c].apply(a,b);return d===a?a[c]():d}},num:function(a){var b=this._numField;if(b[0]){var c=[],d=this._isNumFieldClose?"val":"html";null!=a&&c.push(parseFloat(b[d]())+a);var e=b[d].apply(b,c);return e===b?b[d]():e}},data:function(){return this._node.data()},showLoading:function(){return this._node.addClass("loading"),this.label(this._config.loadingLabel),this},hideLoading:function(){return this._node.removeClass("loading"),this},toggle:function(){return this.isEnabled?this.disable():this.enable(),this},enable:function(){return this.isEnabled?this:(this.isEnabled=!0,this._node.addClass("enabled"),this.val(this._config.enableVal),this.num(this._config.numStep),this._config.enableLabel&&this.label(this._config.enableLabel),a.each(this._enableAttrs,function(a,b){this._node.attr(b,a)},this),this.event.reset("disable").resolve("enable",[this]),this)},disable:function(){return this.isEnabled?(this.isEnabled=!1,this._node.removeClass("enabled"),this.val(this._config.disableVal),this.num(0-this._config.numStep),this._config.disableLabel&&this.label(this._config.disableLabel),a.each(this._disableAttrs,function(a,b){this._node.attr(b,a)},this),this.event.reset("enable").resolve("disable",[this]),this):this}},f.Control=d,f}),define("moui/picker",["mo/lang","dollar","eventmaster","moui/control"],function(a,b,c,d){function e(a,b){this.init(a,b),this.set(this._config)}function f(a){h.call(this,"enable",a),this.event.fire("change",[this,a])}function g(a){h.call(this,"disable",a),this.event.fire("change",[this,a])}function h(a,b){if("enable"===a)if(this._config.ignoreStatus||(this._unwatchEnable(b),this._watchDisable(b)),this._config.multiselect)this._allSelected.push(b);else{var c=this._lastSelected;this._lastSelected=b,c&&(this._unwatchDisable(c),c.disable(),this._watchEnable(c))}else if(this._config.ignoreStatus||(this._unwatchDisable(b),this._watchEnable(b)),this._config.multiselect){var d=this._allSelected.indexOf(b);-1!==d&&this._allSelected.splice(d,1)}else{if(b&&this._lastSelected!==b)return;this._lastSelected=null}this._field[0]&&this._field.val(this.val())}function i(a,b){return new i.Picker(a,b)}var j="_moPickerOid",k={field:'input[type="hidden"]',options:".option",ignoreRepeat:!1,ignoreStatus:!1,multiselect:!1};return e.prototype={_defaults:k,init:function(d,e){return this._uoid=0,this.event=c(),this._node=b(d),this._options=[],e=a.mix({},this.data(),e),this._config=a.config({},e,this._defaults),this},set:function(c){return c?(a.mix(this._config,c),void 0!==c.multiselect&&(c.multiselect?this._allSelected||(this._allSelected=[]):(this._allSelected=null,this._lastSelected=null)),void 0!==c.field&&(this._field=c.field?b(c.field,"string"==typeof c.field&&this._node).eq(0):[]),c.options&&(this._options.forEach(this.removeOption,this),b(c.options,this._node).forEach(this.addOption,this)),this):this},_watchEnable:function(a){a._pickerEnableWatcher=f.bind(this),a.event.bind("enable",a._pickerEnableWatcher)},_watchDisable:function(a){a._pickerDisableWatcher=g.bind(this),a.event.bind("disable",a._pickerDisableWatcher)},_unwatchEnable:function(a){a.event.unbind("enable",a._pickerEnableWatcher)},_unwatchDisable:function(a){a.event.unbind("disable",a._pickerDisableWatcher)},addOption:function(a){if(a=b(a)[0],a[j]||1!==a.nodeType)return this;a[j]=++this._uoid;var c=d(a,{enableVal:a.value,label:!1});return this._watchEnable(c),this._options.push(c),c.isEnabled&&h.call(this,"enable",c),this},removeOption:function(a){var b;return a.constructor===d.Control?(b=a,a=a._node[0]):b=this.getOption(a),this.unselect(a),b&&this._options.splice(this._options.indexOf(b),1),this},getOption:function(a){if("number"==typeof a)a=this._options[a];else if("string"==typeof a)a=this._options.filter(function(b){return b.val()===a})[0];else{var c=b(a)[0][j];if(!c)return null;a=this._options.filter(function(a){return a._node[0][j]===c})[0]}return a},getOptions:function(){return this._options},getSelected:function(){return this._config.multiselect?this._allSelected||[]:this._lastSelected?[this._lastSelected]:[]},getSelectedData:function(){var a=this.getSelected().map(function(a){return a.data()});return this._config.multiselect?a:a[0]},val:function(){var a=this.getSelected().map(function(a){return a.val()});return this._config.multiselect?a:a[0]},data:function(){return this._node.data()},showLoading:function(){return this._node.addClass("loading"),this},hideLoading:function(){return this._node.removeClass("loading"),this},undo:function(){return this._lastActionTarget&&this._lastActionTarget.toggle(),this},selectAll:function(){return this._config.multiselect&&(this._options.forEach(function(a){a.isEnabled||(this._unwatchEnable(a),a.enable(),h.call(this,"enable",a))},this),this.event.fire("change",[this,this._options[0]])),this._lastActionTarget=null,this},unselectAll:function(){return this._config.multiselect?(this._options.forEach(function(a){a.isEnabled&&(this._unwatchDisable(a),a.disable(),h.call(this,"disable",a))},this),this._lastActionTarget=null,this.event.fire("change",[this,this._options[0]])):this.undo(),this},selectInvert:function(){return this._config.multiselect&&(this._options.forEach(function(a){a.isEnabled?(this._unwatchDisable(a),a.toggle(),h.call(this,"disable",a)):(this._unwatchEnable(a),a.toggle(),h.call(this,"enable",a))},this),this.event.fire("change",[this,this._options[0]])),this._lastActionTarget=null,this},select:function(a){var b=this.getOption(a);if(b)if(!this._config.multiselect&&this._config.ignoreStatus)h.call(this,"enable",b),this.event.fire("change",[this,b]);else{if((this._config.multiselect&&-1!==this._allSelected.indexOf(b)||!this._config.multiselect&&this._lastSelected===b)&&!this._config.ignoreRepeat)return this.unselect(a);this._lastActionTarget=b.enable()}return this},unselect:function(a){if(a){var b=this.getOption(a);b&&(this._lastActionTarget=b.disable())}else this.unselectAll();return this}},i.Picker=e,i}),define("moui/actionview",["dollar","mo/lang","mo/template/string","moui/overlay","moui/picker"],function(a,b,c,d,e){function f(a){return new f.ActionView(a)}var g=b.mix,h="mouiActionView",i='<div id="{{id}}" class="{{cname}}"> <div class="shd"></div> <div class="wrapper"> <div class="content"> <header><h1></h1></header> <div class="desc"></div> <article></article> </div> </div> <footer> <span class="cancel"></span> <span class="confirm" data-is-default="true"></span> </footer> </div>',j={className:"moui-actionview",closeDelay:500,confirmText:"OK",cancelText:"Cancel",options:null,multiselect:!1},k=b.construct(d.Overlay);return g(k.prototype,{_ns:h,_template:i,_defaults:b.mix({},k.prototype._defaults,j),init:function(a){return this.superMethod("init",[a]),this._wrapper=this._node.find(".wrapper").eq(0),this._actionsWrapper=this._content,this._content=this._wrapper.find(".desc").eq(0),this._footer=this._node.find("footer").eq(-1),this._confirmBtn=this._footer.find(".confirm"),this._cancelBtn=this._footer.find(".cancel"),this},set:function(b){if(!b)return this;if(this.superMethod("set",[b]),void 0!==b.options){this._actionsWrapper.empty();var c=b.options?a(b.options).clone():[];c.length?(this._actionsWrapper.append(c),this._picker=e(this._actionsWrapper,{options:c,multiselect:this._config.multiselect,ignoreStatus:!this._config.multiselect}),this._node.removeClass("confirm-kind")):this._node.addClass("confirm-kind")}return void 0!==b.multiselect&&(b.multiselect?this._footer.addClass("multi"):this._footer.removeClass("multi")),b.confirmText&&this._confirmBtn.html(b.confirmText),b.cancelText&&this._cancelBtn.html(b.cancelText),this},val:function(){return this._picker?this._picker.val():void 0},data:function(){return this._picker?this._picker.getSelectedData():void 0},confirm:function(){return this.event.fire("confirm",[this,this._picker]),this.ok()},cancel:function(){return this.event.fire("cancel",[this,this.picker]),this.ok()},ok:function(){return this.close(),this.event.promise("close")},applyOpen:function(){if(!this._config.multiselect&&this._picker){var a=this;this._picker.event.once("change",function(){a.confirm()})}return this.superMethod("applyOpen",arguments)},applyClose:function(){return!this._config.multiselect&&this._picker&&this._picker.event.reset(),this.superMethod("applyClose",arguments)}}),k.prototype.done=k.prototype.ok,["select","unselect","undo","selectAll","unselectAll","selectInvert"].forEach(function(a){this[a]=function(){return this._picker[a].apply(this._picker,arguments)}},k.prototype),f.ActionView=k,f}),define("cardkit/ui/actionview",["moui/actionview","cardkit/bus","cardkit/ui/util"],function(a,b,c){var d=c.singleton({flag:"_ckActionViewUid",forceOptions:{className:"ck-actionview"},factory:function(b,c){return a(c)},config:function(a,b){a.set(b)},extend:function(a,c){var e={component:a};a.event.bind("prepareOpen",function(a){d.current=a}).bind("cancelOpen",function(){d.current=null}).bind("open",function(a){b.fire("actionView:open",[a]),c&&c.trigger("actionView:open",e)}).bind("close",function(){d.current=null,b.unbind("actionView:confirmOnThis"),b.fire("actionView:close",[a]),c&&c.trigger("actionView:close",e)}).bind("cancel",function(){b.fire("actionView:cancel",[a]),c&&c.trigger("actionView:cancel",e)}).bind("confirm",function(a,d){if(b.fire("actionView:confirmOnThis",[a]).fire("actionView:confirm",[a]),c&&c.trigger("actionView:confirm",e),d&&d._lastSelected){var f=d._lastSelected._node[0];"A"===f.nodeName&&b.fire("actionView:jump",[a,f.href,f.target])}})}});return d}),define("moui/modalview",["dollar","mo/lang","mo/template/string","moui/overlay"],function(a,b,c,d){function e(a){return new e.ModalView(a)}var f=b.mix,g="mouiModalView",h='<div id="{{id}}" class="{{cname}}"> <div class="shd"></div> <div class="wrapper"> <header> <button type="button" class="confirm" data-fluid="true" data-is-default="true"></button> <button type="button" class="cancel" data-fluid="true"></button> <h1></h1> </header> <article><div class="content"></div></article> </div> </div>',i={className:"moui-modalview",iframe:!1,hideConfirm:!1,confirmText:"OK",cancelText:"Cancel"},j=b.construct(d.Overlay);return f(j.prototype,{_ns:g,_template:h,_defaults:b.mix({},j.prototype._defaults,i),init:function(a){return this.superMethod("init",[a]),this._wrapper=this._node.find(".wrapper").eq(0),this._contentWrapper=this._wrapper.find("article").eq(0),this._content=this._contentWrapper.find(".content").eq(0),this._confirmBtn=this._header.find(".confirm"),this._cancelBtn=this._header.find(".cancel"),this},set:function(a){if(!a)return this;var b=this;return b.superMethod("set",[a]),void 0!==a.content?b._config.iframe=null:a.iframe&&b._setIframeContent(a),void 0!==a.hideConfirm&&(a.hideConfirm?this._confirmBtn.hide():this._confirmBtn.show()),a.confirmText&&this._confirmBtn.html(a.confirmText),a.cancelText&&this._cancelBtn.html(a.cancelText),b},setContent:function(a){return this.event.fire("willUpdateContent",[this]),this.superMethod("setContent",[a]),this.event.fire("updateContent",[this]),this},_setIframeContent:function(){var b=this;this._clearIframeContent(),b.setContent(""),b.showLoading(),b._iframeContent=a('<iframe class="moui-modalview-iframebd" frameborder="0" scrolling="no" style="visibility:hidden;width:100%;"></iframe>').bind("load",function(){try{if(!this.contentWindow.document.body.innerHTML)return;if(b._iframeWindow=a(this.contentWindow),!b._iframeContent&&b._iframeWindow[0].location.href!==b._config.iframe)return;b._iframeContent[0].style.visibility="",b.event.resolve("frameOnload",[b]),b.hideLoading()}catch(c){}}).appendTo(b._content)},_clearIframeContent:function(){this._iframeContent&&(this._iframeContent.remove(),this._iframeContent=null),this.event.reset("frameOnload")},confirm:function(){return this.event.fire("confirm",[this]),this},cancel:function(){return this.event.fire("cancel",[this]),this.ok(),this},ok:function(){return this.close(),this.event.promise("close")},applyOpen:function(){var a=this.superMethod("applyOpen",arguments);return this._config.iframe&&this._iframeContent.attr("src",this._config.iframe),a},applyClose:function(){return this._clearIframeContent(),this._contentWrapper[0].scrollTop=0,this.superMethod("applyClose",arguments)},beforeClose:function(){this.setContent("")}}),j.prototype.done=j.prototype.ok,e.ModalView=j,e}),define("cardkit/ui/modalview",["mo/lang","dollar","moui/modalview"],function(a,b,c){function d(a){return e||(e=new d.ModalView(a)),e}var e,f={className:"ck-modalview",openDelay:400,closeDelay:400,oldStylePage:!1,contentFilter:!1},g={"text/modalview-javascript":1,"text/cardscript":1,"text/jscode":1},h=a.construct(c.ModalView);return a.mix(h.prototype,{_defaults:a.mix({},h.prototype._defaults,f),init:function(){return this.superMethod("init",arguments),this.event.bind("confirm",function(a){a.event.fire("confirmOnThis",arguments)}).bind("close",function(a){a.event.unbind("confirmOnThis")}),this},set:function(a){if(!a)return this;a.iframeUrl&&(a.iframe=a.iframeUrl),a.source&&(a.content=b("."+a.source).map(function(a){var c=b(a).attr("type");return g[c]?'<script type="text/darkscript">'+a.innerHTML+"</script>":a.innerHTML}).join(""));var c=this.superMethod("set",[a]);return this.pageNode()[0]||this._content.append(this.wrapPageContent("<div></div>")),c},setContent:function(a){if(a){var b=this._config.contentFilter;b&&(a=(new RegExp(b).exec(a)||[])[1]),a=this.wrapPageContent(a)}return this.superMethod("setContent",[a])},pageNode:function(){return this._content.find(".ck-modal-page")},wrapPageContent:function(a){var b=this._config.oldStylePage,c=b?'<div class="ckd-page-card ck-modal-page" data-cfg-deck="modalview" id="ckPage-'+this.id+'">':'<ck-card type="page" class="ck-modal-page" deck="modalview" id="ckPageOld-'+this.id+'">',d=b?"</div>":"</ck-card>";return c+a+d}}),d.ModalView=h,d}),define("moui/ranger",["mo/lang","dollar","eventmaster"],function(a,b,c){function d(a,b){this.init(a,b),this.set(this._config)}function e(a,b){return new e.Ranger(a,b)}var f={max:100,min:0,step:1};return d.prototype={_defaults:f,init:function(d,e){this.event=c();var f=this._node=b(d);return e=a.mix({max:f.attr("max")||void 0,min:f.attr("min")||void 0,step:f.attr("step")||void 0},this.data(),e),this._config=a.config({},e,this._defaults),this.val(f.val()),this},set:function(b){return b?(a.config(this._config,b,this._defaults),this):this},data:function(){return this._node.data()},val:function(a){if(void 0!==a){var b=this._config.step.toString().replace(/.*\./,"").length;a=Math.floor(a*Math.pow(10,b))/Math.pow(10,b),this._value=a,this.event.fire("change",[this.val(),this])}return this._value},progress:function(a){if(void 0!==a){var b=this._config;if(0==a)this.val(b.min);else if(1==a)this.val(b.max);else{var c=(b.max-b.min)*a+parseFloat(b.min);c=Math.round(c/b.step)*b.step,this.val(c)}}return this.val()},changeStart:function(){this._originValue=this._value,this.event.fire("changeStart",[this])},changeEnd:function(){this.event.fire("changeEnd",[this]),this._originValue!=this._value&&this.event.fire("changed",[this])}},e.Ranger=d,e}),define("cardkit/ui/ranger",["moui/ranger","cardkit/bus","cardkit/ui/growl","cardkit/ui/util"],function(a,b,c,d){return d.singleton({flag:"_ckRangerUid",customOptions:{enableNotify:!0},factory:function(b,c){return a(b,c)},config:function(a,b){a.set(b)},extend:function(a,d){a.notify=a._config.enableNotify?c({parent:d.parent(),corner:"stick"}):null,a.event.bind("change",function(b){a.notify&&a.notify.set({content:b}).open()}).bind("changed",function(){var c=d.trigger("ranger:changed",{component:a}).data("url");b.fire("ranger:changed",[a,c])}).bind("changeEnd",function(){a.notify&&a.notify.close()})}})}),define("cardkit/ui/picker",["mo/lang","moui/picker","cardkit/ui/util"],function(a,b,c){return a.mix(b.Picker.prototype._defaults,{disableRequest:!1}),c.singleton({flag:"_ckPickerUid",factory:function(a,c){return b(a,c)},defaultOptions:{options:".ck-option"},config:function(a,b){a.set(b)},extend:function(a,b){a.event.bind("change",function(a,d){var e,f=d.data(),g={component:a};a._config.disableRequest||(a.showLoading(),e=d.isEnabled?{method:f.enableMethod,url:f.enableUrl,jsonUrl:f.enableJsonUrl}:{method:f.disableMethod,url:f.disableUrl,jsonUrl:f.disableJsonUrl},c.request({config:e,callback:function(c,d){a.hideLoading(),"success"===d&&(a.responseData=c,b.trigger("picker:response",g))}})),b.trigger("picker:change",g)})}})}),define("cardkit/ui/control",["mo/lang","moui/control","cardkit/ui/util"],function(a,b,c){var d={disableRequest:!1,enableUrl:"",enableJsonUrl:"",enableMethod:"post",disableUrl:"",disableJsonUrl:"",disableMethod:"post"},e=a.construct(b.Control);a.mix(e.prototype,{_defaults:a.mix({},e.prototype._defaults,d),enable:function(){var a=this._config;return this.request({method:a.enableMethod,url:a.enableUrl,jsonUrl:a.enableJsonUrl},function(){this.superClass.enable.call(this)})},disable:function(){var a=this._config;return this.request({method:a.disableMethod,url:a.disableUrl,jsonUrl:a.disableJsonUrl},function(){this.superClass.disable.call(this)})},request:function(a,b){var d=this,e=function(a,c){"success"===c&&(d.responseData=a),d.hideLoading(),b.call(d)};return this._config.disableRequest?e():c.request({config:a,before:function(){d.showLoading()},callback:e}),this}});var f=c.singleton({flag:"_ckControlUid",factory:function(a,b){return new f.Control(a,b)},config:function(a,b){a.set(b)},extend:function(a,b){a.event.bind("enable",function(a){b.trigger("control:enable",{component:a})}).bind("disable",function(a){b.trigger("control:disable",{component:a})})}});return f.Control=e,f}),define("momo/base",["mo/lang/es5","mo/lang/type","mo/lang/mix"],function(a,b,c){function d(a,b,c){(!b||g(b))&&(c=b,b={}),this._listener=c;var d=c&&++h;this.event={},this.EVENTS.forEach(function(a){this[a]=a+(c?"_"+d:"")},this.event),this.node=a,this._config={event:this.EVENTS[0]},this.config(b),this.enable()}function e(){return this}function f(a,b,c){return new f.Class(a,b,c)}var g=b.isFunction,h=0,i=!1;try{document.createEvent("TouchEvent"),i=!0}catch(j){}return d.prototype={SUPPORT_TOUCH:i,PRESS:i?"touchstart":"mousedown",MOVE:i?"touchmove":"mousemove",RELEASE:i?"touchend":"mouseup",CANCEL:"touchcancel",EVENTS:[],DEFAULT_CONFIG:{namespace:""},config:function(a){var b=this._config.namespace;c.merge(c.mix(this._config,a),this.DEFAULT_CONFIG);var d=this._config.namespace||"";return this.EVENTS.forEach(function(a){this[a]=this[a].replace(b||/^/,d)},this.event),this},enable:function(){var a=this;return a.bind(a.PRESS,a._press||(a._press=function(b){return a.press.call(a,b.originalEvent||b)})).bind(a.MOVE,a._move||(a._move=function(b){return a.move.call(a,b.originalEvent||b)})).bind(a.CANCEL,a._cancel||(a._cancel=function(b){return a.cancel.call(a,b.originalEvent||b)})).bind(a.RELEASE,a._release||(a._release=function(b){return a.release.call(a,b.originalEvent||b)})),a._listener&&a.bind(this.event[this._config.event],a._handler||(a._handler=function(b){return a._listener.call(a,b.originalEvent||b)})),a},disable:function(){var a=this;return a.unbind(a.PRESS,a._press).unbind(a.MOVE,a._move).unbind(a.CANCEL,a._cancel).unbind(a.RELEASE,a._release),a._listener&&a._handler&&a.unbind(this.event[this._config.event],a._handler),a},once:function(a,b,c){function d(f){return e.unbind(a,d,c),b.call(this,f.originalEvent||f)}var e=this;this.bind(a,d,c)},bind:e,unbind:e,trigger:e,press:e,move:e,release:e,cancel:e},f.Class=d,f}),define("momo/tap",["mo/lang","momo/base"],function(a,b){function c(a){return a._moveTarget&&a._moveTarget!==a._startTarget||Math.abs(a._movePosX-a._startPosX)>a._config.tapRadius||Math.abs(a._movePosY-a._startPosY)>a._config.tapRadius?!0:void 0
}function d(){}function e(a,b,c){return new e.Class(a,b,c)}var f=a.construct(b.Class);return a.mix(f.prototype,{EVENTS:["tap","doubletap","hold","tapstart","tapcancel"],DEFAULT_CONFIG:{tapRadius:10,doubleTimeout:300,tapThreshold:0,holdThreshold:500},press:function(a){var b=this,e=b.SUPPORT_TOUCH?a.touches[0]:a;b._startTime=a.timeStamp,b._startTarget=e.target,b._startPosX=e.clientX,b._startPosY=e.clientY,b._movePosX=b._movePosY=b._moveTarget=0/0,b._started=!1,b._pressTrigger=function(){b._started=!0,b.trigger(a,b.event.tapstart),b._pressTrigger=d},b._activeTimer=setTimeout(function(){c(b)||b._pressTrigger()},b._config.tapThreshold)},move:function(a){var b=this.SUPPORT_TOUCH?a.touches[0]:a;this._moveTarget=b.target,this._movePosX=b.clientX,this._movePosY=b.clientY},release:function(a){var b=this,d=a.timeStamp,e=c(b);return clearTimeout(b._activeTimer),e||d-b._startTime<b._config.tapThreshold?(e||(b._firstTap=d),void(b._started&&b.trigger(a,b.event.tapcancel))):(b._started||b._pressTrigger(),void(d-b._startTime>b._config.holdThreshold+b._config.tapThreshold?b.trigger(a,b.event.hold):b._firstTap&&d-b._firstTap<b._config.doubleTimeout?(a.preventDefault(),b.trigger(a,b.event.doubletap),b._firstTap=0):(b.trigger(a,b.event.tap),b._firstTap=d)))},cancel:function(a){clearTimeout(this._activeTimer),this._started&&this.trigger(a,this.event.tapcancel)}}),e.Class=f,e}),define("soviet",["mo/lang/es5","mo/lang/mix","mo/lang/type","mo/lang/struct","dollar"],function(a,b,c,d,e){function f(a,c){b.config(this,c||{},p),this.target=e(a),this.events={},this.locks={},this.traceStack||(this.traceStack=[])}function g(a,b,c){var d;return a&&(this.trace&&(this.traceStack.unshift("<"+b.nodeName+"#"+(b.id||"")+">."+(b.className||"").split(/\s+/).join(".")),this.traceStack.length>this.trace&&this.traceStack.pop()),d=a.call(b,c),this.preventDefault&&!d&&c.preventDefault()),d}function h(a,b,c,d){var e=a[b];d?a[b]=c:c&&(e||(e=a[b]=m()),e.push(c))}function i(a,b,c,d){var e=a[b];!c||d?delete a[b]:e&&e.clear(c)}function j(a,b){return a[b]}function k(a){return this.locks[a]=this.matchesSelector?{}:{".":{},"#":{},"&":{}}}function l(a,b,c,d,e){if(void 0===e&&(e=this.autoOverride),b){if(!this.matchesSelector){var f=(/^[\.#]/.exec(b)||["&"])[0];b=b.substr("&"!==f?1:0),a=a[f],"."===f&&(b=b.split(".").join(" "))}}else b="_self_";return d(a,b,c,e)}var m=d.fnQueue,n=c.isFunction,o=e.find.matchesSelector,p={preventDefault:!1,matchesSelector:!1,autoOverride:!1,aliasEvents:{},trace:!1,traceStack:null};f.prototype={on:function(a,b,c){if(n(b)&&(c=b,b=void 0),"object"==typeof b)for(var d in b)this.on(a,d,b[d]);else{a=this.aliasEvents[a]||a;var e=this.events[a];e||(this.target.bind(a,this.trigger.bind(this)),this.reset(a),e=this.events[a]),l.call(this,e,b,c,h)}return this},off:function(a,b,c){n(b)&&(c=b,b=void 0),a=this.aliasEvents[a]||a;var d=this.events[a];return d&&l.call(this,d,b,c,i),this},matches:function(a,b){a=this.aliasEvents[a]||a;var c=this.events[a];return l.call(this,c,b,null,j)},reset:function(a){return a?(a=this.aliasEvents[a]||a,this.events[a]=this.matchesSelector?{}:{".":{},"#":{},"&":{}},k.call(this,a)):(this.events={},this.locks={}),this},disable:function(a,b){var c=this.locks;if(a){a=this.aliasEvents[a]||a;var d=c[a];d||(d=k.call(this,a)),b?l.call(this,d,b,!0,h,!0):d._disable=!0}else this._global_lock=!0;return this},enable:function(a,b){var c=this.locks;if(a){a=this.aliasEvents[a]||a;var d=c[a];d&&(b?l.call(this,d,b,null,i,!0):delete d._disable)}else delete this._global_lock;return this},trigger:function(a){var b=this.aliasEvents[a.type];b&&(a.type=b);var c,d=this,e=a.target,f=this.locks[a.type]||{},h=this.events[a.type];if(!h||this._global_lock||f._disable)return c;if(this.matchesSelector)Object.keys(h).forEach(function(b){!f[b]&&o(this,b)&&(c=g.call(d,h[b],this,a))},e);else{var i,j,k=(i="#")&&(j=e.id)&&h[i][j]||(i=".")&&(j=e.className)&&h[i][j]||(i="&")&&(j=e.nodeName.toLowerCase())&&h[i][j]||null;if(k){var l=f[i][j];l||(c=g.call(this,k,e,a))}}return h._self_&&(c=g.call(this,h._self_,e,a)),c}};var q=function(a,b){return new q.Soviet(a,b)};return q.Soviet=f,q}),define("cardkit/ui",["mo/lang","dollar","mo/browsers","mo/template","mo/network","soviet","momo/base","momo/tap","cardkit/ui/control","cardkit/ui/picker","cardkit/ui/ranger","cardkit/ui/modalview","cardkit/ui/actionview","cardkit/ui/growl","cardkit/supports","cardkit/bus"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(){var a=i(this),b=a.data();b.disableUrl||b.disableJsonUrl?a.toggle():a.isEnabled||a.enable()}function r(){i(this).toggle()}function s(){return b(this).hasClass("ck-post-button")?void q.call(this):s.call(this.parentNode)}function t(){return b(this).hasClass("ck-switch")?void r.call(this):t.call(this.parentNode)}function u(c){var d=a.mix({confirmText:"确认",cancelText:"取消",multiselect:!1},c.data());return d.options=b(d.options||".ck-option",c),m(c,d).open()}function v(a){for(var c in a)b.Event.aliases[c]=A[c]="ck_"+a[c]}function w(){}var x,y=document,z=l(),A={},B={aliasEvents:A,autoOverride:!0,matchesSelector:!0,preventDefault:!0},C=f(y,B),D=a.construct(f.Soviet);D.prototype.on=function(a,b,c){return"string"!=typeof b||/dd-autogen/.test(b)||(b="[dd-autogen] "+b),this.superMethod("on",[a,b,c])};var E=a.construct(f.Soviet);E.prototype.on=function(a,b,c){return"string"!=typeof b||/dd-connect/.test(b)||(b="[dd-connect] "+b),this.superMethod("on",[a,b,c])},a.mix(g.Class.prototype,{bind:function(a,c,d){return b(d||this.node).bind(a,c),this},unbind:function(a,c,d){return b(d||this.node).unbind(a,c),this},trigger:function(a,c){return delete a.layerX,delete a.layerY,delete a.returnValue,b(a.target).trigger(c,a),this}});var F={".ck-link, .ck-link *":function(){H.openLink(this)},".ck-link-direct, .ck-link-direct *":function(){H.openLink(this)},".ck-link-extern, ck-link-extern *":function(){H.openLink(this,{target:this.target||"_blank"})},".ck-link-img":function(){H.openImage(this.href)},".ck-post-link":q,".ck-post-button, .ck-post-button span":s,".ck-folder header":function(){i(this.parentNode).toggle()},".ck-switch, .ck-switch span":t,".ck-segment .ck-option, .ck-segment .ck-option span":function(){var a=b(this);a.hasClass("ck-option")||(a=a.closest(".ck-option"));var c=j(a.parent());c.select(a)},".ck-select, .ck-select span, .ck-select .enabled":function(){var a=b(this);a.hasClass("ck-select")||(a=a.parent());var c=j(a);u(a),p.on("actionView:confirmOnThis",function(b){H.updatePicker(c,b.val()),a.trigger("selector:change",{component:c})})},".ck-tagselector .ck-option":function(){var a=j(this.parentNode);a.select(this)},".ck-actions .ck-option":function(){var a=b(this).closest(".ck-actions"),c=j(a,{ignoreStatus:"false"!==a.data("ignoreStatus")&&!0});c.select(this)},".ck-actions-button, .ck-actions-button span":function(){var a=b(this);a.hasClass("ck-actions-button")||(a=a.parent()),u(a)},".ck-modal-button, .ck-modal-button *":function(){var a=b(this);a.hasClass("ck-modal-button")||(a=a.closest(".ck-modal-button")),H.openModal(a.data())},".ck-modal-link, .ck-modal-link *":function(){var a=b(this);a.hasClass("ck-modal-link")||(a=a.closest(".ck-modal-link")),H.openModal(a.data())},".ck-modalview .wrapper > header .confirm":function(){z.confirm()},".ck-modalview .wrapper > header .cancel":function(){z.cancel()},".ck-actionview .ck-option, .ck-actionview .ck-option > *":function(){var a=b(this);a.hasClass("ck-option")||(a=a.parent()),m.current.select(a)},".ck-actionview > footer .confirm":function(){m.current.confirm()},".ck-actionview > footer .cancel":function(){m.current.cancel()},".ck-top-overflow":function(){u(b(this))},".ck-confirm-link":function(){var a=this;a.href||(a=a.parentNode),H.confirm("",function(){H.openLink(a.href,a.target)},b(a).data())},".ck-growl-button":function(){n(this).open()}};p.on("ranger:changed",function(a,b){b&&H.openLink(d.format(b,{value:a.val()}))}),p.on("actionView:jump",function(a,b,c){H.openLink(b,{target:c})});var G={control:i,picker:j,ranger:k,modalCard:z,modalView:l,actionView:m,growl:n},H={alert:function(b,c){return m("ckAlert",a.mix({title:"提示",content:b||"",cancelText:"关闭",multiselect:!1},c)).open()},confirm:function(b,c,d){var e=m("ckAlert",a.mix({title:"提示",content:b||"",confirmText:"确认",cancelText:"取消",multiselect:!0},d)).open();return p.on("actionView:confirmOnThis",c),e},openModal:function(a){function b(b){c===x&&(a.jsonUrl&&(b=b.html),a.content=b,H.hideLoading(),z.set(a).open())}var c=+new Date,d=a.jsonUrl||a.url;d?(H.showLoading(),x=c,a.jsonUrl?e.getJSON(d,b):a.url&&e.ajax({url:d,success:b})):z.set(a).open()},closeModal:function(){return x=0,z.cancel(),z.event.promise("close")},openImage:function(a){H.openLink(a,{target:"_blank"})},notify:function(b,c){return n(a.mix({content:b},c)).open()},showLoading:function(a){this.loadingTips||(this.loadingTips=n({expires:-1,keepalive:!0,corner:"center"})),this.loadingTips.set({content:a||"加载中..."}).open(),this._loadingStart=+new Date},hideLoading:function(b){b=a.mix({duration:800},b);var c=+new Date-this._loadingStart;c<b.duration?setTimeout(function(){H.hideLoading(b)},b.duration-c):this.loadingTips&&this.loadingTips.close()},updatePicker:function(b,c){if(Array.isArray(c)){var d=b.val();a.each(d,function(a){this[a]||b.unselect(a)},a.index(c)),a.each(c,function(a){this[a]||b.select(a)},a.index(d))}else b.select(c)},openLink:function(a,b){if(b=b||{},"string"!=typeof a){var c=a;a=c.href,b.target=b.target||c.target}b.target&&"_self"!==b.target?window.open(a,b.target):location.href=a}},I={init:function(a){a=a||{};var c=b(a.appWrapper);m.forceOptions.parent=c,n.defaultOptions.parent=c,z.set({oldStylePage:a.oldStyle,parent:c});var d=h(y);v(d.event);var e={};Object.keys(F).forEach(function(a){this[a]=w},e),C.on("tap",F).on("click",e),this.brightDelegate.on("change",{".ck-ranger":function(a){return k(this).val(a.target.value),!0}}).on("touchstart",{".ck-ranger":function(a){return k(this).val(a.target.value),k(this).changeStart(),!0}}).on("touchend",{".ck-ranger":function(){return k(this).changeEnd(),!0}})},brightDelegate:new D(y,B),darkDelegate:new E(y,B),action:H,component:G};return I}),define("darkdom",["mo/lang/es5","mo/lang/mix","dollar"],function(a,b,c){function d(){}function e(a){a=a||{},this._config=b.config({},a,K),this._stateGetters=b.copy(L),this._stateSetters=b.copy(L),this._components={},this._contents={},this._updaters={},this._events={},this.set(this._config)}function f(a){this._stateGetters=Object.create(a.stateGetters),this._stateSetters=Object.create(a.stateSetters),this._options=a.options,this._config=a,this._darkRoots=[],this._specs={},this._buffer=[],this._events={},this._sourceGuard=null}function g(a){b.each(d.prototype,function(a,c){this[c]=function(){var d;return b.each(this,function(b){c in b&&(d=a.apply(b,this))},arguments),void 0===d?this:d}},a.fn)}function h(a,b){var c=a.indexOf(b);-1!==c&&a.splice(c,1)}function i(){var a=+new Date;return a>S&&(S=a,T=0),Z+S+"_"+ ++T}function j(a){delete P[a],delete O[a],delete N[a],delete Q[a]}function k(a,b){b=b||{};var c={text:"",_index:{},_script:"",_context:b.scriptContext,_hasOuter:b.entireAsContent};return a?(b.data=c,c._hasOuter?l.call(b,a.clone().removeAttr(Y)[0]):a.contents().forEach(l,b),c):c}function l(a){var d=this.data;if(1!==a.nodeType)return void(3===a.nodeType&&(a=a.textContent||a.nodeValue,/\S/.test(a)&&(d.text+=a)));if(d._context&&"SCRIPT"===a.nodeName&&"text/darkscript"===a.getAttribute("type"))return void(d._script+=a.innerHTML);var e=a.isMountedDarkDOM;if(this.noComs&&(!this.scriptContext||!a.getElementsByTagName("script").length))return void(e||(d.text+=a.outerHTML||""));var f=a.getAttribute(Y),g=M[f];if(delete M[f],g)d._index[f]=g,d.text+="{{"+Y+"="+f+"}}";else if(!e){var h=k(c(a)),i=a.outerHTML||"";G(h._index)?d.text+=i:(d.text+=i.replace(ab,"$1"+h.text+"$3"),b.mix(d._index,h._index))}}function m(a){if("object"==typeof a){if(Array.isArray(a))return a.forEach(m);var c=a.contentData||{};c._script&&new Function("",c._script).call(c._context),b.each(c._index||{},m),b.each(a.componentData||{},m)}}function n(a,d){var e=a.getAttribute(Y);if(!c.contains(document.body,a))return void(d.onlyStates||d.ignoreRender||s(e,null,{type:"remove"}));var f=P[e],g=O[e];if(f&&g){R=+new Date;var h;if(d.onlyStates)h=f.scanRoot(a,d),b.merge(h,g),d.ignoreRender||p(g,h),g.state&&b.mix(g.state,h.state);else{if(h=f.bufferRoot(a).renderBuffer().releaseModel(),d.ignoreRender)return;o(g,V(h)?h[0]:h)}}}function o(a,c){if(!c||!c.id)return s(a.id,null,{type:"remove"});if(!a.id)return c=c.context,s(c.id,c,{type:"component"});var d=p(a,c);d!==!1&&(q(a.contentData||(a.contentData=k()),c.contentData)&&(d=s(c.id,c,{type:"content",oldValue:a.content,newValue:c.content}),d===!1)||b.each(c.componentData,function(a,b){var e=r.apply(this,arguments);return e&&(d=s(c.id,c,{type:"component",name:b,oldValue:this[b],newValue:a}),d===!1)?!1:void 0},a.componentData||(a.componentData={})))}function p(a,c){var d;return b.each(c.state,function(a,b){return this[b]!=a&&(d=s(c.id,c,{type:"state",name:b,oldValue:this[b],newValue:a}),d===!1)?!1:void 0},a.state||(a.state={})),d}function q(a,c){if(a.text.length!==c.text.length)return!0;var d;return b.each(c._index||{},function(a,b){return this[b]?void o(this[b],a):(d=!0,!1)},a._index),d||a.text!==c.text}function r(a,b){if(!V(a))return void o(this[b]||(this[b]={}),a);for(var c,d=this[b]||(this[b]=[]),e=d.length<a.length?a:d,f=0,g=e.length;g>f;f++){if(!d[f]){c=!0;break}if(a[f]&&d[f].id!==a[f].id){c=!0;break}o(d[f],a[f])}return c}function s(a,d,e){if(a){var g=f.getDarkById(a);g.trigger("darkdom:willUpdate");var h,i=c("#"+a),j=P[a];return j?h=j.triggerUpdate(b.mix(e,{model:d,root:i,rootId:a})):d||(i.remove(),h=!1),d&&"remove"!==e.type?h===!1&&g.trigger("darkdom:rendered"):g.trigger("darkdom:removed"),g.trigger("darkdom:updated"),h}}function t(a,c,d){if(V(c))return c.forEach(function(a){t(this,a,d)},a),a;u(a,c,d);var e=a.contentData||(a.contentData=k()),f=c.contentData;return f&&f.text&&(!e.text||e._hasOuter)&&(e.text=f.text,b.mix(e._index,f._index)),a.componentData||(a.componentData={}),b.each(c.componentData||{},v,a),a}function u(a,c,d){return V(c)?(c.forEach(function(a){u(this,a,d)},a),a):(a.id||(a.id=c.id),a.context=d,b.each(c.state||{},function(a,b){void 0===this[b]&&(this[b]=a)},a.state||(a.state={})),a)}function v(a,b){var c=this,d=c.componentData;if(V(a)){var e=[];(d[b]||[]).forEach(function(a){w(a)||this.push(a)},e),a.forEach(function(a){this.push(t({},a,c))},d[b]=e)}else w(d[b]||{})?d[b]=a:t(d[b]||(d[b]={}),a,c)}function w(a){var b=P[a.id];return b&&b.isSource()}function x(a,c,d){function e(a){var b=N[a];return b?b:(i=!0,a=O[a].context.id,e(a))}function f(c){b.each(c.componentData,function(d,e){if(V(d)){var h=!0;return b.each(d,function(b,c){return b.id===a?(this[c]=g(b),h=!1):void 0},d),h}return c.id===a?(this[e]=g(c),!1):void f(d)},c)}function g(b){var d=h?c(b)||b:c;return y(d,P[a].source()),d}var h=F(c);if(d&&!h)return void(N[a]=g(c));var i,j=e(a);i?f(j):N[a]=g(j)}function y(a,c){a.id||(a.id=i(),P[a.id]=c),a.state||(a.state={}),a.componentData?b.each(c._config.components,z,{specs:c._specs,data:a.componentData}):a.componentData={},a.contentData?a.contentData._hasOuter=c._options.sourceAsContent||c._options.entireAsContent:a.contentData={}}function z(a,b){var d=this.data[b];if(d){V(d)||(d=[d]);var e=this.specs[b];e&&"string"==typeof e[e.length-1]&&(e=!1),d.forEach(function(a){var b=c(),d=this.createGuard({contextTarget:b,isSource:!0});e&&I(e,[d,b]),y(a,d)},a)}}function A(a){b.each(a.componentData,function(a,b){this[b]=V(a)?a.map(function(a){return this(a)},B):B(a)},a.component||(a.component={}));var c=a.contentData,d=c._index,e=c.text;return G(d)||(e=e.replace($,function(a,b){var c=d[b];return"string"==typeof c?c:B(c)})),a.content=e,O[a.id]=a,a}function B(a){var b=P[a.id];return b?(a.component||(a=A(a)),b.render(a)):""}function C(a,b){return("string"==typeof b?a.attr(b):b&&b(a))||void 0}function D(a,b,c){"string"==typeof b?a.attr(b,c):b&&b(a,c)}function E(a){return"<span>"+a.content+"</span>"}function F(a){return"[object Function]"===U.call(a)}function G(a){for(var b in a)return b=null,!1;return!0}function H(a,c,d,e){e=e||{};var f=a;"object"!=typeof f&&(f={},f[a]=c);var g={};return b.each(f,function(a,b){e.execFunc&&F(a)&&(a=a(this[b])),e.enableExtension?(this[b]||(this[b]=[]),g[b]||(g[b]=[]),this[b].push(a),g[b].push(a)):this[b]=g[b]=a},d),g}function I(a,b){a.length>1?a.reduce(function(a,b){return function(){var c=[].slice.call(arguments);return c[c.length]=a,b.apply(this,c)}}).apply(this,b):a[0].apply(this,b)}function J(a){return new J.DarkComponent(a)}var K={unique:!1,enableSource:!1,disableScript:!1,entireAsContent:!1,sourceAsContent:!1,render:!1},L={source:"source-selector"},M={},N={},O={},P={},Q={},R=0,S=0,T=0,U=Object.prototype.toString,V=Array.isArray,W=c.find.matchesSelector,X="dd-autogen",Y="dd-connect",Z="_brightRoot_",$=new RegExp("\\{\\{"+Y+"=(\\w+)\\}\\}","g"),_=/(\S+)\s*(.*)/,ab=/(<[\s\S]+?>)([\s\S]*)(<.+>)/,bb=/(\sid=['"])[^"']*/,cb=new RegExp("("+X+"=['\"])[^'\"]*"),db=/^\s*(<[\w\-]+)([^>]*)>/;return d.prototype={darkGuard:function(){return P[this.getAttribute(Y)]},mountDarkDOM:function(){var a=this.darkGuard();a&&a.mountRoot(this)},unmountDarkDOM:function(){var a=this.darkGuard();a&&a.unmountRoot(this)},resetDarkDOM:function(){var a=this.darkGuard();a&&(a.unmountRoot(this),a.unregisterRoot(this))},getDarkState:function(a){var b=this.darkGuard();return b&&C(c(this),b.stateGetter(a))||null},setDarkState:function(a,b,d){d=d||{};var e=this.darkGuard();if(e){var f=e.stateSetter(a);D(c(this),f,b),d.update&&this.updateDarkStates()}},updateDarkStates:function(a){n(this,b.merge({onlyStates:!0},a))},updateDarkDOM:function(a){a=a||{},n(this,a),a.ignoreRender||J.DarkGuard.gc()},updateDarkSource:function(){var a=this.getAttribute(Y);delete N[a],this.updateDarkDOM()},feedDarkDOM:function(a){var b=this.getAttribute(Y);x(b,a,!0)},forwardDarkDOM:function(a,b){var d=this.getAttribute(Y),e=P[d],f=d+"|"+a;H(a,f,e._config.events),e.forward(f,b),e.registerEvents(c("#"+d),f,a)},responseDarkDOM:function(a,b){var c=this.getAttribute(Y),d=Q[c];d||(d=Q[c]={}),d[a]=b}},e.prototype={set:function(a){return a?(b.config(this._config,a,this._defaults),this):this},state:function(a,c,d){return"object"==typeof a?(b.each(a,function(a,b){this.state(b,a)},this),this):d||"string"!=typeof c?V(c)?this.state(a,c[0],c[1]):(this._stateGetters[a]=c,this._stateSetters[a]=d,this):this.state(a,c,c)},contain:function(a,c,d){"object"==typeof a&&(d=c),d=d||{};var e=H(a,c,this._components,{execFunc:!0});return d.content&&b.mix(this._contents,e),this},forward:function(a,b){return H(a,b,this._events),this},response:function(a,b){return this._updaters[a]=b,this},component:function(a){return this._components[a]},createGuard:function(a){return a=a||{},new J.DarkGuard({contextModel:a.contextModel,contextTarget:a.contextTarget,isSource:a.isSource,stateGetters:this._stateGetters,stateSetters:this._stateSetters,components:this._components,contents:this._contents,updaters:this._updaters,events:this._events,options:this._config})}},f.prototype={state:e.prototype.state,component:function(a,b){return H(a,b,this._specs,{enableExtension:!0}),this},forward:function(a,b){return H(a,b,this._events),this},source:function(){return this._options.enableSource?this._sourceGuard||(this._sourceGuard=this.createSource(this._config)):void 0},stateGetter:function(a){return this._stateGetters[a]},stateSetter:function(a){return this._stateSetters[a]},watch:function(a){return this.selectTargets(a).forEach(this.registerRoot,this),this},unwatch:function(a){return a=a?this.selectTargets(a):this._darkRoots,a.forEach(this.unregisterRoot,this),this},mount:function(){return this._darkRoots.forEach(this.mountRoot,this),this},unmount:function(){return this._darkRoots.forEach(this.unmountRoot,this),this},buffer:function(){return this._darkRoots.forEach(this.bufferRoot,this),this},update:function(){return this._darkRoots.forEach(this.updateRoot,this),this},gc:function(a){b.each(this._darkRoots,function(b){return b.getAttribute(Y)===a?(this.unregisterRoot(b),!1):void 0},this)},registerRoot:function(a){if(!a.getAttribute(X)){var b=this._config.isSource,c=a.getAttribute(Y);if(c||(c=i(),b||a.setAttribute(Y,c)),!b&&(a.lastUpdateDarkDOM||0)>R)return c;if(P[c]=this,b)a.isDarkSource=!0;else{var e=d.prototype;for(var f in e)a[f]=e[f]}return this._darkRoots.push(a),a.lastUpdateDarkDOM=+new Date,c}},unregisterRoot:function(a){var c=a.getAttribute(Y);this===P[c]&&(a.removeAttribute(Y),j(c),b.each(d.prototype,function(a,b){delete this[b]},a),delete a.lastUpdateDarkDOM,h(this._darkRoots,a))},mountRoot:function(a){if(a.getAttribute(X)||a.isMountedDarkDOM)return this;var b=c(a);b.trigger("darkdom:willMount");var d=A(this.scanRoot(b));return b.hide().after(this.render(d)),this._listen(d),b[0].isMountedDarkDOM=!0,m(d),b.trigger("darkdom:rendered").trigger("darkdom:mounted"),this},unmountRoot:function(a){var b=a.getAttribute(Y);c("["+Y+"]",a).forEach(function(a){var b=a.getAttribute(Y),c=P[b];c.unregisterRoot(a)},O),c("#"+b).remove(),delete a.isMountedDarkDOM,delete O[b]},bufferRoot:function(a){if(a.getAttribute(X))return this;var b=this.scanRoot(a);return this._bufferModel(b),a.isMountedDarkDOM=!0,this},updateRoot:function(a){return a.updateDarkDOM(),this},scanRoot:function(a,d){a=c(a),d=d||{};var e=this._config.isSource,f=e?this.registerRoot(a[0]):a.attr(Y),g={id:f};return e||(g.context=this._config.contextModel),g.state={},b.each(this._stateGetters,function(b,c){this[c]=C(a,b)},g.state),d.onlyStates||this._scanComponents(g,a),!e&&(g.state.source||N[f])&&this._options.enableSource&&this._mergeSource(g,d),g},_scanComponents:function(a,c){function d(a,b){var d=a.createGuard(h),e=g[b];if(e){var f=e[e.length-1];"string"==typeof f?d.watch(f):e&&I(e,[d,c])}return d.buffer(),d}var e=this._config,f=this._options,g=this._specs,h={contextModel:a,contextTarget:c,isSource:e.isSource},i={},j={};b.each(e.components,function(a,b){if(!e.contents[b])return void(i[b]=a);var c=d(a,b);c._bufferContent()}),b.each(i,function(a,b){var c=d(a,b);j[b]=c.releaseModel()}),a.componentData=j,a.contentData=this._scanContents(c,{scriptContext:!f.disableScript&&c[0],entireAsContent:f.entireAsContent,noComs:!Object.keys(e.components).length})},_scanContents:k,renderBuffer:function(){return this._buffer.forEach(function(a){A(a)}),this},releaseModel:function(){var a=this._buffer.slice();return this._options.unique&&(a=a[0]||{}),this._resetBuffer(),a},_bufferModel:function(a){this._buffer.push(a)},_bufferContent:function(){this._buffer.forEach(function(a){M[a.id]=a},this),this._resetBuffer()},_resetBuffer:function(){return this._buffer.length=0,this},render:function(a){var b=(this._options.render||E)(a);return b.replace(db,function(b,c,d){var e,f;return d=d.replace(bb,function(b,c){return e=!0,c+a.id}),d=d.replace(cb,function(a,b){return f=!0,b+"true"}),e||(d=' id="'+a.id+'"'+d),f||(d=" "+X+'="true"'+d),c+d+">"})},_listen:function(a){a.id&&this.registerEvents(c("#"+a.id)),b.each(a.componentData||{},function(a){return V(a)?a.forEach(this._listen,this):void this._listen(a)},this);var d=a.contentData;d&&b.each(d._index||{},this._listen,this)},selectTargets:function(a){return a=c(a,this._config.contextTarget),this._options.unique&&(a=a.eq(0)),a},triggerUpdate:function(a){var b,c=a.type,d=Q[a.rootId]||this._config.updaters;return a.name&&(c+=":"+a.name,b=d[c]),b||(b=d[a.type]),b||(b=this.defaultUpdater),b.call(this,a)},defaultUpdater:function(a){var b=!1;return a.model?a.root[0]?(c(this.render(a.model)).replaceAll(a.root),this._listen(a.model),b):void 0:(a.root.remove(),b)},registerEvents:function(a,c,d){function e(a,b){b=_.exec(b),this.on(b[1],function(c){return W(c.target,b[2])&&g.triggerEvent(f,a,c),!1})}var f=a.attr("id"),g=P[f];g&&(d?e.call(a,c,d):b.each(g._config.events,e,a))},triggerEvent:function(a,b,c){var d=this._events[b];if(d){var e=f.getDarkById(a);if(!e[0])return d(c,null,function(b){x(a,b)});if("string"!=typeof d)return d(c,e);d=_.exec(d),d[2]&&(e=e.find(d[2])),e.trigger(d[1],{sourceEvent:c})}},isSource:function(){return this._config.isSource},createSource:function(a){var b,c=a.options,d={};for(b in c)d[b]=c[b];d.entireAsContent=c.sourceAsContent||c.entireAsContent,d.enableSource=!1;var e={};for(b in a)e[b]=a[b];return e.isSource=!0,e.contextTarget=null,e.options=d,new J.DarkGuard(e)},scanSource:function(a,b){if(b){var c=this.source();c._darkRoots.length=0;var d=c.selectTargets(b);c.watch(d),c.buffer();var e=c.releaseModel();c.unwatch(d);var f=e;return V(e)&&(f={},e.forEach(function(a){t(this,a)},f)),f}},_mergeSource:function(a,b){var c=a.id,d=N[c];if(!d){if(d=this.scanSource(c,a.state.source),!d)return;N[c]=d}b.onlyStates?u(a,d,a.context):t(a,d,a.context)}},f.getDarkById=function(a){return c("["+Y+'="'+a+'"]')},f.getDarkByCustomId=function(a){var d;return b.each(c("body #"+a),function(b){return this(b,"[dd-autogen] #"+a)?void 0:(d=c(b),!1)},c.matches),d||c()},f.gc=function(){var a={};c("["+Y+"]").forEach(function(a){this[a.getAttribute(Y)]=!0},a),Object.keys(P).forEach(function(a){if(!this[a]&&!c("#"+a)[0]){var b=P[a];if(b){if(b.isSource())return;b.gc(a)}else j(a)}},a)},g(c),J.DarkDOM=d,J.DarkComponent=e,J.DarkGuard=f,J.getDarkById=f.getDarkById,J.getDarkByCustomId=f.getDarkByCustomId,J.gc=f.gc,J.initPlugins=g,J}),define("cardkit/helper",["mo/lang","dollar","darkdom","cardkit/ui"],function(a,b,c,d){function e(b,c){var d=i(b,a.merge({disableRequest:!0},c.component._config));d.responseData=c.component.responseData,d.enable()}function f(b,c){var d=i(b,a.merge({disableRequest:!0},c.component._config));d.responseData=c.component.responseData,d.disable()}function g(a){return function(b,d){var e=b.target.id;e&&(e=c.getDarkByCustomId(e),e[0]&&!e[0]._ckDisablePageForward&&(a(e,b),d.updateDarkDOM({ignoreRender:!0})))}}function h(a){return function(d){var e=d.target.id;if(e=e?c.getDarkByCustomId(e):c.getDarkById(d.target.parentNode.id),e[0])if(e[0]._ckDisablePageForward=!0,a(e,d),e[0].isDarkSource){var f=b(d.target).closest(".ck-top-actions");c.getDarkById(f[0].id).updateDarkSource()}else e.updateDarkDOM()}}var i=d.component.control,j=d.component.picker,k=d.component.ranger,l={readState:function(a,b){return a&&(a.state||{})[b]},readSource:function(a){var b=a.data("source");return b&&"."+b},readLabel:function(a){var c=a.data("label");return c&&(c=a.find(c)[0]),c=b(c||a),c.text()||c.val()},readClass:function(a){return a[0].className.split(/\s+/).filter(function(a){return a&&!/^ckd\-/.test(a)}).join(" ")},forwardStateEvents:function(a){a.forward({"control:enable *":"control:enable","control:disable *":"control:disable","picker:change *":"picker:change","picker:response *":"picker:response","selector:change *":"selector:change","ranger:changed *":"ranger:changed"})},applyStateEvents:function(a){a.forward({"control:enable":m,"control:disable":n,"picker:change":o,"picker:response":p,"selector:change":q,"ranger:changed":r})},forwardActionEvents:function(a){a.forward({"control:enable .ck-top-act > *":"topControl:enable","control:disable .ck-top-act > *":"topControl:disable","actionView:confirm .ck-top-overflow":"topOverflow:confirm"})},applyActionEvents:function(a){a.forward({"topOverflow:confirm":u,"topControl:enable":s,"topControl:disable":t})},forwardInputEvents:function(a){a.forward({"change select":"select:change","change input":"input:change","change textarea":"input:change"})},applyInputEvents:function(a){a.forward({"select:change":v,"input:change":w})},isBlank:function(a){return!a||!/\S/m.test(a)}},m=g(e),n=g(f),o=g(function(b,c){var e=j(b,a.merge({disableRequest:!0},c.component._config)),f=c.component.val();d.action.updatePicker(e,f)}),p=g(function(b,c){var d=j(b,a.merge({},c.component._config));d.responseData=c.component.responseData,b.trigger("picker:response",{component:d})}),q=g(function(b,c){b.trigger("selector:change",{component:j(b,a.merge({disableRequest:!0},c.component._config))})}),r=g(function(b,c){var d=k(b,a.merge({enableNotify:!1},c.component._config)),e=c.component.val();d.val(e).attr("value",e),b.trigger("ranger:changed",{component:d})}),s=h(e),t=h(f),u=function(a){var c=a.component.val(),d=b("#"+c).children();d.trigger("tap")},v=g(function(a,c){b("option",c.target).forEach(function(a,b){a.selected?this.eq(b).attr("selected","selected"):this.eq(b).removeAttr("selected")},a.find("option"))}),w=g(function(a,b){var c=b.target.checked;a[0].checked=c,c===!1?a.removeAttr("checked"):a.attr("checked","checked");var d=b.target.value;a.val(d).attr("value",d)});return l}),define("cardkit/oldspec/common/item",["cardkit/helper"],function(a){var b={source:a.readSource};return{title:function(a){a.watch(".ckd-title"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-title-link-extern")&&(a.attr("target")||"_blank")},isAlone:function(a){return a.hasClass("ckd-title-link-alone")}})},titleLink:function(a){a.watch(".ckd-title-link"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-title-link-extern")&&(a.attr("target")||"_blank")},isAlone:function(a){return a.hasClass("ckd-title-link-alone")}})},titlePrefix:function(a){a.watch(".ckd-title-prefix"),a.state(b)},titleSuffix:function(a){a.watch(".ckd-title-suffix"),a.state(b)},titleTag:function(a){a.watch(".ckd-title-tag"),a.state(b)},icon:function(a){a.watch(".ckd-icon"),a.state(b),a.state({imgUrl:"src"})},info:function(a){a.watch(".ckd-info"),a.state(b)},opt:function(a){a.watch(".ckd-opt"),a.state(b)},desc:function(a){a.watch(".ckd-desc, .ckd-subtitle"),a.state(b)},content:function(a){a.watch(".ckd-content"),a.state(b)},meta:function(a){a.watch(".ckd-meta"),a.state(b)},author:function(a){a.watch(".ckd-author"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-author-link-extern")&&(a.attr("target")||"_blank")}})},authorLink:function(a){a.watch(".ckd-author-link"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-author-link-extern")&&(a.attr("target")||"_blank")}})},authorPrefix:function(a){a.watch(".ckd-author-prefix"),a.state(b)},authorSuffix:function(a){a.watch(".ckd-author-suffix"),a.state(b)},avatar:function(a){a.watch(".ckd-avatar"),a.state(b),a.state({imgUrl:"src"})},authorInfo:function(a){a.watch(".ckd-author-info"),a.state(b)},authorDesc:function(a){a.watch(".ckd-author-desc"),a.state(b)},authorMeta:function(a){a.watch(".ckd-author-meta"),a.state(b)}}}),define("cardkit/oldspec/common/scaffold",["cardkit/helper"],function(a){var b={source:a.readSource};return{hd:function(a){a.watch(".ckd-hd"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-hd-link-extern")&&(a.attr("target")||"_blank")}})},hdLink:function(a){a.watch(".ckd-hd-link:not(.ckd-hd)"),a.state(b),a.state({link:"href",linkTarget:function(a){return a.hasClass("ckd-hd-link-extern")&&(a.attr("target")||"_blank")}})},hdOpt:function(a){a.watch(".ckd-hdopt"),a.state(b)},ft:function(a){a.watch(".ckd-ft")},blank:function(a){a.watch(".ckd-blank")}}}),define("cardkit/spec/common/source_item",["cardkit/oldspec/common/item"],function(a,b){return b("cardkit/oldspec/common/item")}),define("cardkit/spec/common/item",[],function(){return{title:function(a){a.watch('ck-part[type="title"]'),a.state({link:"href",linkTarget:"target",isAlone:"alone-mode"})},titleLink:function(a){a.watch('ck-part[type="titleLink"]'),a.state({link:"href",linkTarget:"target",isAlone:"alone-mode"})},titlePrefix:'ck-part[type="titlePrefix"]',titleSuffix:'ck-part[type="titleSuffix"]',titleTag:'ck-part[type="titleTag"]',icon:function(a){a.watch('ck-part[type="icon"]'),a.state({imgUrl:"src"})},info:'ck-part[type="info"]',opt:function(a){a.watch('ck-part[type="opt"]')},desc:'ck-part[type="desc"]',content:'ck-part[type="content"]',meta:'ck-part[type="meta"]',author:function(a){a.watch('ck-part[type="author"]'),a.state({link:"href",linkTarget:"target"})},authorLink:function(a){a.watch('ck-part[type="authorLink"]'),a.state({link:"href",linkTarget:"target"})},authorPrefix:'ck-part[type="authorPrefix"]',authorSuffix:'ck-part[type="authorSuffix"]',avatar:function(a){a.watch('ck-part[type="avatar"]'),a.state({imgUrl:"src"})
},authorInfo:'ck-part[type="authorInfo"]',authorDesc:'ck-part[type="authorDesc"]',authorMeta:'ck-part[type="authorMeta"]'}}),define("cardkit/spec/common/source_scaffold",["cardkit/oldspec/common/scaffold"],function(a,b){return b("cardkit/oldspec/common/scaffold")}),define("cardkit/spec/common/scaffold",[],function(){return{hd:function(a){a.watch('ck-part[type="hd"]'),a.state({link:"href",linkTarget:"target"})},hdLink:function(a){a.watch('ck-part[type="hdLink"]'),a.state({link:"href",linkTarget:"target"})},hdOpt:function(a){a.watch('ck-part[type="hdOpt"]')},ft:function(a){a.watch('ck-part[type="ft"]')},blank:function(a){a.watch('ck-part[type="blank"]')}}}),define("cardkit/spec/list",["dollar","cardkit/helper","cardkit/spec/common/scaffold","cardkit/spec/common/source_scaffold","cardkit/spec/common/item","cardkit/spec/common/source_item"],function(a,b,c,d,e,f){function g(a){a.watch(".ckd-item"),a.state(k),a.component(f)}function h(a){a.state({subtype:"subtype",blankText:"blank-text",limit:"limit",col:"col",paperStyle:"paper-style",plainStyle:"plain-style",plainHdStyle:"plain-hd-style",customClass:"custom-class"}),a.component(c),a.component("item",function(a){a.watch('ck-part[type="item"]'),a.state({link:"href",linkTarget:"target",isAlone:"alone-mode",customClass:"custom-class"}),a.component(e),a.source().state(k).component(f)}),a.source().component(d).component("item",g)}function i(b,c){b.watch(a(j,c)),h(b)}var j='ck-card[type="list"]',k={link:"href",linkTarget:function(a){return a.hasClass("ckd-title-link-extern")&&(a.attr("target")||"_blank")},isAlone:function(a){return a.hasClass("ckd-title-link-alone")},customClass:b.readClass};return i.sourceItemStates=k,i.sourceItemSpec=g,i.initList=h,i}),define("cardkit/oldspec/list",["dollar","cardkit/helper","cardkit/spec/list","cardkit/oldspec/common/scaffold","cardkit/oldspec/common/item"],function(a,b,c,d,e){function f(a){a.state({subtype:"data-style",blankText:"data-cfg-blank",limit:"data-cfg-limit",col:"data-cfg-col",paperStyle:"data-cfg-paper",plainStyle:"data-cfg-plain",plainHdStyle:"data-cfg-plainhd",customClass:b.readClass}),a.state(h),a.component(d),a.component("item",function(a){a.watch(".ckd-item"),a.state(h),a.state(i),a.component(e),a.source().component(e)}),a.source().component(d).component("item",j)}function g(b,c){b.watch(a(k,c)),b.watch(a(l,c)),f(b)}var h={source:b.readSource},i=c.sourceItemStates,j=c.sourceItemSpec,k=".ckd-list-card",l=".ck-list-unit";return g.initList=f,g}),define("cardkit/oldspec/box",["dollar","cardkit/helper","cardkit/oldspec/common/scaffold"],function(a,b,c){var d={source:b.readSource},e=".ckd-box-card",f=".ck-box-unit";return function(g,h){g.watch(a(e,h)),g.watch(a(f,h)),g.state({subtype:"data-style",paperStyle:"data-cfg-paper",plainStyle:"data-cfg-plain",plainHdStyle:"data-cfg-plainhd",customClass:b.readClass}),g.state(d),g.component(c),g.component({content:function(a){a.watch(".ckd-content"),a.state(d)},collect:function(a){a.watch(".ckd-collect"),a.state(d)}}),g.source().component(c).component({content:".ckd-content",collect:".ckd-collect"})}}),define("cardkit/spec/form",["dollar","cardkit/helper","cardkit/spec/common/scaffold","cardkit/spec/common/source_scaffold"],function(a,b,c,d){function e(g,h){g.watch(a(f,h)),g.state({subtype:"subtype",blankText:"blank-text",plainHdStyle:"plain-hd-style",customClass:"custom-class"}),g.component(c),g.component("item",function(a){a.watch('ck-part[type="item"]'),a.component({title:'ck-part[type="title"]',content:'ck-part[type="content"]'}),b.applyInputEvents(a),a.source().component({title:".ckd-title",content:".ckd-content"})}),g.source().component(d).component("item",e.sourceItemSpec)}var f='ck-card[type="form"]';return e.sourceItemSpec=function(a){a.watch(".ckd-item"),a.component({title:".ckd-title",content:".ckd-content"})},e}),define("cardkit/oldspec/form",["dollar","cardkit/helper","cardkit/spec/form","cardkit/oldspec/common/scaffold"],function(a,b,c,d){var e={source:b.readSource},f=".ckd-form-card",g=".ck-form-unit";return function(h,i){h.watch(a(f,i)),h.watch(a(g,i)),h.state({subtype:"data-style",blankText:"data-cfg-blank",plainHdStyle:"data-cfg-plainhd",customClass:b.readClass}),h.state(e),h.component(d),h.component("item",function(a){a.watch(".ckd-item"),a.component({title:function(a){a.watch(".ckd-title"),a.state(e)},content:function(a){a.watch(".ckd-content"),a.state(e)}}),b.applyInputEvents(a),a.source().component({title:".ckd-title",content:".ckd-content"})}),h.source().component(d).component("item",c.sourceItemSpec)}}),define("cardkit/oldspec/mini",["dollar","cardkit/oldspec/list"],function(a,b){var c=".ckd-mini-card",d=".ck-mini-unit";return function(e,f){e.watch(a(c,f)),e.watch(a(d,f)),b.initList(e)}}),define("cardkit/spec/mini",["dollar","cardkit/spec/list"],function(a,b){var c='ck-card[type="mini"]';return function(d,e){d.watch(a(c,e)),b.initList(d)}}),define("cardkit/spec/box",["dollar","cardkit/spec/common/scaffold","cardkit/spec/common/source_scaffold"],function(a,b,c){var d='ck-card[type="box"]';return function(e,f){e.watch(a(d,f)),e.state({subtype:"subtype",paperStyle:"paper-style",plainStyle:"plain-style",plainHdStyle:"plain-hd-style",customClass:"custom-class"}),e.component(b),e.component({content:'ck-part[type="content"]',collect:'ck-part[type="collect"]'}),e.source().component(c).component({content:".ckd-content",collect:".ckd-collect"})}}),define("cardkit/spec/page",["dollar","cardkit/helper","cardkit/spec/box","cardkit/spec/list","cardkit/spec/mini","cardkit/spec/form"],function(a,b,c,d,e,f,g){function h(a){a.watch('ck-part[type="nav"]'),a.state({link:"href"})}function i(a){a.watch('ck-part[type="banner"]'),a.state({plainStyle:"plain-style"})}function j(a){a.watch('ck-part[type="actionbar"]'),a.state({limit:"limit"}),a.component("action",k),a.source().component("action",l),p.applyActionEvents(a)}function k(a){a.watch("[action-layout]"),a.state({label:p.readLabel,forceOverflow:function(a){return"overflow"===a.attr("action-layout")}}),m(a.source())}function l(a){a.watch(".ckd-item, .ckd-overflow-item"),m(a)}function m(a){a&&a.state({label:p.readLabel,forceOverflow:function(a){return a.hasClass("ckd-overflow-item")}})}function n(a,b){a.watch(o(n.SELECTOR+q,b)),a.state({blankText:"blank-text",deck:"deck",isPageActive:"active-page",isDeckActive:"active-deck",currentDeck:"current-deck",fixedMinHeight:"fixed-minheight",cardId:"id"}),a.component(r),p.applyStateEvents(a)}var o=g("dollar"),p=g("cardkit/helper"),q=".unmount-page",r={title:'ck-part[type="title"]',actionbar:j,nav:h,banner:i,footer:'ck-part[type="footer"]',blank:'ck-part[type="blank"]',box:g("cardkit/spec/box"),list:g("cardkit/spec/list"),mini:g("cardkit/spec/mini"),form:g("cardkit/spec/form")};return n.SELECTOR='ck-card[type="page"]',n.initOldStyleActionState=m,n}),define("cardkit/oldspec/page",["dollar","cardkit/spec/page","cardkit/helper","cardkit/oldspec/box","cardkit/oldspec/list","cardkit/oldspec/mini","cardkit/oldspec/form"],function(a,b,c,d,e,f,g,h){function i(a){a.watch(".ckd-page-title"),a.state("source",s.readSource)}function j(a){a.watch(".ckd-page-blank"),a.state("source",s.readSource)}function k(a){a.watch(".ckd-page-nav"),a.state({link:"href",source:s.readSource})}function l(a){a.watch(".ckd-page-banner"),a.watch(".ck-banner-unit"),a.state({plainStyle:"data-cfg-plain",source:s.readSource})}function m(a){a.watch(".ckd-page-actions"),a.state({limit:"data-cfg-limit",source:s.readSource}),a.component("action",o),a.source().component("action",o),s.applyActionEvents(a)}function n(a){a.watch(".ckd-page-footer"),a.state("source",s.readSource)}function o(a){a.watch(".ckd-item, .ckd-overflow-item"),a.state("source",s.readSource),t(a),t(a.source())}function p(a,b){a.watch(q(p.SELECTOR+u,b)),a.watch(q(p.SELECTOR_OLD+u,b)),a.state({blankText:"data-cfg-blank",deck:"data-cfg-deck",isPageActive:"data-active-page",isDeckActive:"data-active-deck",currentDeck:"data-current-deck",fixedMinHeight:"data-fixed-minheight",cardId:"id"}),a.component(v),s.applyStateEvents(a)}var q=h("dollar"),r=h("cardkit/spec/page"),s=h("cardkit/helper"),t=r.initOldStyleActionState,u=".unmount-page",v={title:i,actionbar:m,nav:k,banner:l,footer:n,blank:j,box:h("cardkit/oldspec/box"),list:h("cardkit/oldspec/list"),mini:h("cardkit/oldspec/mini"),form:h("cardkit/oldspec/form")};return p.SELECTOR=".ckd-page-card",p.SELECTOR_OLD=".ck-card",p}),define("cardkit/oldspec",["cardkit/oldspec/page","cardkit/oldspec/box","cardkit/oldspec/list"],function(a,b,c,d){return{page:[d("cardkit/oldspec/page")],box:[d("cardkit/oldspec/box")],list:[d("cardkit/oldspec/list")]}}),define("cardkit/tpl/scaffold/ft",[],function(){return{template:"<footer>{%= content %}</footer>\n"}}),define("cardkit/tpl/scaffold/hd_opt",[],function(){return{template:'<span class="ck-hdopt">{%= content %}</span>\n'}}),define("cardkit/tpl/scaffold/hd",[],function(){return{template:'<span class="ck-hd {%= (hdLink && \'clickable\' || \'\') %}">\n {% if (hdLink) { %}\n <a href="{%= hdLink %}" \n target="{%= (hdLinkTarget || \'_self\') %}" \n class="ck-link-mask ck-link"></a>\n {% } %}\n <span>{%= content %}</span>\n</span>\n'}}),define("cardkit/card/common/scaffold",["darkdom","mo/template/micro","cardkit/helper","cardkit/tpl/scaffold/hd","cardkit/tpl/scaffold/hd_opt","cardkit/tpl/scaffold/ft"],function(a,b,c,d,e,f,g){var h=g("darkdom"),i=g("mo/template/micro").convertTpl,j=g("cardkit/helper"),k=i(g("cardkit/tpl/scaffold/hd").template),l=i(g("cardkit/tpl/scaffold/hd_opt").template),m=i(g("cardkit/tpl/scaffold/ft").template),n={hd:function(){return h({unique:!0,enableSource:!0,render:function(a){var b=a.context.componentData.hdLink,c=j.readState(b,"link");return a.hdLink=c||a.state.link,a.hdLinkTarget=c?j.readState(b,"linkTarget"):a.state.linkTarget,k(a)}})},hdLink:function(){return h({unique:!0,enableSource:!0,render:function(a){return a.state.link}})},hdOpt:function(){return h({enableSource:!0,sourceAsContent:!0,render:l})},ft:function(){return h({unique:!0,enableSource:!0,render:m})},blank:function(){return h({unique:!0,enableSource:!0,render:function(a){return"<div>"+a.content+"</div>"}})}};return n}),define("cardkit/tpl/item/author_meta",[],function(){return{template:'<span class="ck-author-meta">{%= content %}</span>\n'}}),define("cardkit/tpl/item/author_info",[],function(){return{template:'<span class="ck-author-info">{%= content %}</span>\n'}}),define("cardkit/tpl/item/author_desc",[],function(){return{template:'<span class="ck-author-desc">{%= content %}</span>\n'}}),define("cardkit/tpl/item/avatar",[],function(){return{template:'{% if (state.imgUrl) { %}\n {% if (context.authorLink) { %}\n <a href="{%= context.authorLink %}" \n target="{%= (context.authorLinkTarget || \'_self\') %}" \n class="ck-avatar ck-link">\n <img src="{%= state.imgUrl %}"/>\n </a>\n {% } else { %}\n <span class="ck-avatar">\n <img src="{%= state.imgUrl %}"/>\n </span>\n {% } %}\n{% } %}\n'}}),define("cardkit/tpl/item/author_suffix",[],function(){return{template:'<span class="ck-author-suffix">{%= content %}</span>\n'}}),define("cardkit/tpl/item/author_prefix",[],function(){return{template:'<span class="ck-author-prefix">{%= content %}</span>\n'}}),define("cardkit/tpl/item/author",[],function(){return{template:'{% if (context.authorLink) { %}\n<a href="{%= context.authorLink %}" \n target="{%= (context.authorLinkTarget || \'_self\') %}" \n class="ck-author ck-link">{%= content %}</a>\n{% } else { %}\n<span class="ck-author">{%= content %}</span>\n{% } %}\n'}}),define("cardkit/tpl/item/meta",[],function(){return{template:'<span class="ck-meta">{%= content %}</span>\n'}}),define("cardkit/tpl/item/content",[],function(){return{template:'<span class="ck-content">{%= content %}</span>\n'}}),define("cardkit/tpl/item/opt",[],function(){return{template:'<span class="ck-opt">{%= content %}</span>\n'}}),define("cardkit/tpl/item/info",[],function(){return{template:'<span class="ck-info">{%= content %}</span>\n'}}),define("cardkit/tpl/item/desc",[],function(){return{template:'<span class="ck-desc">{%= content %}</span>\n'}}),define("cardkit/tpl/item/icon",[],function(){return{template:'{% if (state.imgUrl) { %}\n {% if (context.isItemLinkAlone) { %}\n <a href="{%= context.itemLink %}" \n target="{%= (context.itemLinkTarget || \'_self\') %}" \n class="ck-icon ck-link">\n <img src="{%= state.imgUrl %}"/>\n </a>\n {% } else { %}\n <span class="ck-icon">\n <img src="{%= state.imgUrl %}"/>\n </span>\n {% } %}\n{% } %}\n'}}),define("cardkit/tpl/item/title_tag",[],function(){return{template:'<span class="ck-tag">{%= content %}</span>\n'}}),define("cardkit/tpl/item/title_suffix",[],function(){return{template:'<span class="ck-title-suffix">{%= content %}</span>\n'}}),define("cardkit/tpl/item/title_prefix",[],function(){return{template:'<span class="ck-title-prefix">{%= content %}</span>\n'}}),define("cardkit/tpl/item/title",[],function(){return{template:'{% if (context.isItemLinkAlone) { %}\n<a href="{%= context.itemLink %}" \n class="ck-link"\n target="{%= (context.itemLinkTarget || \'_self\') %}">{%= content %}</a>\n{% } else { %}\n<span class="ck-title">{%= content %}</span>\n{% } %}\n\n'}}),define("cardkit/tpl/item",[],function(){return{template:'<div class="ck-item {%= (itemLink && \'clickable\' || \'\') %} {%= state.customClass %}" \n style="width:{%= (context.state.col ? Math.floor(1000/context.state.col)/10 + \'%\' : \'\') %};">\n\n <div class="ck-initem">\n\n {% if (itemLink && !isItemLinkAlone) { %}\n <a href="{%= itemLink %}" \n target="{%= (itemLinkTarget || \'_self\') %}"\n class="ck-link-mask ck-link"></a>\n {% } %}\n\n <div class="ck-title-box">\n\n {%= component.opt.join(\'\') %}\n {%= component.icon %}\n\n <div class="ck-title-set">\n\n {% if (itemContent) { %}\n <div class="ck-title-line">\n {%= component.titlePrefix.join(\'\') %}\n {%= itemContent %}\n {%= component.titleSuffix.join(\'\') %}\n {%= component.titleTag.join(\'\') %}\n </div>\n {% } %}\n\n {% if (component.info.length) { %}\n <div class="ck-info-wrap">\n {%= component.info.join(\'\') %}\n </div>\n {% } %}\n\n {% if (component.desc.length) { %}\n <div class="ck-desc-wrap">\n {%= component.desc.join(\'\') %}\n </div>\n {% } %}\n\n </div>\n\n {% if (component.content.length) { %}\n <div class="ck-content-wrap">\n {%= component.content.join(\'\') %}\n </div>\n {% } %}\n\n {% if (component.meta.length) { %}\n <div class="ck-meta-wrap">\n {%= component.meta.join(\'\') %}\n </div>\n {% } %}\n\n </div>\n\n {% if (component.author || component.authorDesc.length || component.authorMeta.length) { %}\n <div class="ck-author-box">\n\n {%= component.avatar %}\n\n <div class="ck-author-set">\n\n <div class="ck-author-line">\n {%= component.authorPrefix.join(\'\') %}\n {%= component.author %}\n {%= component.authorSuffix.join(\'\') %}\n </div>\n\n {% if (component.authorInfo.length) { %}\n <div class="ck-author-info-wrap">\n {%= component.authorInfo.join(\'\') %}\n </div>\n {% } %}\n\n {% if (component.authorDesc.length) { %}\n <div class="ck-author-desc-wrap">\n {%= component.authorDesc.join(\'\') %}\n </div>\n {% } %}\n\n </div>\n\n {% if (component.authorMeta.length) { %}\n <div class="ck-author-meta-wrap">\n {%= component.authorMeta.join(\'\') %}\n </div>\n {% } %}\n\n </div>\n {% } %}\n\n </div>\n\n</div>\n\n'}}),define("cardkit/card/item",["darkdom","mo/lang/mix","mo/template/micro","cardkit/helper","cardkit/tpl/item","cardkit/tpl/item/title","cardkit/tpl/item/title_prefix","cardkit/tpl/item/title_suffix","cardkit/tpl/item/title_tag","cardkit/tpl/item/icon","cardkit/tpl/item/desc","cardkit/tpl/item/info","cardkit/tpl/item/opt","cardkit/tpl/item/content","cardkit/tpl/item/meta","cardkit/tpl/item/author","cardkit/tpl/item/author_prefix","cardkit/tpl/item/author_suffix","cardkit/tpl/item/avatar","cardkit/tpl/item/author_desc","cardkit/tpl/item/author_info","cardkit/tpl/item/author_meta"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){var x=w("darkdom"),y=w("mo/lang/mix"),z=w("mo/template/micro").convertTpl,A=w("cardkit/helper"),B=z(w("cardkit/tpl/item").template),C=z(w("cardkit/tpl/item/title").template),D=z(w("cardkit/tpl/item/title_prefix").template),E=z(w("cardkit/tpl/item/title_suffix").template),F=z(w("cardkit/tpl/item/title_tag").template),G=z(w("cardkit/tpl/item/icon").template),H=z(w("cardkit/tpl/item/desc").template),I=z(w("cardkit/tpl/item/info").template),J=z(w("cardkit/tpl/item/opt").template),K=z(w("cardkit/tpl/item/content").template),L=z(w("cardkit/tpl/item/meta").template),M=z(w("cardkit/tpl/item/author").template),N=z(w("cardkit/tpl/item/author_prefix").template),O=z(w("cardkit/tpl/item/author_suffix").template),P=z(w("cardkit/tpl/item/avatar").template),Q=z(w("cardkit/tpl/item/author_desc").template),R=z(w("cardkit/tpl/item/author_info").template),S=z(w("cardkit/tpl/item/author_meta").template),T={title:function(){return x({unique:!0,enableSource:!0,render:C})},titleLink:function(){return x({unique:!0,enableSource:!0,render:function(a){return a.state.link}})},titlePrefix:function(){return x({enableSource:!0,sourceAsContent:!0,render:D})},titleSuffix:function(){return x({enableSource:!0,sourceAsContent:!0,render:E})},titleTag:function(){return x({enableSource:!0,render:F})},icon:function(){return x({unique:!0,enableSource:!0,render:G})},desc:function(){return x({enableSource:!0,sourceAsContent:!0,render:H})},info:function(){return x({enableSource:!0,sourceAsContent:!0,render:I})},opt:function(){return x({enableSource:!0,sourceAsContent:!0,render:J})},content:function(){return x({enableSource:!0,sourceAsContent:!0,render:K})},meta:function(){return x({enableSource:!0,sourceAsContent:!0,render:L})},author:function(){return x({unique:!0,enableSource:!0,render:M})},authorLink:function(){return x({unique:!0,enableSource:!0,render:function(a){return a.state.link}})},authorPrefix:function(){return x({enableSource:!0,sourceAsContent:!0,render:N})},authorSuffix:function(){return x({enableSource:!0,sourceAsContent:!0,render:O})},avatar:function(){return x({unique:!0,enableSource:!0,render:P})},authorDesc:function(){return x({enableSource:!0,sourceAsContent:!0,render:Q})},authorInfo:function(){return x({enableSource:!0,sourceAsContent:!0,render:R})},authorMeta:function(){return x({enableSource:!0,sourceAsContent:!0,render:S})},item:function(){var a=x({enableSource:!0,render:function(a){var b=A.readState,c=a.state,d=a.component,e=a.componentData,f=d.titleLink?e.titleLink:e.title;a.itemLinkTarget=b(f,"linkTarget")||c.linkTarget,a.isItemLinkAlone=b(f,"isAlone")||c.isAlone,a.itemLink=d.titleLink||b(e.title,"link")||c.link,a.itemContent=d.title||a.content;var g=d.authorLink?e.authorLink:e.author;return a.authorLinkTarget=b(g,"linkTarget"),a.authorLink=d.authorLink||b(e.author,"link"),B(a)}}),b=y.copy(T);return delete b.item,a.contain(b),a}};return T}),define("cardkit/tpl/list",[],function(){return{template:"<div class=\"ck-list-card {%= (state.blankText === 'false' ? 'no-blank' : '') %} {%= state.customClass %}\"\n data-style=\"{%= state.subtype %}\"\n {%= state.col ? 'data-cfg-col=\"' + state.col + '\" ' : '' %}\n {%= state.paperStyle ? 'data-cfg-paper=\"true\" ' : '' %}\n {%= state.plainStyle ? 'data-cfg-plain=\"true\" ' : '' %}\n {%= state.plainHdStyle ? 'data-cfg-plainhd=\"true\" ' : '' %}>\n\n {% if (hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n <article class=\"ck-card-wrap\">\n\n {% if (!hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n \n <div class=\"ck-list-wrap\">\n\n {% if (component.item.length) { %}\n\n <div class=\"ck-list\">\n {% component.item.forEach(function(item, i){ %}\n\n {% if (i && (i % state.col === 0)) { %}\n </div><div class=\"ck-list\">\n {% } %}\n\n {%= item %}\n\n {% }); %}\n </div>\n\n {% } else { %}\n\n <div class=\"ck-list\">\n <div class=\"ck-item blank\">\n <div class=\"ck-initem\">\n {% if (component.blank) { %}\n {%= component.blank %}\n {% } else { %}\n {%=(state.blankText || '目前还没有内容')%}\n {% } %}\n </div>\n </div>\n </div>\n\n {% } %}\n\n </div>\n\n {%= component.ft %}\n\n </article>\n\n</div>\n\n"}}),define("cardkit/tpl/scaffold/hdwrap",[],function(){return{template:'\n{% if (component.hd) { %}\n<header class="ck-hd-wrap">\n\n {%= component.hd %}\n\n {% if (component.hdOpt.length) { %}\n <div class="ck-hdopt-wrap">\n {%= component.hdOpt.join(\'\') %}\n </div>\n {% } %}\n\n</header>\n{% } %}\n'}}),define("cardkit/card/list",["darkdom","mo/template/micro","cardkit/tpl/scaffold/hdwrap","cardkit/tpl/list","cardkit/card/item","cardkit/card/common/scaffold"],function(a,b,c,d,e,f,g){var h=g("darkdom"),i=g("mo/template/micro").convertTpl,j=i(g("cardkit/tpl/scaffold/hdwrap").template),k=i(g("cardkit/tpl/list").template),l=g("cardkit/card/item"),m=g("cardkit/card/common/scaffold"),n={item:l.item,list:function(){var a=h({enableSource:!0,render:function(a){var b=a.state;return a.hasSplitHd="true"===b.plainStyle||"true"===b.plainHdStyle||"split"===b.subtype,a.hdwrap=j(a),k(a)}});return a.contain(m),a.contain("item",n.item),a}};return n}),define("cardkit/tpl/box",[],function(){return{template:"<div class=\"ck-box-card {%= state.customClass %}\"\n data-style=\"{%= state.subtype %}\"\n {%= state.paperStyle ? 'data-cfg-paper=\"true\" ' : '' %}\n {%= state.plainStyle ? 'data-cfg-plain=\"true\" ' : '' %}\n {%= state.plainHdStyle ? 'data-cfg-plainhd=\"true\" ' : '' %}>\n\n {% if (hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n <article class=\"ck-card-wrap\">\n\n {% if (!hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n {% if (!isBlank) { %}\n <section>{%= component.collect.join('') || content %}</section>\n {% } %}\n\n {%= component.ft %}\n\n </article>\n\n</div>\n"}}),define("cardkit/tpl/box/collect",[],function(){return{template:'<div class="ck-content">{%= content %}</div>\n'}}),define("cardkit/tpl/box/content",[],function(){return{template:'<div class="ck-content">{%= content %}</div>\n'}}),define("cardkit/card/box",["darkdom","mo/template/micro","cardkit/helper","cardkit/tpl/box/content","cardkit/tpl/box/collect","cardkit/tpl/scaffold/hdwrap","cardkit/tpl/box","cardkit/card/common/scaffold"],function(a,b,c,d,e,f,g,h,i){var j=i("darkdom"),k=i("mo/template/micro").convertTpl,l=i("cardkit/helper"),m=k(i("cardkit/tpl/box/content").template),n=k(i("cardkit/tpl/box/collect").template),o=k(i("cardkit/tpl/scaffold/hdwrap").template),p=k(i("cardkit/tpl/box").template),q=i("cardkit/card/common/scaffold"),r={content:function(){return j({enableSource:!0,sourceAsContent:!0,render:m})},collect:function(){return j({enableSource:!0,sourceAsContent:!0,render:n})},box:function(){var a=j({enableSource:!0,render:function(a){return a.isBlank=!a.component.collect.length&&l.isBlank(a.content),a.hasSplitHd="true"===a.state.plainStyle||"true"===a.state.plainHdStyle,a.hdwrap=o(a),p(a)}});return a.contain(q),a.contain("content",r.content,{content:!0}),a.contain("collect",r.collect),a}};return r}),define("cardkit/tpl/form",[],function(){return{template:"<div class=\"ck-form-card {%= (state.blankText === 'false' ? 'no-blank' : '') %} {%= state.customClass %}\"\n data-style=\"{%= state.subtype %}\"\n {%= state.plainHdStyle ? 'data-cfg-plainhd=\"true\" ' : '' %}>\n\n {% if (hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n <article class=\"ck-card-wrap\">\n\n {% if (!hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n {% if (component.item.length) { %}\n {% component.item.forEach(function(item){ %}\n {%= item %}\n {% }); %}\n {% } else { %}\n <div class=\"ck-item blank\">\n {% if (component.blank) { %}\n {%= component.blank %}\n {% } else { %}\n {%=(state.blankText || '目前还没有内容')%}\n {% } %}\n </div>\n {% } %}\n\n {%= component.ft %}\n\n </article>\n\n</div>\n"}}),define("cardkit/tpl/form/content",[],function(){return{template:'<div class="ck-content">{%= content %}</div>\n'}}),define("cardkit/tpl/form/title",[],function(){return{template:'<label class="ck-title">{%= content %}</label>\n'}}),define("cardkit/tpl/form/item",[],function(){return{template:'<div class="ck-item">\n {%= component.title %}\n {%= content %}\n</div>\n'}}),define("cardkit/card/form",["darkdom","mo/template/micro","cardkit/tpl/form/item","cardkit/tpl/form/title","cardkit/tpl/form/content","cardkit/tpl/scaffold/hdwrap","cardkit/tpl/form","cardkit/helper","cardkit/card/common/scaffold"],function(a,b,c,d,e,f,g,h,i,j){var k=j("darkdom"),l=j("mo/template/micro").convertTpl,m=l(j("cardkit/tpl/form/item").template),n=l(j("cardkit/tpl/form/title").template),o=l(j("cardkit/tpl/form/content").template),p=l(j("cardkit/tpl/scaffold/hdwrap").template),q=l(j("cardkit/tpl/form").template),r=j("cardkit/helper"),s=j("cardkit/card/common/scaffold"),t={title:function(){return k({unique:!0,enableSource:!0,render:n})},content:function(){return k({enableSource:!0,sourceAsContent:!0,render:o})},item:function(){var a=k({enableSource:!0,render:m}).contain("content",t.content,{content:!0}).contain("title",t.title);return r.forwardInputEvents(a),a},form:function(){var a=k({enableSource:!0,render:function(a){return a.hasSplitHd="true"===a.state.plainStyle||"true"===a.state.plainHdStyle,a.hdwrap=p(a),q(a)}});return a.contain(s),a.contain("item",t.item),a}};return t}),define("cardkit/tpl/mini",[],function(){return{template:'<div class="ck-mini-card {%= (state.blankText === \'false\' ? \'no-blank\' : \'\') %} {%= state.customClass %}"\n data-style="{%= state.subtype %}">\n\n {% if (hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n\n <article class="ck-card-wrap {%= (component.item.length > 1 ? \'slide\' : \'\') %}">\n\n {% if (!hasSplitHd) { %}\n {%= hdwrap %}\n {% } %}\n \n <div class="ck-list-wrap">\n\n {% if (component.item.length) { %}\n\n <div class="ck-list" style="width:{%= listWidth %};">\n {% component.item.forEach(function(item){ %}\n <div class="ck-col" style="width:{%= itemWidth %};">\n {%= item %}\n </div>\n {% }); %}\n </div>\n\n {% } else { %}\n\n <div class="ck-list">\n <div class="ck-item blank">\n <div class="ck-initem">\n {% if (component.blank) { %}\n {%= component.blank %}\n {% } else { %}\n {%=(state.blankText || \'目前还没有内容\')%}\n {% } %}\n </div>\n </div>\n </div>\n\n {% } %}\n\n </div>\n\n {%= component.ft %}\n\n </article>\n\n</div>\n\n'}}),define("cardkit/card/mini",["darkdom","mo/template/micro","cardkit/tpl/scaffold/hdwrap","cardkit/tpl/mini","cardkit/card/item","cardkit/card/common/scaffold"],function(a,b,c,d,e,f,g){var h=g("darkdom"),i=g("mo/template/micro").convertTpl,j=i(g("cardkit/tpl/scaffold/hdwrap").template),k=i(g("cardkit/tpl/mini").template),l=g("cardkit/card/item"),m=g("cardkit/card/common/scaffold"),n={item:l.item,mini:function(){var a=h({enableSource:!0,render:function(a){a.hasSplitHd=!0,a.hdwrap=j(a);var b=a.component.item.length;return a.listWidth=b>1?100*b*.94+"%":"",a.itemWidth=Math.floor(1e3/b)/10+"%",k(a)}});return a.contain(m),a.contain("item",n.item),a}};return n}),define("cardkit/tpl/page",[],function(){return{template:'\n<div class="ck-page-card{%= !hasHeader ? \' no-header\' : \'\' %}{%= !component.banner || componentData.banner.isBlank ? \'\' : \' with-banner\' %}{%= state.isPageActive === \'true\' ? \' topbar-enabled\' : \'\' %}" \n data-style="{%= state.subtype %}"\n data-page-active="{%= state.isPageActive || \'false\' %}"\n data-deck-active="{%= state.isDeckActive || \'false\' %}"\n data-deck="{%= (state.deck || \'main\') %}"\n data-curdeck="{%= state.currentDeck %}"\n data-fixed-minheight="{%= (state.fixedMinHeight === \'false\' && \'false\' || \'true\') %}"\n data-cardid="{%= state.cardId %}">\n\n {% if (hasHeader) { %}\n <div class="ck-header">\n <div class="ck-header-shd"></div>\n {%= component.nav %}\n {%= component.title %}\n {%= component.actionbar %}\n </div>\n {% } %}\n\n {%= component.banner %}\n\n <div class="ck-article">\n {% if (!isBlank) { %}\n {%= content %}\n {% } else { %}\n <div class="ck-blank-card">\n <article class="ck-card-wrap">\n {% if (component.blank) { %}\n {%= component.blank %}\n {% } else { %}\n <div>{%=(state.blankText || \'目前还没有内容\')%}</div>\n {% } %}\n </article>\n </div>\n {% } %}\n </div>\n\n {% if (component.footer) { %}\n <div class="ck-footer">{%= component.footer %}</div>\n {% } %}\n\n <a class="ck-page-link-mask ck-link" href="#{%= state.cardId %}"></a>\n\n</div>\n\n'}}),define("cardkit/tpl/page/actionbar/action",[],function(){return{template:'\n<span class="ck-top-act">\n <button type="button" class="ck-option" \n value="{%= id %}">{%= state.label %}</button>\n {%= content %}\n</span>\n'}}),define("cardkit/tpl/page/actionbar",[],function(){return{template:'<div class="ck-top-actions">\n\n {% if (overflowActions.length) { %}\n <span class="ck-top-overflow"\n data-title="More actions...">\n {% overflowActions.forEach(function(action){ %}\n {%= action %}\n {% }); %}\n </span>\n {% } %}\n\n {% visibleActions.forEach(function(action){ %}\n {%= action %}\n {% }); %}\n\n</div>\n'}}),define("cardkit/tpl/page/banner",[],function(){return{template:'<div class="ck-top-banner"\n {%= state.plainStyle ? \'data-cfg-plain="true" \' : \'\' %}>\n <div class="ck-top-banner-inner">{%= content %}</div>\n</div>\n'}}),define("cardkit/tpl/page/nav",[],function(){return{template:'{% if (content) { %}\n<span class="ck-top-nav">{%= content %}</span>\n{% } else { %}\n<a class="ck-top-nav ck-link" href="{%= state.link %}"></a>\n{% } %}\n'}}),define("cardkit/tpl/page/title",[],function(){return{template:'<div class="ck-top-title">{%= content %}</div>\n'}
}),define("cardkit/card/page",["darkdom","mo/lang/mix","mo/template/micro","cardkit/helper","cardkit/tpl/page/title","cardkit/tpl/page/nav","cardkit/tpl/page/banner","cardkit/tpl/page/actionbar","cardkit/tpl/page/actionbar/action","cardkit/tpl/page","cardkit/card/box","cardkit/card/list","cardkit/card/mini","cardkit/card/form"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(a){var b=a.root;return"true"===a.newValue?("false"!==b.attr("data-fixed-minheight")&&b.css("min-height",1.4*window.innerHeight+"px"),b.attr("data-page-active",!0),setTimeout(function(){b.addClass("topbar-enabled"),window.scrollTo(0,0)},100)):b.attr("data-page-active",!1).removeClass("topbar-enabled"),!1}function q(a){var b=a.root;return"true"===a.newValue?("false"!==b.attr("data-fixed-minheight")&&b.css("min-height",1.4*window.innerHeight+"px"),b.attr("data-deck-active",!0)):(b.attr("data-deck-active",!1),setTimeout(function(){window.scrollTo(0,0)},300)),!1}function r(a){return a.root.attr("data-curdeck",a.newValue),!1}var s=o("darkdom"),t=o("mo/lang/mix"),u=o("mo/template/micro").convertTpl,v=o("cardkit/helper"),w=u(o("cardkit/tpl/page/title").template),x=u(o("cardkit/tpl/page/nav").template),y=u(o("cardkit/tpl/page/banner").template),z=u(o("cardkit/tpl/page/actionbar").template),A=u(o("cardkit/tpl/page/actionbar/action").template),B=u(o("cardkit/tpl/page").template),C={box:o("cardkit/card/box").box,list:o("cardkit/card/list").list,mini:o("cardkit/card/mini").mini,form:o("cardkit/card/form").form},D={title:function(){return s({unique:!0,enableSource:!0,render:w})},nav:function(){return s({unique:!0,enableSource:!0,render:x})},banner:function(){return s({unique:!0,enableSource:!0,render:function(a){return a.isBlank=v.isBlank(a.content),y(a)}})},action:function(){return s({enableSource:!0,entireAsContent:!0,render:A})},actionbar:function(){var a=s({unique:!0,enableSource:!0,render:function(a){var b=a.state.limit||1;return a.visibleActions=[],a.overflowActions=[],a.componentData.action.forEach(function(c,d){var e=a.component.action[d];this.length<b&&!c.state.forceOverflow?this.push(e):a.overflowActions.push(e)},a.visibleActions),z(a)}}).contain("action",D.action);return v.forwardActionEvents(a),a},blank:function(){return s({unique:!0,enableSource:!0,render:function(a){return"<div>"+a.content+"</div>"}})},footer:function(){return s({unique:!0,enableSource:!0,render:function(a){return"<div>"+a.content+"</div>"}})},page:function(){var a=s({render:function(a){var b=a.component;return a.hasHeader=b.title||b.nav||b.actionbar,a.isBlank=v.isBlank(a.content),B(a)}}),b=t.copy(D);return delete b.page,a.contain(b),a.contain(C,{content:!0}),a.response("state:isPageActive",p),a.response("state:isDeckActive",q),a.response("state:currentDeck",r),v.forwardStateEvents(a),a}};return D}),define("cardkit/spec",["cardkit/spec/page","cardkit/card/page","cardkit/spec/box","cardkit/card/box","cardkit/spec/list","cardkit/card/list"],function(a,b,c,d,e,f,g){return{page:[g("cardkit/spec/page"),g("cardkit/card/page")],box:[g("cardkit/spec/box"),g("cardkit/card/box")],list:[g("cardkit/spec/list"),g("cardkit/card/list")]}}),define("cardkit",["mo/lang","dollar","mo/mainloop","cardkit/spec","cardkit/oldspec","cardkit/ui","cardkit/supports","cardkit/bus"],function(a,b,c,d,e,f,g,h){function i(a){"true"!==a.getDarkState("isPageActive")&&a.trigger("pageCard:willOpen").setDarkState("isPageActive",!0,{update:!0}).trigger("pageCard:opened")}function j(a){"true"===a.getDarkState("isPageActive")&&a.trigger("pageCard:willClose").setDarkState("isPageActive",!1,{update:!0}).trigger("pageCard:closed")}function k(a){"true"!==a.getDarkState("isDeckActive")&&a.trigger("pageCard:willFocus").setDarkState("isDeckActive",!0,{update:!0}).trigger("pageCard:focused")}function l(a){"true"===a.getDarkState("isDeckActive")&&a.trigger("pageCard:willBlur").setDarkState("isDeckActive",!1,{update:!0}).trigger("pageCard:blured")}function m(a){a.setDarkState("currentDeck",this,{update:!0})}var n,o,p="main",q="unmount-page",r=/#(.+)$/,s=document,t=s.body,u={},v={},w={},x={},y={appWrapper:null,defaultPage:"ckDefault",oldStyle:!1,hybirdMode:!1},z={init:function(b){this._config=a.config({},b,y),this._specs=this._config.oldStyle?e:d,this.initSpec(),this.initView()},initSpec:function(){a.each(d,function(a,b){var c=this._specs[b][0];this.component(b,a[1][b]()),v[b]=c},this)},initView:function(){this.wrapper=b(this._config.appWrapper||t),g.webview&&this.wrapper.addClass("ck-in-webview"),this._config.hybirdMode&&this.wrapper.addClass("ck-in-hybird"),g.noBugWhenFixed||this.wrapper.addClass("ck-bugfix-fixed"),h.on("ready",function(){b(window).on("hashchange",function(a){a.preventDefault(),z.openPage()})}),f.init(this._config)},component:function(a,b){return b?void(u[a]=b):u[a]},guard:function(a){return w[a]||(w[a]=this.component(a).createGuard()),w[a]},render:function(a,b){var c=v[a],d=this.guard(a);c&&d&&(c(d,b||this.wrapper),d.mount())},scrollPageTo:function(a){var d=b(".ck-page-card #"+a);d[0]&&c.addTween("scrollPage",window.scrollY,d.offset().top,400,{easing:"ease",step:function(a){window.scrollTo(0,a)},callback:function(){c.pause()}}).run("scrollPage")},openPageByNode:function(a){var b=this._specs.page[0],c=a.closest(b.SELECTOR);if(c[0]||(c=a.closest(b.SELECTOR_OLD)),c[0]){var d=x[n];d&&d[0]===c[0]||this.openPage(c)}return c},openPage:function(c){if(o)return!1;c=this.findPage(c);var d=c[1];c=c[0];var e=this.isPage(c);if(d&&c[0]&&!e)return this.openPageByNode(c),setTimeout(function(){this.scrollPageTo(d)}.bind(this),400),!0;var f=x[p],g=!f;if(!c[0]||!e){if(!g)return!1;location.replace("#"+this._config.defaultPage),c=b("#"+this._config.defaultPage)}window.scrollTo(0,0),g&&(f=b("#"+this._config.defaultPage),c[0]!==f[0]&&(x[p]=f,this.openPage(f))),o=!0,c[0].isMountedDarkDOM||(c.addClass(q),this.render("page"),c.removeClass(q));var r=c.getDarkState("deck")||p,s=x[r];if(f=x[n],x[r]=c,a.each(x,m,r),r!==n){var u="modalview"===n;n=r,u&&z.closeModal(),f&&b.contains(t,f[0])&&l(f)}return s&&s[0]!==c[0]&&b.contains(t,s[0])&&j(s),g&&c.once("pageCard:opened",function(){h.resolve("ready")}),i(c),k(c),o=!1,!0},resetPage:function(a){a=this.findPage(a)[0],a[0]&&a.resetDarkDOM()},updatePage:function(a){a=a?this.findPage(a)[0]:this.currentPage()[0],a.updateDarkDOM()},currentPage:function(){return x[n]||b()},findPage:function(a){var c;if(a&&"string"!=typeof a)a=b(a);else{var d=r.exec(location.href);c=a||d&&d[1]||this._config.defaultPage,a=b("#"+c)}return[a,c]},isPage:function(a){var b=this._specs.page[0];return a.is(b.SELECTOR)||b.SELECTOR_OLD&&a.is(b.SELECTOR_OLD)},isLandscape:function(){return window.innerWidth/window.innerHeight>1.1},brightDelegate:f.brightDelegate,darkDelegate:f.darkDelegate,ui:f,event:h};return a.mix(z,f.action),a.mix(z,f.component),z.openURL=z.openLink,z.modalCard.event.on("open",function(a){a.lastDecktop=x[n],z.openPage(a.pageNode())}).on("willUpdateContent",function(a){var b=a.pageNode();b[0]&&b[0].isMountedDarkDOM&&z.resetPage(b)}).on("close",function(a){"modalview"===n&&z.openPage(a.lastDecktop)}),z}),require.config({baseUrl:"vendor/"}),define("mo/easing/functions",[],function(){}),define("mo/mainloop",[],function(){}),require(["cardkit"],function(){});