UNPKG

olympus-r-17plugins

Version:

A plugin of Olympus for 17zuoye.

2 lines 212 kB
var __reflect=this&&this.__reflect||function(t,e,i){t.__class__=e,i?i.push(e):i=[e],t.__types__=t.__types__?i.concat(t.__types__):i},__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),eui;!function(t){var e;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.targetLevel=Number.POSITIVE_INFINITY,e.invalidatePropertiesFlag=!1,e.invalidateClientPropertiesFlag=!1,e.invalidatePropertiesQueue=new i,e.invalidateSizeFlag=!1,e.invalidateClientSizeFlag=!1,e.invalidateSizeQueue=new i,e.invalidateDisplayListFlag=!1,e.invalidateDisplayListQueue=new i,e.eventDisplay=new egret.Bitmap,e.listenersAttached=!1,e}return __extends(e,t),e.prototype.invalidateProperties=function(t){this.invalidatePropertiesFlag||(this.invalidatePropertiesFlag=!0,this.listenersAttached||this.attachListeners()),this.targetLevel<=t.$nestLevel&&(this.invalidateClientPropertiesFlag=!0),this.invalidatePropertiesQueue.insert(t)},e.prototype.validateProperties=function(){for(var t=this.invalidatePropertiesQueue,e=t.shift();e;)e.$stage&&e.validateProperties(),e=t.shift();t.isEmpty()&&(this.invalidatePropertiesFlag=!1)},e.prototype.invalidateSize=function(t){this.invalidateSizeFlag||(this.invalidateSizeFlag=!0,this.listenersAttached||this.attachListeners()),this.targetLevel<=t.$nestLevel&&(this.invalidateClientSizeFlag=!0),this.invalidateSizeQueue.insert(t)},e.prototype.validateSize=function(){for(var t=this.invalidateSizeQueue,e=t.pop();e;)e.$stage&&e.validateSize(),e=t.pop();t.isEmpty()&&(this.invalidateSizeFlag=!1)},e.prototype.invalidateDisplayList=function(t){this.invalidateDisplayListFlag||(this.invalidateDisplayListFlag=!0,this.listenersAttached||this.attachListeners()),this.invalidateDisplayListQueue.insert(t)},e.prototype.validateDisplayList=function(){for(var t=this.invalidateDisplayListQueue,e=t.shift();e;)e.$stage&&e.validateDisplayList(),e=t.shift();t.isEmpty()&&(this.invalidateDisplayListFlag=!1)},e.prototype.attachListeners=function(){this.eventDisplay.addEventListener(egret.Event.ENTER_FRAME,this.doPhasedInstantiationCallBack,this),this.eventDisplay.addEventListener(egret.Event.RENDER,this.doPhasedInstantiationCallBack,this),egret.sys.$invalidateRenderFlag=!0,this.listenersAttached=!0},e.prototype.doPhasedInstantiationCallBack=function(t){this.eventDisplay.removeEventListener(egret.Event.ENTER_FRAME,this.doPhasedInstantiationCallBack,this),this.eventDisplay.removeEventListener(egret.Event.RENDER,this.doPhasedInstantiationCallBack,this),this.doPhasedInstantiation()},e.prototype.doPhasedInstantiation=function(){this.invalidatePropertiesFlag&&this.validateProperties(),this.invalidateSizeFlag&&this.validateSize(),this.invalidateDisplayListFlag&&this.validateDisplayList(),this.invalidatePropertiesFlag||this.invalidateSizeFlag||this.invalidateDisplayListFlag?this.attachListeners():this.listenersAttached=!1},e.prototype.validateClient=function(t){var e,i=!1,n=this.targetLevel;this.targetLevel===Number.POSITIVE_INFINITY&&(this.targetLevel=t.$nestLevel);for(var r=this.invalidatePropertiesQueue,o=this.invalidateSizeQueue,s=this.invalidateDisplayListQueue;!i;){for(i=!0,e=r.removeSmallestChild(t);e;)e.$stage&&e.validateProperties(),e=r.removeSmallestChild(t);for(r.isEmpty()&&(this.invalidatePropertiesFlag=!1),this.invalidateClientPropertiesFlag=!1,e=o.removeLargestChild(t);e;){if(e.$stage&&e.validateSize(),this.invalidateClientPropertiesFlag&&(e=r.removeSmallestChild(t))){r.insert(e),i=!1;break}e=o.removeLargestChild(t)}for(o.isEmpty()&&(this.invalidateSizeFlag=!1),this.invalidateClientPropertiesFlag=!1,this.invalidateClientSizeFlag=!1,e=s.removeSmallestChild(t);e;){if(e.$stage&&e.validateDisplayList(),this.invalidateClientPropertiesFlag&&(e=r.removeSmallestChild(t))){r.insert(e),i=!1;break}if(this.invalidateClientSizeFlag&&(e=o.removeLargestChild(t))){o.insert(e),i=!1;break}e=s.removeSmallestChild(t)}s.isEmpty()&&(this.invalidateDisplayListFlag=!1)}n===Number.POSITIVE_INFINITY&&(this.targetLevel=Number.POSITIVE_INFINITY)},e}(egret.EventDispatcher);t.Validator=e,__reflect(e.prototype,"eui.sys.Validator");var i=function(){function t(){this.depthBins={},this.minDepth=0,this.maxDepth=-1}return t.prototype.insert=function(t){var e=t.$nestLevel;this.maxDepth<this.minDepth?this.minDepth=this.maxDepth=e:(e<this.minDepth&&(this.minDepth=e),e>this.maxDepth&&(this.maxDepth=e));var i=this.depthBins[e];i||(i=this.depthBins[e]=new n),i.insert(t)},t.prototype.pop=function(){var t,e=this.minDepth;if(e<=this.maxDepth){for(var i=this.depthBins[this.maxDepth];!i||0===i.length;){if(this.maxDepth--,this.maxDepth<e)return null;i=this.depthBins[this.maxDepth]}for(t=i.pop();!(i&&0!=i.length||(this.maxDepth--,this.maxDepth<e));)i=this.depthBins[this.maxDepth]}return t},t.prototype.shift=function(){var t,e=this.maxDepth;if(this.minDepth<=e){for(var i=this.depthBins[this.minDepth];!i||0===i.length;){if(this.minDepth++,this.minDepth>e)return null;i=this.depthBins[this.minDepth]}for(t=i.pop();!(i&&0!=i.length||(this.minDepth++,this.minDepth>e));)i=this.depthBins[this.minDepth]}return t},t.prototype.removeLargestChild=function(t){for(var e=t.$hashCode,i=t.$nestLevel,n=this.maxDepth,r=i;n>=r;){var o=this.depthBins[n];if(o&&o.length>0){if(n===i){if(o.map[e])return o.remove(t),t}else{if(!egret.is(t,"egret.DisplayObjectContainer"))break;for(var s=o.items,a=o.length,h=0;a>h;h++){var l=s[h];if(t.contains(l))return o.remove(l),l}}n--}else if(n==this.maxDepth&&this.maxDepth--,n--,r>n)break}return null},t.prototype.removeSmallestChild=function(t){for(var e=t.$nestLevel,i=e,n=this.maxDepth,r=t.$hashCode;n>=i;){var o=this.depthBins[i];if(o&&o.length>0){if(i===e){if(o.map[r])return o.remove(t),t}else{if(!egret.is(t,"egret.DisplayObjectContainer"))break;for(var s=o.items,a=o.length,h=0;a>h;h++){var l=s[h];if(t.contains(l))return o.remove(l),l}}i++}else if(i==this.minDepth&&this.minDepth++,i++,i>n)break}return null},t.prototype.isEmpty=function(){return this.minDepth>this.maxDepth},t}();__reflect(i.prototype,"DepthQueue");var n=function(){function t(){this.map={},this.items=[],this.length=0}return t.prototype.insert=function(t){var e=t.$hashCode;this.map[e]||(this.map[e]=!0,this.length++,this.items.push(t))},t.prototype.pop=function(){var t=this.items.pop();return t&&(this.length--,0===this.length?this.map={}:this.map[t.$hashCode]=!1),t},t.prototype.remove=function(t){var e=this.items.indexOf(t);e>=0&&(this.items.splice(e,1),this.length--,0===this.length?this.map={}:this.map[t.$hashCode]=!1)},t}();__reflect(n.prototype,"DepthBin")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){function e(t,e,i,n){var r=t.prototype;r.__meta__=r.__meta__||{},r.__meta__[e]=i,n&&(r.__defaultProperty__=e)}t.registerProperty=e}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(t,i){void 0===i&&(i=[]);var n=e.call(this)||this;return n.name=t,n.overrides=i,n}return __extends(i,e),i.prototype.initialize=function(e,i){for(var n=this.overrides,r=n.length,o=0;r>o;o++){var s=n[o];if(s instanceof t.AddItems){var a=e[s.target];a&&a instanceof t.Image&&!a.$parent&&(i.addChild(a),i.removeChild(a))}}},i}(egret.HashObject);t.State=e,__reflect(e.prototype,"eui.State")}(eui||(eui={})),function(t){var e;!function(t){var e=function(){function t(){}return Object.defineProperty(t.prototype,"states",{get:function(){return this.$stateValues.states},set:function(t){t||(t=[]);var e=this.$stateValues;e.states=t;for(var i={},n=t.length,r=0;n>r;r++){var o=t[r];i[o.name]=o}e.statesMap=i,e.parent&&this.commitCurrentState()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentState",{get:function(){return this.$stateValues.currentState},set:function(t){var e=this.$stateValues;e.explicitState=t,e.currentState=t,this.commitCurrentState()},enumerable:!0,configurable:!0}),t.prototype.commitCurrentState=function(){var t=this.$stateValues;if(t.parent){var e=t.statesMap[t.currentState];if(!e){if(!(t.states.length>0))return;t.currentState=t.states[0].name}if(t.oldState!=t.currentState){var i=t.parent,n=t.statesMap[t.oldState];if(n)for(var r=n.overrides,o=r.length,s=0;o>s;s++)r[s].remove(this,i);if(t.oldState=t.currentState,n=t.statesMap[t.currentState])for(var r=n.overrides,a=r.length,s=0;a>s;s++)r[s].apply(this,i)}}},t.prototype.hasState=function(t){return!!this.$stateValues.statesMap[t]},t.prototype.initializeStates=function(t){this.$stateValues.intialized=!0;for(var e=this.states,i=e.length,n=0;i>n;n++)e[n].initialize(this,t)},t}();t.StateClient=e,__reflect(e.prototype,"eui.sys.StateClient");var i=function(){function t(){this.intialized=!1,this.statesMap={},this.states=[],this.oldState=null,this.explicitState=null,this.currentState=null,this.parent=null,this.stateIsDirty=!1}return t}();t.StateValues=i,__reflect(i.prototype,"eui.sys.StateValues")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){function e(e,i){var n=egret.getImplementation("eui.IAssetAdapter");n||(n=new t.DefaultAssetAdapter),n.getAsset(e,function(t){i(t)},this)}function i(e,i){var n=egret.getImplementation("eui.IThemeAdapter");n||(n=new t.DefaultThemeAdapter),n.getTheme(e,function(t){i(t)},function(t){console.log(t)},this)}t.getAssets=e,t.getTheme=i}(eui||(eui={})),function(t){var e;!function(e){function i(t){return 1===t.a&&0===t.b&&0===t.c&&1===t.d}function n(t,e){if("function"!=typeof t[e])return!1;var i=t[e].toString(),n=i.indexOf("{"),r=i.lastIndexOf("}");return i=i.substring(n+1,r),""==i.trim()}function r(t,e){for(var i in e)"prototype"!=i&&e.hasOwnProperty(i)&&(t[i]=e[i]);for(var r=t.prototype,o=e.prototype,s=Object.keys(o),a=s.length,h=0;a>h;h++){var l=s[h];if("__meta__"!=l&&(!r.hasOwnProperty(l)||n(r,l))){var u=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(r,l,u)}}}function o(e,i,n){r(e,h);var o=e.prototype;o.$super=i.prototype,t.registerProperty(e,"left","Percentage"),t.registerProperty(e,"right","Percentage"),t.registerProperty(e,"top","Percentage"),t.registerProperty(e,"bottom","Percentage"),t.registerProperty(e,"horizontalCenter","Percentage"),t.registerProperty(e,"verticalCenter","Percentage"),n&&(o.$childAdded=function(t,e){this.invalidateSize(),this.invalidateDisplayList()},o.$childRemoved=function(t,e){this.invalidateSize(),this.invalidateDisplayList()})}var s="eui.UIComponent",a=new e.Validator,h=function(n){function r(){var t=n.call(this)||this;return t.initializeUIValues(),t}return __extends(r,n),r.prototype.initializeUIValues=function(){this.$UIComponent={0:0/0,1:0/0,2:0/0,3:0/0,4:0/0,5:0/0,6:0/0,7:0/0,8:0/0,9:0/0,10:0,11:0,12:0,13:1e5,14:0,15:1e5,16:0,17:0,18:0/0,19:0/0,20:0,21:0,22:0,23:0,24:!0,25:!0,26:!0,27:!1,28:!1,29:!1},this.$includeInLayout=!0,this.$touchEnabled=!0},r.prototype.createChildren=function(){},r.prototype.childrenCreated=function(){},r.prototype.commitProperties=function(){var e=this.$UIComponent;(e[22]!=e[10]||e[23]!=e[11])&&(this.dispatchEventWith(egret.Event.RESIZE),e[22]=e[10],e[23]=e[11]),(e[20]!=this.$getX()||e[21]!=this.$getY())&&(t.UIEvent.dispatchUIEvent(this,t.UIEvent.MOVE),e[20]=this.$getX(),e[21]=this.$getY())},r.prototype.measure=function(){},r.prototype.updateDisplayList=function(t,e){},Object.defineProperty(r.prototype,"includeInLayout",{get:function(){return this.$includeInLayout},set:function(t){t=!!t,this.$includeInLayout!==t&&(this.$includeInLayout=!0,this.invalidateParentLayout(),this.$includeInLayout=t)},enumerable:!0,configurable:!0}),r.prototype.$onAddToStage=function(e,i){this.$super.$onAddToStage.call(this,e,i),this.checkInvalidateFlag();var n=this.$UIComponent;n[29]||(n[29]=!0,this.createChildren(),this.childrenCreated(),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CREATION_COMPLETE))},r.prototype.checkInvalidateFlag=function(t){var e=this.$UIComponent;e[24]&&a.invalidateProperties(this),e[25]&&a.invalidateSize(this),e[26]&&a.invalidateDisplayList(this)},Object.defineProperty(r.prototype,"left",{get:function(){return this.$UIComponent[0]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[0]!==t&&(e[0]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.$UIComponent[1]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[1]!==t&&(e[1]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.$UIComponent[2]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[2]!==t&&(e[2]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.$UIComponent[3]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[3]!=t&&(e[3]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"horizontalCenter",{get:function(){return this.$UIComponent[4]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[4]!==t&&(e[4]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"verticalCenter",{get:function(){return this.$UIComponent[5]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[5]!==t&&(e[5]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"percentWidth",{get:function(){return this.$UIComponent[6]},set:function(t){t=+t;var e=this.$UIComponent;e[6]!==t&&(e[6]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"percentHeight",{get:function(){return this.$UIComponent[7]},set:function(t){t=+t;var e=this.$UIComponent;e[7]!==t&&(e[7]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"explicitWidth",{get:function(){return this.$UIComponent[8]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"explicitHeight",{get:function(){return this.$UIComponent[9]},enumerable:!0,configurable:!0}),r.prototype.$getWidth=function(){return this.validateSizeNow(),this.$UIComponent[10]},r.prototype.$setWidth=function(t){t=+t;var e=this.$UIComponent;return 0>t||e[10]===t&&e[8]===t?!1:(e[8]=t,isNaN(t)&&this.invalidateSize(),this.invalidateProperties(),this.invalidateDisplayList(),this.invalidateParentLayout(),!0)},r.prototype.validateSizeNow=function(){this.validateSize(!0),this.updateFinalSize()},r.prototype.$getHeight=function(){return this.validateSizeNow(),this.$UIComponent[11]},r.prototype.$setHeight=function(t){t=+t;var e=this.$UIComponent;return 0>t||e[11]===t&&e[9]===t?!1:(e[9]=t,isNaN(t)&&this.invalidateSize(),this.invalidateProperties(),this.invalidateDisplayList(),this.invalidateParentLayout(),!0)},Object.defineProperty(r.prototype,"minWidth",{get:function(){return this.$UIComponent[12]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[12]===t||(e[12]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxWidth",{get:function(){return this.$UIComponent[13]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[13]===t||(e[13]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"minHeight",{get:function(){return this.$UIComponent[14]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[14]===t||(e[14]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxHeight",{get:function(){return this.$UIComponent[15]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[15]===t||(e[15]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),r.prototype.setMeasuredSize=function(t,e){var i=this.$UIComponent;i[16]=Math.ceil(+t||0),i[17]=Math.ceil(+e||0)},r.prototype.setActualSize=function(t,e){var i=!1,n=this.$UIComponent;n[10]!==t&&(n[10]=t,i=!0),n[11]!==e&&(n[11]=e,i=!0),i&&(this.invalidateDisplayList(),this.dispatchEventWith(egret.Event.RESIZE))},r.prototype.$invalidateMatrix=function(){this.$super.$invalidateMatrix.call(this),this.invalidateParentLayout()},r.prototype.$setMatrix=function(t,e){return void 0===e&&(e=!0),this.$super.$setMatrix.call(this,t,e),this.invalidateParentLayout(),!0},r.prototype.$setAnchorOffsetX=function(t){return this.$super.$setAnchorOffsetX.call(this,t),this.invalidateParentLayout(),!0},r.prototype.$setAnchorOffsetY=function(t){return this.$super.$setAnchorOffsetY.call(this,t),this.invalidateParentLayout(),!0},r.prototype.$setX=function(t){var e=this.$super.$setX.call(this,t);return e&&(this.invalidateParentLayout(),this.invalidateProperties()),e},r.prototype.$setY=function(t){var e=this.$super.$setY.call(this,t);return e&&(this.invalidateParentLayout(),this.invalidateProperties()),e},r.prototype.invalidateProperties=function(){var t=this.$UIComponent;t[24]||(t[24]=!0,this.$stage&&a.invalidateProperties(this))},r.prototype.validateProperties=function(){var t=this.$UIComponent;t[24]&&(this.commitProperties(),t[24]=!1)},r.prototype.invalidateSize=function(){var t=this.$UIComponent;t[25]||(t[25]=!0,this.$stage&&a.invalidateSize(this))},r.prototype.validateSize=function(t){if(t){var e=this.$children;if(e)for(var i=e.length,n=0;i>n;n++){var r=e[n];egret.is(r,s)&&r.validateSize(!0)}}var o=this.$UIComponent;if(o[25]){var a=this.measureSizes();a&&(this.invalidateDisplayList(),this.invalidateParentLayout()),o[25]=!1}},r.prototype.measureSizes=function(){var t=!1,e=this.$UIComponent;if(!e[25])return t;(isNaN(e[8])||isNaN(e[9]))&&(this.measure(),e[16]<e[12]&&(e[16]=e[12]),e[16]>e[13]&&(e[16]=e[13]),e[17]<e[14]&&(e[17]=e[14]),e[17]>e[15]&&(e[17]=e[15]));var i=this.getPreferredUWidth(),n=this.getPreferredUHeight();return(i!==e[18]||n!==e[19])&&(e[18]=i,e[19]=n,t=!0),t},r.prototype.invalidateDisplayList=function(){var t=this.$UIComponent;t[26]||(t[26]=!0,this.$stage&&a.invalidateDisplayList(this))},r.prototype.validateDisplayList=function(){var t=this.$UIComponent;t[26]&&(this.updateFinalSize(),this.updateDisplayList(t[10],t[11]),t[26]=!1)},r.prototype.updateFinalSize=function(){var t=0,e=0,i=this.$UIComponent;t=i[27]?i[10]:isNaN(i[8])?i[16]:i[8],e=i[28]?i[11]:isNaN(i[9])?i[17]:i[9],this.setActualSize(t,e)},r.prototype.validateNow=function(){this.$stage&&a.validateClient(this)},r.prototype.invalidateParentLayout=function(){var t=this.$parent;t&&this.$includeInLayout&&egret.is(t,s)&&(t.invalidateSize(),t.invalidateDisplayList())},r.prototype.setLayoutBoundsSize=function(t,n){if(n=+n,t=+t,!(0>n||0>t)){var r,o,s=this.$UIComponent,a=s[13],h=s[15],l=Math.min(s[12],a),u=Math.min(s[14],h);isNaN(t)?(s[27]=!1,r=this.getPreferredUWidth()):(s[27]=!0,r=Math.max(l,Math.min(a,t))),isNaN(n)?(s[28]=!1,o=this.getPreferredUHeight()):(s[28]=!0,o=Math.max(u,Math.min(h,n)));var p=this.getAnchorMatrix();if(i(p))return void this.setActualSize(r,o);var c=e.MatrixUtil.fitBounds(t,n,p,s[8],s[9],this.getPreferredUWidth(),this.getPreferredUHeight(),l,u,a,h);c||(c=egret.Point.create(l,u)),this.setActualSize(c.x,c.y),egret.Point.release(c)}},r.prototype.setLayoutBoundsPosition=function(e,n){var r=this.$getMatrix();if(!i(r)||0!=this.anchorOffsetX||0!=this.anchorOffsetY){var o=egret.$TempRectangle;this.getLayoutBounds(o),e+=this.$getX()-o.x,n+=this.$getY()-o.y}var s=this.$super.$setX.call(this,e);(this.$super.$setY.call(this,n)||s)&&t.UIEvent.dispatchUIEvent(this,t.UIEvent.MOVE)},r.prototype.getLayoutBounds=function(t){var e,i=this.$UIComponent;e=i[27]?i[10]:isNaN(i[8])?i[16]:i[8];var n;n=i[28]?i[11]:isNaN(i[9])?i[17]:i[9],this.applyMatrix(t,e,n)},r.prototype.getPreferredUWidth=function(){var t=this.$UIComponent;return isNaN(t[8])?t[16]:t[8]},r.prototype.getPreferredUHeight=function(){var t=this.$UIComponent;return isNaN(t[9])?t[17]:t[9]},r.prototype.getPreferredBounds=function(t){var e=this.getPreferredUWidth(),i=this.getPreferredUHeight();this.applyMatrix(t,e,i)},r.prototype.applyMatrix=function(t,e,n){t.setTo(0,0,e,n);var r=this.getAnchorMatrix();i(r)?(t.x+=r.tx,t.y+=r.ty):r.$transformBounds(t)},r.prototype.getAnchorMatrix=function(){var t=this.$getMatrix(),e=this.anchorOffsetX,i=this.anchorOffsetY;if(0!=e||0!=i){var n=egret.$TempMatrix;return t.$preMultiplyInto(n.setTo(1,0,0,1,-e,-i),n),n}return t},r}(egret.DisplayObject);e.UIComponentImpl=h,__reflect(h.prototype,"eui.sys.UIComponentImpl",["eui.UIComponent","egret.DisplayObject"]),e.mixin=r,e.implementUIComponent=o}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var i=e.call(this)||this;return i.$layout=null,i.$stateValues=new t.sys.StateValues,i.initializeUIValues(),i.$Group={0:0,1:0,2:0,3:0,4:!1,5:!1},i.$stateValues.parent=i,i}return __extends(i,e),Object.defineProperty(i.prototype,"elementsContent",{set:function(t){if(t)for(var e=t.length,i=0;e>i;i++)this.addChild(t[i])},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"layout",{get:function(){return this.$layout},set:function(t){this.$setLayout(t)},enumerable:!0,configurable:!0}),i.prototype.$setLayout=function(t){return this.$layout==t?!1:(this.$layout&&(this.$layout.target=null),this.$layout=t,t&&(t.target=this),this.invalidateSize(),this.invalidateDisplayList(),!0)},Object.defineProperty(i.prototype,"contentWidth",{get:function(){return this.$Group[0]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contentHeight",{get:function(){return this.$Group[1]},enumerable:!0,configurable:!0}),i.prototype.setContentSize=function(e,i){e=Math.ceil(+e||0),i=Math.ceil(+i||0);var n=this.$Group,r=n[0]!==e,o=n[1]!==i;(r||o)&&(n[0]=e,n[1]=i,r&&t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"contentWidth"),o&&t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"contentHeight"))},Object.defineProperty(i.prototype,"scrollEnabled",{get:function(){return this.$Group[4]},set:function(t){t=!!t;var e=this.$Group;t!==e[4]&&(e[4]=t,this.updateScrollRect())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollH",{get:function(){return this.$Group[2]},set:function(e){e=+e||0;var i=this.$Group;e!==i[2]&&(i[2]=e,this.updateScrollRect()&&this.$layout&&this.$layout.scrollPositionChanged(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"scrollH"))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollV",{get:function(){return this.$Group[3]},set:function(e){e=+e||0;var i=this.$Group;e!=i[3]&&(i[3]=e,this.updateScrollRect()&&this.$layout&&this.$layout.scrollPositionChanged(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"scrollV"))},enumerable:!0,configurable:!0}),i.prototype.updateScrollRect=function(){var t=this.$Group,e=t[4];if(e){var i=this.$UIComponent;this.scrollRect=egret.$TempRectangle.setTo(t[2],t[3],i[10],i[11])}else this.$scrollRect&&(this.scrollRect=null);return e},Object.defineProperty(i.prototype,"numElements",{get:function(){return this.$children.length},enumerable:!0,configurable:!0}),i.prototype.getElementAt=function(t){return this.$children[t]},i.prototype.getVirtualElementAt=function(t){return this.getElementAt(t)},i.prototype.setVirtualElementIndicesInView=function(t,e){},Object.defineProperty(i.prototype,"touchThrough",{get:function(){return this.$Group[5]},set:function(t){this.$Group[5]=!!t},enumerable:!0,configurable:!0}),i.prototype.$hitTest=function(t,i){var n=e.prototype.$hitTest.call(this,t,i);if(n||this.$Group[5])return n;if(!this.$visible||!this.touchEnabled)return null;var r=this.globalToLocal(t,i,egret.$TempPoint),o=this.$UIComponent,s=egret.$TempRectangle.setTo(0,0,o[10],o[11]),a=this.$scrollRect;return a&&(s.x=a.x,s.y=a.y),s.contains(r.x,r.y)?this:null},i.prototype.invalidateState=function(){var t=this.$stateValues;t.stateIsDirty||(t.stateIsDirty=!0,this.invalidateProperties())},i.prototype.getCurrentState=function(){return""},i.prototype.createChildren=function(){this.$layout||this.$setLayout(new t.BasicLayout),this.initializeStates(this.$stage)},i.prototype.childrenCreated=function(){},i.prototype.commitProperties=function(){t.sys.UIComponentImpl.prototype.commitProperties.call(this);var e=this.$stateValues;e.stateIsDirty&&(e.stateIsDirty=!1,e.explicitState||(e.currentState=this.getCurrentState(),this.commitCurrentState()))},i.prototype.measure=function(){return this.$layout?void this.$layout.measure():void this.setMeasuredSize(0,0)},i.prototype.updateDisplayList=function(t,e){this.$layout&&this.$layout.updateDisplayList(t,e),this.updateScrollRect()},i.prototype.invalidateParentLayout=function(){},i.prototype.setMeasuredSize=function(t,e){},i.prototype.invalidateProperties=function(){},i.prototype.validateProperties=function(){},i.prototype.invalidateSize=function(){},i.prototype.validateSize=function(t){},i.prototype.invalidateDisplayList=function(){},i.prototype.validateDisplayList=function(){},i.prototype.validateNow=function(){},i.prototype.setLayoutBoundsSize=function(t,e){},i.prototype.setLayoutBoundsPosition=function(t,e){},i.prototype.getLayoutBounds=function(t){},i.prototype.getPreferredBounds=function(t){},i}(egret.DisplayObjectContainer);t.Group=e,__reflect(e.prototype,"eui.Group",["eui.IViewport","eui.UIComponent","egret.DisplayObject"]),t.sys.implementUIComponent(e,egret.DisplayObjectContainer,!0),t.sys.mixin(e,t.sys.StateClient),t.registerProperty(e,"elementsContent","Array",!0),t.registerProperty(e,"states","State[]")}(eui||(eui={}));var eui;!function(t){function e(t,e){if(t.hasOwnProperty(i))t[i].push(e);else{var n=[e];t[i]&&(n=t[i].concat(n)),t[i]=n}}var i="__bindables__";t.registerBindable=e}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.initializeUIValues(),t.$Component={0:null,1:null,2:"",3:!0,4:!1,5:!1,6:!0,7:!0,8:null},t.$touchEnabled=!0,t}return __extends(i,e),Object.defineProperty(i.prototype,"hostComponentKey",{get:function(){return this.$Component[0]},set:function(t){this.$Component[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"skinName",{get:function(){return this.$Component[1]},set:function(t){var e=this.$Component;if(e[5]=!0,e[1]!=t){if(t)e[1]=t;else{var i=egret.getImplementation("eui.Theme");if(i){var n=i.getSkinName(this);n&&(e[1]=n)}}this.$parseSkinName()}},enumerable:!0,configurable:!0}),i.prototype.$parseSkinName=function(){var t,e=this.skinName;if(e)if(e.prototype)t=new e;else if("string"==typeof e){var i=void 0,n=e.trim();if("<"==n.charAt(0))i=EXML.parse(n);else if(i=egret.getDefinitionByName(e),!i&&-1!=n.toLowerCase().indexOf(".exml"))return void EXML.load(e,this.onExmlLoaded,this,!0);i&&(t=new i)}else t=e;this.setSkin(t)},i.prototype.onExmlLoaded=function(t,e){if(this.skinName==e){var i=new t;this.setSkin(i)}},Object.defineProperty(i.prototype,"skin",{get:function(){return this.$Component[8]},enumerable:!0,configurable:!0}),i.prototype.setSkin=function(e){!e||e instanceof t.Skin||(e=null);var i=this.$Component,n=i[8];if(n){for(var r=n.skinParts,o=r.length,s=0;o>s;s++){var a=r[s];this[a]&&this.setSkinPart(a,null)}var h=n.$elementsContent;if(h){o=h.length;for(var s=0;o>s;s++){var l=h[s];l.$parent==this&&this.removeChild(l)}}n.hostComponent=null}if(i[8]=e,e){for(var r=e.skinParts,u=r.length,s=0;u>s;s++){var a=r[s],p=e[a];p&&this.setSkinPart(a,p)}var h=e.$elementsContent;if(h)for(var s=h.length-1;s>=0;s--)this.addChildAt(h[s],0);e.hostComponent=this}this.invalidateSize(),this.invalidateDisplayList(),this.dispatchEventWith(egret.Event.COMPLETE)},i.prototype.setSkinPart=function(t,e){var i=this[t];i&&this.partRemoved(t,i),this[t]=e,e&&this.partAdded(t,e)},i.prototype.partAdded=function(t,e){},i.prototype.partRemoved=function(t,e){},i.prototype.$setTouchChildren=function(t){t=!!t;var i=this.$Component;return i[6]=t,i[3]?(i[6]=t,e.prototype.$setTouchChildren.call(this,t)):!0},i.prototype.$setTouchEnabled=function(t){t=!!t;var i=this.$Component;return i[7]=t,i[3]?e.prototype.$setTouchEnabled.call(this,t):!0},Object.defineProperty(i.prototype,"enabled",{get:function(){return this.$Component[3]},set:function(t){t=!!t,this.$setEnabled(t)},enumerable:!0,configurable:!0}),i.prototype.$setEnabled=function(t){var e=this.$Component;return t===e[3]?!1:(e[3]=t,t?(this.$touchEnabled=e[7],this.$touchChildren=e[6]):(this.$touchEnabled=!1,this.$touchChildren=!1),this.invalidateState(),!0)},Object.defineProperty(i.prototype,"currentState",{get:function(){var t=this.$Component;return t[2]?t[2]:this.getCurrentState()},set:function(t){var e=this.$Component;t!=e[2]&&(e[2]=t,this.invalidateState())},enumerable:!0,configurable:!0}),i.prototype.invalidateState=function(){var t=this.$Component;t[4]||(t[4]=!0,this.invalidateProperties())},i.prototype.getCurrentState=function(){return""},i.prototype.createChildren=function(){var t=this.$Component;if(!t[1]){var e=egret.getImplementation("eui.Theme");if(e){var i=e.getSkinName(this);i&&(t[1]=i,this.$parseSkinName())}}},i.prototype.childrenCreated=function(){},i.prototype.commitProperties=function(){t.sys.UIComponentImpl.prototype.commitProperties.call(this);var e=this.$Component;e[4]&&(e[4]=!1,e[8]&&(e[8].currentState=this.currentState))},i.prototype.measure=function(){t.sys.measure(this);var e=this.$Component[8];if(e){var i=this.$UIComponent;isNaN(e.width)?(i[16]<e.minWidth&&(i[16]=e.minWidth),i[16]>e.maxWidth&&(i[16]=e.maxWidth)):i[16]=e.width,isNaN(e.height)?(i[17]<e.minHeight&&(i[17]=e.minHeight),i[17]>e.maxHeight&&(i[17]=e.maxHeight)):i[17]=e.height}},i.prototype.updateDisplayList=function(e,i){t.sys.updateDisplayList(this,e,i)},i.prototype.invalidateParentLayout=function(){},i.prototype.setMeasuredSize=function(t,e){},i.prototype.invalidateProperties=function(){},i.prototype.validateProperties=function(){},i.prototype.invalidateSize=function(){},i.prototype.validateSize=function(t){},i.prototype.invalidateDisplayList=function(){},i.prototype.validateDisplayList=function(){},i.prototype.validateNow=function(){},i.prototype.setLayoutBoundsSize=function(t,e){},i.prototype.setLayoutBoundsPosition=function(t,e){},i.prototype.getLayoutBounds=function(t){},i.prototype.getPreferredBounds=function(t){},i}(egret.DisplayObjectContainer);t.Component=e,__reflect(e.prototype,"eui.Component",["eui.UIComponent","egret.DisplayObject"]),t.registerProperty(e,"skinName","Class"),t.sys.implementUIComponent(e,egret.DisplayObjectContainer,!0)}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$dataProviderChanged=!1,t.$dataProvider=null,t.$indexToRenderer=[],t.$DataGroup={0:!0,1:!1,2:{},3:{},4:!1,5:!1,6:null,7:null,8:!1,9:null,10:!1,11:!1,12:null,13:null,14:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"useVirtualLayout",{get:function(){return this.$layout?this.$layout.$useVirtualLayout:this.$DataGroup[0]},set:function(t){t=!!t;var e=this.$DataGroup;t!==e[0]&&(e[0]=t,this.$layout&&(this.$layout.useVirtualLayout=t))},enumerable:!0,configurable:!0}),i.prototype.$setLayout=function(t){if(t==this.$layout)return!1;this.$layout&&(this.$layout.setTypicalSize(0,0),this.$layout.removeEventListener("useVirtualLayoutChanged",this.onUseVirtualLayoutChanged,this)),this.$layout&&t&&this.$layout.$useVirtualLayout!=t.$useVirtualLayout&&this.onUseVirtualLayoutChanged();var i=e.prototype.$setLayout.call(this,t);if(t){var n=this.$DataGroup[9];n&&t.setTypicalSize(n.width,n.height),t.useVirtualLayout=this.$DataGroup[0],t.addEventListener("useVirtualLayoutChanged",this.onUseVirtualLayoutChanged,this)}return i},i.prototype.onUseVirtualLayoutChanged=function(t){var e=this.$DataGroup;e[1]=!0,e[10]=!0,this.removeDataProviderListener(),this.invalidateProperties()},i.prototype.setVirtualElementIndicesInView=function(t,e){if(this.$layout&&this.$layout.$useVirtualLayout)for(var i=this.$indexToRenderer,n=Object.keys(i),r=n.length,o=0;r>o;o++){var s=+n[o]; (t>s||s>e)&&this.freeRendererByIndex(s)}},i.prototype.getElementAt=function(t){return this.$indexToRenderer[t]},i.prototype.getVirtualElementAt=function(t){if(t=0|+t,0>t||t>=this.$dataProvider.length)return null;var e=this.$indexToRenderer[t];if(!e){var i=this.$dataProvider.getItemAt(t);e=this.createVirtualRenderer(i),this.$indexToRenderer[t]=e,this.updateRenderer(e,t,i);var n=this.$DataGroup;n[4]&&(e.validateNow(),n[4]=!1,this.rendererAdded(e,t,i))}return e},i.prototype.freeRendererByIndex=function(t){var e=this.$indexToRenderer[t];e&&(delete this.$indexToRenderer[t],this.doFreeRenderer(e))},i.prototype.doFreeRenderer=function(t){var e=this.$DataGroup,i=e[2][t.$hashCode],n=i.$hashCode;e[3][n]||(e[3][n]=[]),e[3][n].push(t),t.visible=!1},i.prototype.invalidateSize=function(){this.$DataGroup[4]||e.prototype.invalidateSize.call(this)},i.prototype.createVirtualRenderer=function(t){var e,i=this.itemToRendererClass(t),n=i.$hashCode,r=this.$DataGroup,o=r[3];return o[n]&&o[n].length>0?(e=o[n].pop(),e.visible=!0,this.invalidateDisplayList(),e):(r[4]=!0,this.createOneRenderer(i))},i.prototype.createOneRenderer=function(t){var e=new t,i=this.$DataGroup;return i[2][e.$hashCode]=t,egret.is(e,"eui.IItemRenderer")?(i[13]&&this.setItemRenderSkinName(e,i[13]),this.addChild(e),e):null},i.prototype.setItemRenderSkinName=function(e,i){if(e&&e instanceof t.Component){var n=e;n.$Component[5]||(n.skinName=i,n.$Component[5]=!1)}},Object.defineProperty(i.prototype,"dataProvider",{get:function(){return this.$dataProvider},set:function(t){this.$setDataProvider(t)},enumerable:!0,configurable:!0}),i.prototype.$setDataProvider=function(t){return this.$dataProvider==t||t&&!t.getItemAt?!1:(this.removeDataProviderListener(),this.$dataProvider=t,this.$dataProviderChanged=!0,this.$DataGroup[10]=!0,this.invalidateProperties(),this.invalidateSize(),this.invalidateDisplayList(),!0)},i.prototype.removeDataProviderListener=function(){this.$dataProvider&&this.$dataProvider.removeEventListener(t.CollectionEvent.COLLECTION_CHANGE,this.onCollectionChange,this)},i.prototype.onCollectionChange=function(e){switch(e.kind){case t.CollectionEventKind.ADD:this.itemAddedHandler(e.items,e.location);break;case t.CollectionEventKind.REMOVE:this.itemRemovedHandler(e.items,e.location);break;case t.CollectionEventKind.UPDATE:case t.CollectionEventKind.REPLACE:this.itemUpdatedHandler(e.items[0],e.location);break;case t.CollectionEventKind.RESET:case t.CollectionEventKind.REFRESH:if(this.$layout&&this.$layout.$useVirtualLayout)for(var i=this.$indexToRenderer,n=Object.keys(i),r=n.length,o=r-1;o>=0;o--){var s=+n[o];this.freeRendererByIndex(s)}this.$dataProviderChanged=!0,this.invalidateProperties()}this.invalidateSize(),this.invalidateDisplayList()},i.prototype.itemAddedHandler=function(t,e){for(var i=t.length,n=0;i>n;n++)this.itemAdded(t[n],e+n);this.resetRenderersIndices()},i.prototype.itemRemovedHandler=function(t,e){for(var i=t.length,n=i-1;n>=0;n--)this.itemRemoved(t[n],e+n);this.resetRenderersIndices()},i.prototype.itemAdded=function(t,e){if(this.$layout&&this.$layout.elementAdded(e),this.$layout&&this.$layout.$useVirtualLayout)return void this.$indexToRenderer.splice(e,0,null);var i=this.createVirtualRenderer(t);if(this.$indexToRenderer.splice(e,0,i),i){this.updateRenderer(i,e,t);var n=this.$DataGroup;n[4]&&(n[4]=!1,this.rendererAdded(i,e,t))}},i.prototype.itemRemoved=function(t,e){this.$layout&&this.$layout.elementRemoved(e);var i=this.$indexToRenderer[e];this.$indexToRenderer.length>e&&this.$indexToRenderer.splice(e,1),i&&(this.$layout&&this.$layout.$useVirtualLayout?this.doFreeRenderer(i):(this.rendererRemoved(i,e,t),this.removeChild(i)))},i.prototype.resetRenderersIndices=function(){var t=this.$indexToRenderer;if(0!=t.length)if(this.$layout&&this.$layout.$useVirtualLayout)for(var e=Object.keys(t),i=e.length,n=0;i>n;n++){var r=+e[n];this.resetRendererItemIndex(r)}else for(var o=t.length,r=0;o>r;r++)this.resetRendererItemIndex(r)},i.prototype.itemUpdatedHandler=function(t,e){if(!this.$DataGroup[11]){var i=this.$indexToRenderer[e];i&&this.updateRenderer(i,e,t)}},i.prototype.resetRendererItemIndex=function(t){var e=this.$indexToRenderer[t];e&&(e.itemIndex=t)},Object.defineProperty(i.prototype,"itemRenderer",{get:function(){return this.$DataGroup[6]},set:function(t){var e=this.$DataGroup;e[6]!=t&&(e[6]=t,e[5]=!0,e[8]=!0,e[10]=!0,this.removeDataProviderListener(),this.invalidateProperties())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemRendererSkinName",{get:function(){return this.$DataGroup[13]},set:function(t){var e=this.$DataGroup;e[13]!=t&&(e[13]=t,this.$UIComponent[29]&&(e[14]=!0,this.invalidateProperties()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemRendererFunction",{get:function(){return this.$DataGroup[7]},set:function(t){var e=this.$DataGroup;e[7]!=t&&(e[7]=t,e[5]=!0,e[8]=!0,this.removeDataProviderListener(),this.invalidateProperties())},enumerable:!0,configurable:!0}),i.prototype.itemToRendererClass=function(e){var i,n=this.$DataGroup;return n[7]&&(i=n[7](e)),i||(i=n[6]),i||(i=t.ItemRenderer),i.$hashCode||(i.$hashCode=egret.$hashCount++),i},i.prototype.createChildren=function(){if(!this.$layout){var i=new t.VerticalLayout;i.gap=0,i.horizontalAlign=t.JustifyAlign.CONTENT_JUSTIFY,this.$setLayout(i)}e.prototype.createChildren.call(this)},i.prototype.commitProperties=function(){var i=this.$DataGroup;if((i[5]||this.$dataProviderChanged||i[1])&&(this.removeAllRenderers(),this.$layout&&this.$layout.clearVirtualLayoutCache(),this.setTypicalLayoutRect(null),i[1]=!1,i[5]=!1,this.$dataProvider&&this.$dataProvider.addEventListener(t.CollectionEvent.COLLECTION_CHANGE,this.onCollectionChange,this),this.$layout&&this.$layout.$useVirtualLayout?(this.invalidateSize(),this.invalidateDisplayList()):this.createRenderers(),this.$dataProviderChanged&&(this.$dataProviderChanged=!1,this.scrollV=this.scrollH=0)),e.prototype.commitProperties.call(this),i[8]&&(i[8]=!1,this.$dataProvider&&this.$dataProvider.length>0&&(i[12]=this.$dataProvider.getItemAt(0),this.measureRendererSize())),i[14]){i[14]=!1;for(var n=i[13],r=this.$indexToRenderer,o=Object.keys(r),s=o.length,a=0;s>a;a++){var h=o[a];this.setItemRenderSkinName(r[h],n)}var l=i[3];o=Object.keys(l),s=o.length;for(var a=0;s>a;a++)for(var u=o[a],p=l[u],c=p.length,d=0;c>d;d++)this.setItemRenderSkinName(p[d],n)}},i.prototype.measure=function(){this.$layout&&this.$layout.$useVirtualLayout&&this.ensureTypicalLayoutElement(),e.prototype.measure.call(this)},i.prototype.updateDisplayList=function(t,i){var n=this.$layout&&this.$layout.$useVirtualLayout;n&&this.ensureTypicalLayoutElement(),e.prototype.updateDisplayList.call(this,t,i);var r=this.$DataGroup;if(n){var o=r[9];if(o){var s=this.$indexToRenderer[0];if(s){var a=egret.$TempRectangle;s.getPreferredBounds(a),(a.width!=o.width||a.height!=o.height)&&(r[9]=null)}}}},i.prototype.ensureTypicalLayoutElement=function(){this.$DataGroup[9]||this.$dataProvider&&this.$dataProvider.length>0&&(this.$DataGroup[12]=this.$dataProvider.getItemAt(0),this.measureRendererSize())},i.prototype.measureRendererSize=function(){var t=this.$DataGroup;if(!t[12])return void this.setTypicalLayoutRect(null);var e=this.createVirtualRenderer(t[12]);if(!e)return void this.setTypicalLayoutRect(null);this.updateRenderer(e,0,t[12]),e.validateNow();var i=egret.$TempRectangle;e.getPreferredBounds(i);var n=new egret.Rectangle(0,0,i.width,i.height);this.$layout&&this.$layout.$useVirtualLayout?(t[4]&&this.rendererAdded(e,0,t[12]),this.doFreeRenderer(e)):this.removeChild(e),this.setTypicalLayoutRect(n),t[4]=!1},i.prototype.setTypicalLayoutRect=function(t){this.$DataGroup[9]=t,this.$layout&&(t?this.$layout.setTypicalSize(t.width,t.height):this.$layout.setTypicalSize(0,0))},i.prototype.removeAllRenderers=function(){for(var t=this.$indexToRenderer,e=Object.keys(t),i=e.length,n=0;i>n;n++){var r=e[n],o=t[r];o&&(this.rendererRemoved(o,o.itemIndex,o.data),this.removeChild(o))}this.$indexToRenderer=[];var s=this.$DataGroup;if(s[10]){for(var a=s[3],h=Object.keys(a),l=h.length,n=0;l>n;n++)for(var u=h[n],p=a[u],c=p.length,d=0;c>d;d++){var o=p[d];this.rendererRemoved(o,o.itemIndex,o.data),this.removeChild(o)}s[3]={},s[2]={},s[10]=!1}},i.prototype.createRenderers=function(){if(this.$dataProvider)for(var t=0,e=this.$dataProvider.length,i=0;e>i;i++){var n=this.$dataProvider.getItemAt(i),r=this.itemToRendererClass(n),o=this.createOneRenderer(r);o&&(this.$indexToRenderer[t]=o,this.updateRenderer(o,t,n),this.rendererAdded(o,t,n),t++)}},i.prototype.updateRenderer=function(t,e,i){var n=this.$DataGroup;return n[11]=!0,t.itemIndex=e,t.parent==this&&this.setChildIndex(t,e),t.data=i,n[11]=!1,t},Object.defineProperty(i.prototype,"numElements",{get:function(){return this.$dataProvider?this.$dataProvider.length:0},enumerable:!0,configurable:!0}),i.prototype.rendererAdded=function(t,e,i){},i.prototype.rendererRemoved=function(t,e,i){},i}(t.Group);t.DataGroup=e,__reflect(e.prototype,"eui.DataGroup"),t.registerProperty(e,"itemRenderer","Class"),t.registerProperty(e,"itemRendererSkinName","Class"),t.registerProperty(e,"dataProvider","eui.ICollection",!0)}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.labelDisplay=null,e._label="",e.iconDisplay=null,e._icon=null,e.touchCaptured=!1,e.touchChildren=!1,e.addEventListener(egret.TouchEvent.TOUCH_BEGIN,e.onTouchBegin,e),e}return __extends(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._label=t,this.labelDisplay&&(this.labelDisplay.text=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t,this.iconDisplay&&(this.iconDisplay.source=t)},enumerable:!0,configurable:!0}),e.prototype.onTouchCancle=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!1,this.invalidateState()},e.prototype.onTouchBegin=function(t){this.$stage.addEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!0,this.invalidateState(),t.updateAfterEvent()},e.prototype.onStageTouchEnd=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.contains(t.target)&&this.buttonReleased(),this.touchCaptured=!1,this.invalidateState()},e.prototype.getCurrentState=function(){return this.enabled?this.touchCaptured?"down":"up":"disabled"},e.prototype.partAdded=function(t,e){e===this.labelDisplay?this.labelDisplay.text=this._label:e==this.iconDisplay&&(this.iconDisplay.source=this._icon)},e.prototype.buttonReleased=function(){},e}(t.Component);t.Button=e,__reflect(e.prototype,"eui.Button")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$Range={0:100,1:!1,2:0,3:!1,4:0,5:0,6:!1,7:1,8:!1,9:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"maximum",{get:function(){return this.$Range[0]},set:function(t){t=+t||0;var e=this.$Range;t!==e[0]&&(e[0]=t,e[1]=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minimum",{get:function(){return this.$Range[2]},set:function(t){t=+t||0;var e=this.$Range;t!==e[2]&&(e[2]=t,e[3]=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){var t=this.$Range;return t[6]?t[5]:t[4]},set:function(t){t=+t||0,this.$setValue(t)},enumerable:!0,configurable:!0}),i.prototype.$setValue=function(t){if(t===this.value)return!1;var e=this.$Range;return e[5]=t,e[6]=!0,this.invalidateProperties(),!0},Object.defineProperty(i.prototype,"snapInterval",{get:function(){return this.$Range[7]},set:function(t){var e=this.$Range;e[9]=!0,t=+t||0,t!==e[7]&&(isNaN(t)?(e[7]=1,e[9]=!1):e[7]=t,e[8]=!0,this.invalidateProperties())},enumerable:!0,configurable:!0}),i.prototype.commitProperties=function(){e.prototype.commitProperties.call(this);var t=this.$Range;if(t[2]>t[0]&&(t[1]?t[0]=t[2]:t[2]=t[0]),t[6]||t[1]||t[3]||t[8]){var i=t[6]?t[5]:t[4];t[6]=!1,t[1]=!1,t[3]=!1,t[8]=!1,this.setValue(this.nearestValidValue(i,t[7]))}},i.prototype.nearestValidSize=function(t){var e=this.snapInterval;if(0==e)return t;var i=Math.round(t/e)*e;return Math.abs(i)<e?e:i},i.prototype.nearestValidValue=function(t,e){var i=this.$Range;if(0==e)return Math.max(i[2],Math.min(i[0],t));var n=i[0]-i[2],r=1;if(t-=i[2],e!=Math.round(e)){var o=(1+e).toString().split(".");r=Math.pow(10,o[1].length),n*=r,t=Math.round(t*r),e=Math.round(e*r)}var s=Math.max(0,Math.floor(t/e)*e),a=Math.min(n,Math.floor((t+e)/e)*e),h=t-s>=(a-s)/2?a:s;return h/r+i[2]},i.prototype.setValue=function(e){var i=this.$Range;i[4]!==e&&(i[0]>i[2]?i[4]=Math.min(i[0],Math.max(i[2],e)):i[4]=e,i[6]=!1,this.invalidateDisplayList(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"value"))},i.prototype.updateDisplayList=function(t,i){e.prototype.updateDisplayList.call(this,t,i),this.updateSkinDisplayList()},i.prototype.updateSkinDisplayList=function(){},i}(t.Component);t.Range=e,__reflect(e.prototype,"eui.Range"),t.registerBindable(e.prototype,"value")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.$target=null,e.$useVirtualLayout=!1,e.$typicalWidth=71,e.$typicalHeight=22,e}return __extends(e,t),Object.defineProperty(e.prototype,"target",{get:function(){return this.$target},set:function(t){this.$target!==t&&(this.$target=t,this.clearVirtualLayoutCache())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useVirtualLayout",{get:function(){return this.$useVirtualLayout},set:function(t){t=!!t,this.$useVirtualLayout!=t&&(this.$useVirtualLayout=t,this.dispatchEventWith("useVirtualLayoutChanged"),this.$useVirtualLayout&&!t&&this.clearVirtualLayoutCache(),this.target&&this.target.invalidateDisplayList())},enumerable:!0,configurable:!0}),e.prototype.setTypicalSize=function(t,e){t=+t||71,e=+e||22,(t!==this.$typicalWidth||e!==this.$typicalHeight)&&(this.$typicalWidth=t,this.$typicalHeight=e,this.$target&&this.$target.invalidateSize())},e.prototype.scrollPositionChanged=function(){},e.prototype.clearVirtualLayoutCache=function(){},e.prototype.elementAdded=function(t){},e.prototype.elementRemoved=function(t){},e.prototype.getElementIndicesInView=function(){return null},e.prototype.measure=function(){},e.prototype.updateDisplayList=function(t,e){},e}(egret.EventDispatcher);t.LayoutBase=e,__reflect(e.prototype,"eui.LayoutBase")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$ListBase={0:!1,1:!1,2:-2,3:-1,4:!1,5:void 0,6:!1,7:null,8:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"requireSelection",{get:function(){return this.$ListBase[0]},set:function(t){t=!!t;var e=this.$ListBase;t!==e[0]&&(e[0]=t,t&&(e[1]=!0,this.invalidateProperties()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this.$getSelectedIndex()},set:function(t){t=0|+t,this.setSelectedIndex(t,!1)},enumerable:!0,configurable:!0}),i.prototype.$getSelectedIndex=function(){var t=this.$ListBase;return t[2]!=i.NO_PROPOSED_SELECTION?t[2]:t[3]},i.prototype.setSelectedIndex=function(t,e){if(t!=this.selectedIndex){var i=this.$ListBase;e&&(i[4]=i[4]||e),i[2]=t,this.invalidateProperties()}},Object.defineProperty(i.prototype,"selectedItem",{get:function(){var t=this.$ListBase;if(void 0!==t[5])return t[5];var e=this.$getSelectedIndex();if(e!=i.NO_SELECTION&&null!=this.$dataProvider)return this.$dataProvider.length>e?this.$dataProvider.getItemAt(e):void 0},set:function(t){this.setSelectedItem(t,!1)},enumerable:!0,configurable:!0}),i.prototype.setSelectedItem=function(t,e){if(void 0===e&&(e=!1),this.selectedItem!==t){var i=this.$ListBase;e&&(i[4]=i[4]||e),i[5]=t,this.invalidateProperties()}},i.prototype.commitProperties=function(){var n=this.$dataProviderChanged;e.prototype.commitProperties.call(this);var r=this.$ListBase,o=this.$getSelectedIndex(),s=this.$dataProvider;n&&(o>=0&&s&&o<s.length?this.itemSelected(o,!0):this.requireSelection?r[2]=0:this.setSelectedIndex(-1,!1)),r[1]&&(r[1]=!1,r[0]&&o==i.NO_SELECTION&&s&&s.length>0&&(r[2]=0)),void 0!==r[5]&&(s?r[2]=s.getItemIndex(r[5]):r[2]=i.NO_SELECTION,r[5]=void 0);var a=!1;r[2]!=i.NO_PROPOSED_SELECTION&&(a=this.commitSelection()),r[6]&&(r[6]=!1,a||t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedIndex"))},i.prototype.updateRenderer=function(t,i,n){return this.itemSelected(i,this.$isItemIndexSelected(i)),e.prototype.updateRenderer.call(this,t,i,n)},i.prototype.itemSelected=function(t,e){var i=this.$indexToRenderer[t];i&&(i.selected=e)},i.prototype.$isItemIndexSelected=function(t){return t==this.selectedIndex},i.prototype.commitSelection=function(e){void 0===e&&(e=!0);var n=this.$dataProvider,r=this.$ListBase,o=n?n.length-1:-1,s=r[3],a=r[2];if(a<i.NO_SELECTION&&(a=i.NO_SELECTION),a>o&&(a=o),r[0]&&a==i.NO_SELECTION&&n&&n.length>0)return r[2]=i.NO_PROPOSED_SELECTION,r[4]=!1,!1;if(r[4]){var h=this.dispatchEventWith(egret.Event.CHANGING,!1,!0,!0);if(!h)return this.itemSelected(r[2],!1),r[2]=i.NO_PROPOSED_SELECTION,r[4]=!1,!1}return r[3]=a,r[2]=i.NO_PROPOSED_SELECTION,s!=i.NO_SELECTION&&this.itemSelected(s,!1),r[3]!=i.NO_SELECTION&&this.itemSelected(r[3],!0),e&&(r[4]&&(this.dispatchEventWith(egret.Event.CHANGE),r[4]=!1),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedIndex"),t.PropertyEvent.dispatchPropertyEvent(this,t.Pr