var touch,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){var t=function(t){function n(n){var o=t.call(this)||this;return o._main=null,o.videoType=-1,o._main=n,o.btnGet.x=271,o.btnDoubleGet.visible=!1,o.aniOpen.once(Laya.Event.COMPLETE,o,o.onOpenOver),o.aniOpen.play(0,!1),e.SoundManager.playSound("res/sounds/get_reward.mp3"),o}return __extends(n,t),n.prototype.destroy=function(){this._main=null,t.prototype.destroy.call(this)},n.prototype.showDoubleGet=function(){GameBaseData.isNative?SdkHelper.IronSourceHelper.isVideoReady()&&(this.btnDoubleGet.visible=!0):SdkHelper.MiniGameSDKHelper.isRewardVideoReady()&&(this.btnDoubleGet.visible=!0),this.btnGet.x=175},n.prototype.onOpenOver=function(){this.aniLight.play(0,!0),this.btnGet.clickHandler=Laya.Handler.create(this,this.onGet),this.btnAllGet.clickHandler=Laya.Handler.create(this,this.onAllGet),this.btnDoubleGet.clickHandler=Laya.Handler.create(this,this.onDoubleGet,null,!1)},n.prototype.onGet=function(){this._main.event(e.GameEvent.HIDE_REWARD)},n.prototype.onAllGet=function(){},n.prototype.onDoubleGet=function(){this.nativeDoubleGet()},n.prototype.nativeDoubleGet=function(){var t=this;GameBaseData.isNative?SdkHelper.IronSourceHelper.isVideoReady()&&SdkHelper.IronSourceHelper.showVideoAdsAsync(function(n){e.GameData.instance.setAddDiamond(parseInt(t.tfNum.text)),t._main.event(e.GameEvent.HIDE_REWARD)}):SdkHelper.MiniGameSDKHelper.showRewardedVideo(function(n){n?(e.GameData.instance.setAddDiamond(parseInt(t.tfNum.text)),t._main.event(e.GameEvent.HIDE_REWARD)):e.Notice.show("fail to show reward video")})},n}(ui.RewardTipViewUI);e.RewardTipView=t}(touch||(touch={}));