(function(){var v=this,q=document,A=navigator.userAgent,D="uki"+ +new Date,s=Math.max,z=Math.min,H=Math.floor,F=Math.ceil;v.uki=v.uki||function(b,a){if(typeof b==="string"){var c=b.match(/^#((?:[\w\u00c0-\uFFFF_-]|\\.)+)$/),e=c&&uki._ids[c[1]];if(c&&!a)return new uki.Collection(e?[e]:[]);return uki.find(b,a)}if(b.length===undefined)b=[b];if(b.length>0&&uki.isFunction(b[0].typeName))return new uki.Collection(b);return uki.build(b)};uki.version="0.3.5";uki.guid=1;uki.F=function(){return false};uki._ids=
{};uki.registerId=function(b){uki._ids[uki.attr(b,"id")]=b};uki.unregisterId=function(b){uki._ids[uki.attr(b,"id")]=undefined};var K=Object.prototype.toString,L=String.prototype.trim,I=Array.prototype.slice,M=/^\s+|\s+$/g,J={attr:function(b,a,c){if(c!==undefined){if(b[a]&&b[a].apply)b[a](c);else b[a]=c;return b}else return b[a]&&b[a].apply?b[a]():b[a]},proxy:function(b,a){var c=I.call(arguments,2),e=function(){return b.apply(a,c.concat(I.call(arguments,0)))};e.huid=b.huid=b.huid||uki.guid++;return e},
isFunction:function(b){return K.call(b)==="[object Function]"},isArray:function(b){return K.call(b)==="[object Array]"},trim:function(b){b=b||"";return L?L.call(b):b.replace(M,"")},escapeHTML:function(b){var a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};return(b+"").replace(/[&<>\"\']/g,function(c){return a[c]})},each:function(b,a,c){var e,f=0,d=b.length;if(d===undefined)for(e in b){if(!(!e||b[e]===undefined||!b.hasOwnProperty(e)))if(a.call(c||b[e],e,b[e])===false)break}else for(e=
b[0];f<d&&a.call(c||e,f,e)!==false;e=b[++f]);return b},inArray:function(b,a){for(var c=0,e=a.length;c<e;c++)if(a[c]===b)return c;return-1},unique:function(b){if(b.length&&(typeof b[0]=="object"||typeof b[0]=="function")){var a=[],c;for(c=0;c<b.length;c++){b[c].__uki_marked||(a[a.length]=b[c]);b[c].__uki_marked=true}for(c=0;c<a.length;c++)delete a[c].__uki_marked;return a}else{a=[];var e={};c=0;for(var f=b.length;c<f;c++){var d=b[c];if(!e[d]){e[d]=true;a.push(b[c])}}return a}},grep:function(b,a){for(var c=
[],e=0,f=b.length;e<f;e++)a(b[e],e)&&c.push(b[e]);return c},map:function(b,a,c){for(var e=[],f=uki.isFunction(a)?a:function(k){return uki.attr(k,a)},d=0,g=b.length;d<g;d++){var h=f.call(c||b[d],b[d],d);if(h!=null)e[e.length]=h}return e},reduce:function(b,a,c,e){for(var f=0,d=a.length;f<d;f++)b=c.call(e||a[f],b,a[f],f);return b},extend:function(){for(var b=arguments[0]||{},a=1,c=arguments.length,e;a<c;a++)if((e=arguments[a])!=null)for(var f in e){var d=e[f];if(d!==undefined)b[f]=d}return b},newClass:function(){var b=
function(){this.init.apply(this,arguments)},a,c;c=0;var e;a=[];var f,d;f=arguments;var g;if((g=f.length)>1)if(f[0].prototype){a=function(){};a.prototype=arguments[0].prototype;b.prototype=new a;c=1;a=[a.prototype]}for(c=c;c<g;c++){f=arguments[c];if(this.isFunction(f)){e={};f.apply(e,a);f=e}a[a.length]=f;for(d in f){e=f[d];!f.hasOwnProperty(d)||e===undefined||(b.prototype[d]=e)}}if(!b.prototype.init)b.prototype.init=function(){};return b},binarySearch:function(b,a){for(var c=0,e=a.length,f;c<e;){f=
c+e>>1;a[f]<b?(c=f+1):(e=f)}return c},newProp:function(b,a){return function(c){if(c===undefined)return this[b];if(a)a.call(this,c);else this[b]=c;return this}},addProps:function(b,a){for(var c=0,e=a.length;c<e;c++)b[a[c]]=uki.newProp("_"+a[c])},toArray:function(b){return I.call(b,0)},delegateProp:function(b,a,c){var e="_"+a;b[a]=function(f){if(f===undefined){if(this[c])return uki.attr(this[c],a,f);return this[e]}if(this[c])uki.attr(this[c],a,f);else this[e]=f;return this}},camalize:function(b){return b.replace(/[-_]\S/g,
function(a){return a.substr(1).toUpperCase()})},dasherize:function(b){return b.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}};J.extend(uki,J);delete J;uki.geometry={};var y=uki.geometry.Point=function(b,a){this.x=b*1||0;this.y=a*1||0};y.prototype={toString:function(){return this.x+" "+this.y},clone:function(){return new y(this.x,this.y)},eq:function(b){return this.x==b.x&&this.y==b.y},offset:function(b,a){if(typeof b=="object"){a=b.y;b=b.x}this.x+=b;this.y+=a;return this},constructor:y};
y.fromString=function(b){b=b.split(/\s+/);return new y(b[0],b[1])};var t=uki.geometry.Size=function(b,a){this.width=b*1||0;this.height=a*1||0};t.prototype={toString:function(){return this.width+" "+this.height},clone:function(){return new t(this.width,this.height)},eq:function(b){return this.width==b.width&&this.height==b.height},empty:function(){return this.width<=0||this.height<=0},constructor:t};t.fromString=function(b){b=b.split(/\s+/);return new t(b[0],b[1])};t.create=function(b,a){if(b===undefined)return null;
if(b.width!==undefined)return b;if(/\S+\s+\S+/.test(b+""))return t.fromString(b,a);return new t(b,a)};var r=uki.geometry.Rect=function(b,a,c,e){if(c!==undefined){this.x=b*1||0;this.y=a*1||0;this.width=c*1||0;this.height=e*1||0}else if(b===undefined||b.x===undefined){this.y=this.x=0;this.width=b*1||0;this.height=a*1||0}else{this.x=b?b.x*1:0;this.y=b?b.y*1:0;this.width=a?a.width*1:0;this.height=a?a.height*1:0}};r.prototype={toString:function(){return[this.x,this.y,this.width,this.height].join(" ")},
toCoordsString:function(){return[this.x,this.y,this.maxX(),this.maxY()].join(" ")},clone:function(){return new r(this.x,this.y,this.width,this.height)},minX:function(){return this.x},maxX:function(){return this.x+this.width},midX:function(){return this.x+this.width/2},minY:function(){return this.y},midY:function(){return this.y+this.height/2},maxY:function(){return this.y+this.height},normalize:function(){this.x=this.y=0;return this},empty:t.prototype.empty,eq:function(b){return b&&this.x==b.x&&this.y==
b.y&&this.height==b.height&&this.width==b.width},inset:function(b,a){this.x+=b;this.y+=a;this.width-=b*2;this.height-=a*2;return this},offset:y.prototype.offset,intersection:function(b){var a=new y(s(this.x,b.x),s(this.y,b.y));b=new t(z(this.maxX(),b.maxX())-a.x,z(this.maxY(),b.maxY())-a.y);return b.empty()?new r:new r(a,b)},union:function(b){return r.fromCoords(z(this.x,b.x),z(this.y,b.y),s(this.maxX(),b.maxX()),s(this.maxY(),b.maxY()))},containsPoint:function(b){return b.x>=this.minX()&&b.x<=this.maxX()&&
b.y>=this.minY()&&b.y<=this.maxY()},containsRect:function(b){return this.eq(this.union(b))},constructor:r};r.prototype.left=r.prototype.minX;r.prototype.top=r.prototype.minY;r.fromCoords=function(b,a,c,e){if(c===undefined)return new r(b.x,b.y,a.x-b.x,a.y-b.y);return new r(b,a,c-b,e-a)};r.fromCoordsString=function(b){b=b.split(/\s+/);return r.fromCoords(b[0],b[1],b[2],b[3])};r.fromString=function(b){b=b.split(/\s+/);if(b.length>2)return new r(b[0],b[1],b[2],b[3]);return new r(b[0],b[1])};r.create=
function(b,a,c,e){if(b===undefined)return null;if(b.x!==undefined)return b;if(/\S+\s+\S+/.test(b+""))return r.fromString(b,a);if(c===undefined)return new r(b,a);return new r(b,a,c,e)};var w=uki.geometry.Inset=function(b,a,c,e){this.top=b*1||0;this.right=a*1||0;this.bottom=c===undefined?this.top*1:c*1;this.left=e===undefined?this.right*1:e*1};w.prototype={toString:function(){return[this.top,this.right,this.bottom,this.left].join(" ")},clone:function(){return new w(this.top,this.right,this.bottom,this.left)},
width:function(){return this.left+this.right},height:function(){return this.top+this.bottom},negative:function(){return this.top<0||this.left<0||this.right<0||this.bottom<0},empty:function(){return!this.top&&!this.left&&!this.right&&!this.bottom}};w.fromString=function(b){b=b.split(/\s+/);if(b.length<3)b[2]=b[0];if(b.length<4)b[3]=b[1];return new w(b[0],b[1],b[2],b[3])};w.create=function(b,a,c,e){if(b===undefined)return null;if(b.top!==undefined)return b;if(/\S+\s+\S+/.test(b+""))return w.fromString(b,
a);if(c===undefined)return new w(b,a);return new w(b,a,c,e)};uki.dom={createElement:function(b,a,c){b=q.createElement(b);if(a)b.style.cssText=a;if(c)b.innerHTML=c;b[D]=uki.guid++;return b},probe:function(b,a){var c=q.body;c.appendChild(b);a=a(b);c.removeChild(b);return a},layout:function(b,a,c){c=c||{};if(c.left!=a.left)b.left=a.left+"px";if(c.top!=a.top)b.top=a.top+"px";if(c.right!=a.right)b.right=a.right+"px";if(c.bottom!=a.bottom)b.bottom=a.bottom+"px";if(c.width!=a.width)b.width=s(a.width,0)+
"px";if(c.height!=a.height)b.height=s(a.height,0)+"px";return a},computedStyle:function(b){if(q&&q.defaultView&&q.defaultView.getComputedStyle)return q.defaultView.getComputedStyle(b,null);else if(b.currentStyle)return b.currentStyle},contains:function(b,a){try{if(b.contains)return b.contains(a);if(b.compareDocumentPosition)return!!(b.compareDocumentPosition(a)&16)}catch(c){}for(;a&&a!=b;)try{a=a.parentNode}catch(e){a=null}return b==a},createStylesheet:function(b){var a=q.createElement("style");q.getElementsByTagName("head")[0].appendChild(a);
if(a.styleSheet)a.styleSheet.cssText=b;else a.appendChild(document.createTextNode(b));return a}};uki.each(["createElement"],function(b,a){uki[a]=uki.dom[a]});uki.dom.special={};uki.dom.Event=function(b){b=b||{};this.domEvent=b.domEvent||b;for(var a=uki.dom.props.length,c;a;){c=uki.dom.props[--a];this[c]=b[c]}};uki.dom.Event.prototype=new (function(){function b(){return true}this.preventDefault=function(){var a=this.domEvent;a.preventDefault&&a.preventDefault();a.returnValue=false;this.isDefaultPrevented=
b};this.stopPropagation=function(){var a=this.domEvent;a.stopPropagation&&a.stopPropagation();a.cancelBubble=true;this.isPropagationStopped=b};this.isDefaultPrevented=this.isPropagationStopped=uki.F});uki.extend(uki.dom,{bound:{},handlers:{},props:"type altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which dragOffset dataTransfer".split(" "),
events:"blur focus load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error draggesturestart draggestureend draggesture dragstart dragend drag drop dragenter dragleave dragover".split(" "),bind:function(b,a,c){if(b.setInterval&&b!=window)b=window;c.huid=c.huid||uki.guid++;var e=b[D]=b[D]||uki.guid++,f=uki.dom.handlers[e]=uki.dom.handlers[e]||function(){uki.dom.handler.apply(arguments.callee.elem,
arguments)},d,g;f.elem=b;uki.dom.bound[e]||(uki.dom.bound[e]={});a=a.split(" ");for(d=0;d<a.length;d++){g=a[d];if(!uki.dom.bound[e][g]){uki.dom.bound[e][g]=[];if(!uki.dom.special[g]||uki.dom.special[g].setup.call(b)===false)b.addEventListener?b.addEventListener(g,f,false):b.attachEvent("on"+g,f)}uki.dom.bound[e][g].push(c)}c=f=b=null},unbind:function(b,a,c){var e=b[D],f=c&&c.huid,d,g;if(a)a=a.split(" ");else{a=[];uki.each(uki.dom.bound[e]||[],function(k){a.push(k)})}for(d=0;d<a.length;d++){g=a[d];
if(!(!e||!uki.dom.bound[e]||!uki.dom.bound[e][g])){uki.dom.bound[e][g]=c?uki.grep(uki.dom.bound[e][g],function(k){return k.huid!==f}):[];if(uki.dom.bound[e][g].length==0){var h=uki.dom.handlers[e];if(!uki.dom.special[g]||uki.dom.special[g].teardown.call(b)===false)b.removeEventListener?b.removeEventListener(g,h,false):b.detachEvent("on"+g,h);uki.dom.bound[e][g]=null}}}},handler:function(b){b=b||v.event;var a=b.type,c=this[D],e=uki.dom.bound[c];if(!b.domEvent){b=new uki.dom.Event(b);b=uki.dom.fix(b)}if(!(!c||
!e||!e[a])){uki.after.start();c=0;for(e=e[a];c<e.length;c++)e[c].call(this,b);uki.after.stop()}},fix:function(b){if(!b.target)b.target=b.srcElement||q;if(b.target.nodeType==3)b.target=b.target.parentNode;if(!b.relatedTarget&&b.fromElement)b.relatedTarget=b.fromElement==b.target?b.toElement:b.fromElement;if(b.pageX==null&&b.clientX!=null){var a=q.documentElement,c=q.body;b.pageX=b.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a.clientLeft||0);b.pageY=b.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-
(a.clientTop||0)}if(!b.which&&(b.charCode||b.charCode===0?b.charCode:b.keyCode))b.which=b.charCode||b.keyCode;if(!b.metaKey&&b.ctrlKey)try{b.metaKey=b.ctrlKey}catch(e){}if(!b.which&&b.button)b.which=b.button&1?1:b.button&2?3:b.button&4?2:0;return b},preventDefaultHandler:function(b){b&&b.preventDefault();return false}});uki.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(b,a){var c=function(e){if(!uki.dom.contains(this,e.relatedTarget)){e.type=a;uki.dom.handler.apply(this,arguments)}};
uki.dom.special[a]={setup:function(){uki.dom.bind(this,b,c)},teardown:function(){uki.dom.unbind(this,b,c)}}});v.attachEvent&&v.attachEvent("onunload",function(){uki.each(uki.dom.bound,function(b,a){uki.each(a,function(c){try{uki.dom.handlers[b].elem.detachEvent("on"+c,uki.dom.handlers[b])}catch(e){}})})});(function(){function b(l){if(!d.draggable){d.draggable=l;uki.dom.bind(q,"mousemove scroll",e);uki.dom.bind(q,k,f);uki.dom.bind(q,"selectstart mousedown",uki.dom.preventDefaultHandler)}}function a(){d.draggable=
null;uki.dom.unbind(q,"mousemove scroll",e);uki.dom.unbind(q,k,f);uki.dom.unbind(q,"selectstart mousedown",uki.dom.preventDefaultHandler)}function c(l){l=new uki.dom.Event(l);l.type="draggesturestart";uki.dom.handler.apply(this,arguments);if(!l.isDefaultPrevented()){b(this);d.position=new y(-l.pageX,-l.pageY)}}function e(l){l=new uki.dom.Event(l);l.type="draggesture";l.dragOffset=(new y(l.pageX,l.pageY)).offset(d.position);uki.dom.handler.apply(d.draggable,arguments);l.isDefaultPrevented()&&a(d.draggable)}
function f(l){l=new uki.dom.Event(l);l.type="draggestureend";l.dragOffset=(new y(l.pageX,l.pageY)).offset(d.position);uki.dom.handler.apply(d.draggable,arguments);a(d.draggable)}var d=uki.dom.dnd={draggable:null,nativeDnD:false,position:null};try{if(typeof q.createEvent("MouseEvent").dataTransfer=="object"||q.createEvent("DragEvent").initDragEvent)d.nativeDnD=!A.match(/Chrome\/4/)}catch(g){}var h={setup:function(){if(this.__draggesturebound)this.__draggesturebound++;else{this.__draggesturebound=1;
uki.dom.bind(this,"mousedown",c);if(!d.nativeDnD&&typeof this.ondragstart=="object")this.ondragstart=function(){event.returnValue=false}}},teardown:function(){this.__draggesturebound--;this.__draggesturebound||uki.dom.unbind(this,"mousedown",c)}};uki.extend(uki.dom.special,{draggesturestart:h,draggestureend:h,draggesture:h});var k="mouseup "+(d.nativeDnD?" dragend":"")})();(function(){function b(j){if(uki.isFunction(j.dom)){if(j.parent().length)return j.dom();var o=uki.createElement("div","width:1px;height:1px;position:absolute;left:-999em;top:0");
q.body.appendChild(o);j.attachTo(o);return o}return j}function a(j){j=new uki.dom.Event(j);var o=j.dataTransfer;j.dataTransfer=new uki.dom.DataTransferWrapper(o);uki.dom.handler.apply(this,arguments);o.effectAllowed=j.dataTransfer.effectAllowed;o.dropEffect=j.dataTransfer.dropEffect}function c(j){uki.dom.bind(j,"draggestureend",h)}function e(j){if(k.dataTransfer){k.dataTransfer.cleanup();k.dragOver=k.dataTransfer=k.target=null;uki.dom.unbind(j,"draggestureend",h)}}function f(j){if(!(!k.dataTransfer||
j.domEvent.__dragEntered||!l)){j=new uki.dom.Event(j);j.domEvent.__dragEntered=true;if(k.dragOver!=this){k.dragOver=this;j.type="dragenter";uki.dom.handler.apply(this,arguments)}}}function d(j){if(l){if(!j.domEvent.__dragEntered&&k.dragOver){j=new uki.dom.Event(j);j.type="dragleave";uki.dom.handler.apply(k.dragOver,arguments);k.dragOver=null}}else{if(k.dataTransfer){j.type="drag";j.target=k.target}else if(j.dragOffset.x>k.dragDelta||j.dragOffset.y>k.dragDelta){var o=j.target,x=this.parentNode;try{for(;o&&
o!=x&&!o.getAttribute("draggable");)o=o.parentNode}catch(u){o=null}if(o&&o.getAttribute("draggable")){k.target=j.target=o;j.type="dragstart";k.dataTransfer=j.dataTransfer=new uki.dom.DataTransfer(j.domEvent.dataTransfer);c(this)}else return}else return;j=new uki.dom.Event(j);uki.dom.handler.apply(this,arguments);j.isDefaultPrevented()?e(this):g(j)}}function g(j){var o=k.dataTransfer._dragImage.style,x=j.domEvent.type;j.stopPropagation();j.preventDefault();o.left="-999em";o=q.elementFromPoint(j.pageX,
j.pageY);k.dataTransfer.update(j);try{var u;l=true;try{if(q.createEventObject){u=q.createEventObject();for(var G=p.length,E;G;){E=uki.dom.props[--G];u[E]=j.domEvent[E]}o.fireEvent("on"+x,u)}else{u=q.createEvent("MouseEvents");u.initMouseEvent(x,true,true,q.defaultView,j.detail,j.screenX,j.screenY,j.clientX,j.clientY,j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,null);o.dispatchEvent(u)}}catch(N){}l=false}catch(O){}}function h(j){if(!l)if(k.dataTransfer){j.type="dragend";j.target=k.target;j.dataTransfer=
k.dataTransfer;uki.dom.handler.apply(this,arguments);g(j);e(this)}}var k=uki.dom.dnd,l=false;uki.extend(k,{dragDelta:5,initNativeDnD:function(){var j=uki.createElement("div","position: absolute;left:-999em;");q.body.appendChild(j);k.dragImageContainer=j;k.initNativeDnD=uki.F;return true},dragImageContainer:null,dataTransfer:null,target:null,dragOver:null});var n=["dropEffect","effectAllowed","types","files"];uki.dom.DataTransferWrapper=uki.newClass(new (function(){this.init=function(j){this.dataTransfer=
j;for(var o=n.length-1;o>=0;o--)this[n[o]]=j[n[o]]};this.setData=function(j,o){return this.dataTransfer.setData(j,o)};this.clearData=function(j){return this.dataTransfer.clearData(j)};this.getData=function(j){return this.dataTransfer.getData(j)};this.setDragImage=function(j,o,x){k.initNativeDnD();j=b(j);var u=j.cloneNode(true);j=u.style;j.left=j.right=j.top=j.bottom="";j.position="static";k.dragImageContainer.appendChild(u);setTimeout(function(){k.dragImageContainer.removeChild(u)},1);return this.dataTransfer.setDragImage(u,
o,x)}}));uki.dom.DataTransfer=uki.newClass(new (function(){this.init=function(){uki.extend(this,{dropEffect:"none",effectAllowed:"none",types:[],files:[],dragImage:new Image,imagePosition:new y,data:{}})};this.setData=function(j,o){this.data[j]=o;uki.inArray(j,this.types)==-1&&this.types.push(j)};this.clearData=function(j){if(j){delete this.data[j];this.types=uki.grep(this.types,function(o){return o!=j})}else{this.data={};this.types=[]}};this.getData=function(j){return this.data[j]};this.setDragImage=
function(j,o,x){this._dragImage=this._initDragImage(j);this._imagePosition=new y(o||0,x||0)};this.update=function(j){if(this._dragImage){this._dragImage.style.left=j.pageX-this._imagePosition.x+"px";this._dragImage.style.top=j.pageY-this._imagePosition.y+"px"}};this.cleanup=function(){this._dragImage&&this._dragImage.parentNode.removeChild(this._dragImage);this._dragImage=undefined};this._initDragImage=function(j){j=b(j);j=j.cloneNode(true);var o=j.style;o.left=o.right=o.top=o.bottom="";o.position=
"absolute";o.left="-999em";o.zIndex="9999";q.body.appendChild(j);return j}}));var m={setup:function(){if(this.__w3cdragbound)this.__w3cdragbound++;else{this.__w3cdragbound=1;uki.dom.bind(this,"draggesture",d)}},teardown:function(){this.__w3cdragbound--;this.__draggesturebound||uki.dom.unbind(this,"draggesture",d)}};if(k.nativeDnD)uki.extend(uki.dom.special,{dragstart:{setup:function(){this.addEventListener("dragstart",a,false)},teardown:function(){this.removeEventListener("dragstart",a,false)}}});
else{uki.extend(uki.dom.special,{dragstart:m,drag:m,dragend:m});uki.each({dragover:"mousemove",drop:"mouseup"},function(j,o){var x=function(u){if(k.dataTransfer&&l){u=new uki.dom.Event(u);u.type=j;u.dataTransfer=k.dataTransfer;if(j=="dragover")k.__canDrop=false;else{e(this);if(!k.__canDrop)return}uki.dom.handler.apply(this,arguments);if(u.isDefaultPrevented())k.__canDrop=true}};uki.dom.special[j]={setup:function(){uki.dom.bind(this,o,x)},teardown:function(){uki.dom.unbind(this,o,x)}}});uki.dom.special.dragenter=
{setup:function(){uki.dom.bind(this,"mousemove",f)},teardown:function(){uki.dom.unbind(this,"mousemove",f)}};uki.dom.special.dragleave={setup:function(){},teardown:function(){}}}var p="detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button".split(" ")})();(function(){var b;b=q.documentElement.getBoundingClientRect?(uki.dom.offset=function(a){if(!a||a==v)return new y;if(a===a.ownerDocument.body)return b.bodyOffset(a);b.boxModel===undefined&&b.initializeBoxModel();var c=a.getBoundingClientRect(),
e=a.ownerDocument;a=e.body;e=e.documentElement;return new y(c.left+(b.pageXOffset||b.boxModel&&e.scrollLeft||a.scrollLeft)-(e.clientLeft||a.clientLeft||0),c.top+(b.pageYOffset||b.boxModel&&e.scrollTop||a.scrollTop)-(e.clientTop||a.clientTop||0))}):(uki.dom.offset=function(a){if(!a||a==v)return new y;if(a===a.ownerDocument.body)return b.bodyOffset(a);b.initialized||b.initialize();var c=a.offsetParent,e=a.ownerDocument,f,d=e.documentElement,g=e.body;e=e.defaultView;f=e.getComputedStyle(a,null);for(var h=
a.offsetTop,k=a.offsetLeft;(a=a.parentNode)&&a!==g&&a!==d;){f=e.getComputedStyle(a,null);h-=a.scrollTop;k-=a.scrollLeft;if(a===c){h+=a.offsetTop;k+=a.offsetLeft;if(b.doesNotAddBorder&&!(b.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(a.tagName))){h+=parseInt(f.borderTopWidth,10)||0;k+=parseInt(f.borderLeftWidth,10)||0}c=a.offsetParent}if(b.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){h+=parseInt(f.borderTopWidth,10)||0;k+=parseInt(f.borderLeftWidth,10)||0}f=f}if(f.position===
"relative"||f.position==="static"){h+=g.offsetTop;k+=g.offsetLeft}if(f.position==="fixed"){h+=s(d.scrollTop,g.scrollTop);k+=s(d.scrollLeft,g.scrollLeft)}return new y(k,h)});uki.extend(b,{initialize:function(){if(!this.initialized){var a=q.body,c=q.createElement("div"),e,f,d,g=a.style.marginTop;e={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(f in e)c.style[f]=e[f];c.innerHTML='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
a.insertBefore(c,a.firstChild);e=c.firstChild;f=e.firstChild;d=e.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=d.offsetTop===5;e.style.overflow="hidden";e.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;a.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=a.offsetTop===0;a.style.marginTop=g;a.removeChild(c);this.boxModel===undefined&&this.initializeBoxModel();this.initialized=true}},initializeBoxModel:function(){if(this.boxModel===
undefined){var a=q.createElement("div");a.style.width=a.style.paddingLeft="1px";q.body.appendChild(a);this.boxModel=a.offsetWidth===2;q.body.removeChild(a).style.display="none"}},bodyOffset:function(a){b.initialized||b.initialize();var c=a.offsetTop,e=a.offsetLeft;if(uki.dom.doesNotIncludeMarginInBodyOffset){c+=parseInt(uki.dom.elem.currentStyle(a).marginTop,10)||0;e+=parseInt(uki.dom.elem.currentStyle(a).marginLeft,10)||0}return new y(e,c)}})})();uki.browser=new (function(){function b(l,n,m){var p=
l[n];l[n]=undefined;l[m]=p}function a(l){for(var n=uki.createElement("div").style,m=["","-webkit-","-moz-"],p=0;p<m.length;p++)if(n[uki.camalize(m[p]+l)]!==undefined)return m[p]+l;return"unsupported"}function c(){var l=uki.createElement("div","background-image:-moz-linear-gradient(right,red,red);background-image:linear-gradient(right,red,red);background-image:-webkit-gradient(linear,0 0,100% 0,from(red),to(red))").style.backgroundImage+"";return l.indexOf("-moz-linear-gradient")>-1?"-moz-linear-gradient":
l.indexOf("-webkit-gradient")>-1?"-webkit-gradient":l.indexOf("linear-gradient")>-1?"linear-gradient":"unsupported"}var e;this.cssBoxShadow=function(){return e=e||(v.opera?"unsupported":a("box-shadow"))};var f;this.cssBorderRadius=function(){return f=f||a("border-radius")};var d;this.cssUserSelect=function(){return d=d||a("user-select")};var g;this.cssLinearGradient=function(){return g=g||c()};var h;this.canvas=function(){if(h===undefined)h=!!uki.createElement("canvas").getContext;return h};var k;
this.cssFilter=function(){if(k===undefined)k=typeof uki.createElement("div").style.filter!="undefined";return k};this.css=function(l){if(!l)return"";if(typeof l=="string")return l.replace(/(^|[^-])(box-shadow|border-radius|user-select)/g,function(n){var m;if((m=n.indexOf("box-shadow"))>-1)return n.substr(0,m)+uki.browser.cssBoxShadow();if((m=n.indexOf("border-radius"))>-1)return n.substr(0,m)+uki.browser.cssBorderRadius();if((m=n.indexOf("user-select"))>-1)return n.substr(0,m)+uki.browser.cssUserSelect()});
uki.each(["boxShadow","borderRadius","userSelect"],function(n,m){l[m]&&b(l,m,uki.camalize(uki.browser[uki.camalize("css-"+m)]()))});return l};this.textStyles="font fontFamily fontWeight fontSize textDecoration textOverflow textAlign textShadow overflow color".split(" ")});uki.initNativeLayout=function(){uki.supportNativeLayout===undefined&&uki.dom.probe(uki.createElement("div","position:absolute;width:100px;height:100px;left:-999em;",'<div style="position:absolute;left:0;right:0"></div>'),function(b){uki.supportNativeLayout=
b.childNodes[0].offsetWidth==100&&!v.opera})};uki.after=function(){var b=function(a){a.huid=a.huid||uki.guid++;if(!b._bound[a.huid]){b._bound[a.huid]=true;b._queue.push(a);b._running||b._startTimer()}};b._bound={};b._running=false;b._timer=0;b._queue=[];b.start=function(){b._clearTimer();b._running++};b.stop=function(){--b._running||b._runCallbacks()};b._runCallbacks=function(){b._clearTimer();var a=b._queue;b._queue=[];b._bound={};for(var c=0;c<a.length;c++)a[c]()};b._startTimer=function(){if(!b._timer)b._timer=
setTimeout(b._runCallbacks,1)};b._clearTimer=function(){if(b._timer){clearTimeout(b._timer);b._timer=0}};return b}();uki.view={declare:function(){var b=uki.toArray(arguments),a=b.shift();b=uki.newClass.apply(uki,b);var c=a.split("."),e=v,f,d,g=c.length-1;b.prototype.typeName=function(){return a};for(f=0;f<g;f++){d=c[f];e[d]||(e[d]={});e=e[d]}return e[c[g]]=b}};uki.view.Observable={bind:function(b,a){a.huid=a.huid||uki.guid++;uki.each(b.split(" "),function(c,e){this._bound(e)||this._bindToDom(e);this._observersFor(e).push(a)},
this);return this},unbind:function(b,a){if(this._observers){uki.each(b.split(" "),function(c,e){this._observers[e]=!a?[]:uki.grep(this._observersFor(e,true),function(f){return f!=a&&f.huid!=a.huid});this._observers[e].length==0&&this._unbindFromDom(e)},this);return this}},trigger:function(b){var a=Array.prototype.slice.call(arguments,1);uki.each(this._observersFor(b,true),function(c,e){e.apply(this,a)},this);return this},_unbindFromDom:function(b){this._domHander&&this._eventTargets[b]&&uki.dom.unbind(this._eventTargets[b],
b,this._domHander)},_bindToDom:function(b,a){if(!a&&!this.dom)return false;this._domHander=this._domHander||uki.proxy(function(c){c.source=this;this.trigger(c.type,c)},this);this._eventTargets=this._eventTargets||{};this._eventTargets[b]=a||this.dom();uki.dom.bind(this._eventTargets[b],b,this._domHander);return true},_bound:function(b){return this._observers&&this._observers[b]},_observersFor:function(b,a){if(a&&(!this._observers||!this._observers[b]))return[];if(!this._observers)this._observers=
{};this._observers[b]||(this._observers[b]=[]);return this._observers[b]}};(function(){function b(){return q.compatMode=="CSS1Compat"&&q.documentElement||q.body}var a=uki.Attachment=uki.newClass(uki.view.Observable,{init:function(c,e,f){uki.initNativeLayout();this._dom=c=c||v;this._view=e;this._rect=r.create(f)||this.rect();uki.dom.offset.initialize();e.parent(this);this.domForChild().appendChild(e.dom());if(c!=v&&c.tagName!="BODY"){e=c.runtimeStyle||c.ownerDocument.defaultView.getComputedStyle(c,
null);if(!e.position||e.position=="static")c.style.position="relative"}a.register(this);this.layout()},domForChild:function(){return this._dom===v?q.body:this._dom},rectForChild:function(){return this.rect()},scroll:function(){},scrollTop:function(){return this._dom.scrollTop||0},scrollLeft:function(){return this._dom.scrollLeft||0},parent:uki.F,childResized:uki.F,layout:function(){var c=this._rect,e=this._rect=this.rect();this._view.parentResized(c,e);this._view._needsLayout&&this._view.layout();
this.trigger("layout",{source:this,rect:e})},dom:function(){return this._dom},view:function(){return this._view},rect:function(){var c=this._dom===v||this._dom===q.body?s(b().clientWidth,this._dom.offsetWidth||0):this._dom.offsetWidth,e=this._dom===v||this._dom===q.body?s(b().clientHeight,this._dom.offsetHeight||0):this._dom.offsetHeight;return new r(c,e)}});a.instances=[];a.register=function(c){if(a.instances.length==0){var e=false;uki.dom.bind(v,"resize",function(){if(!e){e=true;setTimeout(function(f,
d){uki.after.start();e=false;f=0;for(d=a.instances.length;f<d;f++)a.instances[f].layout();uki.after.stop()},1)}})}a.instances.push(c)};a.childViews=function(){return uki.map(a.instances,"view")};uki.top=function(){return[a]}})();uki.Collection=function(b){this.length=0;Array.prototype.push.apply(this,b)};uki.fn=uki.Collection.prototype=new (function(){var b=this;this.each=function(a){return uki.each(this,a)};this.grep=function(a){return new uki.Collection(uki.grep(this,a))};this.attr=function(a,c){if(c!==
undefined){for(var e=this.length-1;e>=0;e--)uki.attr(this[e],a,c);return this}else return this[0]?uki.attr(this[0],a):""};this.find=function(a){return uki.find(a,this)};this.attachTo=function(a,c){this.each(function(){new uki.Attachment(a,this,c)});return this};this.append=function(a){var c=this[0];if(!c)return this;a=a.length!==undefined?a:[a];for(var e=a.length-1;e>=0;e--)c.appendChild(a[e]);return this};this.appendTo=function(a){a=uki(a)[0];this.each(function(){a.appendChild(this)});return this};
uki.Collection.addAttrs=function(a){uki.each(a,function(c,e){b[e]=function(f){return this.attr(e,f)}})};uki.Collection.addAttrs("dom html text background value rect checked anchors childViews typeName id name visible disabled focusable style draggable textSelectable width height minX maxX minY maxY left top x y".split(" "));uki.each([["parent","parent"],["next","nextView"],["prev","prevView"]],function(a,c){b[c[0]]=function(){return new uki.Collection(uki.unique(uki.map(this,c[1])))}});uki.each("bind unbind trigger layout appendChild removeChild insertBefore addRow removeRow resizeToContents toggle".split(" "),
function(a,c){b[c]=function(){for(var e=this.length-1;e>=0;e--)this[e][c].apply(this[e],arguments);return this}});uki.each(uki.dom.events,function(a,c){b[c]=function(e){if(e)this.bind(c,e);else for(e=this.length-1;e>=0;e--)this[e][c]?this[e][c]():this[e].trigger(c);return this}})});(function(){function b(e){return uki.map(e,function(f){return a(f)})}function a(e){if(uki.isFunction(e.typeName))return e;var f=e.view||e.type,d;if(uki.isFunction(f))d=new f(e.rect);else if(typeof f==="string"){for(var g=
0,h=uki.viewNamespaces,k=h.length;g<k;g++){for(var l=(h[g]+f).split("."),n=v,m=0,p=l.length;n&&m<p;m++)n=n[l[m]];if(n){d=new n(e.rect);break}}if(!n)throw"No view of type "+f+" found";}else d=f;c(d,e);return d}function c(e,f){uki.each(f,function(d,g){d=="view"||d=="type"||d=="rect"||uki.attr(e,d,g)});return e}uki.build=function(e){return new uki.Collection(b(e.length===undefined?[e]:e))};uki.viewNamespaces=["uki.view.",""];uki.build.copyAttrs=c})();(function(){function b(m){return m.parent().childViews().slice((m._viewIndex||
0)+1)}function a(m){return c(uki.map(m,function(p){return[p].concat(a(d(p,"childViews")))}))}function c(m){return uki.reduce([],m,e)}function e(m,p){return m.concat(p)}var f,d=uki.attr,g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,h=[{name:"ID",regexp:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/},{name:"ATTR",regexp:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/},{name:"TYPE",regexp:/^((?:[\w\u00c0-\uFFFF\*_\.-]|\\.)+)/},
{name:"POS",regexp:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/}],k={first:function(m){return m===0},last:function(m,p,j){return m===j.length-1},even:function(m){return m%2===0},odd:function(m){return m%2===1},lt:function(m,p){return m<p[2]-0},gt:function(m,p){return m>p[2]-0},nth:function(m,p){return p[2]-0==m},eq:function(m,p){return p[2]-0==m}},l={TYPE:function(m,p){p=p[1];if(p=="*")return true;return(m=d(m,"typeName"))&&m.length>=p.length&&("."+m).indexOf("."+p)==m.length-p.length},
ATTR:function(m,p){m=d(m,p[1]);var j=m+"",o=p[2];p=p[4];return m==null?o==="!=":o==="="?j===p:o==="*="?j.indexOf(p)>=0:o==="~="?(" "+j+" ").indexOf(p)>=0:!p?j&&m!==false:o==="!="?j!=p:o==="^="?j.indexOf(p)===0:o==="$="?j.substr(j.length-p.length)===p:false},ID:function(m,p){return l.ATTR(m,["","id","=","",p[1]])},POS:function(m,p,j,o){return(m=k[p[1]])?m(j,p,o):false}},n={"+":function(m){return uki.unique(uki.map(m,"nextView"))},">":function(m){return uki.unique(c(uki.map(m,"childViews")))},"":function(m){return uki.unique(a(c(uki.map(m,
"childViews"))))},"~":function(m){return uki.unique(c(uki.map(m,b)))}};f=uki.Selector={find:function(m,p,j){p=p||uki.top();if(p.length===undefined)p=[p];var o=f.tokenize(m);m=o[0];o=o[1];for(var x=p,u;m.length>0;){u=n[m[0]]?n[m.shift()]:n[""];x=u(x);if(m.length==0)break;x=f.reduce(m.shift(),x)}if(o)x=x.concat(f.find(o,p,true));return j?x:new uki.Collection(uki.unique(x))},reduce:function(m,p){if(!p||!p.length)return[];for(var j,o;m!="";){o=false;uki.each(h,function(x,u){if(j=m.match(u.regexp)){o=
true;p=uki.grep(p,function(G,E){return l[u.name](G,j,E,p)});m=m.replace(u.regexp,"");return false}});if(!o)break}return p},tokenize:function(m){var p=[],j,o;for(g.lastIndex=0;(j=g.exec(m))!==null;){p.push(j[1]);if(j[2]){o=RegExp.rightContext;break}}return[p,o]}};uki.find=f.find})();uki.image=function(b,a,c){var e=new Image;e.src=uki.imageSrc(b,a,c);return e};uki.imageSrc=function(b,a,c){if(uki.image.dataUrlSupported&&a)return a;if(c&&uki.image.needAlphaFix)return c;return b};uki.imageHTML=function(b,
a,c,e){if(uki.image.needAlphaFix&&c)b=c;else if(uki.image.dataUrlSupported)b=a;return"<img"+(e||"")+' src="'+b+'" />'};uki.image.dataUrlSupported=q.createElement("canvas").toDataURL||/MSIE (8)/.test(A);uki.image.needAlphaFix=/MSIE 6/.test(A);uki.image.needAlphaFix&&q.execCommand("BackgroundImageCache",false,true);(function(){var b=/^\s*null\s*$/,a=/theme\s*\(\s*(.*\s*)\)/,c=/rows\s*\(\s*(.*\s*)\)/,e=/cssBox\s*\(\s*(.*\s*)\)/,f=uki.background=function(d){if(typeof d==="string"){var g;if(d.match(b))return new f.Null;
if(g=d.match(a))return uki.theme.background(g[1]);if(g=d.match(c))return new f.Rows(g[1].split(",")[0],g[1].split(/\s*,\s*/).slice(1));if(g=d.match(e))return new f.CssBox(g[1]);return new f.Css(d)}return d}})();uki.background.Base=uki.background.Null=uki.newClass({init:uki.F,attachTo:uki.F,detach:uki.F});uki.background.Sliced9=uki.newClass(new (function(){function b(d,g,h,k,l){k=h[3]?c(h,k):"";h[3]||(g+=a(h,l));return'<div class="'+d+'" style="position:absolute;overflow:hidden;'+g+'">'+k+"</div>"}
function a(d,g){return";background: url("+uki.imageSrc(d[0],d[1],d[2])+") "+g}function c(d,g){return uki.imageHTML(d[0],d[1],d[2],' ondragstart="return false;" galleryimg="no" style="-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;position:absolute;'+g+'"')}var e=uki.dom,f={};this.init=function(d,g,h){this._settings=uki.extend({},d);this._inset=w.create(g);this._size=null;this._inited=false;h=h||{};this._fixedSize=t.create(h.fixedSize)||new t;this._bgInset=w.create(h.inset)||
new w;this._zIndex=h.zIndex||-1;this._container=this._getContainer();this._container.style.zIndex=this._zIndex};this._getContainer=function(){var d=this._getKey();if(!f[d])return f[d]=this._createContainer();return f[d].cloneNode(true)};this._createContainer=function(){var d=this._inset,g=this._bgInset,h=this._settings,k=d.left+d.right,l=d.top+d.bottom;g=["left:"+g.left+"px","right:"+g.right+"px","top:"+g.top+"px","bottom:"+g.bottom+"px"].join(";");var n=[];if(d.top&&d.left)n[n.length]=b("tl",["left:0;top:0",
"width:"+d.left+"px","height:"+d.top+"px"].join(";"),h.c,["left:0;top:0","width:"+k+"px","height:"+l+"px"].join(";"),"top left");if(d.top)n[n.length]=b("t",["left:"+d.left+"px","top:0","height:"+d.top+"px","right:"+d.right+"px"].join(";"),h.h,["left:0;top:0;width:100%","height:"+l+"px"].join(";"),"repeat-x top");if(d.top&&d.right)n[n.length]=b("tr",["right:0;top:0","width:"+d.right+"px","height:"+d.top+"px"].join(";"),h.c,["left:-"+d.left+"px","top:0","width:"+k+"px","height:"+l+"px"].join(";"),"top right");
if(d.left)n[n.length]=b("l",["left:0","top:"+d.top+"px","width:"+d.left+"px","bottom:"+d.bottom+"px"].join(";"),h.v,["left:0;top:0;height:100%","width:"+k+"px"].join(";"),"repeat-y left");if(h.m)n[n.length]=b("m",["left:"+d.left+"px","top:"+d.top+"px","right:"+d.right+"px","bottom:"+d.bottom+"px"].join(";"),h.m,"left:0;top:0;height:100%;width:100%","");if(d.right)n[n.length]=b("r",["right:0","top:"+d.top+"px","width:"+d.right+"px","bottom:"+d.bottom+"px"].join(";"),h.v,["left:-"+d.left+"px","top:0;height:100%",
"width:"+k+"px"].join(";"),"repeat-y right");if(d.bottom&&d.left)n[n.length]=b("bl",["left:0;bottom:0","width:"+d.left+"px","height:"+d.bottom+"px"].join(";"),h.c,["left:0","top:-"+d.top+"px","width:"+k+"px","height:"+l+"px"].join(";"),"left -"+d.top+"px");if(d.bottom)n[n.length]=b("b",["left:"+d.left+"px","bottom:0","height:"+d.bottom+"px","right:"+d.right+"px"].join(";"),h.h,["left:0","top:-"+d.top+"px","width:100%","height:"+l+"px"].join(";"),"repeat-x 0 -"+d.top+"px");if(d.bottom&&d.right)n[n.length]=
b("br",["right:0;bottom:0","width:"+d.right+"px","height:"+d.bottom+"px"].join(";"),h.c,["left:-"+d.left+"px","top:-"+d.top+"px","width:"+k+"px","height:"+l+"px"].join(";"),"right -"+d.top+"px");d=uki.createElement("div","position:absolute;overflow:hidden;"+g,n.join(""));d.className="uki-background-Sliced9";return d};this._getKey=function(){return uki.map(["v","h","m","c"],function(d){return this._settings[d]&&this._settings[d][0]||""},this).concat([this._inset,this._bgInset,this._fixedSize]).join(",")};
this.attachTo=function(d){this._comp=d;this._container.style.visibility="visible";this._comp.dom().insertBefore(this._container,this._comp.dom().firstChild);if(!uki.supportNativeLayout){this._layoutHandler=this._layoutHandler||uki.proxy(function(g){if(!(this._size&&this._size.eq(g.rect))){this._size=g.rect;this.layout()}},this);this._comp.bind("layout",this._layoutHandler);this.layout()}};this.detach=function(){if(this._comp){this._container.style.visibility="hidden";uki.supportNativeLayout||this._comp.unbind("layout",
this._layoutHandler);this._size=this._comp=null;this._attached=this._inited=false}};this.layout=function(){var d=this._comp.rect(),g=this._parts,h=this._inset,k=this._bgInset,l=this._fixedSize,n=H(l.width||d.width-k.left-k.right);d=H(l.height||d.height-k.top-k.bottom);k=h.left+h.right;h=h.top+h.bottom;if(!g){g={};uki.each(this._container.childNodes,function(){if(this.className)g[this.className]=this});this._parts=g}g.t&&e.layout(g.t.style,{width:n-k});g.b&&e.layout(g.b.style,{width:n-k});g.l&&e.layout(g.l.style,
{height:d-h});g.r&&e.layout(g.r.style,{height:d-h});g.m&&e.layout(g.m.style,{height:d-h,width:n-k});e.layout(this._container.style,{width:n,height:d})}}));uki.background.Css=uki.newClass(new (function(){this.init=function(b){this._options=typeof b=="string"?{background:b}:b;this._options=uki.browser.css(this._options)};this.attachTo=function(b){this._comp=b;this._originalValues={};uki.each(this._options,function(a,c){this._originalValues[a]=b.style(a);b.style(a,c)},this)};this.detach=function(){this._comp&&
uki.each(this._options,function(b){this._comp.style(b,this._originalValues[b])},this)}}));uki.background.CssBox=uki.newClass(new (function(){function b(c){a[c]||uki.dom.probe(uki.createElement("div",c+";position:absolute;overflow:hidden;left:-999em;width:10px;height:10px;"),function(e){a[c]=new w(e.offsetHeight-10,e.offsetWidth-10)});return a[c]}var a={};this.init=function(c,e){this._options=c;e=e||{};this._inset=inset=w.create(e.inset)||new w;this._insetWidth=b(c).left+inset.left+inset.right;this._insetHeight=
b(c).top+inset.top+inset.bottom;this._container=uki.createElement("div","position:absolute;overflow:hidden;z-index:"+(e.zIndex||"-1")+";left:"+inset.left+"px;top:"+inset.top+"px;right:"+inset.right+"px;bottom:"+inset.bottom+"px;"+uki.browser.css(c),e.innerHTML);this._container.className="uki-background-CssBox";this._attached=false};this.attachTo=function(c){this._comp=c;this._comp.dom().insertBefore(this._container,this._comp.dom().firstChild);if(!uki.supportNativeLayout){this._layoutHandler=this._layoutHandler||
uki.proxy(function(e){this.layout(e.rect)},this);this._comp.bind("layout",this._layoutHandler);this.layout(this._comp.rect())}};this.layout=function(c){this._prevLayout=uki.dom.layout(this._container.style,{width:c.width-this._insetWidth,height:c.height-this._insetHeight},this._prevLayout)};this.detach=function(){if(this._comp){this._comp.dom().removeChild(this._container);uki.supportNativeLayout||this._comp.unbind("layout",this._layoutHandler);this._attached=false}}}));uki.background.LinearGradient=
uki.newClass(uki.background.CssBox,new (function(){function b(f,d,g,h){var k=f+d+(g?1:0)+uki.map(h,function(m){return m.pos+"-"+m.color});if(!e[k]){var l=document.createElement("canvas");l.width=l.height=c;var n=l.getContext("2d");g=n.createLinearGradient(0,0,g?c:0,g?0:c);g.addColorStop(0,f);g.addColorStop(1,d);for(f=0;f<h.length;f++)g.addColorStop(h[f].pos,h[f].color);n.fillStyle=g;n.fillRect(0,0,c,c);e[k]=l.toDataURL&&l.toDataURL()}return e[k]}function a(f,d,g){return"filter:progid:DXImageTransform.Microsoft.gradient(gradientType="+
(f?"1":"0")+", startColorstr=#FF"+d.substr(1)+", endColorstr=#FF"+g.substr(1)+");"}var c=200;this.init=function(f){this._options=f;var d=this._inset=uki.geometry.Inset.create(this._options.inset)||new uki.geometry.Inset;this._container=this._createContainer();f=this._container.cloneNode(true);f.style.cssText+=";width:100px;height:100px;";uki.dom.probe(f,uki.proxy(function(g){this._insetWidth=g.offsetWidth-100+d.width();this._insetHeight=g.offsetHeight-100+d.height()},this));this._container.style.cssText+=
";left:"+d.left+"px;top:"+d.top+"px;right:"+d.right+"px;bottom:"+d.bottom+"px;";this._attached=false};var e={};this._createContainer=function(){var f=this._options.startColor||"#FFFFFF",d=this._options.endColor||"#CCCCCC",g=this._options.horizontal,h=this._options.stops||[],k="",l=0,n=uki.browser.cssLinearGradient(),m;if(n=="-moz-linear-gradient"||n=="linear-gradient"){for(k+="background-image:"+n+"("+(g?"left":"top")+", "+f;l<h.length;l++)k+=","+h[l].color+" "+h[l].pos*100+"%";k+=", "+d+");"}else if(n==
"-webkit-gradient"){for(k+="background-image:"+n+"(linear, 0% 0%, "+(g?"100% 0%":"0% 100%")+", from("+f+"), to("+d+")";l<h.length;l++)k+=",color-stop("+h[l].pos*100+"%,"+h[l].color+")";k+=");"}else if(!uki.browser.canvas()&&uki.browser.cssFilter()&&h.length==0)k+=a(g,f,d);n=uki.createElement("div",uki.browser.css(this._options.css)+";position:absolute;overflow:hidden;z-index:"+(this._options.zIndex||"-1")+";"+k,this._options.innerHTML);n.className="uki-background-CssBox";if(k)return n;if(uki.browser.canvas()&&
(m=b(f,d,g,h))){g=uki.createElement("img","position:absolute;left:0;top:0;width:100%;height:100%;z-index:0;");g.src=m;n.appendChild(g)}else if(uki.browser.cssFilter()&&h.length>0){h.unshift({pos:0,color:f});for(h.push({pos:1,color:d});l<h.length-1;l++){m=uki.createElement("div","position:absolute;z-index:-1;left:"+(g?h[l].pos*100-(l&&1)+"%":"0")+";top:"+(g?"0":h[l].pos*100-(l&&1)+"%")+";width:"+(g?(h[l+1].pos-h[l].pos)*100+1+"%":"100%")+";height:"+(g?"100%":(h[l+1].pos-h[l].pos)*100+1+"%")+";"+a(g,
h[l].color,h[l+1].color));n.appendChild(m)}}return n}}));uki.background.Rows=uki.newClass(new (function(){function b(e,f){var d=e+" "+f.join(" "),g=[],h=[],k,l=f.length;if(!a[d]){for(k=0;k<l;k++)g[k]=['<div style="height:',e,"px;width:100%;overflow:hidden;",f[k]?"background:"+f[k]:"",'"></div>'].join("");for(k=0;k<c;k++)h[k]=g[k%l];a[d]=h.join("")}return a[d]}var a=[],c=100;this.init=function(e,f){this._height=e||20;this._colors=uki.isArray(f)?f:f.split(" ");this._packSize=F(c/this._colors.length)*
this._colors.length;this._renderedHeight=0;this._visibleExt=200;if(this._colors.length==1)this._colors=this._colors.concat(["#FFF"])};this.attachTo=function(e){this._comp&&this.detach();this._comp=e;if(!this._container){this._container=uki.createElement("div","position:absolute;left:0;top:0;width:100%;z-index:-1");this._container.className="uki-background-Rows"}this._layoutHandler=this._layoutHandler||uki.proxy(function(f){this.layout(f.rect,f.visibleRect)},this);this._comp.dom().appendChild(this._container);
this._comp.bind("layout",this._layoutHandler)};this.layout=function(e,f){for(e=f?f.height+this._visibleExt*2:e.maxY();this._renderedHeight<e;){var d=c*this._height,g=uki.createElement("div","height:"+d+"px;overflow:hidden;width:100%;",b(this._height,this._colors));this._renderedHeight+=d;this._container.appendChild(g)}if(f)this._container.style.top=F((f.y-this._visibleExt)/this._height/this._colors.length)*this._height*this._colors.length+"px"};this.detach=function(){if(this._comp){this._comp.dom().removeChild(this._container);
this._comp.unbind("layout",this._layoutHandler);this._comp=null}}}));uki.background.Multi=uki.newClass({init:function(){this._bgs=Array.prototype.slice.call(arguments,0)},attachTo:function(b){for(var a=0,c=this._bgs.length;a<c;a++)this._bgs[a].attachTo(b)},detach:function(){for(var b=0,a=this._bgs.length;b<a;b++)this._bgs[b].detach()}});(function(){var b=uki.theme={themes:[],register:function(a,c){(c=b.themes)[c.length]=a},background:function(a,c){return b._namedResource(a,"background",c)||new uki.background.Null},
image:function(a,c){return b._namedResource(a,"image",c)||new Image},imageSrc:function(a,c){return b._namedResource(a,"imageSrc",c)||""},style:function(a,c){return b._namedResource(a,"style",c)||""},dom:function(a,c){return b._namedResource(a,"dom",c)||uki.createElement("div")},template:function(a,c){return b._namedResource(a,"template",c)||""},_namedResource:function(a,c,e,f,d){for(f=b.themes.length-1;f>=0;f--)if(d=b.themes[f][c](a,e))return d;return null}}})();uki.theme.Base={images:[],imageSrcs:[],
backgrounds:[],doms:[],styles:[],templates:[],background:function(b,a){return this.backgrounds[b]&&this.backgrounds[b](a)},image:function(b,a){if(this.images[b])return this.images[b](a);return this.imageSrcs[b]&&uki.image.apply(uki,this.imageSrcs[b](a))},imageSrc:function(b,a){if(this.imageSrcs[b])return uki.imageSrc.apply(uki,this.imageSrcs[b](a));return this.images[b]&&this.images[b](a).src},dom:function(b,a){return this.doms[b]&&this.doms[b](a)},style:function(b,a){return this.styles[b]&&this.styles[b](a)},
template:function(b,a){return this.templates[b]&&this.templates[b](a)}};uki.theme.Template=function(b){b=b.split("${");var a,c,e;this.parts=[b[0]];this.names=[];a=1;for(c=b.length;a<c;a++){e=b[a].split("}");this.names.push(e.shift());this.parts.push("");this.parts.push(e.join("}"))}};uki.theme.Template.prototype.render=function(b){for(var a=0,c=this.names,e=c.length;a<e;a++)this.parts[a*2+1]=b[c[a]]||"";return this.parts.join("")};uki.view.utils=new (function(){function b(a){return a.visibleRect?
a.visibleRect():a.rect().clone()}this.visibleRect=function(a,c){var e=[],f,d=a;do{e[e.length]=d;d=d.parent()}while(d&&d!=c);if(c&&c!=a)e[e.length]=c;for(a=e.length-1;a>=0;a--){d=e[a];c=b(d);f=f?f.intersection(c):c;f.x-=d.rect().x;f.y-=d.rect().y}return f};this.top=function(a){for(;a.parent();)a=a.parent();return a};this.offset=function(a,c){for(var e=new y,f;a&&a!=c;){f=a.rect();e.x+=f.x;e.y+=f.y;if(a.scrollTop){e.x-=a.scrollLeft();e.y-=a.scrollTop()}a=a.parent()}return e};this.scrollableParent=function(a){do{if(uki.isFunction(a.scrollTop))return a;
a=a.parent()}while(a);return null}});uki.extend(uki.view,uki.view.utils);uki.view.Styleable=new (function(){this.style=function(b,a){if(typeof b=="string")return this._style(b,a);uki.each(b,function(c,e){this._style(c,e)},this);return this};this._style=function(b,a){if(a===undefined)return this._dom.style[b];this._dom.style[b]=a;return this};this.textSelectable=uki.newProp("_textSelectable",function(b){this._textSelectable=b;if(uki.browser.cssUserSelect()!="unsupported")this._dom.style.cssText+=uki.browser.cssUserSelect()+
":"+(b?"normal":uki.browser.cssUserSelect()=="-moz-user-select"?"-moz-none":"none");else uki.dom[b?"unbind":"bind"](this.dom(),"selectstart",uki.dom.preventDefaultHandler);this._dom.style.cursor=b?"":"default"});this.draggable=function(b){if(b===undefined)return this._dom.getAttribute("draggable");this._dom.setAttribute("draggable",true);this._dom.style.WebkitUserDrag="element";return this}});uki.view.Focusable=new (function(){this._focusOnClick=this._focusable=true;this.focusOnClick=uki.newProp("_focusOnClick");
this.focusable=uki.newProp("_focusable",function(b){(this._focusable=b)&&this._initFocusable();this._updateFocusable()});this.disabled=uki.newProp("_disabled",function(b){var a=b!==!!this._disabled;(this._disabled=b)&&this.blur();this._updateFocusable();a&&this._updateBg&&this._updateBg()});this._updateFocusable=function(){if(!(this._preCreatedFocusTarget||!this._focusTarget))this._focusTarget.style.display=this._focusable&&!this._disabled?"block":"none"};this._initFocusable=function(b){if(!(!b&&
!this._focusable||this._focusTarget)){this._preCreatedFocusTarget=this._focusTarget=b;if(!b){this._focusTarget=uki.createElement("input","position:absolute;left:-9999px;top:0;width:1px;height:1px;");this._focusTarget.className="uki-view-Focusable";this.dom().appendChild(this._focusTarget)}this._hasFocus=false;this._firstFocus=true;uki.dom.bind(this._focusTarget,"focus",uki.proxy(function(a){this._stopWatingForBlur();this._hasFocus||this._focus(a)},this));uki.dom.bind(this._focusTarget,"blur",uki.proxy(function(){if(this._hasFocus){this._hasFocus=
false;this._waitingForBlur=setTimeout(uki.proxy(function(){this._waitingForBlur=false;this._hasFocus||this._blur()},this),1)}},this));b||this.bind("mousedown",function(){this._focusOnClick&&this.focus()});this._updateFocusable()}};this._focus=function(){this._hasFocus=true;this._firstFocus=false};this._blur=function(){this._hasFocus=false};this._stopWatingForBlur=function(){if(this._waitingForBlur){clearTimeout(this._waitingForBlur);this._waitingForBlur=false;this._hasFocus=true}};this.focus=function(){if(this._focusable&&
!this._disabled){this._stopWatingForBlur();this._hasFocus||this._focus();var b=this._focusTarget;setTimeout(function(){try{b.focus()}catch(a){}b=null},1)}return this};this.blur=function(){try{this._focusTarget.blur()}catch(b){}return this};this.hasFocus=function(){return this._hasFocus};this._bindToDom=function(b){if(!this._focusTarget||"keyup keydown keypress focus blur".indexOf(b)==-1)return false;return uki.view.Observable._bindToDom.call(this,b,this._focusTarget)}});var B=16,C=32;uki.view.declare("uki.view.Base",
uki.view.Observable,uki.view.Styleable,function(){function b(c){if(!c)return 0;var e=0;if(c.indexOf("width")>-1)e|=B;if(c.indexOf("height")>-1)e|=C;return e}var a=1;this.defaultCss="position:absolute;z-index:100;-moz-user-focus:none;";this.init=function(c){this._parentRect=this._rect=r.create(c);this._setup();uki.initNativeLayout();this._createDom()};this._setup=function(){uki.extend(this,{_anchors:0,_parent:null,_visible:true,_needsLayout:true,_textSelectable:false,_styleH:"left",_styleV:"top",_firstLayout:true});
this.defaultCss+=uki.theme.style("base")};this.dom=function(){return this._dom};this.id=function(c){if(c===undefined)return this._dom.id;this._dom.id&&uki.unregisterId(this);this._dom.id=c;uki.registerId(this);return this};uki.delegateProp(this,"className","_dom");this.visible=function(c){if(c===undefined)return this._dom.style.display!="none";this._dom.style.display=c?"block":"none";return this};this.background=function(c){if(c===undefined&&!this._background&&this.defaultBackground)this._background=
this.defaultBackground();if(c===undefined)return this._background;c=uki.background(c);if(c==this._background)return this;this._background&&this._background.detach(this);c.attachTo(this);this._background=c;return this};this.defaultBackground=function(){return this._defaultBackground&&uki.background(this._defaultBackground)};this.parent=function(c){if(c===undefined)return this._parent;this._parent=c;return this};this.childViews=function(){return[]};this.prevView=function(){if(!this.parent())return null;
return this.parent().childViews()[this._viewIndex-1]||null};this.nextView=function(){if(!this.parent())return null;return this.parent().childViews()[this._viewIndex+1]||null};this.rect=function(c){if(c===undefined)return this._rect;this._parentRect=c=r.create(c);this._rect=this._normalizeRect(c);this._needsLayout=this._needsLayout||a++;return this};this.anchors=uki.newProp("_anchors",function(c){if(c.indexOf){var e=0;if(c.indexOf("right")>-1)e|=2;if(c.indexOf("bottom")>-1)e|=4;if(c.indexOf("top")>
-1)e|=1;if(c.indexOf("left")>-1)e|=8;if(c.indexOf("width")>-1||e&8&&e&2)e|=B;if(c.indexOf("height")>-1||e&4&&e&1)e|=C;c=e}this._anchors=c;this._styleH=c&8?"left":"right";this._styleV=c&1?"top":"bottom"});this.rectForChild=function(){return this.rect()};this.layout=function(){this._layoutDom(this._rect);this._needsLayout=false;this.trigger("layout",{rect:this._rect,source:this});this._firstLayout=false};this.layoutIfNeeded=function(){this._needsLayout&&this.visible()&&this.layout()};uki.each(["min",
"max"],function(c,e){c=e+"Size";var f="_"+c;this[c]=function(d){if(d===undefined)return this[f]||new t;this[f]=t.create(d);this.rect(this._parentRect);this._dom.style[e+"Width"]=this[f].width?this[f].width+"px":"";this._dom.style[e+"Height"]=this[f].height?this[f].height+"px":"";return this}},this);this.parentResized=function(c,e){var f=this._parentRect.clone(),d=(e.width-c.width)/((this._anchors&8^8?1:0)+(this._anchors&B?1:0)+(this._anchors&2^2?1:0));c=(e.height-c.height)/((this._anchors&1^1?1:0)+
(this._anchors&C?1:0)+(this._anchors&4^4?1:0));if(this._anchors&8^8)f.x+=d;if(this._anchors&B)f.width+=d;if(this._anchors&1^1)f.y+=c;if(this._anchors&C)f.height+=c;this.rect(f)};this.childResized=function(){};this.resizeToContents=function(c){c=b(c);if(0==c)return this;this.rect();this._rect=this._parentRect=this._calcRectOnContentResize(c);this._needsLayout=true;return this};this.contentsSize=function(){return this.rect()};this._normalizeRect=function(c){if(this._minSize)c=new r(c.x,c.y,s(this._minSize.width,
c.width),s(this._minSize.height,c.height));if(this._maxSize)c=new r(c.x,c.y,z(this._maxSize.width,c.width),z(this._maxSize.height,c.height));return c};this._initBackgrounds=function(){this.background()&&this.background().attachTo(this)};this._calcRectOnContentResize=function(c){var e=this.contentsSize(c),f=this.rect();if(e.eq(f))return f;var d=this.rect().clone(),g=e.width-f.width;e=e.height-f.height;if(c&B){if(this._anchors&8^8&&this._anchors&2^2)d.x-=g/2;else if(this._anchors&8^8)d.x-=g;d.width+=
g}if(c&C){if(this._anchors&1^1&&this._anchors&4^4)d.y-=e/2;else if(this._anchors&1^1)d.y-=e;d.height+=e}return d};uki.each(["width","height","minX","maxX","minY","maxY","x","y","left","top"],function(c,e){this[e]=function(f){if(f===undefined)return uki.attr(this.rect(),e);uki.attr(this.rect(),e,f);return this}},this);this._createDom=function(){this._dom=uki.createElement("div",this.defaultCss);this._initClassName()};this._initClassName=function(){this._dom.className=this.typeName().replace(/\./g,
"-")};this._layoutDom=function(c){var e={},f=uki.supportNativeLayout,d=this.parent().rectForChild(this);if(f&&this._anchors&8&&this._anchors&2){e.left=c.x;e.right=d.width-c.x-c.width}else{e.width=c.width;e[this._styleH]=this._styleH=="left"?c.x:d.width-c.x-c.width}if(f&&this._anchors&1&&this._anchors&4){e.top=c.y;e.bottom=d.height-c.y-c.height}else{e.height=c.height;e[this._styleV]=this._styleV=="top"?c.y:d.height-c.y-c.height}this._lastLayout=uki.dom.layout(this._dom.style,e,this._lastLayout);this._firstLayout&&
this._initBackgrounds();return true};this._bindToDom=function(c){if("resize layout".indexOf(c)>-1)return true;return uki.view.Observable._bindToDom.call(this,c)}});uki.view.declare("uki.view.Container",uki.view.Base,function(b){function a(c,e){var f=0,d;for(d=c._childViews.length-1;d>=0;d--)if(c._childViews[d].visible())f=s(f,c._childViews[d].rect()[e]());return f}this._inset=new w;this._setup=function(){this._childViews=[];b._setup.call(this)};this.contentsWidth=function(){return a(this,"maxX")+
this.inset().right};this.contentsHeight=function(){return a(this,"maxY")+this.inset().bottom};this.contentsSize=function(){return new t(this.contentsWidth(),this.contentsHeight())};this.childViews=function(c){if(c===undefined)return this._childViews;uki.each(this._childViews,function(e,f){this.removeChild(f)},this);uki.each(uki.build(c),function(e,f){this.appendChild(f)},this);return this};this.removeChild=function(c){c.parent(null);this.domForChild(c).removeChild(c.dom());var e,f;e=c._viewIndex+
1;for(f=this._childViews.length;e<f;e++)this._childViews[e]._viewIndex--;this._childViews=uki.grep(this._childViews,function(d){return d!=c});this._contentChanged()};this.appendChild=function(c){c._viewIndex=this._childViews.length;this._childViews.push(c);c.parent(this);this.domForChild(c).appendChild(c.dom());this._contentChanged()};this.insertBefore=function(c,e){var f,d;f=c._viewIndex=e._viewIndex;for(d=this._childViews.length;f<d;f++)this._childViews[f]._viewIndex++;this._childViews.splice(e._viewIndex-
1,0,c);c.parent(this);this.domForChild(c).insertBefore(c.dom(),e.dom());this._contentChanged()};this.domForChild=function(){return this._dom};this.inset=uki.newProp("_inset",function(c){this._inset=w.create(c)});this._contentChanged=function(){};this._layoutDom=function(c){b._layoutDom.call(this,c);this._layoutChildViews(c)};this._layoutChildViews=function(){for(var c=0,e=this.childViews();c<e.length;c++)e[c].layoutIfNeeded()};this.rect=function(c){if(c===undefined)return this._rect;this._parentRect=
c=r.create(c);var e=this._rect;if(!this._resizeSelf(c))return this;this._needsLayout=true;if(e.width!=c.width||e.height!=c.height)this._resizeChildViews(e);this.trigger("resize",{oldRect:e,newRect:this._rect,source:this});return this};this._resizeSelf=function(c){this._rect=this._normalizeRect(c);return true};this._resizeChildViews=function(c){for(var e=0,f=this.childViews();e<f.length;e++)f[e].parentResized(c,this._rect)}});uki.view.declare("uki.view.Box",uki.view.Container,{});uki.view.declare("uki.view.Image",
uki.view.Base,function(){this.typeName=function(){return"uki.view.Image"};uki.delegateProp(this,"src","_dom");this._createDom=function(){this._dom=uki.createElement("img",this.defaultCss);this._initClassName()}});uki.view.declare("uki.view.Label",uki.view.Base,function(b){this._setup=function(){b._setup.call(this);uki.extend(this,{_scrollable:false,_textSelectable:false,_inset:new w});this.defaultCss+=uki.theme.style("label")};this._style=function(a,c){if(c!==undefined&&uki.inArray(a,uki.browser.textStyles)!=
-1)this._label.style[a]=c;return b._style.call(this,a,c)};this.textSelectable=function(a){if(a!==undefined&&!this._textSelectProp)this._label.unselectable=a?"":"on";return b.textSelectable.call(this,a)};this.contentsSize=function(a){var c=this._createLabelClone(a),e=this.inset(),f;uki.dom.probe(c,function(){f=new t(c.offsetWidth+e.width(),c.offsetHeight+e.height())});return f};this.text=function(a){return a===undefined?this.html():this.html(uki.escapeHTML(a))};this.html=function(a){if(a===undefined)return this._label.innerHTML;
this._label.innerHTML=a;return this};this.inset=uki.newProp("_inset",function(a){this._inset=w.create(a)});this.scrollable=uki.newProp("_scrollable",function(a){this._scrollable=a;this._label.style.overflow=a?"auto":"hidden"});this.multiline=uki.newProp("_multiline",function(a){this._multiline=a;this._label.style.whiteSpace=a?"":"nowrap"});this._createLabelClone=function(a){var c=this._label.cloneNode(true),e=this.inset(),f=this.rect();if(a&B)c.style.width=c.style.right="";else if(uki.supportNativeLayout){c.style.right=
"";c.style.width=f.width-e.width()+"px"}if(a&C)c.style.height=c.style.bottom="";else if(uki.supportNativeLayout){c.style.bottom="";c.style.height=f.height-e.height()+"px"}c.style.paddingTop=0;c.style.visibility="hidden";return c};this._createDom=function(){b._createDom.call(this);this._label=uki.createElement("div",this.defaultCss+"white-space:nowrap;");this._dom.appendChild(this._label);this.textSelectable(this.textSelectable())};this._layoutDom=function(){b._layoutDom.apply(this,arguments);var a=
this._inset;if(!this.multiline()){parseInt(this.style("fontSize"),10);this._label.style.lineHeight=this._rect.height-a.top-a.bottom+"px"}a=uki.supportNativeLayout?{left:a.left,top:a.top,right:a.right,bottom:a.bottom}:{left:a.left,top:a.top,width:this._rect.width-a.width(),height:this._rect.height-a.height()};this._lastLabelLayout=uki.dom.layout(this._label.style,a,this._lastLabelLayout)}});uki.view.declare("uki.view.Button",uki.view.Label,uki.view.Focusable,function(b,a){this._backgroundPrefix="button-";
this._setup=function(){b._setup.call(this);uki.extend(this,{_inset:new w(0,4)});this.defaultCss+="cursor:default;-moz-user-select:none;-webkit-user-select:none;"+uki.theme.style("button")};uki.addProps(this,["backgroundPrefix"]);uki.each(["normal","hover","down","focus","disabled"],function(c,e){var f=e+"-background";this[f]=function(d){if(d)this["_"+f]=d;return this["_"+f]=this["_"+f]||uki.theme.background(this._backgroundPrefix+e,{height:this.rect().height,view:this})}},this);this._createLabelClone=
function(c){return b._createLabelClone.call(this,c)};this._layoutDom=function(c){b._layoutDom.call(this,c);if(this._firstLayout){this["hover-background"]();this["down-background"]();this._backgroundByName(this._backgroundName||"normal")}};this._updateBg=function(){this._backgroundByName(this._disabled?"disabled":this._down?"down":this._over?"hover":"normal")};this._createDom=function(){this._dom=uki.createElement("div",this.defaultCss);this._initClassName();this._label=uki.createElement("div",this.defaultCss);
this._dom.appendChild(this._label);this._dom.appendChild(uki.createElement("div","left:0;top:0;width:100%;height:100%;position:absolute;background:url("+uki.theme.imageSrc("x")+");"));this.textSelectable(this.textSelectable());this._initFocusable();uki.dom.bind(document,"mouseup",uki.proxy(this._mouseup,this));this.bind("mousedown",this._mousedown);this.bind("mouseenter",this._mouseenter);this.bind("mouseleave",this._mouseleave);this.bind("keyup",this._keyup);this.bind("keydown",this._keydown)};this._mouseup=
function(){if(this._down){this._down=false;this._updateBg()}};this._mousedown=function(){this._down=true;this._updateBg()};this._mouseenter=function(){this._over=true;this._updateBg()};this._mouseleave=function(){this._over=false;this._updateBg()};this._focus=function(c){this["focus-background"]().attachTo(this);a._focus.call(this,c)};this._keydown=function(c){if((c.which==32||c.which==13)&&!this._down)this._mousedown()};this._keyup=function(c){if((c.which==32||c.which==13)&&this._down){this._mouseup();
this.trigger("click",{domEvent:c,source:this})}c.which==27&&this._down&&this._mouseup()};this._blur=function(c){this["focus-background"]().detach();a._blur.call(this,c)};this._backgroundByName=function(c){var e=this[c+"-background"]();if(this._background!=e){this._background&&this._background.detach();e.attachTo(this);this._background=e;this._backgroundName=c}};this._bindToDom=function(c){return uki.view.Focusable._bindToDom.call(this,c)||uki.view.Label.prototype._bindToDom.call(this,c)}});uki.view.declare("uki.view.Checkbox",
uki.view.Button,function(b){this._backgroundPrefix="checkbox-";uki.each(["checked-normal","checked-hover","checked-disabled"],function(a,c){var e=c+"-background";this[e]=function(f){if(f)this["_"+e]=f;return this["_"+e]=this["_"+e]||uki.theme.background(this._backgroundPrefix+c,{height:this.rect().height,view:this})}},this);this._setup=function(){b._setup.call(this);this._focusable=false};this._updateBg=function(){var a=this._disabled?"disabled":this._over?"hover":"normal";if(this._checked)a="checked-"+
a;this._backgroundByName(a)};this.value=this.checked=uki.newProp("_checked",function(a){this._checked=!!a;this._updateBg()});this._mouseup=function(){if(this._down){this._down=false;if(!this._disabled){this.checked(!this.checked());this.trigger("change",{checked:this._checked,source:this})}}}});(function(){var b=uki.view.declare("uki.view.Radio",uki.view.Checkbox,function(){this._backgroundPrefix="radio-";this.group=uki.newProp("_group",function(a){b.unregisterGroup(this);this._group=a;b.registerGroup(this);
this.checked()&&b.clearGroup(this)});this.value=this.checked=uki.newProp("_checked",function(a){this._checked=!!a;a&&b.clearGroup(this);this._updateBg()});this._mouseup=function(){if(this._down){this._down=false;if(!this._checked&&!this._disabled){this.checked(!this._checked);this.trigger("change",{checked:this._checked,source:this})}}}});b.groups={};b.registerGroup=function(a){var c=a.group();if(b.groups[c])b.groups[c].push(a);else b.groups[c]=[a]};b.unregisterGroup=function(a){var c=a.group();if(b.groups[c])b.groups[c]=
uki.grep(b.groups[c],function(e){return e!=a})};b.clearGroup=function(a){uki.each(b.groups[a.group()]||[],function(c,e){if(e!=a)if(e.checked()){e.checked(false);this.trigger("change",{checked:false,source:e})}})}})();uki.view.declare("uki.view.TextField",uki.view.Base,uki.view.Focusable,function(b,a){function c(d){if(!f[d]){var g=uki.createElement("input",b.defaultCss+"border:none;padding:0;border:0;margin:0;overflow:hidden;left:-999em;top:0;line-height:1;"+d);uki.dom.probe(g,function(h){f[d]=h.offsetHeight})}return f[d]}
function e(d){return typeof d.placeholder=="string"}var f={};this._setup=function(){b._setup.apply(this,arguments);uki.extend(this,{_value:"",_multiline:false,_placeholder:"",_backgroundPrefix:"",_tagName:"input",_type:"text"});this.defaultCss+="margin:0;border:none;outline:none;padding:0;left:2px;top:0;z-index:100;resize:none;background: url("+uki.theme.imageSrc("x")+");"+uki.theme.style("input")};this._updateBg=function(){this._input.style.color=this._disabled?"#999":"#000"};uki.delegateProp(this,
"name","_input");this.value=function(d){if(d===undefined)return this._input.value;this._input.value=d;this._updatePlaceholderVis();return this};this.placeholder=uki.newProp("_placeholder",function(d){this._placeholder=d;if(!this._multiline&&e(this._input))this._input.placeholder=d;else if(this._placeholderDom)this._placeholderDom.innerHTML=d;else{this._placeholderDom=uki.createElement("div",this.defaultCss+"z-input:103;color:#999;cursor:text;-moz-user-select:none;",d);if(!this._multiline)this._placeholderDom.style.whiteSpace=
"nowrap";this._dom.appendChild(this._placeholderDom);this._updatePlaceholderVis();uki.each(["fontSize","fontFamily","fontWeight"],function(g,h){this._placeholderDom.style[h]=this._input.style[h]},this);uki.dom.bind(this._placeholderDom,"mousedown",uki.proxy(function(g){this.focus();g.preventDefault()},this))}});this._style=function(d,g){if(uki.inArray(d,uki.browser.textStyles)!=-1){if(g===undefined)return this._input.style[d];this._input.style[d]=g;if(this._placeholderDom)this._placeholderDom.style[d]=
g}return b._style.call(this,d,g)};uki.addProps(this,["backgroundPrefix"]);this.defaultBackground=function(){return uki.theme.background(this._backgroundPrefix+"input")};this._createDom=function(){this._dom=uki.createElement("div",b.defaultCss+";cursor:text;overflow:visible;");this._initClassName();this._input=uki.createElement(this._tagName,this.defaultCss+(this._multiline?"":";overflow:hidden;"));this._input.value=this._value;if(this._type)this._input.type=this._type;this._dom.appendChild(this._input);
this._input.value=this.value();this._initFocusable(this._input);this.bind("mousedown",function(d){d.target!=this._input&&this.focus()})};this._layoutDom=function(){b._layoutDom.apply(this,arguments);uki.dom.layout(this._input.style,{width:this._rect.width-4});var d;if(this._multiline){this._input.style.height=this._rect.height-4+"px";this._input.style.top="2px";d="2px 0"}else{d=(this._rect.height-c("font-size:"+this.style("fontSize")+";font-family:"+this.style("fontFamily")))/2;d=F(d)+"px 0 "+H(d)+
"px 0";this._input.style.padding=d}if(this._placeholderDom)this._placeholderDom.style.padding=d};this._updatePlaceholderVis=function(){if(this._placeholderDom)this._placeholderDom.style.display=this.value()?"none":"block"};this._focus=function(d){this._focusBackground=this._focusBackground||uki.theme.background(this._backgroundPrefix+"input-focus");this._focusBackground.attachTo(this);if(this._placeholderDom)this._placeholderDom.style.display="none";a._focus.call(this,d)};this._blur=function(d){this._focusBackground.detach();
this._updatePlaceholderVis();a._blur.call(this,d)};this._bindToDom=function(d){return a._bindToDom.call(this,d)||b._bindToDom.call(this,d)}});uki.view.declare("uki.view.MultilineTextField",uki.view.TextField,function(b){this._setup=function(){b._setup.call(this);this._tagName="textarea";this._type="";this._multiline=true}});uki.view.declare("uki.view.PasswordTextField",uki.view.TextField,function(b){this._setup=function(){b._setup.call(this);this._type="password"}});uki.Collection.addAttrs(["placeholder"]);
(function(){function b(){a||uki.dom.probe(uki.createElement("div","position:absolute;left:-99em;width:100px;height:100px;overflow:scroll;",'<div style="position:absolute;left:0;width:100%;"></div>'),function(e){a=e.offsetWidth-e.clientWidth;c=e.firstChild.offsetWidth==100});return a}var a,c;uki.view.declare("uki.view.ScrollPane",uki.view.Container,function(e){this.typeName=function(){return"uki.view.ScrollPane"};this._setup=function(){e._setup.call(this);uki.extend(this,{_clientRect:this.rect().clone(),
_rectForChild:this.rect().clone(),_scrollableV:true,_scrollableH:false,_scrollV:false,_scrollH:false,_sbV:false,_sbH:false})};uki.addProps(this,["scrollableV","scrollableH","scrollH","scrollV"]);this.rectForChild=function(){return this._rectForChild};this.clientRect=function(){return this._clientRect};this.scroll=function(f,d){f&&this.scrollTop(this.scrollLeft()+d);d&&this.scrollTop(this.scrollTop()+d)};uki.each(["scrollTop","scrollLeft"],function(f,d){this[d]=function(g){if(g==undefined)return this._dom[d];
this._dom[d]=g;this.trigger("scroll",{source:this});return this}},this);this.visibleRect=function(){var f=this._clientRect.clone();f.x=this.rect().x+this.scrollLeft();f.y=this.rect().y+this.scrollTop();return f};this.rect=function(f){if(f===undefined)return this._rect;f=r.create(f);var d=this._rect;this._parentRect=f;if(!this._resizeSelf(f))return this;this._updateClientRects();this._needsLayout=true;this.trigger("resize",{oldRect:d,newRect:this._rect,source:this});return this};this._createDom=function(){e._createDom.call(this);
if(A.indexOf("Gecko/")>-1)this._dom.tabIndex="-1"};this._recalcClientRects=function(){b();var f=this.contentsWidth(),d=this.contentsHeight();f=this._scrollableH?f>this._rect.width:false;d=this._scrollableV?d>this._rect.height:false;this._sbH=f||this._scrollH;this._sbV=d||this._scrollV;this._clientRect=new r(this._rect.width+(d?-1:0)*a,this._rect.height+(f?-1:0)*a);this._rectForChild=new r(this._rect.width+(d&&!c?-1:0)*a,this._rect.height+(f&&!c?-1:0)*a)};this._updateClientRects=function(){var f=this._clientRect;
this._recalcClientRects();if(f.width!=this._clientRect.width||f.height!=this._clientRect.height)this._resizeChildViews(f)};this._resizeChildViews=function(f){for(var d=0,g=this.childViews();d<g.length;d++)g[d].parentResized(f,this._clientRect)};this._layoutChildViews=function(){for(var f=0,d=this.childViews();f<d.length;f++)d[f]._needsLayout&&d[f].visible()&&d[f].layout()};this._layoutDom=function(f){this._updateClientRects();if(this._layoutScrollH!==this._sbH){this._dom.style.overflowX=this._sbH?
"scroll":"hidden";this._layoutScrollH=this._sbH}if(this._layoutScrollV!==this._sbV){this._dom.style.overflowY=this._sbV?"scroll":"hidden";this._layoutScrollV=this._sbV}e._layoutDom.call(this,f)};this._contentChanged=this.childResized=function(){this._needsLayout=true;uki.after(uki.proxy(this.layoutIfNeeded,this))}});uki.view.ScrollPane.initScrollWidth=b})();uki.view.list={};uki.view.declare("uki.view.List",uki.view.Base,uki.view.Focusable,function(b,a){function c(d,g){for(var h=new Array(g-d),k=0;d<=
g;d++,k++)h[k]=d;return h}function e(d,g,h){for(var k=g=uki.binarySearch(g,d);d[g]<=h;)g++;g>k&&d.splice(k,g-k)}this._throttle=42;this._visibleRectExt=300;this._defaultBackground="theme(list)";this._setup=function(){b._setup.call(this);uki.extend(this,{_rowHeight:30,_render:new uki.view.list.Render,_data:[],_lastClickIndex:-1,_selectedIndexes:[]})};this.defaultBackground=function(){return uki.theme.background("list",this._rowHeight)};uki.addProps(this,["render","packSize","visibleRectExt","throttle",
"lastClickIndex","multiselect"]);this.rowHeight=uki.newProp("_rowHeight",function(d){this._rowHeight=d;this.minSize(new t(this.minSize().width,this._rowHeight*this._data.length));this._background&&this._background.detach();this._background=null;this.background()&&this.background().attachTo(this);this._contentChanged()});this.data=function(d){if(d===undefined)return this._data;this.clearSelection();this._data=d;this._packs[0].itemFrom=this._packs[0].itemTo=this._packs[1].itemFrom=this._packs[1].itemTo=
0;this.minSize(new t(this.minSize().width,this._rowHeight*this._data.length));this.trigger("selection",{source:this});this._contentChanged();return this};this.relayout=function(){this._packs[0].itemFrom=this._packs[0].itemTo=this._packs[1].itemFrom=this._packs[1].itemTo=0;this.layout()};this.contentsSize=function(){return new t(this.rect().width,this._rowHeight*this._data.length)};this.addRow=function(d,g){this._data.splice(d,0,g);g=this._itemAt(d);var h=q.createElement("div");h.innerHTML=this._rowTemplate.render({height:this._rowHeight,
text:this._render.render(this._data[d],this._rowRect(d),d)});g?g.parentNode.insertBefore(h.firstChild,g):this._dom.childNodes[0].appendChild(h.firstChild);if(d<=this._packs[0].itemTo){this._packs[0].itemTo++;this._packs[1].itemFrom++;this._packs[1].itemTo++;this._packs[1].dom.style.top=this._packs[1].itemFrom*this._rowHeight+"px"}else this._packs[1].itemTo++;for(d=uki.binarySearch(d,this.selectedIndexes());d<this._selectedIndexes.length;d++)this._selectedIndexes[d]++;this.minSize(new t(this.minSize().width,
this._rowHeight*this._data.length));this._contentChanged();return this};this.removeRow=function(d){this._data.splice(d,1);this.data(this._data);return this};this.redrawRow=function(d){var g=this._itemAt(d);if(g)g.innerHTML=this._render.render(this._data[d],this._rowRect(d),d);return this};this.selectedIndex=function(d){if(d===undefined)return this._selectedIndexes.length?this._selectedIndexes[0]:-1;this.selectedIndexes([d]);this._scrollToPosition(d);return this};this.selectedIndexes=function(d){if(d===
undefined)return this._selectedIndexes;this.clearSelection(true);this._selectedIndexes=d;for(d=0;d<this._selectedIndexes.length;d++)this._setSelected(this._selectedIndexes[d],true);this.trigger("selection",{source:this});return this};this.selectedRow=function(){return this._data[this.selectedIndex()]};this.selectedRows=function(){return uki.map(this.selectedIndexes(),function(d){return this._data[d]},this)};this.clearSelection=function(d){for(var g=0;g<this._selectedIndexes.length;g++)this._setSelected(this._selectedIndexes[g],
false);this._selectedIndexes=[];if(!d)this._lastClickIndex=-1};this.isSelected=function(d){return this._selectedIndexes[uki.binarySearch(d,this._selectedIndexes)]==d};this.layout=function(){this._layoutDom(this._rect);this._needsLayout=false;this.trigger("layout",{rect:this._rect,source:this,visibleRect:this._visibleRect});this._firstLayout=false};this._rowRect=function(d){return new r(0,d*this._rowHeight,this.rect().width,this._rowHeight)};this._toggleSelection=function(d){var g=[].concat(this._selectedIndexes),
h=uki.binarySearch(d,g);g[h]==d?g.splice(h,1):g.splice(h,0,d);this.selectedIndexes(g)};var f=false;this._scrollableParentScroll=function(){if(!f)if(this._throttle){if(!this._throttleStarted){this._throttleStarted=true;setTimeout(uki.proxy(function(){this._throttleStarted=false;this.layout()},this),this._throttle)}}else this.layout()};this._contentChanged=function(){this._needsLayout=true;uki.after(uki.proxy(this._relayoutParent,this))};this._relayoutParent=function(){this.parent().childResized(this);
if(this._scrollableParent){for(var d=this;d&&d!=this._scrollableParent;){d._needsLayout=true;d=d.parent()}d.layout()}};this.keyPressEvent=function(){return v.opera||/mozilla/i.test(A)&&!/(compatible|webkit)/i.test(A)?"keypress":"keydown"};this._bindSelectionEvents=function(){this.bind("mousedown",this._mousedown);this.bind("mouseup",this._mouseup);this.bind(this.keyPressEvent(),this._keypress)};this._mouseup=function(d){if(this._multiselect){var g=uki.dom.offset(this._dom);d=(d.pageY-g.y)/this._rowHeight<<
0;this._selectionInProcess&&this._lastClickIndex==d&&this.isSelected(d)&&this.selectedIndexes([d]);this._selectionInProcess=false}};this._mousedown=function(d){var g=uki.dom.offset(this._dom);g=(d.pageY-g.y)/this._rowHeight<<0;var h=this._selectedIndexes;if(this._multiselect){this._selectionInProcess=false;if(d.shiftKey&&h.length>0)if(this.isSelected(g)){h=[].concat(h);e(h,Math.min(g+1,this._lastClickIndex),Math.max(g-1,this._lastClickIndex));this.selectedIndexes(h)}else this.selectedIndexes(c(Math.min(g,
h[0]),Math.max(g,h[h.length-1])));else if(d.metaKey)this._toggleSelection(g);else if(this.isSelected(g))this._selectionInProcess=true;else this.selectedIndexes([g])}else this.selectedIndexes([g]);this._lastClickIndex=g};this._keypress=function(d){var g=-1;if(d.which==38||d.keyCode==38){g=Math.max(0,this._lastClickIndex-1);d.preventDefault()}else if(d.which==40||d.keyCode==40){g=Math.min(this._data.length-1,this._lastClickIndex+1);d.preventDefault()}else if(this._multiselect&&(d.which==97||d.which==
65)&&d.metaKey){d.preventDefault();this.selectedIndexes(c(0,this._data.length-1))}if(g>-1&&g!=this._lastClickIndex){if(d.shiftKey&&this._multiselect){this.isSelected(g)?this._toggleSelection(this._lastClickIndex):this._toggleSelection(g);this._scrollToPosition(g)}else this.selectedIndex(g);this._lastClickIndex=g}};this._createDom=function(){this._dom=uki.createElement("div",this.defaultCss+"overflow:hidden");this._initClassName();var d=uki.createElement("div","position:absolute;left:0;top:0px;width:100%;overflow:hidden");
this._packs=[{dom:d,itemTo:0,itemFrom:0},{dom:d.cloneNode(false),itemTo:0,itemFrom:0}];this._dom.appendChild(this._packs[0].dom);this._dom.appendChild(this._packs[1].dom);this._initFocusable();this._bindSelectionEvents()};this._setSelected=function(d,g){var h=this._itemAt(d);h&&this._render.setSelected(h,this._data[d],g,this.hasFocus())};this._scrollToPosition=function(d){if(this._visibleRect){var g;g=(d+1)*this._rowHeight;d=d*this._rowHeight;f=true;if(g>=this._visibleRect.maxY())this._scrollableParent.scroll(0,
g-this._visibleRect.maxY());else d<this._visibleRect.y&&this._scrollableParent.scroll(0,d-this._visibleRect.y);f=false;this.layout()}};this._itemAt=function(d){if(d<this._packs[1].itemTo&&d>=this._packs[1].itemFrom)return this._packs[1].dom.childNodes[d-this._packs[1].itemFrom];else if(d<this._packs[0].itemTo&&d>=this._packs[0].itemFrom)return this._packs[0].dom.childNodes[d-this._packs[0].itemFrom];return null};this._rowTemplate=new uki.theme.Template('<div style="width:100%;height:${height}px;overflow:hidden;">${text}</div>');
this._renderPack=function(d,g,h){var k=[];for(i=g;i<h;i++)k[k.length]=this._rowTemplate.render({height:this._rowHeight,text:this._render.render(this._data[i],this._rowRect(i),i)});d.dom.innerHTML=k.join("");d.itemFrom=g;d.itemTo=h;d.dom.style.top=g*this._rowHeight+"px";this._restorePackSelection(d,g,h)};this._restorePackSelection=function(d){var g=this._selectedIndexes;if(g[0]<=d.itemFrom&&g[g.length-1]>=d.itemFrom||g[0]<=d.itemTo&&g[g.length-1]>=d.itemTo||g[0]>=d.itemFrom&&g[g.length-1]<=d.itemTo){var h=
uki.binarySearch(d.itemFrom,g);for(h=Math.max(h,0);g[h]!==null&&g[h]<d.itemTo;){var k=g[h]-d.itemFrom;this._render.setSelected(d.dom.childNodes[k],this._data[k],true,this.hasFocus());h++}}};this._swapPacks=function(){var d=this._packs[0];this._packs[0]=this._packs[1];this._packs[1]=d};this._layoutDom=function(d){if(!this._scrollableParent){this._scrollableParent=uki.view.scrollableParent(this);this._scrollableParent.bind("scroll",uki.proxy(this._scrollableParentScroll,this))}var g=this._rowHeight*
this._data.length;this._visibleRect=uki.view.visibleRect(this,this._scrollableParent);if(this._focusTarget)this._focusTarget.style.top=this._visibleRect.y+"px";var h=F((this._visibleRect.height+this._visibleRectExt*2)/this._rowHeight),k=s(0,this._visibleRect.y-this._visibleRectExt),l=z(g,this._visibleRect.maxY()+this._visibleRectExt),n=this._packs[0].itemFrom*this._rowHeight,m=this._packs[1].itemTo*this._rowHeight;g=true;b._layoutDom.call(this,d);if(l<=n||k>=m||l>m&&this._packs[1].itemFrom*this._rowHeight>
this._visibleRect.y&&this._packs[1].itemTo>this._packs[1].itemFrom||k<n&&this._packs[0].itemTo*this._rowHeight<this._visibleRect.maxY()){d=k-this._visibleRectExt/2;d=s(0,Math.round(d/this._rowHeight));h=z(this._data.length,d+h);this._renderPack(this._packs[0],d,h);this._renderPack(this._packs[1],h,h)}else if(l>m&&this._packs[1].itemTo>this._packs[1].itemFrom){d=this._packs[1].itemTo;h=z(this._data.length,this._packs[1].itemTo+h);this._renderPack(this._packs[0],d,h);this._swapPacks()}else if(l>m){d=
this._packs[0].itemTo;h=z(this._data.length,this._packs[1].itemTo+h);this._renderPack(this._packs[1],d,h)}else if(k<n){d=s(this._packs[0].itemFrom-h,0);h=this._packs[0].itemFrom;this._renderPack(this._packs[1],d,h);this._swapPacks()}else g=false;if(g&&/MSIE 6|7/.test(A))this.dom().className+=""};this._bindToDom=function(d){return a._bindToDom.call(this,d)||b._bindToDom.call(this,d)};this._focus=function(d){a._focus.call(this,d);this._selectedIndexes.length==0&&this._data.length>0?this.selectedIndexes([0]):
this.selectedIndexes(this.selectedIndexes())};this._blur=function(d){a._blur.call(this,d);this.selectedIndexes(this.selectedIndexes())}});uki.Collection.addAttrs(["data","selectedIndex","selectedIndexes","selectedRow","selectedRows","lastClickIndex"]);uki.view.declare("uki.view.ScrollableList",uki.view.ScrollPane,function(b){this._createDom=function(){b._createDom.call(this);this._list=uki({view:"List",rect:this.rect().clone().normalize(),anchors:"left top right bottom"})[0];this.appendChild(this._list)};
uki.each("data rowHeight render packSize visibleRectExt throttle focusable selectedIndex selectedIndexes selectedRow selectedRows multiselect draggable textSelectable".split(" "),function(a,c){uki.delegateProp(this,c,"_list")},this)});uki.view.list.Render=uki.newClass({init:function(){},render:function(b,a){return'<div style="line-height: '+a.height+'px; font-size: 12px; padding: 0 4px;">'+b+"</div>"},setSelected:function(b,a,c,e){b.style.backgroundColor=c&&e?"#3875D7":c?"#CCC":"";b.style.color=c&&
e?"#FFF":"#000"}});uki.view.table={};uki.view.declare("uki.view.Table",uki.view.Container,function(b){var a="rowHeight data packSize visibleRectExt render selectedIndex selectedIndexes selectedRows selectedRow focus blur hasFocus lastClickIndex focusable textSelectable multiselect".split(" ");this._headerHeight=this._rowHeight=17;this._listImpl="uki.view.List";uki.each(a,function(c,e){uki.delegateProp(this,e,"_list")},this);this._setup=function(){b._setup.call(this);this._columns=[];this.defaultCss+=
"overflow:hidden;"};this._style=function(c,e){this._header.style(c,e);return b._style.call(this,c,e)};this.list=function(){return this._list};this.header=function(){return this._header};this.columns=uki.newProp("_columns",function(c){for(var e=0;e<this._columns.length;e++)this._columns[e].unbind();this._columns=uki.build(c);for(e=this._totalWidth=0;e<this._columns.length;e++){this._columns[e].position(e);this._columns[e].bind("beforeResize",uki.proxy(function(){this._updateTotalWidth();this._scrollPane.layout()},
this))}this._updateTotalWidth();this._header.columns(this._columns)});this.redrawCell=function(c,e){var f=this._list._itemAt(c);if(f){var d=q.createElement("div");d.innerHTML=this.columns()[e].render(this.data()[c],new r(0,c*this.rowHeight(),this.list().width(),this.rowHeight()),c);f.replaceChild(d.firstChild,f.childNodes[e])}return this};uki.each(["redrawRow","addRow","removeRow"],function(c,e){this[e]=function(){this.list()[e].apply(this.list(),arguments);return this}},this);this.redrawColumn=function(c){for(var e=
this._list._packs[1].itemTo,f=this._list._packs[0].itemFrom;f<e;f++)this.redrawCell(f,c);return this};this._updateTotalWidth=function(){for(var c=this._totalWidth=0;c<this._columns.length;c++){this._columns[c].position(c);this._totalWidth+=this._columns[c].width()}this._list.minSize(new t(this._totalWidth,this._list.minSize().height));this._header.minSize(new t(this._totalWidth,0))};this._createDom=function(){b._createDom.call(this);this._initClassName();var c=new r(0,this._headerHeight,this.rect().width,
this.rect().height-this._headerHeight),e=c.clone().normalize(),f=new r(0,0,this.rect().width,this._headerHeight),d={view:this._listImpl,rect:e,anchors:"left top bottom right",render:new uki.view.table.Render(this),className:"table-list"};c={view:"ScrollPane",rect:c,anchors:"left top right bottom",scrollableH:true,childViews:[d],className:"table-scroll-pane"};f={view:"table.Header",rect:f,anchors:"top left right",className:"table-header"};uki.each(a,function(g,h){if(this["_"+h]!==undefined)d[h]=this["_"+
h]},this);this._scrollPane=uki.build(c)[0];this._list=this._scrollPane.childViews()[0];this._header=uki.build(f)[0];this._scrollPane.resizeToContents();this.appendChild(this._header);this.appendChild(this._scrollPane);this._scrollPane.bind("scroll",uki.proxy(function(){this._header.dom().style.left=-this._scrollPane.scrollLeft()+"px"},this))}});uki.Collection.addAttrs(["columns"]);uki.view.table.Render=uki.newClass(uki.view.list.Render,new (function(){this.init=function(b){this._table=b};this.render=
function(b,a,c){var e=this._table.columns();return uki.map(e,function(f,d){return e[d].render(b,a,c)}).join("")}}));uki.view.table.Column=uki.newClass(uki.view.Observable,new (function(){this._width=100;this._maxWidth=this._minWidth=this._position=this._offset=0;this._css="float:left;white-space:nowrap;text-overflow:ellipsis;";this._inset=new w(3,5);this._templatePrefix="table-";this.init=function(){};uki.addProps(this,["position","css","formatter","label","resizable","maxWidth","minWidth","maxWidth",
"key","sort"]);this.template=function(){return this._template||(this._template=uki.theme.template(this._templatePrefix+"cell"))};this.headerTemplate=function(){var b="";if(this.sort()=="ASC")b="-asc";if(this.sort()=="DESC")b="-desc";return uki.theme.template(this._templatePrefix+"header-cell"+b)};this.sortData=function(b){var a=this;return b.sort(function(c,e){return a._key?a.compare(uki.attr(c,a._key),uki.attr(e,a._key)):a.compare(c[a._position],e[a._position])})};this.compare=function(b,a){return(b>=
a?1:b==a?0:-1)*(this._sort=="DESC"?-1:1)};this.width=uki.newProp("_width",function(b){var a={oldWidth:this._width,source:this};this._width=this._normailizeWidth(b);a.newWidth=this._width;this.trigger("beforeResize",a);if(this._stylesheet&&a.newWidth!=a.oldWidth)(this._stylesheet.styleSheet?this._stylesheet.styleSheet.rules:this._stylesheet.sheet.cssRules)[0].style.width=this._clientWidth()+"px";this.trigger("resize",a)});this._bindToDom=uki.F;this._normailizeWidth=function(b){if(this._maxWidth)b=
z(this._maxWidth,b);if(this._minWidth)b=s(this._minWidth,b);return b};this.inset=uki.newProp("_inset",function(b){this._inset=w.create(b)});this.render=function(b,a,c){this._prerenderedTemplate||this._prerenderTemplate(a);a=this._key?uki.attr(b,this._key):b[this._position];this._prerenderedTemplate[1]=this._formatter?this._formatter(a,b,c):a;return this._prerenderedTemplate.join("")};this.appendResizer=function(b,a){a=uki.theme.dom("resizer",a);b.appendChild(a);return a};this.renderHeader=function(b){this._className||
this._initStylesheet();return this.headerTemplate().render({data:'<div style="overflow:hidden;text-overflow:ellipsis;*width:100%;height:100%;padding-top:'+this._inset.top+'px">'+this.label()+"</div>",style:"*overflow-y:hidden;"+this._cellStyle(true,b),className:this._className})};this._prerenderTemplate=function(b){this._className||this._initStylesheet();this._prerenderedTemplate=this.template().render({data:"\u0001\u0001",style:"overflow:hidden;"+this._cellStyle(false,b.height),className:this._className}).split("\u0001")};
this._cellPadding=function(b){var a=this._inset;return["padding:",b?"0":a.top,"px ",a.right,"px ",b?"0":a.bottom,"px ",a.left,"px;"].join("")};this._cellHeight=function(b,a){return"height:"+(a-(uki.dom.offset.boxModel&&!b?this._inset.height():0))+"px;"};this._cellStyle=function(b,a){return this._css+this._cellPadding(b)+";"+this._cellHeight(b,a)};this._clientWidth=function(){return this._width-(uki.dom.offset.boxModel?this._inset.width()+1:0)};this._initStylesheet=function(){if(!this._className){uki.dom.offset.initializeBoxModel();
this._className="uki-table-column-"+uki.guid++;var b="."+this._className+" {width:"+this._clientWidth()+"px;}";this._stylesheet=uki.dom.createStylesheet(b)}}}));uki.view.table.NumberColumn=uki.newClass(uki.view.table.Column,new function(){this._css=uki.view.table.Column.prototype._css+"text-align:right;";this.compare=function(b,a){b*=1;a*=1;return(b>=a?1:b==a?0:-1)*(this._sort=="DESC"?-1:1)}});uki.view.table.CustomColumn=uki.view.table.Column;uki.view.declare("uki.view.table.Header",uki.view.Label,
function(b){this._defaultBackground="theme(table-header)";this._setup=function(){b._setup.call(this);this._multiline=true;this._resizers=[]};this.columns=uki.newProp("_columns",function(a){this._columns=a;this.html(this._createColumns());this._createResizers()});this._createDom=function(){b._createDom.call(this);this.bind("click",this._click)};this._click=function(a){if(!this._dragging){a=a.target;if(!(a==this.dom()||a==this._label)){for(;a.parentNode!=this._label;)a=a.parentNode;a=uki.inArray(a,
this._label.childNodes);a>-1&&this.trigger("columnClick",{source:this,columnIndex:a,column:this._columns[a]})}}};this.redrawColumn=function(a){this._resizers[a]&&uki.dom.unbind(this._resizers[a]);var c=q.createElement("div");c.innerHTML=this._columns[a].renderHeader(this.rect().height);this._label.replaceChild(c.firstChild,this._label.childNodes[a]);this._columns[a].resizable()&&this._createResizers(a)};this._createColumns=function(){for(var a=[],c=0,e=this._columns,f=e.length;c<f;c++)a[a.length]=
e[c].renderHeader(this.rect().height);return a.join("")};this._createResizer=function(a){var c=this._columns[a];if(c.resizable()){c=c.appendResizer(this._label.childNodes[a],this.rect().height);this._bindResizerDrag(c,a);this._resizers[a]=c}};this._createResizers=function(){uki.each(this._columns,this._createResizer,this)};this._bindResizerDrag=function(a,c){var e=this;uki.dom.bind(a,"draggesture",function(f){e._dragging=true;var d=uki.dom.offset(e.dom());f=f.pageX-d.x;d=0;var g,h=e._columns[c];for(g=
0;g<c;g++)d+=e._columns[g].width();h.width(f-d)});uki.dom.bind(a,"draggestureend",function(){setTimeout(function(){e._dragging=false},1)})}});uki.view.declare("uki.view.Slider",uki.view.Container,uki.view.Focusable,function(b,a){this._handleSize=new t(10,18);this._setup=function(){b._setup.call(this);uki.extend(this,{_min:0,_max:1,_value:0,_values:null,_keyStep:0.01})};uki.addProps(this,["min","max","values","keyStep"]);this.values=uki.newProp("_values",function(c){this._values=c;this._min=c[0];this._max=
c[c.length-1]});this.value=uki.newProp("_value",function(c){this._value=s(this._min,z(this._max,c));this._position=this._val2pos(this._value);this._moveHandle()});this._pos2val=function(c,e){if(this._values){c=Math.round(1*c/(this._rect.width-this._handleSize.width)*(this._values.length-1));if(e)this._cachedIndex=c;return this._values[c]}return c/(this._rect.width-this._handleSize.width)*(this._max-this._min)+this._min};this._val2pos=function(c){if(this._values)return(this._cachedIndex!==undefined?
this._cachedIndex:uki.binarySearch(c,this._values))/(this._values.length-1)*(this._rect.width-this._handleSize.width);return(c-this._min)/(this._max-this._min)*(this._rect.width-this._handleSize.width)};this._createDom=function(){this._dom=uki.createElement("div",this.defaultCss+"height:18px;-moz-user-select:none;-webkit-user-select:none;overflow:visible;");this._initClassName();this._handle=uki({view:"SliderHandle",rect:new r(0,(this._rect.height-this._handleSize.height)/2,this._handleSize.width,
this._handleSize.height),anchors:"left top"})[0];this.appendChild(this._handle);uki.theme.background("slider-bar").attachTo(this);uki.each(["draggesturestart","draggesture","draggestureend"],function(c,e){this._handle.bind(e,uki.proxy(this["_"+e],this))},this);this.bind(uki.view.List.prototype.keyPressEvent(),this._keypress);this.bind("click",this._click);this._initFocusable()};this._focus=function(c){this._handle._focus();a._focus.call(this,c)};this._blur=function(c){this._handle._blur();a._blur.call(this,
c)};this._click=function(c){this.value(this._pos2val(c.pageX-uki.dom.offset(this._dom).x-this._handleSize.width/2,true));this._cachedIndex=undefined;this.trigger("change",{source:this,value:this._value})};this._keypress=function(c){if(c.which==39||c.keyCode==39)this.value(this.value()+this._keyStep*(this._max-this._min));else if(c.which==37||c.keyCode==37)this.value(this.value()-this._keyStep*(this._max-this._min))};this._moveHandle=function(){var c=this._handle.rect().clone();c.x=this._position;
c.y=(this._rect.height-this._handleSize.height)/2;this._handle.rect(c).layout()};this._draggesturestart=function(){this._dragging=true;this._initialPosition=this._handle.rect().clone();return true};this._draggesture=function(c){this.value(this._pos2val(s(0,z(this._rect.width-this._handleSize.width,this._initialPosition.x+c.dragOffset.x)),true));this._cachedIndex=undefined};this._draggestureend=function(){this._dragging=false;this._initialPosition=null;this.value(this._pos2val(this._position,true));
this._cachedIndex=undefined;this.trigger("change",{source:this,value:this._value})};this._layoutDom=function(c){b._layoutDom.call(this,c);this._position=this._val2pos(this._value);this._moveHandle();return true};this._bindToDom=function(c){if(c=="change")return true;return uki.view.Focusable._bindToDom.call(this,c)||b._bindToDom.call(this,c)}});uki.view.declare("uki.view.SliderHandle",uki.view.Button,{_backgroundPrefix:"slider-handle-",_focusable:false});uki.view.declare("uki.view.HSplitPane",uki.view.Container,
function(b){this._throttle=0;this._setup=function(){b._setup.call(this);this._originalRect=this._rect;uki.extend(this,{_vertical:false,_handlePosition:200,_autogrowLeft:false,_autogrowRight:true,_handleWidth:7,_leftMin:100,_rightMin:100,_panes:[]})};uki.addProps(this,["leftMin","rightMin","autogrowLeft","autogrowRight","throttle"]);this.topMin=this.leftMin;this.bottomMin=this.rightMin;this.handlePosition=uki.newProp("_handlePosition",function(a){this._handlePosition=this._normalizePosition(a);this.trigger("handleMove",
{source:this,handlePosition:this._handlePosition,dragValue:a});this._resizeChildViews()});this.handleWidth=uki.newProp("_handleWidth",function(a){if(this._handleWidth!=a){this._handleWidth=a;a=this._createHandle();this._dom.insertBefore(a,this._handle);this._removeHandle();this._handle=a;this._resizeChildViews()}});this._normalizePosition=function(a){var c=this._vertical?"height":"width";return s(this._leftMin,z(this._rect[c]-this._rightMin-this._handleWidth,s(0,z(this._rect?this._rect[c]:1E3,a*1))))};
this._removeHandle=function(){this._dom.removeChild(this._handle)};this._createHandle=function(){var a;if(this._vertical){a=uki.theme.dom("splitPane-vertical",{handleWidth:this._handleWidth});a.style.top=this._handlePosition+"px"}else{a=uki.theme.dom("splitPane-horizontal",{handleWidth:this._handleWidth});a.style.left=this._handlePosition+"px"}uki.each(["draggesturestart","draggesture","draggestureend"],function(c,e){uki.dom.bind(a,e,uki.proxy(this["_"+e],this))},this);return a};this._createDom=function(){this._dom=
uki.createElement("div",this.defaultCss);this._initClassName();for(var a=0,c;a<2;a++){c={view:"Container"};c.anchors=a==1?"left top bottom right":this._vertical?"left top right":"left top bottom";c.rect=a==0?this._leftRect():this._rightRect();this._panes[a]=uki.build(c)[0];this.appendChild(this._panes[a])}this._dom.appendChild(this._handle=this._createHandle())};this._normalizeRect=function(a){a=b._normalizeRect.call(this,a);a=a.clone();if(this._vertical)a.height=s(a.height,this._leftMin+this._rightMin);
else a.width=s(a.width,this._leftMin+this._rightMin);return a};this._resizeSelf=function(a){var c=this._rect,e=this._vertical?"height":"width";if(!b._resizeSelf.call(this,a))return false;if(this._autogrowLeft){c=a[e]-c[e];this._handlePosition=this._normalizePosition(this._handlePosition+(this._autogrowRight?c/2:c))}if(this._vertical){if(a.height-this._handlePosition<this._rightMin)this._handlePosition=s(this._leftMin,a.height-this._rightMin)}else if(a.width-this._handlePosition<this._rightMin)this._handlePosition=
s(this._leftMin,a.width-this._rightMin);return true};this._draggesturestart=function(a){var c=uki.dom.offset(this.dom());this._posWithinHandle=a[this._vertical?"pageY":"pageX"]-c[this._vertical?"y":"x"]-this._handlePosition;return true};this._draggesture=function(a){this._updatePositionOnDrag(a)};this._draggestureend=function(a){this._updatePositionOnDrag(a)};this._updatePositionOnDrag=function(a){var c=uki.dom.offset(this.dom());this.handlePosition(a[this._vertical?"pageY":"pageX"]-c[this._vertical?
"y":"x"]-this._posWithinHandle);if(this._throttle){this._throttleHandler=this._throttleHandler||uki.proxy(function(){this.layout();this._trottling=false},this);if(!this._trottling){this._trottling=true;setTimeout(this._throttleHandler,this._throttle)}}else this.layout()};this.topPane=this.leftPane=function(a){return this._paneAt(0,a)};this.bottomPane=this.rightPane=function(a){return this._paneAt(1,a)};this.topChildViews=this.leftChildViews=function(a){return this._childViewsAt(0,a)};this.bottomChildViews=
this.rightChildViews=function(a){return this._childViewsAt(1,a)};this._childViewsAt=function(a,c){if(c===undefined)return this._panes[a].childViews();this._panes[a].childViews(c);return this};this._paneAt=function(a,c){if(c===undefined)return this._panes[a];uki.build.copyAttrs(this._panes[a],c);return this};this._leftRect=function(){return this._vertical?new r(this._rect.width,this._handlePosition):new r(this._handlePosition,this._rect.height)};this._rightRect=function(){return this._vertical?new r(0,
this._handlePosition+this._handleWidth,this._rect.width,this._rect.height-this._handleWidth-this._handlePosition):new r(this._handlePosition+this._handleWidth,0,this._rect.width-this._handleWidth-this._handlePosition,this._rect.height)};this._resizeChildViews=function(){this._panes[0].rect(this._leftRect());this._panes[1].rect(this._rightRect())};this._layoutDom=function(a){b._layoutDom.call(this,a);this._handle.style[this._vertical?"top":"left"]=this._handlePosition+"px"};this._bindToDom=function(a){if(a==
"handleMove")return true;return b._bindToDom.call(this,a)}});uki.view.declare("uki.view.VSplitPane",uki.view.HSplitPane,function(b){this._setup=function(){b._setup.call(this);this._vertical=true}});uki.Collection.addAttrs(["handlePosition"]);uki.view.declare("uki.view.Popup",uki.view.Container,function(b){this._setup=function(){b._setup.call(this);uki.extend(this,{_offset:2,_relativeTo:null,_horizontal:false,_flipOnResize:true,_defaultBackground:"theme(popup-normal)"})};this._createDom=function(){b._createDom.call(this);
this.hideOnClick(true)};uki.addProps(this,["offset","relativeTo","horizontal","flipOnResize"]);this.hideOnClick=function(a){if(a===undefined)return this._clickHandler;if(a!=!!this._clickHandler)if(a){this._clickHandler=this._clickHandler||uki.proxy(function(c){uki.dom.contains(this._relativeTo.dom(),c.target)||uki.dom.contains(this.dom(),c.target)||this.hide()},this);uki.dom.bind(q.body,"mousedown",this._clickHandler);uki.dom.bind(v,"resize",this._clickHandler)}else{uki.dom.unbind(q.body,"mousedown",
this._clickHandler);uki.dom.unbind(v,"resize",this._clickHandler);this._clickHandler=false}return this};this.toggle=function(){this.parent()&&this.visible()?this.hide():this.show()};this.show=function(){this.visible(true);if(this.parent()){this.rect(this._recalculateRect());this.layout(this._rect)}else new uki.Attachment(v,this);this.trigger("toggle",{source:this})};this.hide=function(){this.visible(false);this.trigger("toggle",{source:this})};this.parentResized=function(){this.rect(this._recalculateRect())};
this._resizeSelf=function(a){this._rect=this._normalizeRect(a);return true};this._layoutDom=function(a){return b._layoutDom.call(this,a)};this._recalculateRect=function(){if(!this.visible())return this._rect;var a=uki.dom.offset(this._relativeTo.dom()),c=this._relativeTo.rect(),e=this.rect().clone(),f=uki.view.top(this);f.rect();f=uki.dom.offset(f.dom());var d=new y,g=this._horizontal?this._offset:0,h=this._horizontal?0:this._offset;a.offset(-f.x,-f.y);d.x=this._anchors&2?a.x+c.width-(this._horizontal?
0:e.width)+g:this._anchors&8?a.x-(this._horizontal?e.width:0)-g:a.x+(c.width-e.width>>1)-g;d.y=this._anchors&4?a.y+(this._horizontal?c.height:0)-e.height-h:this._anchors&1?a.y+(this._horizontal?0:c.height)+h:a.y+(c.height-e.height>>1)+h;return new r(d.x,d.y,e.width,e.height)}});uki.each(["show","hide","toggle"],function(b,a){uki.fn[a]=function(){this.each(function(){this[a]()})}});uki.view.declare("uki.view.VFlow",uki.view.Container,function(b){this.contentsSize=function(){var a=uki.reduce(0,this._childViews,
function(c,e){return c+(e.visible()?e.rect().height:0)});return new t(this.contentsWidth(),a)};this.hidePartlyVisible=uki.newProp("_hidePartlyVisible");this.resizeToContents=function(a){this._resizeChildViews(this._rect);return b.resizeToContents.call(this,a)};this.layout=function(){return b.layout.call(this)};this._resizeChildViews=function(a){for(var c=0,e,f=0,d=this.childViews();f<d.length;f++){e=d[f];e.parentResized(a,this._rect);e.rect().y=c;this._hidePartlyVisible&&e.visible(e._rect.height+
c<=this._rect.height);if(e.visible())c+=e._rect.height}};this._contentChanged=this.childResized=function(){this._needsLayout=true;uki.after(uki.proxy(this._afterChildResized,this))};this._afterChildResized=function(){this.resizeToContents("height");this.parent().childResized(this);this.layoutIfNeeded()}});uki.view.declare("uki.view.HFlow",uki.view.VFlow,function(){this.contentsSize=function(){var b=uki.reduce(0,this._childViews,function(a,c){return a+(c.visible()?c.rect().width:0)});return new t(b,
this.contentsHeight())};this._resizeChildViews=function(b){for(var a=0,c,e=0,f=this.childViews();e<f.length;e++){c=f[e];c.parentResized(b,this._rect);c.rect().x=a;this._hidePartlyVisible&&c.visible(c._rect.width+a<=this._rect.width);if(c.visible())a+=c._rect.width}};this._afterChildResized=function(){this.resizeToContents("width");this.parent().childResized(this);this.layoutIfNeeded()}});uki.view.toolbar={};uki.view.declare("uki.view.Toolbar",uki.view.Container,function(b){this.typeName=function(){return"uki.view.Toolbar"};
this._moreWidth=30;this._setup=function(){b._setup.call(this);this._buttons=[];this._widths=[]};this.buttons=uki.newProp("_buttons",function(a){this._buttons=a;this._flow.childViews(uki.build(uki.map(this._buttons,this._createButton,this)).resizeToContents("width"));this._totalWidth=uki.reduce(0,this._flow.childViews(),function(c,e){return c+e.rect().width})});uki.moreWidth=uki.newProp("_moreWidth",function(a){this._moreWidth=a;this._updateMoreVisible()});this._createDom=function(){b._createDom.call(this);
var a=this.rect(),c=a.clone().normalize();a={view:"Button",rect:new r(a.width-this._moreWidth,0,this._moreWidth,a.height),anchors:"right top",className:"toolbar-button",visible:false,backgroundPrefix:"toolbar-more-",text:">>",focusable:false};var e={view:"Popup",rect:"0 0",anchors:"right top",className:"toolbar-popup",background:"theme(toolbar-popup)",childViews:{view:"VFlow",rect:"0 5 0 0",anchors:"right top left bottom"}};this._flow=uki.build({view:"HFlow",rect:c,anchors:"left top right",className:"toolbar-flow",
hidePartlyVisible:true})[0];this._more=uki.build(a)[0];this.appendChild(this._flow);this.appendChild(this._more);e.relativeTo=this._more;this._popup=uki.build(e)[0];this._more.bind("click",uki.proxy(this._showMissingButtons,this))};this._showMissingButtons=function(){for(var a=this._flow.rect().width,c=0,e=[],f=0,d=this._flow.childViews(),g=d.length;f<g;f++){c+=d[f].rect().width;c>a&&e.push(f)}a=uki.map(e,function(h){var k={html:d[h].html(),backgroundPrefix:"toolbar-popup-button-"};uki.each(["fontSize",
"fontWeight","color","textAlign","inset"],function(l,n){k[n]=uki.attr(d[h],n)});return this._createButton(k)},this);uki("VFlow",this._popup).childViews(a).resizeToContents("width height");this._popup.resizeToContents("width height").height(this._popup.height()+5).toggle()};this._updateMoreVisible=function(){var a=this._rect;if(this._more.visible()!=a.width<this._totalWidth){this._more.visible(a.width<this._totalWidth);var c=this._flow.rect();c.width+=(a.width<this._totalWidth?-1:1)*this._moreWidth;
this._flow.rect(c)}};this.rect=function(a){var c=b.rect.call(this,a);a&&this._updateMoreVisible();return c};this._createButton=function(a){var c=this.rect().clone().normalize();c.width=100;return uki.extend({view:"Button",rect:c,focusable:false,align:"left",anchors:"left top",backgroundPrefix:"toolbar-button-",autosizeToContents:"width",focusable:false},a)}})})();
