Commit be5434ff authored by rockyl's avatar rockyl

init

parent 2c008fdd
<!--AnnieJS:https://github.com/flash2x/annieJS-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Flash2AnnieEngine</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no">
<script src="//g.alicdn.com/mtb/lib-windvane/2.1.8/windvane.js"></script>
<!-- build:libs -->
<script src="libs/annieCore.min.js"></script>
<script src="libs/annieUI.js"></script>
<script src="libs/zepto-ajax.js"></script>
<script src="libs/downloadApp.js"></script>
<script src="libs/security.js"></script>
<!-- endbuild -->
<style>
html, body {
width: 100%;
height: 100%;
margin: 0px;
border: 0px;
overflow: hidden;
position: absolute;
background-color: #000;
}
</style>
</head>
<body>
<!--如果不想canvas全屏而是作为html中的一个标签,请设置div的style.width和style.height为实际值如<div id="annieEngine" style="width:320px;height:576px;line-height:0;font-size:0"></div>-->
<div id="annieEngine" style="line-height:0;font-size:0"></div>
<script>
var gameId = 1;
var CFG = {
appInfo: {
"appId": 1,
"earnCreditsUrl": "https://www.baidu.com/",
"loginProgram": "",
"open": false,
"openLogin": false
},
gameInfo: {
"id": 1317,
"oaId": 19951,
"offDate": "2018-04-17 11:00",
"openTotalScoreSwitch": false,
"rankPrize": true,
"skincontent": ""
},
extra: {
"embedDomain": "//embedlog.duibatest.com.cn"
},
defenseStrategy: {
"scoreUnit": 10
}
}
var recordUrl = 'record/';
function resolve(a) {
var b = eval(a);
return b;
}
var commonResPath = 'common/';
var offlineUrl = 'https://sky.vip.youku.com/svip/viphuodong/zhaomu1';
var shareUrl = 'https://sky.vip.youku.com/svip/viphuodong/zhaomu1';
</script>
<!-- build:bundlejs -->
<script src="bin-dev/bundle.js"></script>
<!-- endbuild -->
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
var __extends=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},annie;!function(t){var e=function(){function t(){this._instanceId=0,this._instanceType="annie.AObject",this._instanceId=t._object_id++}return Object.defineProperty(t.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceType",{get:function(){return this._instanceType},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){},t._object_id=0,t}();t.AObject=e;var n=function(e){function n(){e.call(this),this.eventTypes={},this.eventTypes1={},this._instanceType="annie.EventDispatcher"}return __extends(n,e),n.getMouseEventCount=function(t){void 0===t&&(t="");var e=0;if(""==t)for(var i in n._MECO)0==i.indexOf("onMouse")&&(e+=n._MECO[i]);else n._MECO[t]&&(e=n._MECO[t]);return e},n.prototype.addEventListener=function(t,e,n){if(void 0===n&&(n=!0),!t)throw new Error("添加侦听的type值为undefined");if(!e)throw new Error("侦听回调函数不能为null");var i=this,r=i.eventTypes;n||(r=i.eventTypes1),r[t]||(r[t]=[]),r[t].indexOf(e)<0&&(r[t].unshift(e),0==t.indexOf("onMouse")&&i._changeMouseCount(t,!0))},n.prototype._changeMouseCount=function(t,e){var i=e?1:-1;n._MECO[t]||(n._MECO[t]=0),n._MECO[t]+=i,n._MECO[t]<0&&(n._MECO[t]=0),n._totalMEC+=i},n.prototype.dispatchEvent=function(e,n,i){void 0===n&&(n=null),void 0===i&&(i=!0);var r=this;"string"==typeof e&&(r._defaultEvent?r._defaultEvent.reset(e,r):r._defaultEvent=new t.Event(e),e=r._defaultEvent);var o=r.eventTypes[e.type];if(i||(o=r.eventTypes1[e.type]),o){var a=o.length;null==e.target&&(e.target=r),null!=n&&(e.data=n);for(var s=a-1;s>=0;s--)e._pd||(o[s]?o[s](e):o.splice(s,1));return!0}return!1},n.prototype.hasEventListener=function(t,e){void 0===e&&(e=!0);var n=this;if(e){if(n.eventTypes[t]&&n.eventTypes[t].length>0)return!0}else if(n.eventTypes1[t]&&n.eventTypes1[t].length>0)return!0;return!1},n.prototype.removeEventListener=function(t,e,n){void 0===n&&(n=!0);var i=this,r=i.eventTypes[t];if(n||(r=i.eventTypes1[t]),r)for(var o=r.length,a=o-1;a>=0;a--)r[a]===e&&(r.splice(a,1),0==t.indexOf("onMouse")&&i._changeMouseCount(t,!1))},n.prototype.removeAllEventListener=function(){var t=this;for(var e in t.eventTypes)if(0==e.indexOf("onMouse"))for(var n=0;n<t.eventTypes[e].length;n++)t._changeMouseCount(e,!1);for(var e in t.eventTypes1)if(0==e.indexOf("onMouse"))for(var n=0;n<t.eventTypes1[e].length;n++)t._changeMouseCount(e,!1);t.eventTypes1={},t.eventTypes={}},n.prototype.destroy=function(){this.removeAllEventListener()},n._MECO={},n._totalMEC=0,n}(e);t.EventDispatcher=n}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e){t.call(this),this.type="",this.target=null,this.data=null,this._bpd=!1,this._pd=!1,this._instanceType="annie.Event",this.type=e}return __extends(e,t),e.prototype.stopImmediatePropagation=function(){this._pd=!0},e.prototype.stopPropagation=function(){this._bpd=!0},e.prototype.destroy=function(){var t=this;t.target=null,t.data=null},e.prototype.reset=function(t,e){var n=this;n.target=e,n._pd=!1,n._bpd=!1,n.type=t},e.RESIZE="onResize",e.ON_RUN_CHANGED="onRunChanged",e.ON_PLAY_UPDATE="onPlayUpdate",e.ON_PLAY_END="onPlayEnd",e.ON_PLAY_START="onPlayStart",e.ON_FLIP_START="onFlipStart",e.ON_FLIP_STOP="onFlipStop",e.ON_SCROLL_TO_HEAD="onScrollToHead",e.ON_SCROLL_STOP="onScrollStop",e.ON_SCROLL_START="onScrollStart",e.ON_SCROLL_TO_END="onScrollToEnd",e.ON_SLIDE_START="onSlideStart",e.ON_SLIDE_END="onSlideEnd",e.ON_INIT_STAGE="onInitStage",e.ADD_TO_STAGE="onAddToStage",e.REMOVE_TO_STAGE="onRemoveToStage",e.ENTER_FRAME="onEnterFrame",e.END_FRAME="onEndFrame",e.CALL_FRAME="onCallFrame",e.COMPLETE="onComplete",e.PROGRESS="onProgress",e.ERROR="onError",e.ABORT="onAbort",e.START="onStart",e.TIMER="onTimer",e.TIMER_COMPLETE="onTimerComplete",e}(t.AObject);t.Event=e}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e){t.call(this,e),this.clientX=0,this.clientY=0,this.stageX=0,this.stageY=0,this.localX=0,this.localY=0,this.currentTarget=null,this.identifier=0,this._instanceType="annie.MouseEvent"}return __extends(e,t),e.prototype.updateAfterEvent=function(){this.target.stage._cp=!0},e.prototype.destroy=function(){this.currentTarget=null,t.prototype.destroy.call(this)},e.MOUSE_DOWN="onMouseDown",e.MOUSE_UP="onMouseUp",e.CLICK="onMouseClick",e.MOUSE_MOVE="onMouseMove",e.MOUSE_OVER="onMouseOver",e.MOUSE_OUT="onMouseOut",e}(t.Event);t.MouseEvent=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(n){e.call(this,n),this.clientPoint1=new t.Point,this.clientPoint2=new t.Point,this.scale=0,this.rotate=0,this._instanceType="annie.TouchEvent"}return __extends(n,e),n.prototype.updateAfterEvent=function(){this.target.stage._cp=!0},n.prototype.destroy=function(){var t=this;t.clientPoint1=null,t.clientPoint2=null,e.prototype.destroy.call(this)},n.ON_MULTI_TOUCH="onMultiTouch",n}(t.Event);t.TouchEvent=e}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e,n){void 0===e&&(e=0),void 0===n&&(n=0),t.call(this),this.x=0,this.y=0;var i=this;i._instanceType="annie.Point",i.x=e,i.y=n}return __extends(e,t),e.prototype.destroy=function(){},e.distance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=t.length;return 4==n?Math.sqrt((t[0]-t[2])*(t[0]-t[2])+(t[1]-t[3])*(t[1]-t[3])):2==n?Math.sqrt((t[0].x-t[1].x)*(t[0].x-t[1].x)+(t[0].y-t[1].y)*(t[0].y-t[1].y)):void 0},e}(t.AObject);t.Point=e}(annie||(annie={}));var annie;!function(t){function e(t){switch(t){case r:case-o:return 0;case i:case-i:return-1;case o:case-r:return 0;default:return Math.cos(t)}}function n(t){switch(t){case r:case-o:return 1;case i:case-i:return 0;case o:case-r:return-1;default:return Math.sin(t)}}var i=Math.PI,r=i>>1,o=i+r,a=Math.PI/180,s=function(i){function r(e,n,r,o,a,s){void 0===e&&(e=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=1),void 0===a&&(a=0),void 0===s&&(s=0),i.call(this),this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this.transformPoint=function(e,n,i){void 0===i&&(i=null);var r=this;return i||(i=new t.Point),i.x=e*r.a+n*r.c+r.tx,i.y=e*r.b+n*r.d+r.ty,i},this.prepend=function(t){var e=this,n=t.a,i=t.b,r=t.c,o=t.d,a=t.tx,s=t.ty,l=e.a,u=e.c,c=e.tx;e.a=n*l+r*e.b,e.b=i*l+o*e.b,e.c=n*u+r*e.d,e.d=i*u+o*e.d,e.tx=n*c+r*e.ty+a,e.ty=i*c+o*e.ty+s};var l=this;l._instanceType="annie.Matrix",l.a=e,l.b=n,l.c=r,l.d=o,l.tx=a,l.ty=s}return __extends(r,i),r.prototype.clone=function(){var t=this;return new r(t.a,t.b,t.c,t.d,t.tx,t.ty)},r.prototype.setFrom=function(t){var e=this;e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.tx=t.tx,e.ty=t.ty},r.prototype.identity=function(){var t=this;t.a=t.d=1,t.b=t.c=t.tx=t.ty=0},r.prototype.invert=function(){var t=this,e=new r(t.a,t.b,t.c,t.d,t.tx,t.ty),n=t.a,i=t.b,o=t.c,a=t.d,s=t.tx,l=t.ty;if(0==i&&0==o)return 0==n||0==a?e.a=e.d=e.tx=e.ty=0:(n=e.a=1/n,a=e.d=1/a,e.tx=-n*s,e.ty=-a*l),e;var u=n*a-i*o;if(0==u)return e.identity(),e;u=1/u;var c=e.a=a*u;return i=e.b=-i*u,o=e.c=-o*u,a=e.d=n*u,e.tx=-(c*s+o*l),e.ty=-(i*s+a*l),e},r.prototype.createBox=function(t,i,r,o,s,l,u,c,h){var d=this;if(0!=s?l=u=s%360:(l%=360,u%=360),0==l&&0==u)d.a=r,d.b=d.c=0,d.d=o;else{l*=a,u*=a;var p=e(l),f=n(l);l==u?(d.a=p*r,d.b=f*r):(d.a=e(u)*r,d.b=n(u)*r),d.c=-f*o,d.d=p*o}d.tx=t+c-(c*d.a+h*d.c),d.ty=i+h-(c*d.b+h*d.d)},r.isEqual=function(t,e){return t.tx==e.tx&&t.ty==e.ty&&t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d},r.prototype.concat=function(t){var e=this,n=e.a,i=e.b,r=e.c,o=e.d,a=e.tx,s=e.ty,l=t.a,u=t.b,c=t.c,h=t.d,d=t.tx,p=t.ty;e.a=n*l+i*c,e.b=n*u+i*h,e.c=r*l+o*c,e.d=r*u+o*h,e.tx=a*l+s*c+d,e.ty=a*u+s*h+p},r.prototype.rotate=function(t){var e=this,n=Math.sin(t),i=Math.cos(t),r=e.a,o=e.b,a=e.c,s=e.d,l=e.tx,u=e.ty;e.a=r*i-o*n,e.b=r*n+o*i,e.c=a*i-s*n,e.d=a*n+s*i,e.tx=l*i-u*n,e.ty=l*n+u*i},r.prototype.scale=function(t,e){var n=this;n.a*=t,n.d*=e,n.c*=t,n.b*=e,n.tx*=t,n.ty*=e},r.prototype.translate=function(t,e){var n=this;n.tx+=t,n.ty+=e},r.prototype.destroy=function(){},r}(t.AObject);t.Matrix=s}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e,n,i,r){void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),t.call(this),this.x=0,this.y=0,this.width=0,this.height=0;var o=this;o._instanceType="annie.Rectangle",o.x=e,o.y=n,o.height=r,o.width=i}return __extends(e,t),e.prototype.isPointIn=function(t){var e=this;return t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height},e.createFromRects=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0==t.length)return null;if(1==t.length)return t[0];for(var n=t[0],i=n.x,r=n.y,o=n.width,a=n.height,s=void 0,l=void 0,u=void 0,c=void 0,h=1;h<t.length;h++)s=i+o,u=r+a,l=t[h].x+t[h].width,c=t[h].y+t[h].height,(i>t[h].x||0==s)&&(i=t[h].x),(r>t[h].y||0==u)&&(r=t[h].y),s<l&&(s=l),u<c&&(u=c),n.x=i,n.y=r,n.width=s-i,n.height=u-r;return n},e.createFromPoints=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=e[0].x,r=e[0].y,o=e[0].x,a=e[0].y,s=1;s<e.length;s++)null!=e[s]&&(i>e[s].x&&(i=e[s].x),r>e[s].y&&(r=e[s].y),o<e[s].x&&(o=e[s].x),a<e[s].y&&(a=e[s].y));return t.x=i,t.y=r,t.width=o-i,t.height=a-r,t},e.createRectform2Point=function(t,e,n){var i=e.x,r=e.y,o=e.x,a=e.y;i>n.x&&(i=n.x),r>n.y&&(r=n.y),o<n.x&&(o=n.x),a<n.y&&(a=n.y),t.x=i,t.y=r,t.width=o-i,t.height=a-r},e.testRectCross=function(t,e){var n,i,r,o;return n=t.x+t.width/2,i=t.y+t.height/2,r=e.x+e.width/2,o=e.y+e.height/2,Math.abs(n-r)<=t.width/2+e.width/2&&Math.abs(i-o)<=t.height/2+e.height/2},e.prototype.destroy=function(){},e}(t.AObject);t.Rectangle=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this._UI={UD:!1,UM:!0,UA:!0,UF:!1},this.stage=null,this.parent=null,this.cAlpha=1,this.cMatrix=new t.Matrix,this.mouseEnable=!0,this.cFilters=[],this.name="",this._x=0,this._y=0,this._scaleX=1,this._scaleY=1,this._rotation=0,this._alpha=1,this._skewX=0,this._skewY=0,this._anchorX=0,this._anchorY=0,this._visible=!0,this._matrix=new t.Matrix,this._mask=null,this._filters=[],this._cp=!0,this._dragBounds=new t.Rectangle,this._isDragCenter=!1,this._lastDragPoint=new t.Point,this._isUseToMask=0,this._texture=null,this._offsetX=0,this._offsetY=0,this._bounds=new t.Rectangle,this._drawRect=new t.Rectangle,this.soundList=[],this._a2x_res_obj={},this._instanceType="annie.DisplayObject"}return __extends(n,e),Object.defineProperty(n.prototype,"x",{get:function(){return this._x},set:function(t){this._setProperty("_x",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},set:function(t){this._setProperty("_y",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleX",{get:function(){return this._scaleX},set:function(t){this._setProperty("_scaleX",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleY",{get:function(){return this._scaleY},set:function(t){this._setProperty("_scaleY",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._setProperty("_rotation",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"alpha",{get:function(){return this._alpha},set:function(t){this._setProperty("_alpha",t,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"skewX",{get:function(){return this._skewX},set:function(t){this._setProperty("_skewX",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"skewY",{get:function(){return this._skewY},set:function(t){this._setProperty("_skewY",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"anchorX",{get:function(){return this._anchorX},set:function(t){this._setProperty("_anchorX",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"anchorY",{get:function(){return this._anchorY},set:function(t){this._setProperty("_anchorY",t,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(t){var e=this;t!=e._visible&&(e._visible=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matrix",{get:function(){return this._matrix},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mask",{get:function(){return this._mask},set:function(t){var e=this;t!=e._mask&&(t?t._isUseToMask++:null!=e._mask&&e._mask._isUseToMask--,e._mask=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"filters",{get:function(){return this._filters},set:function(t){this._setProperty("_filters",t,2)},enumerable:!0,configurable:!0}),n.prototype.globalToLocal=function(t,e){return void 0===e&&(e=null),this.cMatrix.invert().transformPoint(t.x,t.y,e)},n.prototype.localToGlobal=function(t,e){void 0===e&&(e=null);var n=this;return n.parent?n.parent.cMatrix.transformPoint(t.x,t.y,e):n.cMatrix.transformPoint(t.x,t.y,e)},n.prototype.startDrag=function(e,n){void 0===e&&(e=!1),void 0===n&&(n=null);var i=this;if(!i.stage)return void console.log("The DisplayObject is not on stage");t.Stage._dragDisplay=i,i._isDragCenter=e,i._lastDragPoint.x=Number.MAX_VALUE,i._lastDragPoint.y=Number.MAX_VALUE,n?(i._dragBounds.x=n.x,i._dragBounds.y=n.y,i._dragBounds.width=n.width,i._dragBounds.height=n.height):(i._dragBounds.x=0,i._dragBounds.y=0,i._dragBounds.width=0,i._dragBounds.height=0)},n.prototype.stopDrag=function(){t.Stage._dragDisplay==this&&(t.Stage._dragDisplay=null)},n.prototype.hitTestPoint=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var r=this;if(!r.visible||!r.mouseEnable&&i)return null;var o;return o=e?r.globalToLocal(t,n._bp):t,r.getBounds().isPointIn(o)?r:null},n.prototype.getBounds=function(){return this._bounds},n.prototype.getDrawRect=function(){var e=this,i=e.getBounds();if(e._mask){var r=e._mask.getDrawRect();i.x<r.x&&(i.x=r.x),i.y<r.y&&(i.y=r.y),i.width>r.width&&(i.width=r.width),i.height>r.height&&(i.height=r.height)}return e.matrix.transformPoint(i.x,i.y,n._p1),e.matrix.transformPoint(i.x+i.width,i.y,n._p2),e.matrix.transformPoint(i.x+i.width,i.y+i.height,n._p3),e.matrix.transformPoint(i.x,i.y+i.height,n._p4),t.Rectangle.createFromPoints(e._drawRect,n._p1,n._p2,n._p3,n._p4),e._drawRect},n.prototype.update=function(t){void 0===t&&(t=!0);var e=this;if(e._visible){var n=e._UI;if(e._cp&&(n.UM=n.UA=n.UF=!0,e._cp=!1),n.UM&&e._matrix.createBox(e._x,e._y,e._scaleX,e._scaleY,e._rotation,e._skewX,e._skewY,e._anchorX,e._anchorY),n.UM&&(e.cMatrix.setFrom(e._matrix),e.parent&&e.cMatrix.prepend(e.parent.cMatrix)),n.UA&&(e.cAlpha=e._alpha,e.parent&&(e.cAlpha*=e.parent.cAlpha)),n.UF){e.cFilters.length=0;var i=e._filters;if(i)for(var r=i.length,o=0;o<r;o++)e.cFilters.push(i[o]);if(e.parent&&e.parent.cFilters.length>0)for(var r=e.parent.cFilters.length,a=e.parent.cFilters,o=r-1;o>=0;o--)e.cFilters.unshift(a[o])}}},n.prototype.render=function(t){var e=this,n=e.cFilters,i=n.length,r=-1;if(i)for(var o=0;o<i;o++)if("Shadow"==e.cFilters[o].type){r=o;break}if(r>=0){var a=t._ctx;a.shadowBlur=n[r].blur,a.shadowColor=n[r].color,a.shadowOffsetX=n[r].offsetX,a.shadowOffsetY=n[r].offsetY,t.draw(e),a.shadowBlur=0,a.shadowOffsetX=0,a.shadowOffsetY=0}else t.draw(e)},Object.defineProperty(n.prototype,"width",{get:function(){return this.getWH().width},set:function(t){var e=this,n=e.width;if(t>0&&n>0){var i=t/n;e.scaleX*=i}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.getWH().height},set:function(t){var e=this,n=e.height;if(t>0&&n>0){var i=t/n;e.scaleY*=i}},enumerable:!0,configurable:!0}),n.prototype.getWH=function(){var t=this;t.update();var e=t.getDrawRect();return{width:e.width,height:e.height}},n.prototype._setProperty=function(t,e,n){var i=this;if(i[t]!=e){i[t]=e;var r=i._UI;0==n?r.UM=!0:1==n?r.UA=!0:2==n?r.UF=!0:3==n&&(r.UD=!0)}},n.prototype.stopAllSounds=function(){var t=this.soundList;if(t)for(var e=t.length-1;e>=0;e--)t[e].stop()},n.prototype.getSound=function(t){var e=this.soundList,n=[];if(e)if("string"==typeof t)for(var i=e.length-1;i>=0;i--)e[i].name==t&&n.push(e[i]);else t>=0&&t<e.length&&n.push(e[t]);return n},n.prototype.addSound=function(t){var e=this;e.soundList||(e.soundList=[]),e.soundList.push(t)},n.prototype.removeSound=function(t){var e=this.soundList;if(e)if("string"==typeof t)for(var n=e.length-1;n>=0;n--)"id"==e[n].name&&e.splice(t,1);else t>=0&&t<e.length&&e.splice(t,1)},n.prototype.destroy=function(){var t=this;t.stopAllSounds();for(var n=0;n<t.soundList.length;n++)t.soundList[n].destroy();t._a2x_res_obj=null,t.mask=null,t.filters=null,t.parent=null,t.stage=null,t._bounds=null,t._drawRect=null,t._dragBounds=null,t._lastDragPoint=null,t.cFilters=null,t._matrix=null,t.cMatrix=null,t._UI=null,t._texture=null,t._visible=!1,e.prototype.destroy.call(this)},n.prototype.callEventAndFrameScript=function(e){var n=this;if(n.stage){var i=n.soundList;if(0==e){if(n.dispatchEvent(t.Event.REMOVE_TO_STAGE),i.length>0)for(var r=0;r<i.length;r++)i[r].stop2()}else{if(1==e){if(i.length>0)for(var r=0;r<i.length;r++)i[r].play2();n.dispatchEvent(t.Event.ADD_TO_STAGE)}n._visible&&n.dispatchEvent(t.Event.ENTER_FRAME)}}},n._bp=new t.Point,n._p1=new t.Point,n._p2=new t.Point,n._p3=new t.Point,n._p4=new t.Point,n._canvas=window.document.createElement("canvas"),n}(t.EventDispatcher);t.DisplayObject=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(t,n){void 0===t&&(t=null),void 0===n&&(n=null),e.call(this),this._bitmapData=null,this._realCacheImg=null,this._rect=null,this._isCache=!1,this.hitTestWidthPixel=!1;var i=this;i._instanceType="annie.Bitmap",i._rect=n,i.bitmapData=t}return __extends(n,e),Object.defineProperty(n.prototype,"rect",{get:function(){return this._rect},set:function(t){var e=this;e._rect=t,e._UI.UD=!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bitmapData",{get:function(){return this._bitmapData},set:function(t){var e=this;e._setProperty("_bitmapData",t,3),t?(e._bounds.width=e._rect?e._rect.width:t.width,e._bounds.height=e._rect?e._rect.height:t.height):e._bounds.width=e._bounds.height=0},enumerable:!0,configurable:!0}),n.prototype.update=function(t){void 0===t&&(t=!1);var n=this;if(n._visible){e.prototype.update.call(this,t);var i=n._bitmapData;if((n._UI.UD||n._UI.UF)&&i){if(0==i.width||0==i.height)return;if(n._UI.UD=!1,n.cFilters.length>0){n._realCacheImg||(n._realCacheImg=window.document.createElement("canvas"));var r=n._realCacheImg,o=n._rect,a=o?o.width:i.width,s=o?o.height:i.height,l=a+20,u=s+20;r.width=l,r.height=u;var c=r.getContext("2d");c.clearRect(0,0,l,u),c.translate(10,10),c.shadowBlur=0,c.shadowColor="#0",c.shadowOffsetX=0,c.shadowOffsetY=0,o?c.drawImage(n._bitmapData,o.x,o.y,a,s,0,0,a,s):c.drawImage(n._bitmapData,0,0);var h=n.cFilters,d=h.length;if(d>0){for(var p=c.getImageData(0,0,l,u),f=0;f<d;f++)h[f].drawFilter(p);c.putImageData(p,0,0)}n._texture=n._realCacheImg,n._offsetX=-10,n._offsetY=-10,n._isCache=!0}else n._isCache=!1,n._offsetX=0,n._offsetY=0,n._texture=i;var _=void 0,v=void 0;n._rect?(_=n._rect.width,v=n._rect.height):(_=n._texture.width+2*n._offsetX,v=n._texture.height+2*n._offsetY),n._bounds.width=_,n._bounds.height=v}n._UI.UF=!1,n._UI.UM=!1,n._UI.UA=!1}},n.convertToImage=function(t,e){if(void 0===e&&(e=!0),t._rect){var n=window.document.createElement("canvas"),i=t._rect.width,r=t._rect.height;n.width=i,n.height=r;var o=n.getContext("2d"),a=t._rect;if(o.drawImage(t.bitmapData,a.x,a.y,i,r,0,0,i,r),e){var s=new Image;return s.src=n.toDataURL(),s}return n}return t.bitmapData},n.prototype.hitTestPoint=function(n,i,r){void 0===i&&(i=!1),void 0===r&&(r=!1);var o=this;if(e.prototype.hitTestPoint.call(this,n,i,r)){if(!o.hitTestWidthPixel)return o;var a=void 0;a=i?o.globalToLocal(n):n,a.x+=o._offsetX,a.y+=o._offsetY;var s=o._texture;if(!s||0==s.width||0==s.height)return null;var l=t.DisplayObject._canvas;l.width=1,l.height=1;var u=l.getContext("2d");if(u.clearRect(0,0,1,1),o._rect&&(a.x+=o._rect.x,a.y+=o._rect.y),u.setTransform(1,0,0,1,-a.x,-a.y),u.drawImage(s,0,0),u.getImageData(0,0,1,1).data[3]>0)return o}return null},n.prototype.destroy=function(){var t=this;t._bitmapData=null,t._realCacheImg=null,t._rect=null,e.prototype.destroy.call(this)},n}(t.DisplayObject);t.Bitmap=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this._command=[],this.hitTestWidthPixel=!0,this.beginRadialGradientFill=function(t,e){this._fill(n.getGradientColor(t,e))},this.beginRadialGradientStroke=function(t,e,i,r,o,a){void 0===i&&(i=1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=10),this._stroke(n.getGradientColor(t,e),i,r,o,a)},this.decodePath=function(t){for(var e=this,n=["moveTo","lineTo","quadraticCurveTo","bezierCurveTo","closePath"],i=t.length,r=0;r<i;r++)0==t[r]||1==t[r]?(e.addDraw(n[t[r]],[t[r+1],t[r+2]]),r+=2):(e.addDraw(n[t[r]],[t[r+1],t[r+2],t[r+3],t[r+4]]),r+=4)},this._instanceType="annie.Shape",this._texture=window.document.createElement("canvas")}return __extends(n,e),n.getGradientColor=function(e,i){var r,o=t.DisplayObject._canvas.getContext("2d");r=4==e.length?o.createLinearGradient(e[0],e[1],e[2],e[3]):o.createRadialGradient(e[0],e[1],0,e[2],e[3],e[4]);for(var a=0,s=i.length;a<s;a++)r.addColorStop(i[a][0],n.getRGBA(i[a][1],i[a][2]));return r},n.getBitmapStyle=function(e){return t.DisplayObject._canvas.getContext("2d").createPattern(e,"repeat")},n.getRGBA=function(t,e){if(0==t.indexOf("0x")&&(t=t.replace("0x","#")),t.length<7&&(t="#000000"),1!=e){t="rgba("+parseInt("0x"+t.substr(1,2))+","+parseInt("0x"+t.substr(3,2))+","+parseInt("0x"+t.substr(5,2))+","+e+")"}return t},n.prototype.addDraw=function(t,e){var n=this;n._UI.UD=!0,n._command[n._command.length]=[1,t,e]},n.prototype.drawRoundRect=function(t,e,n,i,r,o,a,s){void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=0);var l=(n<i?n:i)/2,u=0,c=0,h=0,d=0;r<0&&(r*=u=-1),r>l&&(r=l),o<0&&(o*=c=-1),o>l&&(o=l),s<0&&(s*=h=-1),s>l&&(s=l),a<0&&(a*=d=-1),a>l&&(a=l);var p=this._command;p[p.length]=[1,"moveTo",[t+n-o,e]],p[p.length]=[1,"arcTo",[t+n+o*c,e-o*c,t+n,e+o,o]],p[p.length]=[1,"lineTo",[t+n,e+i-s]],p[p.length]=[1,"arcTo",[t+n+s*h,e+i+s*h,t+n-s,e+i,s]],p[p.length]=[1,"lineTo",[t+a,e+i]],p[p.length]=[1,"arcTo",[t-a*d,e+i+a*d,t,e+i-a,a]],p[p.length]=[1,"lineTo",[t,e+r]],p[p.length]=[1,"arcTo",[t-r*u,e-r*u,t+r,e,r]],p[p.length]=[1,"closePath",[]]},n.prototype.moveTo=function(t,e){this._command[this._command.length]=[1,"moveTo",[t,e]]},n.prototype.lineTo=function(t,e){this._command[this._command.length]=[1,"lineTo",[t,e]]},n.prototype.arcTo=function(t,e){this._command[this._command.length]=[1,"arcTo",[t,e]]},n.prototype.quadraticCurveTo=function(t,e,n,i){this._command[this._command.length]=[1,"quadraticCurveTo",[t,e,n,i]]},n.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._command[this._command.length]=[1,"bezierCurveTo",[t,e,n,i,r,o]]},n.prototype.closePath=function(){this._command[this._command.length]=[1,"closePath",[]]},n.prototype.drawRect=function(t,e,n,i){var r=this._command;r[r.length]=[1,"moveTo",[t,e]],r[r.length]=[1,"lineTo",[t+n,e]],r[r.length]=[1,"lineTo",[t+n,e+i]],r[r.length]=[1,"lineTo",[t,e+i]],r[r.length]=[1,"closePath",[]]},n.prototype.drawArc=function(t,e,n,i,r){this._command[this._command.length]=[1,"arc",[t,e,n,i/180*Math.PI,r/180*Math.PI]]},n.prototype.drawCircle=function(t,e,n){this._command[this._command.length]=[1,"arc",[t,e,n,0,2*Math.PI]]},n.prototype.drawEllipse=function(t,e,n,i){var r=.5522848,o=n/2*r,a=i/2*r,s=t+n,l=e+i,u=t+n/2,c=e+i/2,h=this._command;h[h.length]=[1,"moveTo",[t,c]],h[h.length]=[1,"bezierCurveTo",[t,c-a,u-o,e,u,e]],h[h.length]=[1,"bezierCurveTo",[u+o,e,s,c-a,s,c]],h[h.length]=[1,"bezierCurveTo",[s,c+a,u+o,l,u,l]],h[h.length]=[1,"bezierCurveTo",[u-o,l,t,c+a,t,c]]},n.prototype.clear=function(){var t=this;t._command=[],t._UI.UD=!0,t._texture&&(t._texture.width=0,t._texture.height=0),t._offsetX=0,t._offsetY=0,t._bounds.width=0,t._bounds.height=0},n.prototype.beginFill=function(t){this._fill(t)},n.prototype.beginLinearGradientFill=function(t,e){this._fill(n.getGradientColor(t,e))},n.prototype.beginBitmapFill=function(t,e){var i=this;e&&(i._isBitmapFill=e),i._fill(n.getBitmapStyle(t))},n.prototype._fill=function(t){var e=this._command;e[e.length]=[0,"fillStyle",t],e[e.length]=[1,"beginPath",[]],this._UI.UD=!0},n.prototype.beginStroke=function(t,e,n,i,r){void 0===e&&(e=1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),this._stroke(t,e,n,i,r)},n.prototype.beginLinearGradientStroke=function(t,e,i,r,o,a){void 0===i&&(i=1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=10),this._stroke(n.getGradientColor(t,e),i,r,o,a)},n.prototype.beginBitmapStroke=function(t,e,i,r,o,a){void 0===i&&(i=1),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=10);var s=this;e&&(s._isBitmapStroke=e),s._stroke(n.getBitmapStyle(t),i,r,o,a)},n.prototype._stroke=function(t,e,i,r,o){var a=this._command;a[a.length]=[0,"lineWidth",e],a[a.length]=[0,"lineCap",n._caps[i]],a[a.length]=[0,"lineJoin",n._joins[r]],a[a.length]=[0,"miterLimit",o],a[a.length]=[0,"strokeStyle",t],a[a.length]=[1,"beginPath",[]],this._UI.UD=!0},n.prototype.endFill=function(){var t=this,e=t._command,n=t._isBitmapFill;n&&(e[e.length]=[2,"setTransform",n]),e[e.length]=[1,"fill",[]],n&&(t._isBitmapFill=null)},n.prototype.endStroke=function(){var t=this,e=t._command,n=t._isBitmapStroke;n&&(e[e.length]=[2,"setTransform",n]),e[e.length]=[1,"stroke",[]],n&&(t._isBitmapStroke=null)},n.prototype.update=function(t){void 0===t&&(t=!1);var n=this;if(n._visible){if(e.prototype.update.call(this,t),n._UI.UD||n._UI.UF){var i=n._command.length,r=void 0,o=void 0,a=void 0,s=void 0,l=void 0;if(i>0){var u=void 0,c=0,h=0,d=0;for(l=0;l<i;l++)if(u=n._command[l],1==u[0]){if("moveTo"==u[1]||"lineTo"==u[1]||"arcTo"==u[1]||"bezierCurveTo"==u[1])void 0==r&&(r=u[2][0]),void 0==o&&(o=u[2][1]),void 0==a&&(a=u[2][0]),void 0==s&&(s=u[2][1]),"bezierCurveTo"==u[1]?(r=Math.min(r,u[2][0],u[2][2],u[2][4]),o=Math.min(o,u[2][1],u[2][3],u[2][5]),a=Math.max(a,u[2][0],u[2][2],u[2][4]),s=Math.max(s,u[2][1],u[2][3],u[2][5]),c=u[2][4],h=u[2][5]):(r=Math.min(r,u[2][0]),o=Math.min(o,u[2][1]),a=Math.max(a,u[2][0]),s=Math.max(s,u[2][1]),c=u[2][0],h=u[2][1]);else if("quadraticCurveTo"==u[1]){var p=.5*(c+u[2][0]),f=.5*(h+u[2][1]),_=.5*(u[2][0]+u[2][2]),v=.5*(u[2][1]+u[2][3]);void 0==r&&(r=p),void 0==o&&(o=f),void 0==a&&(a=p),void 0==s&&(s=f),r=Math.min(r,p,_,u[2][2]),o=Math.min(o,f,v,u[2][3]),a=Math.max(a,p,_,u[2][2]),s=Math.max(s,f,v,u[2][3]),c=u[2][2],h=u[2][3]}else if("arc"==u[1]){var g=u[2][0],y=u[2][1],m=u[2][2],b=g-m,x=y-m,E=g+m,w=y+m;void 0==r&&(r=b),void 0==o&&(o=x),void 0==a&&(a=E),void 0==s&&(s=w),r=Math.min(r,b),o=Math.min(o,x),a=Math.max(a,E),s=Math.max(s,w)}}else"lineWidth"==u[1]&&d<u[2]&&(d=u[2]);if(void 0!=r||d>0){void 0==r&&(r=0,o=0),r-=20+d>>1,o-=20+d>>1,a+=20+d>>1,s+=20+d>>1;var T=a-r,P=s-o;if(n._offsetX=r,n._offsetY=o,n._bounds.x=r+10,n._bounds.y=o+10,n._bounds.width=T-20,n._bounds.height=P-20,!n._isUseToMask){var M=n._texture,O=M.getContext("2d");M.width=T,M.height=P,O.clearRect(0,0,T,P),O.setTransform(1,0,0,1,-r,-o),n._drawShape(O);var L=n.cFilters,C=L.length;if(C>0){for(var S=O.getImageData(0,0,T,P),F=0;F<C;F++)L[F].drawFilter(S);O.putImageData(S,0,0)}}}}n._UI.UD=!1}n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1}},n.prototype._drawShape=function(t){for(var e,n=this,i=n._command,r=i.length,o=n._offsetX,a=n._offsetY,s=0;s<r;s++)if(e=i[s],e[0]>0){var l=e[2].length;if(0==l)t[e[1]]();else if(2==l)t[e[1]](e[2][0],e[2][1]);else if(4==l)t[e[1]](e[2][0],e[2][1],e[2][2],e[2][3]);else if(5==l)t[e[1]](e[2][0],e[2][1],e[2][2],e[2][3],e[2][4]);else if(6==l){var u=e[2][4],c=e[2][5];2==e[0]&&(u-=o,c-=a),t[e[1]](e[2][0],e[2][1],e[2][2],e[2][3],u,c)}}else t[e[1]]=e[2]},n.prototype.hitTestPoint=function(n,i,r){void 0===i&&(i=!1),void 0===r&&(r=!1);var o=this;if(e.prototype.hitTestPoint.call(this,n,i,r)){if(o._isUseToMask||!o.hitTestWidthPixel)return o;var a=void 0;a=i?o.globalToLocal(n):n;var s=o._texture;if(!s||0==s.width||0==s.height)return null;var l=t.DisplayObject._canvas;l.width=1,l.height=1,a.x-=o._offsetX,a.y-=o._offsetY;var u=l.getContext("2d");if(u.clearRect(0,0,1,1),u.setTransform(1,0,0,1,-a.x,-a.y),u.drawImage(s,0,0),u.getImageData(0,0,1,1).data[3]>0)return o}return null},n.prototype.changeColor=function(t){for(var e=this,n=e._command.length,i=e._command,r=0;r<n;r++)0==i[r][0]&&("fillStyle"==i[r][1]&&t.fillColor&&i[r][2]!=t.fillColor&&(i[r][2]=t.fillColor,e._UI.UD=!0),"strokeStyle"==i[r][1]&&t.strokeColor&&i[r][2]!=t.strokeColor&&(i[r][2]=t.strokeColor,e._UI.UD=!0),"lineWidth"==i[r][1]&&t.lineWidth&&i[r][2]!=t.lineWidth&&(i[r][2]=t.lineWidth,e._UI.UD=!0))},n.prototype.render=function(t){e.prototype.render.call(this,t)},n.prototype.destroy=function(){var t=this;t._command=null,t._isBitmapStroke=null,t._isBitmapFill=null,e.prototype.destroy.call(this)},n._caps=["butt","round","square"],n._joins=["miter","round","bevel"],n}(t.DisplayObject);t.Shape=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this.mouseChildren=!0,this.children=[],this._removeChildren=[],this._instanceType="annie.Sprite"}return __extends(n,e),n.prototype.destroy=function(){for(var t=this,n=0;n<t.children.length;n++)t.children[n].destroy();t.removeAllChildren(),t._parent&&t._parent.removeChild(t),t.callEventAndFrameScript(0),t.children.length=0,t._removeChildren.length=0,e.prototype.destroy.call(this)},Object.defineProperty(n.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(e){var n=this;n._texture||(n._texture=new Image),e?n._texture.src=t.toDisplayDataURL(n):(n._texture.src="",n._offsetX=0,n._offsetY=0),n._cacheAsBitmap=e},enumerable:!0,configurable:!0}),n.prototype.addChild=function(t){this.addChildAt(t,this.children.length)},n.prototype.removeChild=function(t){for(var e=this,n=e.children.length,i=0;i<n;i++)if(e.children[i]==t){e.removeChildAt(i);break}},n._getElementsByName=function(t,e,i,r,o){var a=e.children.length;if(a>0)for(var s,l=void 0,u=0;u<a;u++){if(l=e.children[u],(s=l.name)&&""!=s&&t.test(s)&&(o[o.length]=l,i))return;r&&null!=l.children&&n._getElementsByName(t,l,i,r,o)}},n.prototype.getChildByName=function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!1),!t)return null;var r,o=this;r="string"==typeof t?new RegExp("^"+t+"$"):t;var a=[];n._getElementsByName(r,o,e,i,a);var s=a.length;return 0==s?null:1==s?a[0]:a},n.prototype.addChildAt=function(t,e){if(t){var n,i=this,r=i==t.parent,o=t.parent;if(o)if(r){n=i.children.length;for(var a=0;a<n;a++)if(i.children[a]==t){i.children.splice(a,1);break}}else{var s=o.children;n=s.length;for(var l=!0,a=0;a<n;a++)if(s[a]==t){s.splice(a,1),l=!1;break}if(l){var u=o._removeChildren;n=u.length;for(var a=0;a<n;a++)if(u[a]==t){u.splice(a,1);break}}}n=i.children.length,e>=n?i.children[i.children.length]=t:0==e?i.children.unshift(t):i.children.splice(e,0,t),o!=i&&(t._cp=!0,t.parent=i)}},n.prototype.getChildAt=function(t){return this.children.length-1>=t?this.children[t]:null},n.prototype.getChildIndex=function(t){for(var e=this,n=e.children.length,i=0;i<n;i++)if(e.children[i]==t)return i;return-1},n.prototype.swapChild=function(t,e){var n=this,i=-1,r=-1,o=n.children.length;if(i="number"==typeof t?t:n.getChildIndex(t),r="number"==typeof e?e:n.getChildIndex(e),i==r||i<0||i>=o||r<0||r>=o)return!1;var a=n.children[i];return n.children[i]=n.children[r],n.children[r]=a,!0},n.prototype.removeChildAt=function(t){var e,n=this,i=n.children.length-1;i<0||(e=t==i?n.children.pop():0==t?n.children.shift():n.children.splice(t,1)[0],n._removeChildren.push(e))},n.prototype.removeAllChildren=function(){for(var t=this,e=t.children.length,n=e-1;n>=0;n--)t.removeChildAt(0)},n.prototype.update=function(t){void 0===t&&(t=!0);var n=this;if(n._visible){var i=n._UI.UM,r=n._UI.UA,o=n._UI.UF;e.prototype.update.call(this,t),n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1;for(var a=n.children.length,s=null,l=a-1;l>=0;l--)s=n.children[l],i&&(s._UI.UM=i),
o&&(s._UI.UF=o),r&&(s._UI.UA=r),s.update(t)}},n.prototype.hitTestPoint=function(e,n,i){void 0===n&&(n=!1),void 0===i&&(i=!1);var r=this;if(!r.visible||!r.mouseEnable&&i)return null;if(r._cacheAsBitmap){var o=void 0;o=n?r.globalToLocal(e):e,o.x+=r._offsetX,o.y+=r._offsetY;var a=r._texture;if(!a||0==a.width||0==a.height)return null;var s=t.DisplayObject._canvas;s.width=1,s.height=1;var l=s.getContext("2d");if(l.clearRect(0,0,1,1),l.setTransform(1,0,0,1,-o.x,-o.y),l.drawImage(a,0,0),l.getImageData(0,0,1,1).data[3]>0)return r}else for(var u=r.children.length,c=void 0,h=void 0,d=u-1;d>=0;d--)if(h=r.children[d],!(h._isUseToMask>0)&&(!h.mask||h.mask.parent!=h.parent||h.mask.hitTestPoint(e,n,i))&&(c=h.hitTestPoint(e,n,i)))return c;return null},n.prototype.getBounds=function(){var e=this,n=e._bounds;if(n.x=0,n.y=0,n.width=0,n.height=0,e._cacheAsBitmap)e._texture&&(n.x=e._offsetX,n.y=e._offsetY,n.width=e._texture.width,n.height=e._texture.height);else{var i=e.children.length;if(i>0){for(var r=0;r<i;r++)e.children[r].visible&&t.Rectangle.createFromRects(n,e.children[r].getDrawRect());if(e.mask&&e.mask.parent==e.parent){var o=e.mask.getDrawRect();n.x<o.x&&(n.x=o.x),n.y<o.y&&(n.y=o.y),n.width>o.width&&(n.width=o.width),n.height>o.height&&(n.height=o.height)}}}return n},n.prototype.render=function(t){var n=this;if(n.cAlpha>0&&n._visible)if(n._cacheAsBitmap)e.prototype.render.call(this,t);else{for(var i=void 0,r=void 0,o=n.children.length,a=0;a<o;a++)r=n.children[a],r._isUseToMask>0||r.cAlpha>0&&r._visible&&(i?r.mask&&r.mask.parent==r.parent?r.mask!=i&&(t.endMask(),i=r.mask,t.beginMask(i)):(t.endMask(),i=null):r.mask&&r.mask.parent==r.parent&&(i=r.mask,t.beginMask(i)),r.render(t));i&&t.endMask()}},n.prototype.callEventAndFrameScript=function(t){var n=this,i=null,r=null,o=0;if(0==t){r=n._removeChildren,o=r.length;for(var a=o-1;a>=0;a--)i=r[a],i.callEventAndFrameScript(t),i.stage=null,i.parent=null;r=n.children,o=r.length;for(var a=o-1;a>=0;a--)i=r[a],i.callEventAndFrameScript(t),i.stage=null}else if(1==t){r=n.children,o=r.length;for(var a=o-1;a>=0;a--)i=r[a],i.stage=n.stage,i.parent=n,i.callEventAndFrameScript(t)}else if(2==t){r=n._removeChildren,o=r.length;for(var a=o-1;a>=0;a--)i=r[a],i.callEventAndFrameScript(0),i.stage=null,i.parent=null;r=n.children,o=r.length;for(var a=o-1;a>=0;a--)i=r[a],i.stage?i.callEventAndFrameScript(2):(i.stage=n.stage,i.parent=n,i.callEventAndFrameScript(1))}n._removeChildren.length=0,e.prototype.callEventAndFrameScript.call(this,t)},n}(t.DisplayObject);t.Sprite=e}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e,n){t.call(this),this.media=null,this.type="",this.isPlaying=!0,this.name="",this._loop=1,this._repeate=1;var i=this;i._instanceType="annie.Media","string"==typeof e?(i.media=document.createElement(n),i.media.src=e):i.media=e,i._SBWeixin=i._weixinSB.bind(i),i.media.addEventListener("ended",i._endEvent=function(){-1==i._loop?i.play(0):(i._loop--,i._loop>0?i.play(0,i._loop):i.stop()),i.dispatchEvent("onPlayEnd")}.bind(i)),i.type=n.toLocaleUpperCase(),i.media.addEventListener("timeupdate",i._updateEvent=function(){i.dispatchEvent("onPlayUpdate",{currentTime:i.media.currentTime})}),i.media.addEventListener("play",i._playEvent=function(){i.dispatchEvent("onPlayStart")})}return __extends(e,t),e.prototype.play=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var n=this;0==e?n._loop=n._repeate:(n._loop=e,n._repeate=e);try{n.media.currentTime=t}catch(t){console.log(t)}var i=window;if(i.WeixinJSBridge)try{i.WeixinJSBridge.invoke("getNetworkType",{},n._SBWeixin)}catch(t){n.media.play()}else n.media.play();n.isPlaying=!0},e.prototype._weixinSB=function(){this.media.play()},e.prototype.stop=function(){var t=this;t.media.pause(),t.media.currentTime=0,t.isPlaying=!1},e.prototype.pause=function(t){void 0===t&&(t=!0);var e=this;t?(e.media.pause(),e.isPlaying=!1):(e.media.play(),e.isPlaying=!0)},Object.defineProperty(e.prototype,"volume",{get:function(){return this.media.volume},set:function(t){var e=this;e.media.volume=t,e.media.muted=0==t},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){var e=this;e.media.pause(),e.media.removeEventListener("ended",e._endEvent),e.media.removeEventListener("onPlayStart",e._playEvent),e.media.removeEventListener("timeupdate",e._updateEvent),e.media=null,t.prototype.destroy.call(this)},e}(t.EventDispatcher);t.Media=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(i){e.call(this,i,"Audio");var r=this;r._instanceType="annie.Sound",t.Sound._soundList.push(r),r.volume=n._volume}return __extends(n,e),n.prototype.destroy=function(){for(var n=t.Sound._soundList.length,i=n-1;i>=0;i--)t.Sound._soundList[i]&&t.Sound._soundList[i]!=this||t.Sound._soundList.splice(i,1);e.prototype.destroy.call(this)},n.prototype.stop2=function(){var t=this;t.isPlaying&&t.media.pause()},n.prototype.play2=function(){var t=this;t.isPlaying&&t.play()},n.stopAllSounds=function(){for(var e=t.Sound._soundList.length,n=e-1;n>=0;n--)t.Sound._soundList[n]?t.Sound._soundList[n].stop2():t.Sound._soundList.splice(n,1)},n.resumePlaySounds=function(){for(var e=t.Sound._soundList.length,n=e-1;n>=0;n--)t.Sound._soundList[n]?t.Sound._soundList[n].play2():t.Sound._soundList.splice(n,1)},n.setAllSoundsVolume=function(e){for(var i=t.Sound._soundList.length,r=i-1;r>=0;r--)t.Sound._soundList[r]?t.Sound._soundList[r].volume=e:t.Sound._soundList.splice(r,1);n._volume=e},n._soundList=[],n._volume=1,n}(t.Media);t.Sound=e}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),t.call(this,e,"Video");var r=this;r._instanceType="annie.Video",r.media.setAttribute("playsinline","true"),r.media.setAttribute("webkit-playsinline","true"),r.media.setAttribute("x-webkit-airplay","true"),r.media.setAttribute("x5-video-player-type","h5"),r.media.poster="",r.media.preload="auto",r.media.controls=!1,n&&i&&(r.media.width=n,r.media.height=i)}return __extends(e,t),e}(t.Media);t.Video=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this._curFrame=1,this._wantFrame=0,this._lastFrameObj=null,this._isPlaying=!0,this._isFront=!0,this._lastFrame=0,this._a2x_res_class={tf:1},this._a2x_res_children=[],this._a2x_script=null,this._mode=-2,this._clicked=!1,this.isUpdateFrame=!1,this._a2x_sounds=null,this._instanceType="annie.MovieClip"}return __extends(n,e),Object.defineProperty(n.prototype,"currentFrame",{get:function(){return this._curFrame},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isFront",{get:function(){return this._isFront},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"totalFrames",{get:function(){return this._a2x_res_class.tf},enumerable:!0,configurable:!0}),n.prototype.stop=function(){this._isPlaying=!1},n.prototype.addFrameScript=function(t,e){var n=this;void 0==n._a2x_script&&(n._a2x_script={}),n._a2x_script[t]=e},n.prototype.removeFrameScript=function(t){var e=this;void 0!=e._a2x_script&&(e._a2x_script[t]=null)},Object.defineProperty(n.prototype,"isButton",{get:function(){return-1==this._mode},enumerable:!0,configurable:!0}),n.prototype.initButton=function(){var t=this;-1!=t._mode&&t._a2x_res_class.tf>1&&(t.mouseChildren=!1,t.addEventListener("onMouseDown",t._mouseEvent.bind(t)),t.addEventListener("onMouseUp",t._mouseEvent.bind(t)),t.addEventListener("onMouseOut",t._mouseEvent.bind(t)),t.gotoAndStop(1),t._mode=-1)},Object.defineProperty(n.prototype,"clicked",{get:function(){return this._clicked},set:function(t){var e=this;t!=e._clicked&&(t?e._mouseEvent({type:"onMouseDown"}):e.gotoAndStop(1),e._clicked=t)},enumerable:!0,configurable:!0}),n.prototype._mouseEvent=function(t){var e=this;if(!e._clicked){var n=2;"onMouseDown"==t.type?e._curFrame>2&&(n=3):n=1,e.gotoAndStop(n)}},n.prototype.getCurrentLabel=function(){var t=this;return t._a2x_res_class.tf>1&&t._a2x_res_class.l[t._curFrame-1]?t._a2x_res_class.l[t._curFrame-1]:null},n.prototype.nextFrame=function(){var t=this;t._curFrame<t.totalFrames&&(t._wantFrame=t._curFrame+1),t._isPlaying=!1},n.prototype.prevFrame=function(){var t=this;t._curFrame>1&&(t._wantFrame=t._curFrame-1),t._isPlaying=!1},n.prototype.gotoAndStop=function(t){var e=this;e._isPlaying=!1;var n=e._a2x_res_class;"string"==typeof t?t=void 0!=n.label[t]?n.label[t]:e._curFrame:"number"==typeof t&&(t>n.tf&&(t=n.tf),t<1&&(t=1)),e._wantFrame=t},n.prototype.play=function(t){void 0===t&&(t=!0);var e=this;e._isPlaying=!0,e._isFront=t;var n=e._curFrame;e._isFront?n++:n--,n>e.totalFrames?n=1:n<1&&(n=e.totalFrames),e._wantFrame=n},n.prototype.gotoAndPlay=function(t,e){void 0===e&&(e=!0);var n=this;n._isFront=e,n._isPlaying=!0;var i=n._a2x_res_class;"string"==typeof t?t=void 0!=i.label[t]?i.label[t]:n._curFrame:"number"==typeof t&&(t>i.tf&&(t=i.tf),t<1&&(t=1)),n._wantFrame=t},n.prototype.update=function(i){void 0===i&&(i=!0);var r=this;if(r._visible&&i&&r._a2x_res_class.tf>1&&(r._mode>=0?(r._isPlaying=!1,r._curFrame=r.parent._curFrame-r._mode):0!=r._wantFrame&&(r._curFrame=r._wantFrame,r._wantFrame=0),r._lastFrame==r._curFrame&&r._isPlaying&&(r._isFront?++r._curFrame>r._a2x_res_class.tf&&(r._curFrame=1):--r._curFrame<1&&(r._curFrame=r._a2x_res_class.tf)),r._lastFrame!=r._curFrame)){r._mode<0&&(r.isUpdateFrame=!0),r._lastFrame=r._curFrame;var o=r._a2x_res_class,a=r._a2x_res_children,s=a.length,l=0,u=null,c=null,h=o.f[o.timeLine[r._curFrame-1]];if(r._lastFrameObj!=h){r._lastFrameObj=h,r.children.length=0,r._removeChildren.length=0;for(var d=null,p=-1,f=s-1;f>=0;f--)l=a[f][0],u=a[f][1],c=h&&h.c?h.c[l]:null,c&&t.d(u,c),c||0==l?(void 0!=c.ma?(d=u,p=c.ma):d&&(u.mask=d,l==p&&(d=null)),r.children.unshift(u),u.parent&&r.parent==r||(u._cp=!0,u.parent=r)):u.parent&&(r._removeChildren.push(u),n._resetMC(u))}}e.prototype.update.call(this,i)},n.prototype.callEventAndFrameScript=function(n){var i=this;if(i.isUpdateFrame){var r=i._a2x_res_class;i.isUpdateFrame=!1;var o=i._curFrame-1,a=void 0,s=!1,l=i._isFront;if(i._a2x_script&&void 0!=(a=i._a2x_script[o])&&(null!=a&&a(),s=!0),s||(a=r.a[o])&&i[a[0]](void 0==a[1]||a[1],void 0==a[2]||a[2]),i.hasEventListener(t.Event.CALL_FRAME)&&(a=r.e[o]))for(var u=0;u<a.length;u++)i.dispatchEvent(t.Event.CALL_FRAME,{frameIndex:i._curFrame,frameName:a[u]});(1==i._curFrame&&!l||i._curFrame==i._a2x_res_class.tf&&l)&&i.hasEventListener(t.Event.END_FRAME)&&i.dispatchEvent(t.Event.END_FRAME,{frameIndex:i._curFrame,frameName:"endFrame"});var c=r.s[o];if(c)for(var h in c)i._a2x_sounds[h-1].play(0,c[h])}e.prototype.callEventAndFrameScript.call(this,n)},n._resetMC=function(t){var e=!1;if("annie.MovieClip"==t._instanceType?(t._wantFrame=1,t._lastFrame=0,t._isFront=!0,t._mode<-1?t._isPlaying=!0:t._isPlaying=!1,e=!0):"annie.Sprite"==t._instanceType&&(e=!0),e)for(var i=0;i<t.children.length;i++)n._resetMC(t.children[i])},n.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),t._lastFrameObj=null,t._a2x_script=null,t._a2x_res_children=null,t._a2x_res_class=null,t._a2x_sounds=null},n}(t.Sprite);t.MovieClip=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this.htmlElement=null,this._isAdded=!1;var n=this;n._instanceType="annie.FloatDisplay",n.addEventListener(t.Event.REMOVE_TO_STAGE,function(t){n.htmlElement&&(n.htmlElement.style.display="none")}),n.addEventListener(t.Event.ADD_TO_STAGE,function(t){if(n.htmlElement){var e=n.htmlElement.style;n._isAdded?n.htmlElement&&n.visible&&(e.display="inline"):(n._isAdded=!0,n.stage.rootDiv.insertBefore(n.htmlElement,n.stage.rootDiv.childNodes[0]),n.stage._floatDisplayList.push(n))}})}return __extends(n,e),n.prototype.init=function(t){var e,n=this;e="string"==typeof t?document.getElementById(t):"annie.Video"==t._instanceType?t.media:t;var i=e.style;i.position="absolute",i.display="none",i.transformOrigin=i.WebkitTransformOrigin="0 0 0";var r=n.getStyle(e,"width"),o=n.getStyle(e,"height"),a=0,s=0;r.indexOf("px")&&(a=parseInt(r)),o.indexOf("px")&&(s=parseInt(o)),n._bounds.width=a,n._bounds.height=s,n.htmlElement=e},n.prototype.getStyle=function(t,e){if(t.style[e])return t.style[e];if(document.defaultView&&document.defaultView.getComputedStyle){e=e.replace(/([A-Z])/g,"-$1"),e=e.toLowerCase();var n=document.defaultView.getComputedStyle(t,"");return n&&n.getPropertyValue(e)}return null},n.prototype.updateStyle=function(){var e=this,n=e.htmlElement;if(n){var i=n.style,r=e._visible;if(r)if(e.stage)for(var o=e._parent;o;){if(!o._visible){r=!1;break}o=o.parent}else r=!1;var a=r?"inline":"none";if(a!=i.display&&(i.display=a),r||e._UI.UM||e._UI.UA||e._UI.UF){if(e._UI.UM){var s=e.cMatrix,l=t.devicePixelRatio;i.transform=i.webkitTransform="matrix("+(s.a/l).toFixed(4)+","+(s.b/l).toFixed(4)+","+(s.c/l).toFixed(4)+","+(s.d/l).toFixed(4)+","+(s.tx/l).toFixed(4)+","+(s.ty/l).toFixed(4)+")"}e._UI.UA&&(i.opacity=e.cAlpha),e._UI.UF=!1,e._UI.UM=!1,e._UI.UA=!1}}},n.prototype.destroy=function(){var t=this,n=t.htmlElement;n&&(n.style.display="none",n.parentNode&&n.parentNode.removeChild(n),t._isAdded=!1,t.htmlElement=null);for(var i=t.stage._floatDisplayList,r=i.length,o=0;o<r;o++)if(i[o]==t){i.splice(o,1);break}e.prototype.destroy.call(this)},n}(t.DisplayObject);t.FloatDisplay=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this._textAlign="left",this._textAlpha=1,this._textHeight=0,this._lineSpacing=14,this._textWidth=120,this._lineType="single",this._text="",this._font="Arial",this._size=12,this._color="#fff",this._italic=!1,this._bold=!1,this._border=!1,this.realLines=[],this._instanceType="annie.TextField",this._texture=window.document.createElement("canvas")}return __extends(n,e),Object.defineProperty(n.prototype,"textAlign",{get:function(){return this._textAlign},set:function(t){this._setProperty("_textAlign",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textAlpha",{get:function(){return this._textAlpha},set:function(t){this._setProperty("_textAlpha",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textHeight",{get:function(){return this._textHeight},set:function(t){this._setProperty("_textHeight",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineSpacing",{get:function(){return this._lineSpacing},set:function(t){this._setProperty("_lineSpacing",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textWidth",{get:function(){return this._textWidth},set:function(t){this._setProperty("_textWidth",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineType",{get:function(){return this._lineType},set:function(t){this._setProperty("_lineType",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this._text},set:function(t){this._setProperty("_text",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"font",{get:function(){return this._font},set:function(t){this._setProperty("_font",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this._size},set:function(t){this._setProperty("_size",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){this._setProperty("_color",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"italic",{get:function(){return this._italic},set:function(t){this._setProperty("_italic",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bold",{get:function(){return this._bold},set:function(t){this._setProperty("_bold",t,3)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"border",{get:function(){return this._border},set:function(t){this._setProperty("_border",t,3)},enumerable:!0,configurable:!0}),n.prototype._prepContext=function(e){var n=this,i=n.size||12;i+="px ",i+=n.font,n._bold&&(i="bold "+i),n._italic&&(i="italic "+i),e.font=i,e.textAlign=n._textAlign||"left",e.textBaseline="top",e.fillStyle=t.Shape.getRGBA(n._color,n._textAlpha)},n.prototype.getTextWidth=function(t){void 0===t&&(t=0);var e=this;return e.update(),e._texture.getContext("2d").measureText(e.realLines[t]).width},Object.defineProperty(n.prototype,"lines",{get:function(){return this.realLines.length},enumerable:!0,configurable:!0}),n.prototype._getMeasuredWidth=function(t){return this._texture.getContext("2d").measureText(t).width},n.prototype.update=function(t){void 0===t&&(t=!1),e.prototype.update.call(this,t);var n=this;if(n._visible){if(n._UI.UD||n._UI.UF){n._text+="";var i=n._texture,r=i.getContext("2d"),o=n._text.toString().split(/(?:\r\n|\r|\n)/),a=[];n.realLines=a,n._prepContext(r);var s=0,l=n._lineSpacing;if(n._text.indexOf("\n")<0&&"single"==n.lineType){a[a.length]=o[0];var u=o[0];if(n._getMeasuredWidth(u)>n._textWidth)for(var c=n._getMeasuredWidth(u[0]),h=u[0],d=u.length,p=1;p<d;p++){if(s=r.measureText(u[p]).width,(c+=s)>n._textWidth){a[0]=h;break}h+=u[p]}}else for(var f=0,_=o.length;f<_;f++){var u=o[f];if(u){for(var c=n._getMeasuredWidth(u[0]),h=u[0],d=u.length,p=1;p<d;p++)s=r.measureText(u[p]).width,c+=s,c>n._textWidth?(a[a.length]=h,h=u[p],c=s):h+=u[p];a[a.length]=h}}var v=l*a.length,g=n._textWidth,y=0;"center"==n._textAlign?y=.5*g:"right"==n._textAlign&&(y=g),i.width=g+20,i.height=v+20,r.clearRect(0,0,i.width,i.width),n.border&&(r.beginPath(),r.strokeStyle="#000",r.lineWidth=1,r.strokeRect(10.5,10.5,g,v),r.closePath()),r.setTransform(1,0,0,1,y+10,10),n._prepContext(r);for(var f=0;f<a.length;f++)r.fillText(a[f],0,f*l,g);var m=n.cFilters,b=m.length;if(b>0){for(var x=r.getImageData(0,0,g,v),f=0;f<b;f++)m[f].drawFilter(x);r.putImageData(x,0,0)}n._offsetX=-10,n._offsetY=-10,n._UI.UD=!1,n._bounds.height=v,n._bounds.width=g}n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1}},n}(t.DisplayObject);t.TextField=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(i){void 0===i&&(i=0),e.call(this),this.inputType=0,this.isAutoDownKeyBoard=!0;var r=null,o=this;o._instanceType="annie.InputText",i<2?(r=document.createElement("input"),r.type=n._inputTypeList[i]):(r=document.createElement("textarea"),r.style.resize="none",r.style.overflow="hidden"),o.inputType=i;var a=function(){o.isAutoDownKeyBoard&&"pc"!=t.osType&&o.htmlElement&&o.htmlElement.blur()}.bind(o);o.addEventListener(t.Event.REMOVE_TO_STAGE,function(e){o.stage.removeEventListener(t.MouseEvent.MOUSE_UP,a)}),o.addEventListener(t.Event.ADD_TO_STAGE,function(e){o.stage.addEventListener(t.MouseEvent.MOUSE_UP,a)}),o.init(r)}return __extends(n,e),n.prototype.init=function(t){e.prototype.init.call(this,t);var n=this;n.htmlElement.style.outline="none",n.htmlElement.style.borderWidth="thin",n.htmlElement.style.borderColor="#000"},n.prototype.initInfo=function(t,e,n,i,r,o,a){var s=this;s.htmlElement.placeholder=t,s.htmlElement.style.font=i+"px "+r,s.htmlElement.style.color=e,s.htmlElement.style.textAlign=n,s.border=o,2==s.inputType&&(s.htmlElement.style.lineHeight=a+"px")},Object.defineProperty(n.prototype,"lineSpacing",{get:function(){return parseInt(this.htmlElement.style.lineHeight)},set:function(t){this.htmlElement.style.lineHeight=t+"px",this.htmlElement.style.height=t+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bold",{get:function(){return"bold"==this.htmlElement.style.fontWeight},set:function(t){var e=this.htmlElement.style;e.fontWeight=t?"bold":"normal"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"italic",{get:function(){return"italic"==this.htmlElement.style.fontStyle},set:function(t){var e=this.htmlElement.style;e.fontStyle=t?"italic":"normal"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textHeight",{get:function(){return parseInt(this.htmlElement.style.height)},set:function(t){this.htmlElement.style.height=t+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textWidth",{get:function(){return parseInt(this.htmlElement.style.width)},set:function(t){this.htmlElement.style.width=t+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.htmlElement.style.color},set:function(t){this.htmlElement.style.color=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"border",{get:function(){return"none"!=this.htmlElement.style.borderStyle},set:function(t){var e=this;t?(e.htmlElement.style.borderStyle="inset",e.htmlElement.style.backgroundColor="#fff"):(e.htmlElement.style.borderStyle="none",e.htmlElement.style.backgroundColor="transparent")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){var t=this;if(t.htmlElement)return t.htmlElement.value},set:function(t){var e=this;e.htmlElement&&(e.htmlElement.value=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxCharacters",{get:function(){var t=this.htmlElement.getAttribute("maxlength");return null===t?0:t},set:function(t){this.htmlElement.setAttribute("maxlength",t)},enumerable:!0,configurable:!0}),n._inputTypeList=["input","password","textarea"],n}(t.FloatDisplay);t.InputText=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(i,r,o,a,s,l){void 0===i&&(i="annieEngine"),void 0===r&&(r=640),void 0===o&&(o=1040),void 0===a&&(a=30),void 0===s&&(s="fixedHeight"),void 0===l&&(l=0),e.call(this),this.iosTouchendPreventDefault=!0,this.isPreventDefaultEvent=!0,this.rootDiv=null,this.renderObj=null,this.renderType=0,this.viewRect=new t.Rectangle,this.isMultiTouch=!1,this.isMultiMouse=!1,this.autoSteering=!1,this.autoResize=!1,this.desWidth=0,this.desHeight=0,this.divHeight=0,this.divWidth=0,this.bgColor="",this._scaleMode="onScale",this._flush=0,this._currentFlush=0,this._lastDpList={},this._rid=-1,this._floatDisplayList=[],this._resizeEvent=null,this._ml=[],this._mp=[],this._mouseDownPoint={},this._mouseEventTypes={mousedown:"onMouseDown",mouseup:"onMouseUp",mousemove:"onMouseMove",touchstart:"onMouseDown",touchmove:"onMouseMove",touchend:"onMouseUp"},this.muliPoints=[],this._mP1=new t.Point,this._mP2=new t.Point,this.mouseEvent=null,this.resize=function(){var t=this,e=t.getRootDivWH(t.rootDiv);t._UI.UM=!0,t.divHeight=e.h,t.divWidth=e.w,t.renderObj.reSize(),t.setAlign(),t.update()};var u=this;this._instanceType="annie.Stage",t.Stage._stageList[i]=u,u.stage=this,u.name="stageInstance_"+u.instanceId;var c=document.getElementById(i);u.renderType=l,u.desWidth=r,u.desHeight=o,u.rootDiv=c,u.setFrameRate(a),u._scaleMode=s,u.anchorX=r>>1,u.anchorY=o>>1,u.renderObj=new t.CanvasRender(u),u.renderObj.init(),window.addEventListener("resize",u._resizeEvent=function(e){clearTimeout(u._rid),u._rid=setTimeout(function(){u.autoResize&&u.resize();var e=new t.Event("onResize");u.dispatchEvent(e)},300)}),setTimeout(function(){if(u.resize(),n.addUpdateObj(u),t.debug&&!n._isLoadedVConsole){var e=document.createElement("script");e.onload=function(){new VConsole,u.dispatchEvent(new t.Event("onInitStage")),e.onload=null},document.head.appendChild(e),e.src="libs/vconsole.min.js"}else u.dispatchEvent(new t.Event("onInitStage"))},100);var h=u.rootDiv;u.mouseEvent=u.onMouseEvent.bind(u),"pc"!=t.osType?(h.addEventListener("touchstart",u.mouseEvent,!1),h.addEventListener("touchmove",u.mouseEvent,!1),h.addEventListener("touchend",u.mouseEvent,!1)):(h.addEventListener("mousedown",u.mouseEvent,!1),h.addEventListener("mousemove",u.mouseEvent,!1),h.addEventListener("mouseup",u.mouseEvent,!1))}return __extends(n,e),n.getStage=function(e){return void 0===e&&(e="annieEngine"),t.Stage._stageList[e]},Object.defineProperty(n,"pause",{get:function(){return n._pause},set:function(e){var i=n;e!=i._pause&&(i._pause=e,e?t.Sound.stopAllSounds():t.Sound.resumePlaySounds(),t.globalDispatcher.dispatchEvent("onRunChanged",{pause:e}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){var e=this;t!=e._scaleMode&&(e._scaleMode=t,e.setAlign())},enumerable:!0,configurable:!0}),n.prototype.update=function(t){void 0===t&&(t=!0);var n=this;e.prototype.update.call(this,t);for(var i=n._floatDisplayList,r=i.length,o=0;o<r;o++)i[o].updateStyle()},n.prototype.render=function(t){t.begin(),e.prototype.render.call(this,t)},n.prototype._initMouseEvent=function(t,e,n,i){t._pd=!1,t._bpd=!1,t.clientX=e.x,t.clientY=e.y,t.stageX=n.x,t.stageY=n.y,t.identifier=i},n.prototype.flush=function(){var t=this;0==t._flush?(t.callEventAndFrameScript(2),t.update(!0),t.render(t.renderObj)):0==t._currentFlush?t._currentFlush=t._flush:(t._currentFlush==t._flush&&(t.callEventAndFrameScript(2),t.update(!0),t.render(t.renderObj)),t._currentFlush--)},n.prototype.setFrameRate=function(t){var e=this;e._flush=60/t-1>>0,e._flush<0&&(e._flush=0)},n.prototype.getFrameRate=function(){return 60/(this._flush+1)},n.prototype.getRootDivWH=function(t){var e=t.style.width,n=t.style.height,i=document.body.clientWidth,r=document.body.clientHeight,o=parseInt(e),a=parseInt(n);return"NaN"==o.toString()?o=i:e.indexOf("%")>0&&(o*=i/100),"NaN"==a.toString()?a=r:n.indexOf("%")>0&&(a*=r/100),{w:o,h:a}},n.prototype.onMouseEvent=function(e){var i=this,r=n._dragDisplay;if(i.isMultiTouch&&e.targetTouches&&e.targetTouches.length>1){if(2==e.targetTouches.length){i._mP1.x=e.targetTouches[0].clientX-e.target.offsetLeft,i._mP1.y=e.targetTouches[0].clientY-e.target.offsetTop,i._mP2.x=e.targetTouches[1].clientX-e.target.offsetLeft,i._mP2.y=e.targetTouches[1].clientY-e.target.offsetTop;var o=Math.atan2(i._mP1.y-i._mP2.y,i._mP1.x-i._mP2.x)/Math.PI*180,a=t.Point.distance(i._mP1,i._mP2);if(i.muliPoints.push({p1:i._mP1,p2:i._mP2,angle:o,dis:a}),i.muliPoints.length>=2){i._touchEvent||(i._touchEvent=new t.TouchEvent(t.TouchEvent.ON_MULTI_TOUCH),i._touchEvent.target=i);var s=i.muliPoints.length;i._touchEvent.rotate=2*(i.muliPoints[s-1].angle-i.muliPoints[s-2].angle),i._touchEvent.scale=(i.muliPoints[s-1].dis-i.muliPoints[s-2].dis)/(i.divHeight>i.divWidth?i.desWidth:i.desHeight)*4,i._touchEvent.clientPoint1.x=i.muliPoints[s-1].p1.x*t.devicePixelRatio,i._touchEvent.clientPoint2.x=i.muliPoints[s-1].p2.x*t.devicePixelRatio,i._touchEvent.clientPoint1.y=i.muliPoints[s-1].p1.y*t.devicePixelRatio,i._touchEvent.clientPoint2.y=i.muliPoints[s-1].p2.y*t.devicePixelRatio,i.dispatchEvent(i._touchEvent),i.muliPoints.shift()}}else i.muliPoints.length=0;r&&(r._lastDragPoint.x=Number.MAX_VALUE,r._lastDragPoint.y=Number.MAX_VALUE),i._mouseDownPoint={},i._lastDpList={}}else if(i.muliPoints.length>0&&(i._touchEvent.rotate=0,i._touchEvent.scale=0,i._touchEvent.clientPoint1.x=0,i._touchEvent.clientPoint2.x=0,i._touchEvent.clientPoint1.y=0,i._touchEvent.clientPoint2.y=0,i.dispatchEvent(i._touchEvent),i.muliPoints.length=0),t.EventDispatcher._totalMEC>0){var l,u=void 0,c=i._mouseEventTypes[e.type],h=void 0,d=void 0,p=void 0,f=void 0,_=void 0,v=void 0;"pc"==t.osType?(e.identifier=0,u=[e]):u=i.isMultiMouse?e.changedTouches:[e.changedTouches[0]];for(var g=0;g<u.length;g++)if(_=0,h=[],v="m"+u[g].identifier,f=i._mp.length>0?i._mp.shift():new t.Point,f.x=(u[g].clientX-u[g].target.offsetLeft)*t.devicePixelRatio,f.y=(u[g].clientY-u[g].target.offsetTop)*t.devicePixelRatio,d=i.globalToLocal(f,t.DisplayObject._bp),i._ml[_]?(l=i._ml[_],l.type=c):(l=new t.MouseEvent(c),i._ml[_]=l),h[h.length]=l,i._initMouseEvent(l,f,d,v),_++,"onMouseDown"==c?i._mouseDownPoint[v]=f:"onMouseUp"==c&&i._mouseDownPoint[v]&&t.Point.distance(i._mouseDownPoint[v],f)<20&&t.EventDispatcher.getMouseEventCount("onMouseClick")>0&&(i._ml[_]?(l=i._ml[_],l.type="onMouseClick"):(l=new t.MouseEvent("onMouseClick"),i._ml[_]=l),h[h.length]=l,i._initMouseEvent(l,f,d,v),_++),_>0){var y=i.hitTestPoint(f,!0,!0),m=[];if(y)for(;y;)!1===y.mouseChildren&&(m.length=0),m[m.length]=y,y=y.parent;else m[m.length]=i;for(var s=m.length,b=s-1;b>=0;b--){y=m[b];for(var x=0;x<_;x++)h[x]._bpd||y.hasEventListener(h[x].type)&&(h[x].currentTarget=y,h[x].target=m[0],p=y.globalToLocal(f,t.DisplayObject._bp),h[x].localX=p.x,h[x].localY=p.y,y.dispatchEvent(h[x]))}m.reverse();for(var b=s-1;b>=0;b--){y=m[b];for(var x=0;x<_;x++)h[x]._bpd||y.hasEventListener(h[x].type)&&(h[x].currentTarget=y,h[x].target=m[_-1],p=y.globalToLocal(f,t.DisplayObject._bp),h[x].localX=p.x,h[x].localY=p.y,y.dispatchEvent(h[x],null,!1))}if("onMouseDown"!=c){if((t.EventDispatcher.getMouseEventCount("onMouseOver")>0||t.EventDispatcher.getMouseEventCount("onMouseOut")>0)&&i._lastDpList[v]){var E=i._lastDpList[v].length,w=m.length;s=E>w?E:w;for(var T=!1,P=void 0,M=void 0,b=1;b<s;b++)T||i._lastDpList[v][b]!=m[b]&&(T=!0,i._ml[_]?(P=i._ml[_],P.type="onMouseOver"):(P=new t.MouseEvent("onMouseOver"),i._ml[_]=P),i._initMouseEvent(P,f,d,v),_++,i._ml[_]?(M=i._ml[_],M.type="onMouseOut"):(M=new t.MouseEvent("onMouseOut"),i._ml[_]=M),i._initMouseEvent(M,f,d,v)),T&&(i._lastDpList[v][b]&&(M._bpd||(y=i._lastDpList[v][b],y.hasEventListener("onMouseOut")&&(M.currentTarget=y,M.target=i._lastDpList[v][E-1],p=y.globalToLocal(f,t.DisplayObject._bp),M.localX=p.x,M.localY=p.y,y.dispatchEvent(M)))),m[b]&&(P._bpd||(y=m[b],y.hasEventListener("onMouseOver")&&(P.currentTarget=y,P.target=m[w-1],p=y.globalToLocal(f,t.DisplayObject._bp),P.localX=p.x,P.localY=p.y,y.dispatchEvent(P)))))}i._mp[i._mp.length]=f}if(r&&r.stage&&r.parent){var O=r.x,L=r.y;p=r.parent.globalToLocal(f,t.DisplayObject._bp),r._isDragCenter?(O=p.x,L=p.y):(r._lastDragPoint.x!=Number.MAX_VALUE&&(O+=p.x-r._lastDragPoint.x,L+=p.y-r._lastDragPoint.y),r._lastDragPoint.x=p.x,r._lastDragPoint.y=p.y),p.x=O,p.y=L,0!=r._dragBounds.width&&(r._dragBounds.isPointIn(p)||(O<r._dragBounds.x?O=r._dragBounds.x:O>r._dragBounds.x+r._dragBounds.width&&(O=r._dragBounds.x+r._dragBounds.width),L<r._dragBounds.y?L=r._dragBounds.y:L>r._dragBounds.y+r._dragBounds.height&&(L=r._dragBounds.y+r._dragBounds.height))),r.x=O,r.y=L}"onMouseUp"==c?(r&&(r._lastDragPoint.x=Number.MAX_VALUE,r._lastDragPoint.y=Number.MAX_VALUE),delete i._mouseDownPoint[v],delete i._lastDpList[v]):i._lastDpList[v]=m}}"_a2x_canvas"==e.target.id&&i.isPreventDefaultEvent&&("touchend"==e.type&&"ios"==t.osType&&i.iosTouchendPreventDefault&&e.preventDefault(),("touchmove"==e.type||"touchstart"==e.type&&"android"==t.osType)&&e.preventDefault())},n.prototype.setAlign=function(){var e=this,n=e.divHeight*t.devicePixelRatio,i=e.divWidth*t.devicePixelRatio,r=e.desHeight,o=e.desWidth;e.anchorX=o>>1,e.anchorY=r>>1;var a=n>i,s=r>o,l=1,u=1;if(e.x=i-o>>1,e.y=n-r>>1,e.autoSteering&&s!=a){var c=n;n=i,i=c}if("noScale"!=e._scaleMode)switch(l=n/r,u=i/o,e._scaleMode){case"noBorder":u>l?l=u:u=l;break;case"showAll":u<l?l=u:u=l;break;case"fixedWidth":l=u;break;case"fixedHeight":u=l}e.scaleX=u,e.scaleY=l,e.viewRect.x=o-i/u>>1,e.viewRect.y=r-n/l>>1,e.viewRect.width=o-2*e.viewRect.x,e.viewRect.height=r-2*e.viewRect.y,e.autoSteering?e.rotation=s==a?0:r>o?-90:90:e.rotation=0},n.prototype.getBounds=function(){return this.viewRect},n.flushAll=function(){if(!n._pause)for(var t=n.allUpdateObjList.length,e=t-1;e>=0;e--)n.allUpdateObjList[e]&&n.allUpdateObjList[e].flush();requestAnimationFrame(n.flushAll)},n.addUpdateObj=function(t){for(var e=!1,i=n.allUpdateObjList.length,r=0;r<i;r++)if(n.allUpdateObjList[r]===t){e=!0;break}e||n.allUpdateObjList.unshift(t)},n.removeUpdateObj=function(t){for(var e=n.allUpdateObjList.length,i=0;i<e;i++)if(n.allUpdateObjList[i]===t){n.allUpdateObjList.splice(i,1);break}},n.prototype.destroy=function(){e.prototype.destroy.call(this);var i=this;n.removeUpdateObj(i);var r=i.rootDiv;"pc"!=t.osType?(r.removeEventListener("touchstart",i.mouseEvent,!1),r.removeEventListener("touchmove",i.mouseEvent,!1),r.removeEventListener("touchend",i.mouseEvent,!1)):(r.removeEventListener("mousedown",i.mouseEvent,!1),r.removeEventListener("mousemove",i.mouseEvent,!1),r.removeEventListener("mouseup",i.mouseEvent,!1)),window.addEventListener("resize",i._resizeEvent),r.style.display="none",r.parentNode&&r.parentNode.removeChild(r),i.renderObj=null},n._stageList={},n._pause=!1,n._dragDisplay=null,n._isLoadedVConsole=!1,
n.allUpdateObjList=[],n}(t.Sprite);t.Stage=e}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(e,n,i,r){void 0===e&&(e="black"),void 0===n&&(n=2),void 0===i&&(i=2),void 0===r&&(r=2),t.call(this),this.color="black",this.offsetX=2,this.offsetY=2,this.blur=2,this.type="Shadow";var o=this;o._instanceType="annie.ShadowFilter",o.offsetX=n,o.offsetY=i,o.blur=r,o.color=e}return __extends(e,t),e.prototype.toString=function(){var t=this;return t.type+t.offsetX+t.offsetY+t.blur+t.color},e.prototype.drawFilter=function(t){void 0===t&&(t=null)},e.prototype.destroy=function(){},e}(t.AObject);t.ShadowFilter=e;var n=function(t){function e(e){t.call(this),this.redMultiplier=0,this.redOffset=0,this.greenMultiplier=0,this.greenOffset=0,this.blueMultiplier=0,this.blueOffset=0,this.alphaMultiplier=0,this.alphaOffset=0,this.type="Color";var n=this;n._instanceType="annie.ColorFilter",n.redMultiplier=e[0],n.greenMultiplier=e[1],n.blueMultiplier=e[2],n.alphaMultiplier=e[3],n.redOffset=e[4],n.greenOffset=e[5],n.blueOffset=e[6],n.alphaOffset=e[7]}return __extends(e,t),e.prototype.drawFilter=function(t){if(void 0===t&&(t=null),t)for(var e=this,n=t.data,i=n.length,r=0;r<i;r+=4)n[r]=n[r]*e.redMultiplier+e.redOffset,n[r+1]=n[r+1]*e.greenMultiplier+e.greenOffset,n[r+2]=n[r+2]*e.blueMultiplier+e.blueOffset,n[r+3]=n[r+3]*e.alphaMultiplier+e.alphaOffset},e.prototype.toString=function(){var t=this;return t.type+t.redMultiplier+t.greenMultiplier+t.blueMultiplier+t.alphaMultiplier+t.redOffset+t.greenOffset+t.blueOffset+t.alphaOffset},e.prototype.destroy=function(){},e}(t.AObject);t.ColorFilter=n;var i=function(t){function e(n,i,r,o){t.call(this),this.brightness=0,this.contrast=0,this.saturation=0,this.hue=0,this.type="ColorMatrix";var a=this;a._instanceType="annie.ColorMatrixFilter",a.brightness=n,a.contrast=i,a.saturation=r,a.hue=o,a.colorMatrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n=a._cleanValue(n,255),0!=n&&a._multiplyMatrix([1,0,0,0,n,0,1,0,0,n,0,0,1,0,n,0,0,0,1,0,0,0,0,0,1]),i=this._cleanValue(i,100);var s;if(0!=i&&(i<0?s=127+i/100*127:(s=i%1,s=0==s?e.DELTA_INDEX[i]:e.DELTA_INDEX[i<<0]*(1-s)+e.DELTA_INDEX[1+(i<<0)]*s,s=127*s+127),a._multiplyMatrix([s/127,0,0,0,.5*(127-s),0,s/127,0,0,.5*(127-s),0,0,s/127,0,.5*(127-s),0,0,0,1,0,0,0,0,0,1])),0!=(r=this._cleanValue(r,100))){s=1+(r>0?3*r/100:r/100);var l=.3086,u=.6094,c=.082;a._multiplyMatrix([l*(1-s)+s,u*(1-s),c*(1-s),0,0,l*(1-s),u*(1-s)+s,c*(1-s),0,0,l*(1-s),u*(1-s),c*(1-s)+s,0,0,0,0,0,1,0,0,0,0,0,1])}if(0!=(o=this._cleanValue(o,180)/180*Math.PI)){var h=Math.cos(o),d=Math.sin(o),l=.213,u=.715,c=.072;a._multiplyMatrix([l+h*(1-l)+d*-l,u+h*-u+d*-u,c+h*-c+d*(1-c),0,0,l+h*-l+.143*d,u+h*(1-u)+.14*d,c+h*-c+-.283*d,0,0,l+h*-l+d*-(1-l),u+h*-u+d*u,c+h*(1-c)+d*c,0,0,0,0,0,1,0,0,0,0,0,1])}}return __extends(e,t),e.prototype.drawFilter=function(t){if(void 0===t&&(t=null),t)for(var e,n,i,r,o=t.data,a=o.length,s=this.colorMatrix,l=s[0],u=s[1],c=s[2],h=s[3],d=s[4],p=s[5],f=s[6],_=s[7],v=s[8],g=s[9],y=s[10],m=s[11],b=s[12],x=s[13],E=s[14],w=s[15],T=s[16],P=s[17],M=s[18],O=s[19],L=0;L<a;L+=4)e=o[L],n=o[L+1],i=o[L+2],r=o[L+3],o[L]=e*l+n*u+i*c+r*h+d,o[L+1]=e*p+n*f+i*_+r*v+g,o[L+2]=e*y+n*m+i*b+r*x+E,o[L+3]=e*w+n*T+i*P+r*M+O},e.prototype._multiplyMatrix=function(t){var e,n,i,r=[];for(e=0;e<5;e++){for(n=0;n<5;n++)r[n]=this.colorMatrix[n+5*e];for(n=0;n<5;n++){var o=0;for(i=0;i<5;i++)o+=t[n+5*i]*r[i];this.colorMatrix[n+5*e]=o}}},e.prototype._cleanValue=function(t,e){return Math.min(e,Math.max(-e,t))},e.prototype.toString=function(){var t=this;return t.type+t.brightness+t.hue+t.saturation+t.contrast},e.prototype.destroy=function(){this.colorMatrix=null},e.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],e}(t.AObject);t.ColorMatrixFilter=i;var r=function(t){function e(e,n,i){void 0===e&&(e=2),void 0===n&&(n=2),void 0===i&&(i=1),t.call(this),this.type="blur",this.blurX=0,this.blurY=0,this.quality=1;var r=this;r._instanceType="annie.BlurFilter",r.blurX=e,r.blurY=n,r.quality=i}return __extends(e,t),e.prototype.toString=function(){var t=this;return t.type+t.blurX+t.blurY+t.quality},e.prototype.drawFilter=function(t){void 0===t&&(t=null);var n=this,i=n.blurX>>1;if(isNaN(i)||i<0)return!1;var r=n.blurY>>1;if(isNaN(r)||r<0)return!1;if(0==i&&0==r)return!1;var o=n.quality;(isNaN(o)||o<1)&&(o=1),o|=0,o>3&&(o=3),o<1&&(o=1);var a=t.data,s=0,l=0,u=0,c=0,h=0,d=0,p=0,f=0,_=0,v=0,g=0,y=0,m=0,b=0,x=0,E=i+i+1|0,w=r+r+1|0,T=0|t.width,P=0|t.height,M=T-1|0,O=P-1|0,L=i+1|0,C=r+1|0,S={r:0,b:0,g:0,a:0},F=S;for(u=1;u<E;u++)F=F.n={r:0,b:0,g:0,a:0};F.n=S;var D={r:0,b:0,g:0,a:0},A=D;for(u=1;u<w;u++)A=A.n={r:0,b:0,g:0,a:0};A.n=D;for(var U=null,I=0|e.MUL_TABLE[i],R=0|e.SHG_TABLE[i],k=0|e.MUL_TABLE[r],j=0|e.SHG_TABLE[r];o-- >0;){p=d=0;var B=I,X=R;for(l=P;--l>-1;){for(f=L*(y=a[0|d]),_=L*(m=a[d+1|0]),v=L*(b=a[d+2|0]),g=L*(x=a[d+3|0]),F=S,u=L;--u>-1;)F.r=y,F.g=m,F.b=b,F.a=x,F=F.n;for(u=1;u<L;u++)c=d+((M<u?M:u)<<2)|0,f+=F.r=a[c],_+=F.g=a[c+1],v+=F.b=a[c+2],g+=F.a=a[c+3],F=F.n;for(U=S,s=0;s<T;s++)a[d++]=f*B>>>X,a[d++]=_*B>>>X,a[d++]=v*B>>>X,a[d++]=g*B>>>X,c=p+((c=s+i+1)<M?c:M)<<2,f-=U.r-(U.r=a[c]),_-=U.g-(U.g=a[c+1]),v-=U.b-(U.b=a[c+2]),g-=U.a-(U.a=a[c+3]),U=U.n;p+=T}for(B=k,X=j,s=0;s<T;s++){for(d=s<<2|0,f=C*(y=a[d])|0,_=C*(m=a[d+1|0])|0,v=C*(b=a[d+2|0])|0,g=C*(x=a[d+3|0])|0,A=D,u=0;u<C;u++)A.r=y,A.g=m,A.b=b,A.a=x,A=A.n;for(h=T,u=1;u<=r;u++)d=h+s<<2,f+=A.r=a[d],_+=A.g=a[d+1],v+=A.b=a[d+2],g+=A.a=a[d+3],A=A.n,u<O&&(h+=T);if(d=s,U=D,o>0)for(l=0;l<P;l++)c=d<<2,a[c+3]=x=g*B>>>X,x>0?(a[c]=f*B>>>X,a[c+1]=_*B>>>X,a[c+2]=v*B>>>X):a[c]=a[c+1]=a[c+2]=0,c=s+((c=l+C)<O?c:O)*T<<2,f-=U.r-(U.r=a[c]),_-=U.g-(U.g=a[c+1]),v-=U.b-(U.b=a[c+2]),g-=U.a-(U.a=a[c+3]),U=U.n,d+=T;else for(l=0;l<P;l++)c=d<<2,a[c+3]=x=g*B>>>X,x>0?(x=255/x,a[c]=(f*B>>>X)*x,a[c+1]=(_*B>>>X)*x,a[c+2]=(v*B>>>X)*x):a[c]=a[c+1]=a[c+2]=0,c=s+((c=l+C)<O?c:O)*T<<2,f-=U.r-(U.r=a[c]),_-=U.g-(U.g=a[c+1]),v-=U.b-(U.b=a[c+2]),g-=U.a-(U.a=a[c+3]),U=U.n,d+=T}}},e.prototype.destroy=function(){},e.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],e.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],e}(t.AObject);t.BlurFilter=r}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(t){e.call(this),this.rootContainer=null,this._instanceType="annie.CanvasRender",this._stage=t}return __extends(n,e),n.prototype.begin=function(){var t=this,e=t.rootContainer;t._ctx.setTransform(1,0,0,1,0,0),""!=t._stage.bgColor?(t._ctx.fillStyle=t._stage.bgColor,t._ctx.fillRect(0,0,e.width,e.height)):t._ctx.clearRect(0,0,e.width,e.height)},n.prototype.beginMask=function(t){var e=this;e._ctx.save(),e._ctx.globalAlpha=0,e.drawMask(t),e._ctx.clip()},n.prototype.drawMask=function(t){var e=this,n=t.cMatrix;if(e._ctx.setTransform(n.a,n.b,n.c,n.d,n.tx,n.ty),"annie.Shape"==t._instanceType)t._drawShape(e._ctx);else if("annie.Sprite"==t._instanceType||"annie.MovieClip"==t._instanceType)for(var i=0;i<t.children.length;i++)e.drawMask(t.children[i]);else{var r=t._bounds;e._ctx.rect(0,0,r.width,r.height)}},n.prototype.endMask=function(){this._ctx.restore()},n.prototype.draw=function(t){var e=this;t._cp&&e._stage.update(!1);var n=t._texture;if(n&&n.width>0&&n.height>0){var i=e._ctx;i.globalAlpha=t.cAlpha;var r=t.cMatrix;if(i.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty),t.rect&&!t._isCache){var o=t.rect;i.drawImage(n,o.x,o.y,o.width,o.height,0,0,o.width,o.height)}else i.translate(t._offsetX,t._offsetY),i.drawImage(n,0,0)}},n.prototype.init=function(){var t=this;t.rootContainer||(t.rootContainer=document.createElement("canvas"),t._stage.rootDiv.appendChild(t.rootContainer),t.rootContainer.id="_a2x_canvas");var e=t.rootContainer;t._ctx=e.getContext("2d")},n.prototype.reSize=function(){var e=this,n=e.rootContainer;n.width=e._stage.divWidth*t.devicePixelRatio,n.height=e._stage.divHeight*t.devicePixelRatio,n.style.width=e._stage.divWidth+"px",n.style.height=e._stage.divHeight+"px"},n.prototype.destroy=function(){var t=this;t.rootContainer=null,t._stage=null,t._ctx=null},n}(t.AObject);t.CanvasRender=e}(annie||(annie={}));var annie;!function(t){var e=function(e){function n(){e.call(this),this._req=null,this.headers=[],this.responseType=null,this.url="",this.method="get",this.data=null,this._fqs=function(t,e){var n=[];if(t)for(var i in t)n.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e&&(n=n.concat(e)),n.join("&")},this._fus=function(t,e){var n=this;if(null==e||""==e)return t;var i=[],r=t.indexOf("?");if(-1!=r){var o=t.slice(r+1);return i=i.concat(o.split("&")),t.slice(0,r)+"?"+n._fqs(e,i)}return t+"?"+n._fqs(e,i)},this._instanceType="annie.URLLoader"}return __extends(n,e),n.prototype.loadCancel=function(){var t=this;t._req&&t._req.abort()},n.prototype.load=function(e,n){void 0===n&&(n="form");var i=this;if(i.loadCancel(),null==i.responseType||""==i.responseType){var r=e.split("."),o=r[r.length-1],a=o.split("?")[0].toLocaleLowerCase();i.responseType="mp3"==a||"ogg"==a||"wav"==a?"sound":"jpg"==a||"jpeg"==a||"png"==a||"gif"==a?"image":"css"==a?"css":"mp4"==a?"video":"svg"==a?"svg":"xml"==a?"xml":"json"==a?"json":"txt"==a?"text":"js"==a||"swf"==a?"js":"unKnow"}if(!i._req){i._req=new XMLHttpRequest;var s=i._req;s.withCredentials=!1,s.onprogress=function(t){!t||t.loaded>0&&0==t.total||i.dispatchEvent("onProgress",{loadedBytes:t.loaded,totalBytes:t.total})},s.onerror=function(t){if(++u>2)i.dispatchEvent("onError",{id:2,msg:t.message});else if(s.abort(),i.data)if("form"==n)s.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"),s.send(i._fqs(i.data,null));else{var e="application/json";"json"!=n&&(e="multipart/form-data"),s.setRequestHeader("Content-type",e+";charset=UTF-8"),s.send(i.data)}else s.send()},s.onreadystatechange=function(e){if(e){var n=e.target;if(4==n.readyState)if(200==s.status||0==s.status){var r=!1,o=new t.Event("onComplete"),a=n.response;o.data={type:i.responseType,response:null};var l=void 0;switch(i.responseType){case"css":l=document.createElement("link"),l.rel="stylesheet",l.href=i.url;break;case"image":case"sound":case"video":var u;"image"==i.responseType?(r=!0,u=document.createElement("img"),u.onload=function(){URL.revokeObjectURL(u.src),u.onload=null,i.dispatchEvent(o)},u.src=URL.createObjectURL(a)):"sound"==i.responseType?(u=document.createElement("AUDIO"),u.preload=!0,u.src=i.url):"video"==i.responseType&&(u=document.createElement("VIDEO"),u.preload=!0,u.src=i.url),l=u;break;case"json":l=JSON.parse(a);break;case"js":l="JS_CODE",t.Eval(a);break;case"text":case"unKnow":case"xml":default:l=a}o.data.response=l,i.data=null,i.responseType="",r||i.dispatchEvent(o)}else i.dispatchEvent("onError",{id:0,msg:"访问地址不存在"})}}}var l=i._req,u=0;if(i.data&&"get"==i.method.toLocaleLowerCase()?(i.url=i._fus(e,i.data),i.data=null):i.url=e,"image"==i.responseType||"sound"==i.responseType||"video"==i.responseType?l.responseType="blob":l.responseType="text",l.open(i.method,i.url,!0),i.headers.length>0){for(var c=0;c<i.headers.length;c+=2)l.setRequestHeader(i.headers[c],i.headers[c+1]);i.headers.length=0}if(i.data)if("form"==n)l.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"),l.send(i._fqs(i.data,null));else{var h="application/json";"json"!=n&&(h="multipart/form-data"),l.setRequestHeader("Content-type",h+";charset=UTF-8"),l.send(i.data)}else l.send()},n.prototype.addHeader=function(t,e){this.headers.push(t,e)},n.prototype.destroy=function(){var t=this;t.loadCancel(),t.headers=null,t.data=null,e.prototype.destroy.call(this)},n}(t.EventDispatcher);t.URLLoader=e}(annie||(annie={}));var annie;!function(t){function e(){R.load(S+"resource/"+C[F]+"/"+C[F]+".res.json?t="+N)}function n(t){var n=t.data.response;B.push(n),D+=n.length,F++,C[F]?e():(F=0,Y=1/D,s())}function i(t){I&&I(100*(X+t.data.loadedBytes/t.data.totalBytes*Y)>>0)}function r(e,n){void 0===n&&(n=null);var i=null;for(var r in e)if(i=e[r],1==i.t){if(!i.f){i.f=[];continue}if(i.tf>1){for(var o=i.f,a=o.length,s=null,l=null,u=[],c=0;c<a;c++){if(s=o[c].c){for(var h in s){var d=s[h].at;if(void 0!=d&&-1!=d){if(0==d)u.push(h);else for(var p=0;p<u.length;p++)if(u[p]==d){u.splice(p,0,h);break}delete s[h].at}}if(l)for(var h in l)if(s[h])if(-1!=s[h].at)for(var f in l[h])void 0==s[h][f]&&(s[h][f]=l[h][f]);else delete s[h];else s[h]=l[h]}l=s}i.ol=u}}else if(t._isReleased)if(2==e[r]){var _=new Image;_.src=n[r],n[r]=_}else if(5==e[r]){var v=new Audio;v.src=n[r],n[r]=v}}function o(e){var n=C[F];if(t._isReleased){if("f2xShare"==n)return B.shift(),C.shift(),void s();r(t.res[C[F]]._a2x_con,t.res[C[F]])}else if("js"!=e.data.type&&"css"!=e.data.type){var i=e.data.response;"_a2x_con"==B[F][0].id&&r(i),t.res[n][B[F][0].id]=i}a()}function a(){if(A++,X=A/D,B[F].shift(),t.res[C[F]]._f2x_had_loaded_scene=!0,B[F].length>0)s();else{var e={};e.sceneName=C[F],F++,e.sceneId=F,e.sceneTotal=C.length,F==C.length?(L=!1,setTimeout(function(){U(e)},100)):(U(e),s())}}function s(){var e=S+B[F][0].src;t._isReleased?(k.responseType="js",e+="?v="+t._isReleased):e+="?v="+N,k.load(e)}function l(e){return!(void 0==t.res[e]||null==t.res[e]||!t.res[e]._f2x_had_loaded_scene)}function u(e){delete t.res[e];var n=window,i=n[e];for(var r in i)delete i[r];delete n[e],i=null}function c(e,n){var i=t.res;return i[e][n]?i[e][n]:null}function h(e,n){return new t.Bitmap(t.res[e][n])}function d(t,e,n){if(void 0===n&&(n=1),t._a2x_res_obj!=e){void 0!=e.tr&&1!=e.tr.length||(e.tr=[0,0,1,1,0,0]);var i=t._a2x_res_obj;if(void 0!=e.w&&(t.textWidth=e.w,t.textHeight=e.h),i.tr!=e.tr&&(c=e.tr,t.x=c[0],t.y=c[1],t.scaleX=c[2],t.scaleY=c[3],t.skewX=c[4],t.skewY=c[5]),t.alpha=void 0==e.al?1:e.al,void 0!=e.t&&(-1==e.t&&t.initButton&&t.initButton(),t._mode=e.t),i.fi!=e.fi)if(void 0!=e.fi){for(var r,o=[],a=void 0,s=0;s<e.fi.length;s++)switch(e.fi[s][0]){case 0:r=.5*(e.fi[s][2]+e.fi[s][3]),a=T.getRGBA(e.fi[s][10],e.fi[s][11]);var l=e.fi[s][4]*Math.cos(e.fi[s][1]),u=e.fi[s][4]*Math.sin(e.fi[s][1]);o[o.length]=new M(a,l,u,r);break;case 1:o[o.length]=new P(e.fi[s][1],e.fi[s][2],e.fi[s][3]);break;case 2:r=.5*(e.fi[s][1]+e.fi[s][2]),a=T.getRGBA(e.fi[s][7],e.fi[s][6]),o[o.length]=new M(a,0,0,r);break;case 6:o[o.length]=new O(e.fi[s][1],e.fi[s][2],e.fi[s][3],e.fi[s][4]);break;case 7:o[o.length]=new w(e.fi[s][1])}o.length>0?t.filters=o:t.filters=null}else t.filters=null;t._a2x_res_obj=e;var c}}function p(e,n){var i,r=t.res[e]._a2x_con[n],o=decodeURIComponent(r[9]),a=decodeURIComponent(r[4]),s=r[5],l=q[r[3]],u=W[r[2]],c=r[11],h=r[10],d=r[6],p=r[7],f=r[12],_=r[8];return 0==r[1]||1==r[1]?(i=new t.TextField,i.text=o,i.font=a,i.size=s,i.textAlign=l,i.lineType=u,i.italic=c,i.bold=h,i.color=d,i.textAlpha=p,i.border=f,i.lineSpacing=_):(i=new t.InputText(r[2]),i.initInfo(o,d,l,s,a,f,_),i.italic=c,i.bold=h),i}function f(e,n){var i="_f2x_s"+n;if(t.res[e][i])return t.res[e][i];var r=null,o=h(e,n);return o?(r=o.rect?t.Bitmap.convertToImage(o,!1):o.bitmapData,t.res[e][i]=r,r):(console.log("error:矢量位图填充时,未找到位图资源!"),null)}function _(e,n){for(var i=t.res[e]._a2x_con[n][1],r=new t.Shape,o=0;o<i.length;o++)1==i[o][0]?(0==i[o][1]?r.beginFill(t.Shape.getRGBA(i[o][2][0],i[o][2][1])):1==i[o][1]?r.beginLinearGradientFill(i[o][2][0],i[o][2][1]):2==i[o][1]?r.beginRadialGradientFill(i[o][2][0],i[o][2][1]):r.beginBitmapFill(h(e,i[o][2][0]).bitmapData,i[o][2][1]),r.decodePath(i[o][3]),r.endFill()):(0==i[o][1]?r.beginStroke(t.Shape.getRGBA(i[o][2][0],i[o][2][1]),i[o][4],i[o][5],i[o][6],i[o][7]):1==i[o][1]?r.beginLinearGradientStroke(i[o][2][0],i[o][2][1],i[o][4],i[o][5],i[o][6],i[o][7]):2==i[o][1]?r.beginRadialGradientStroke(i[o][2][0],i[o][2][1],i[o][4],i[o][5],i[o][6],i[o][7]):r.beginBitmapStroke(h(e,i[o][2][0]).bitmapData,i[o][2][1],i[o][4],i[o][5],i[o][6],i[o][7]),r.decodePath(i[o][3]),r.endStroke());return r}function v(e,n){return new t.Sound(t.res[e][n])}function g(e){var n=new x;n.addHeader("X-Requested-With","XMLHttpRequest"),n.method=void 0==e.type?"get":e.type,n.data=void 0==e.data?null:e.data,n.responseType=void 0==e.responseType?"text":e.responseType,void 0!=e.success&&n.addEventListener(t.Event.COMPLETE,e.success),void 0!=e.error&&n.addEventListener(t.Event.ERROR,e.error),n.load(e.url)}function y(t,e,n,i){var r=window;1==e&&(r[n]=i);var o=document.createElement("script"),a=document.getElementsByTagName("head")[0];o.onload=function(t){0==e&&i(r[n]),t.path[0].src="",r[n]=null,delete r[n],a.removeChild(t.path[0])},a.appendChild(o);var s;s=t.indexOf("?")>0?"&":"?",o.src=t+s+"a_n_n_i_e="+Math.random()+"&callback="+n}function m(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),n=window.location.search.substr(1).match(e);return null!=n?decodeURIComponent(n[2]):null}function b(e,n,i){var r=window,o=t.res[n],a=o._a2x_con,s=a[i];e._a2x_res_class=s;var l,u=!1;if(s.tf>1&&(u=!0,void 0==s.timeLine)){var c=s.f.length,f=[],g=c>0?s.f[0].i:s.tf,y=0;if(g>0)for(var m=0;m<g;m++)f[f.length]=-1;if(c>0)for(l=0;l<c;l++){y=l+1<c?s.f[l+1].i:s.tf,g=s.f[l].i;for(var m=0;m<y-g;m++)f[f.length]=l}s.timeLine=f,s.f||(s.f=[]),s.a||(s.a={}),s.s||(s.s={}),s.e||(s.e={});var x={};if(s.l)for(var E in s.l)for(var w=0;w<s.l[E].length;w++)x[s.l[E][w]]=parseInt(E)+1;else s.l=[];s.label=x}var T=s.c;if(T){var P=[],M=T.length,O=null,L=0,C=null,S=0;for(l=0;l<M;l++){switch(L=Array.isArray(a[T[l]])?a[T[l]][0]:a[T[l]].t){case 1:case 4:s.n&&s.n[l]&&e[s.n[l]]?O=e[s.n[l]]:(4==L?O=p(n,T[l]):0==T[l].indexOf("_$")?(O=a[T[l]].tf>1?new t.MovieClip:new t.Sprite,b(O,n,T[l])):O=new r[n][T[l]],s.n&&s.n[l]&&(e[s.n[l]]=O,O.name=s.n[l]));break;case 2:O=h(n,T[l]);break;case 3:O=_(n,T[l]);break;case 5:O=v(n,T[l]),O.name=T[l],e.addSound(O)}if(u)P[P.length]=O,5==L&&(O.isPlaying=!1,e._a2x_sounds||(e._a2x_sounds={}),e._a2x_sounds[l]=O);else{var E=l+1;5==L?O._loop=O._repeate=s.s[0][E]:(d(O,s.f[0].c[E]),void 0!=s.f[0].c[E].ma?(C=O,S=s.f[0].c[E].ma-1):C&&l<=S&&(O.mask=C,l==S&&(C=null)),e.addChildAt(O,0))}}if(u){var F=s.ol;if(F)for(var D=0;D<F.length;D++)e._a2x_res_children[D]=[F[D],P[F[D]-1]]}}}var x=t.URLLoader,E=t.Event,w=t.ColorFilter,T=t.Shape,P=t.BlurFilter,M=t.ShadowFilter,O=t.ColorMatrixFilter;t._isReleased=!1,t._shareSceneList=[],t.res={};var L,C,S,F,D,A,U,I,R,k,j,B,X,Y,N=(new Date).getTime();t.loadScene=function(r,a,u,c){if(void 0===c&&(c=""),L&&(R.loadCancel(),k.loadCancel()),C=[],S=c,"string"==typeof r)if(l(r)){var h={};h.sceneName=r,h.sceneId=1,h.sceneTotal=1,u(h)}else t.res[r]={},C.push(r);else for(var d=r.length,p=0,f=0;f<d;f++)if(l(r[f])){var h={};h.sceneName=r[f],h.sceneId=++p,h.sceneTotal=d,u(h)}else t.res[r[f]]={},C.push(r[f]);if(0!=C.length)if(j||(t._isReleased&&console.log("AnnieJS:https://github.com/flash2x/annieJS"),R=new x,R.addEventListener(E.COMPLETE,n),k=new x,k.addEventListener(E.COMPLETE,o),k.addEventListener(E.PROGRESS,i),j=!0),X=0,F=0,D=0,A=0,L=!0,U=u,I=a,B=[],t._isReleased){if(t._shareSceneList.length>0&&!l("f2xShare"))for(var f=0;f<C.length;f++)if(t._shareSceneList.indexOf(C[f])>=0){C.unshift("f2xShare");break}F=0,D=C.length,Y=1/D;for(var f=0;f<D;f++)B.push([{src:"src/"+C[f]+"/"+C[f]+".swf"}]);s()}else e()},t.isLoadedScene=l,t.unLoadScene=u,t.getResource=c,t.d=d;var W=["single","multiline"],q=["left","center","right"];t.sb=f,t.ajax=g,t.jsonp=y,t.getQueryString=m,t.initRes=b,console.log("https://github.com/flash2x/AnnieJS")}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(){t.call(this),this.currentFrame=0,this.totalFrames=0,this._isLoop=0,this._delay=0,this._isFront=!0,this._cParams=null,this._loop=!1}return __extends(e,t),e.prototype.init=function(t,e,n,i){if(void 0===i&&(i=!0),e<=0||"number"!=typeof e)throw new Error("annie.Tween.to()或者annie.Tween.from()方法的第二个参数一定要是大于0的数字");var r=this;r.currentFrame=1;var o=60*e>>0;r.totalFrames=o>0?o:1,r.target=t,r._isTo=i,r._isLoop=0,r._startData={},r._disData={},r._delay=0,r._isFront=!0,r._ease=null,r._update=null,r._cParams=null,r._loop=!1,r._completeFun=null;for(var a in n)switch(a){case"useFrame":1==n[a]&&(r.totalFrames=e);break;case"yoyo":!1===n[a]?r._isLoop=0:!0===n[a]?r._isLoop=Number.MAX_VALUE:r._isLoop=n[a];break;case"delay":n.useFrame?r._delay=n[a]:r._delay=60*n[a]>>0;break;case"ease":r._ease=n[a];break;case"onUpdate":r._update=n[a];break;case"onComplete":r._completeFun=n[a];break;case"completeParams":r._cParams=n[a];break;case"loop":r._loop=n[a];break;default:"number"==typeof n[a]&&(i?(r._startData[a]=t[a],r._disData[a]=n[a]-t[a]):(r._startData[a]=n[a],r._disData[a]=t[a]-n[a],t[a]=n[a]))}},e.prototype.update=function(){var t=this;if(t._isFront&&t._delay>0)return void t._delay--;var e=t.currentFrame/t.totalFrames;if(!(e<0||e>1)){t._ease&&(e=t._ease(e));var i=!1;for(var r in t._disData)i=!0,t.target[r]=t._startData[r]+t._disData[r]*e;if(!i)return void n.kill(t.instanceId);t._update&&t._update(e);var o=t._completeFun,a=t._cParams;t._isFront?++t.currentFrame>t.totalFrames&&(t._loop?t.currentFrame=1:t._isLoop>0?(t._isFront=!1,t.currentFrame=t.totalFrames,t._isLoop--):n.kill(t.instanceId),o&&o(a)):--t.currentFrame<0&&(t._isLoop>0?(t._isFront=!0,t.currentFrame=1):n.kill(t.instanceId),o&&o(a))}},e.prototype.destroy=function(){var t=this;t._update=null,t._completeFun=null,t._ease=null},e}(t.AObject);t.TweenObj=e;var n=function(){function n(){}return n.to=function(t,e,i){return n.createTween(t,e,i,!0)},n.from=function(t,e,i){return n.createTween(t,e,i,!1)},n.createTween=function(i,r,o,a){for(var s,l=n._tweenList.length,u=0;u<l;u++)if(s=n._tweenList[u],i==s.target)for(var c in s._startData)void 0!=o[c]&&(delete s._startData[c],delete s._disData[c]);return l=n._tweenPool.length,l>0?(s=n._tweenPool.shift(),s._instanceId=t.AObject._object_id++):s=new e,n._tweenList.push(s),s.init(i,r,o,a),s.instanceId},n.killAll=function(){for(var t,e=n._tweenList.length,i=0;i<e;i++)t=n._tweenList[i],t.target=null,t._completeFun=null,t._cParams=null,t._update=null,t._ease=null,t._loop=!1,n._tweenPool.push(t);n._tweenList.length=0},n.kill=function(t){for(var e,i=n._tweenList.length,r=0;r<i;r++)if(e=n._tweenList[r],e.instanceId==t){e.target=null,e._completeFun=null,e._cParams=null,e._update=null,e._ease=null,e._loop=null,n._tweenPool.push(e),n._tweenList.splice(r,1);break}},n.quadraticIn=function(t){return t*t},n.quadraticOut=function(t){return t*(2-t)},n.quadraticInOut=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},n.cubicIn=function(t){return t*t*t},n.cubicOut=function(t){return--t*t*t+1},n.cubicInOut=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},n.quarticIn=function(t){return t*t*t*t},n.quarticOut=function(t){return 1- --t*t*t*t},n.quarticInOut=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},n.quinticIn=function(t){return t*t*t*t*t},n.quinticOut=function(t){return--t*t*t*t*t+1},n.quinticInOut=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},n.sinusoidalIn=function(t){return 1-Math.cos(t*Math.PI/2)},n.sinusoidalOut=function(t){return Math.sin(t*Math.PI/2)},n.sinusoidalInOut=function(t){return.5*(1-Math.cos(Math.PI*t))},n.exponentialIn=function(t){return 0===t?0:Math.pow(1024,t-1)},n.exponentialOut=function(t){return 1===t?1:1-Math.pow(2,-10*t)},n.exponentialInOut=function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},n.circularIn=function(t){return 1-Math.sqrt(1-t*t)},n.circularOut=function(t){return Math.sqrt(1- --t*t)},n.circularInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},n.elasticIn=function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},n.elasticOut=function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},n.elasticInOut=function(t){return 0===t?0:1===t?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1)},n.backIn=function(t){var e=1.70158;return t*t*((e+1)*t-e)},n.backOut=function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},n.backInOut=function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},n.bounceIn=function(t){return 1-n.bounceOut(1-t)},n.bounceOut=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},n.bounceInOut=function(t){return t<.5?.5*n.bounceIn(2*t):.5*n.bounceOut(2*t-1)+.5},n.flush=function(){for(var t=n._tweenList.length,e=t-1;e>=0;e--)n._tweenList[e]?n._tweenList[e].update():n._tweenList.splice(e,1)},n._tweenPool=[],n._tweenList=[],n}();t.Tween=n}(annie||(annie={}));var annie;!function(t){var e=function(t){function e(n,i){void 0===i&&(i=0),t.call(this),this._currentCount=0,this._delay=0,this._frameDelay=0,this._currentFrameDelay=0,this._repeatCount=0,this._running=!1,n<=0&&(n=1);var r=this;r._delay=n,r._frameDelay=Math.ceil(.001*n*60),r._repeatCount=i,e._timerList.push(r)}return __extends(e,t),e.prototype.reset=function(){var t=this;t._running=!1,t._currentCount=0,t._currentFrameDelay=0},e.prototype.start=function(){var t=this;t._running=!0,t._currentCount==t._repeatCount&&(t._currentCount=0)},e.prototype.stop=function(){this._running=!1},Object.defineProperty(e.prototype,"currentCount",{get:function(){return this._currentCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return this._delay},set:function(t){this._delay=t,this._frameDelay=Math.ceil(.001*t*60)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"repeatCount",{get:function(){return this._repeatCount},set:function(t){t<0&&(t=0),this._repeatCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"running",{get:function(){return this._running},enumerable:!0,configurable:!0}),e.prototype.kill=function(){for(var t=e._timerList.length,n=this,i=0;i<t;i++)if(e._timerList[i]._instanceId==n._instanceId){e._timerList.splice(i,1);break}},e.prototype.update=function(){var t=this;t._running&&++t._currentFrameDelay==t._frameDelay&&(t._repeatCount&&t._currentCount++,t._currentFrameDelay=0,t.dispatchEvent("onTimer"),t._repeatCount&&t._currentCount==t._repeatCount&&(t._running=!1,t.dispatchEvent("onTimerComplete")))},e.flush=function(){for(var t=e._timerList.length,n=t-1;n>=0;n--)e._timerList[n]?e._timerList[n].update():e._timerList.splice(n,1)},e.prototype.destroy=function(){this.kill(),t.prototype.destroy.call(this)},e._timerList=[],e}(t.EventDispatcher);t.Timer=e}(annie||(annie={}));var annie;!function(t){function e(t){window.location.href=t}function n(t){var e=new XMLHttpRequest;e.open("get",t,!0),e.send()}t.Eval=eval.bind(window),t.debug=!1,t.version="2.0.0",t.osType=function(){var t=navigator.userAgent.toLocaleLowerCase(),e=/android/,n=/iphone|ipod|ipad/;return e.test(t)?"android":n.test(t)?"ios":"pc"}(),t.globalDispatcher=new t.EventDispatcher,t.devicePixelRatio=window.devicePixelRatio?window.devicePixelRatio:1,t.StageScaleMode={EXACT_FIT:"exactFit",NO_BORDER:"noBorder",NO_SCALE:"noScale",SHOW_ALL:"showAll",FIXED_WIDTH:"fixedWidth",FIXED_HEIGHT:"fixedHeight"},t.navigateToURL=e,t.sendToURL=n;var i=null;t.toDisplayDataURL=function(e,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=""),i||(i=new t.CanvasRender(null)),i._stage=e,i.rootContainer=t.DisplayObject._canvas;var a={p:e.parent,x:e.x,y:e.y,scX:e.scaleX,scY:e.scaleY,r:e.rotation,skX:e.skewX,skY:e.skewY};e.parent=null,n||(n=e.getDrawRect());var s=n.width,l=n.height;return e.x=1e-5-n.x,e.y=1e-5-n.y,i.rootContainer.width=s,i.rootContainer.height=l,i._ctx=i.rootContainer.getContext("2d"),""==o?i._ctx.clearRect(0,0,s,l):(i._ctx.fillStyle=o,i._ctx.fillRect(0,0,s,l)),e._cp=!0,e.update(!1),e.render(i),e.parent=a.p,e.x=a.x,e.y=a.y,e.scaleX=a.scX,e.scaleY=a.scY,e.rotation=a.r,e.skewX=a.skX,e.skewY=a.skY,e._cp=!0,e.update(!1),r?r.quality&&(r.quality/=10):r={type:"png"},i.rootContainer.toDataURL("image/"+r.type,r.quality)},t.getStagePixels=function(e,n){var i=e.localToGlobal(new t.Point(n.x,n.y));return e.renderObj.rootContainer.getContext("2d").getImageData(i.x,i.y,n.width,n.height)}}(annie||(annie={}));var trace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];for(var n in arguments)console.log(arguments[n])};annie.Stage.addUpdateObj(annie.Tween),annie.Stage.addUpdateObj(annie.Timer),annie.Stage.flushAll();
\ No newline at end of file
/**
* Created by anlun on 16/8/14.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
...@@ -18,7 +15,7 @@ declare namespace annieUI { ...@@ -18,7 +15,7 @@ declare namespace annieUI {
* 横向还是纵向 默认为纵向 * 横向还是纵向 默认为纵向
* @property isVertical * @property isVertical
* @type {boolean} * @type {boolean}
* @private * @protected
* @since 1.0.0 * @since 1.0.0
* @default true * @default true
*/ */
...@@ -27,20 +24,20 @@ declare namespace annieUI { ...@@ -27,20 +24,20 @@ declare namespace annieUI {
* 可见区域的宽 * 可见区域的宽
* @property viewWidth * @property viewWidth
* @type {number} * @type {number}
* @private * @protected
* @since 1.0.0 * @since 1.0.0
* @default 0 * @default 0
*/ */
private viewWidth; protected viewWidth: number;
/** /**
* 可见区域的高 * 可见区域的高
* @property viewHeight * @property viewHeight
* @type {number} * @type {number}
* @private * @protected
* @since 1.0.0 * @since 1.0.0
* @default 0 * @default 0
*/ */
private viewHeight; protected viewHeight: number;
private _tweenId; private _tweenId;
/** /**
* 整个滚动的最大距离值 * 整个滚动的最大距离值
...@@ -61,16 +58,11 @@ declare namespace annieUI { ...@@ -61,16 +58,11 @@ declare namespace annieUI {
protected distance: number; protected distance: number;
/** /**
* 最小鼠标滑动距离 * 最小鼠标滑动距离
* @property minDis
* @protected
* @type {number} * @type {number}
*/ */
private minDis; protected minDis: number;
/**
* 遮罩对象
* @property maskObj
* @since 1.0.0
* @private
* @type {annie.Shape}
*/
private maskObj; private maskObj;
/** /**
* 真正的容器对象,所有滚动的内容都应该是添加到这个容器中 * 真正的容器对象,所有滚动的内容都应该是添加到这个容器中
...@@ -80,13 +72,6 @@ declare namespace annieUI { ...@@ -80,13 +72,6 @@ declare namespace annieUI {
* @type {annie.Sprite} * @type {annie.Sprite}
*/ */
view: Sprite; view: Sprite;
/**
* 最后鼠标经过的坐标值
* @property lastValue
* @private
* @since 1.0.0
* @type {number}
*/
private lastValue; private lastValue;
/** /**
* 速度 * 速度
...@@ -99,11 +84,11 @@ declare namespace annieUI { ...@@ -99,11 +84,11 @@ declare namespace annieUI {
/** /**
* 加速度 * 加速度
* @property addSpeed * @property addSpeed
* @private * @protected
* @since 1.0.0 * @since 1.0.0
* @type {number} * @type {number}
*/ */
private addSpeed; protected addSpeed: number;
/** /**
* 是否是停止滚动状态 * 是否是停止滚动状态
* @property isStop * @property isStop
...@@ -134,14 +119,6 @@ declare namespace annieUI { ...@@ -134,14 +119,6 @@ declare namespace annieUI {
protected paramXY: string; protected paramXY: string;
private stopTimes; private stopTimes;
private isMouseDownState; private isMouseDownState;
/**
* 是否是通过scrollTo方法在滑动中
* @property autoScroll
* @since 1.0.2
* @type {boolean}
* @private
* @default false
*/
private autoScroll; private autoScroll;
/** /**
* 构造函数 * 构造函数
...@@ -151,7 +128,7 @@ declare namespace annieUI { ...@@ -151,7 +128,7 @@ declare namespace annieUI {
* @param {number} maxDistance 最大滚动的长度 * @param {number} maxDistance 最大滚动的长度
* @param {boolean} isVertical 是纵向还是横向,也就是说是滚x还是滚y,默认值为沿y方向滚动 * @param {boolean} isVertical 是纵向还是横向,也就是说是滚x还是滚y,默认值为沿y方向滚动
* @example * @example
* s.sPage=new annieUI.ScrollPage(640,s.stage.viewRect.height,4943); * s.sPage=new annie.ScrollPage(640,s.stage.viewRect.height,4943);
* s.addChild(s.sPage); * s.addChild(s.sPage);
* s.sPage.view.addChild(new home.Content()); * s.sPage.view.addChild(new home.Content());
* s.sPage.y=s.stage.viewRect.y; * s.sPage.y=s.stage.viewRect.y;
...@@ -179,17 +156,16 @@ declare namespace annieUI { ...@@ -179,17 +156,16 @@ declare namespace annieUI {
* @public * @public
*/ */
scrollTo(dis: number, time?: number): void; scrollTo(dis: number, time?: number): void;
destroy(): void;
} }
} }
/**
* Created by anlun on 16/8/14.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
declare namespace annieUI { declare namespace annieUI {
import Sprite = annie.Sprite; import Sprite = annie.Sprite;
/** /**
* <h4><font color="red">小游戏不支持 小程序不支持</font></h4>
* 有时我们需要从外部获取一张个人头像,将它变成方形或者圆形展示出来。 * 有时我们需要从外部获取一张个人头像,将它变成方形或者圆形展示出来。
* 又希望他能按照我们的尺寸展示,这个时候你就需要用到FacePhoto类啦。 * 又希望他能按照我们的尺寸展示,这个时候你就需要用到FacePhoto类啦。
* @class annieUI.FacePhoto * @class annieUI.FacePhoto
...@@ -204,8 +180,8 @@ declare namespace annieUI { ...@@ -204,8 +180,8 @@ declare namespace annieUI {
* @since 1.0.0 * @since 1.0.0
* @public * @public
* @example * @example
* var circleface = new annieUI.FacePhoto(), * var circleface = new annie.FacePhoto(),
* rectFace=new annieUI.FacePhoto(); * rectFace=new annie.FacePhoto();
* //圆形头像 * //圆形头像
* circleface.init('http://test.annie2x.com/biglong/logo.jpg', 100, 0); * circleface.init('http://test.annie2x.com/biglong/logo.jpg', 100, 0);
* circleface.x = 260; * circleface.x = 260;
...@@ -231,11 +207,9 @@ declare namespace annieUI { ...@@ -231,11 +207,9 @@ declare namespace annieUI {
* @param {number} maskType 遮罩类型,是圆形遮罩还是方形遮罩 0 圆形 1方形 默认是0 * @param {number} maskType 遮罩类型,是圆形遮罩还是方形遮罩 0 圆形 1方形 默认是0
*/ */
init(src: string, radio?: number, maskType?: number): void; init(src: string, radio?: number, maskType?: number): void;
destroy(): void;
} }
} }
/**
* Created by saron on 16/10/19.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
...@@ -253,10 +227,10 @@ declare namespace annieUI { ...@@ -253,10 +227,10 @@ declare namespace annieUI {
* 页面个数 * 页面个数
* @property listLen * @property listLen
* @type {number} * @type {number}
* @private * @protected
* @default 0 * @default 0
*/ */
private listLen; protected listLen: number;
/** /**
* 页面滑动容器 * 页面滑动容器
* @property view * @property view
...@@ -270,9 +244,9 @@ declare namespace annieUI { ...@@ -270,9 +244,9 @@ declare namespace annieUI {
* 滑动方向 * 滑动方向
* @property isVertical * @property isVertical
* @type {boolean} * @type {boolean}
* @private * @protected
*/ */
private isVertical; protected isVertical: boolean;
/** /**
* 容器活动速度 * 容器活动速度
* @property slideSpeed * @property slideSpeed
...@@ -281,12 +255,6 @@ declare namespace annieUI { ...@@ -281,12 +255,6 @@ declare namespace annieUI {
* @default 0.2 * @default 0.2
*/ */
slideSpeed: number; slideSpeed: number;
/**
* 是否滑动中断
* @property _isBreak
* @private
* @type {boolean}
*/
private _isBreak; private _isBreak;
/** /**
* 滚动距离 * 滚动距离
...@@ -297,25 +265,10 @@ declare namespace annieUI { ...@@ -297,25 +265,10 @@ declare namespace annieUI {
* @since 1.0.0 * @since 1.0.0
*/ */
protected distance: number; protected distance: number;
/**
* 触摸点结束点X
* @property touchEndX
* @type {number}
* @private
*/
private touchEndX; private touchEndX;
private movingX; private movingX;
private movingY; private movingY;
private _moveDis; private _moveDis;
/**
* 触摸点结束点Y
* @property touchEndY
* @type {number}
* @private
* @since
* @public
* @default 0
*/
private touchEndY; private touchEndY;
/** /**
* 当前页面索引ID 默认从0开始 * 当前页面索引ID 默认从0开始
...@@ -342,33 +295,33 @@ declare namespace annieUI { ...@@ -342,33 +295,33 @@ declare namespace annieUI {
* 页面宽 * 页面宽
* @property viewWidth * @property viewWidth
* @type {number} * @type {number}
* @private * @protected
*/ */
viewWidth: number; protected viewWidth: number;
/** /**
* 页面高 * 页面高
* @property viewHeight * @property viewHeight
* @type {number} * @type {number}
* @private * @protected
*/ */
viewHeight: number; protected viewHeight: number;
/** /**
* 页面列表 * 页面列表
* @property pageList * @property pageList
* @type {Array} * @type {Array}
* @private * @public
*/ */
private pageList; pageList: Array<any>;
private pageClassList; pageClassList: Array<any>;
private lastX; private lastX;
private lastY; private lastY;
/** /**
* 是否点击了鼠标 * 是否点击了鼠标
* @property isMouseDown * @property isMouseDown
* @type {boolean} * @type {boolean}
* @private * @public
*/ */
private isMouseDown; isMouseDown: boolean;
/** /**
* 是否可以下一页 * 是否可以下一页
* @property canSlideNext * @property canSlideNext
...@@ -406,17 +359,14 @@ declare namespace annieUI { ...@@ -406,17 +359,14 @@ declare namespace annieUI {
* @since 1.0.0 * @since 1.0.0
*/ */
private setMask(w, h); private setMask(w, h);
/**
* 触摸事件
* @param e
*/
private onMouseEvent(e); private onMouseEvent(e);
/** /**
* 滑动到指定页 * 滑动到指定页
* @method slideTo * @method slideTo
* @public * @public
* @since 1.1.1 * @since 1.1.1
* @param {number} index 是向上还是向下 * @param {number} index 要跳到页的索引
* @param {boolean} noTween 是否需要动画过渡,如果不需要设置成true
*/ */
slideTo(index: number, noTween?: boolean): void; slideTo(index: number, noTween?: boolean): void;
/** /**
...@@ -427,6 +377,7 @@ declare namespace annieUI { ...@@ -427,6 +377,7 @@ declare namespace annieUI {
* @public * @public
*/ */
addPageList(classList: any): void; addPageList(classList: any): void;
destroy(): void;
} }
} }
/** /**
...@@ -518,8 +469,8 @@ declare namespace annieUI { ...@@ -518,8 +469,8 @@ declare namespace annieUI {
private getBookArr(point, actionPoint1, actionPoint2); private getBookArr(point, actionPoint1, actionPoint2);
private getLayerArr(point1, point2, actionPoint1, actionPoint2, limitPoint1, limitPoint2); private getLayerArr(point1, point2, actionPoint1, actionPoint2, limitPoint1, limitPoint2);
private getShape(shape, pointArr); private getShape(shape, pointArr);
private setShadowMask(shape, maskShape, g_width, g_height); private setShadowMask(shape, g_width, g_height);
private getShadow(shape, maskShape, point1, point2, maskArray, arg); private getShadow(shape, point1, point2, arg);
private setPage(pageNum); private setPage(pageNum);
private onMouseDown(e); private onMouseDown(e);
private onMouseUp(e); private onMouseUp(e);
...@@ -561,16 +512,21 @@ declare namespace annieUI { ...@@ -561,16 +512,21 @@ declare namespace annieUI {
private arc(argR, argN1, argN2); private arc(argR, argN1, argN2);
private angle(target1, target2); private angle(target1, target2);
private pos(target1, target2); private pos(target1, target2);
destroy(): void;
} }
} }
/**
* Created by anlun on 16/8/14.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
declare namespace annieUI { declare namespace annieUI {
import DisplayObject = annie.DisplayObject; import DisplayObject = annie.DisplayObject;
/**
* 有些时候需要大量的有规则的滚动内容。这个是滚动类的Item类接口
* @class annieUI.IScrollListItem
* @public
* @extends annie.DisplayObject
* @since 1.0.9
*/
interface IScrollListItem extends DisplayObject { interface IScrollListItem extends DisplayObject {
initData(id: number, data: Array<any>): void; initData(id: number, data: Array<any>): void;
id: number; id: number;
...@@ -601,9 +557,9 @@ declare namespace annieUI { ...@@ -601,9 +557,9 @@ declare namespace annieUI {
* 获取下拉滚动的loadingView对象 * 获取下拉滚动的loadingView对象
* @property loadingView * @property loadingView
* @since 1.0.9 * @since 1.0.9
* @returns {DisplayObject} * @return {DisplayObject}
*/ */
readonly loadingView: DisplayObject; loadingView: DisplayObject;
/** /**
* 构造函数 * 构造函数
* @method ScrollList * @method ScrollList
...@@ -621,7 +577,7 @@ declare namespace annieUI { ...@@ -621,7 +577,7 @@ declare namespace annieUI {
* 更新列表数据 * 更新列表数据
* @method updateData * @method updateData
* @param {Array} data * @param {Array} data
* @param {boolean} isReset 是否重数据列表。 * @param {boolean} isReset 是否重数据列表。
* @since 1.0.9 * @since 1.0.9
*/ */
updateData(data: Array<any>, isReset?: boolean): void; updateData(data: Array<any>, isReset?: boolean): void;
...@@ -644,16 +600,15 @@ declare namespace annieUI { ...@@ -644,16 +600,15 @@ declare namespace annieUI {
* @param {annie.DisplayObject} downLoading * @param {annie.DisplayObject} downLoading
*/ */
setLoading(downLoading: DisplayObject): void; setLoading(downLoading: DisplayObject): void;
destroy(): void;
} }
} }
/**
* Created by anlun on 2017/5/24.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
declare namespace annieUI { declare namespace annieUI {
/** /**
* <h4><font color="red">小游戏不支持 小程序不支持</font></h4>
* 画板类 * 画板类
* @class annieUI.DrawingBoard * @class annieUI.DrawingBoard
* @public * @public
...@@ -707,8 +662,26 @@ declare namespace annieUI { ...@@ -707,8 +662,26 @@ declare namespace annieUI {
* @since 1.1.1 * @since 1.1.1
*/ */
drawHeight: number; drawHeight: number;
/**
* 总步数数据
* @property totalStepList
* @protected
* @type {any[]}
*/
protected totalStepList: any; protected totalStepList: any;
/**
* 单步数据
* @protected
* @property addStepObj
* @type {Object}
*/
protected addStepObj: any; protected addStepObj: any;
/**
* 当前步数所在的id
* @property currentStepId
* @protected
* @type {number}
*/
protected currentStepId: number; protected currentStepId: number;
/** /**
* 构造函数 * 构造函数
...@@ -738,11 +711,9 @@ declare namespace annieUI { ...@@ -738,11 +711,9 @@ declare namespace annieUI {
* @since 1.1.1 * @since 1.1.1
*/ */
cancel(step?: number): boolean; cancel(step?: number): boolean;
destroy(): void;
} }
} }
/**
* Created by anlun on 2017/5/24.
*/
/** /**
* @module annieUI * @module annieUI
*/ */
...@@ -751,7 +722,7 @@ declare namespace annieUI { ...@@ -751,7 +722,7 @@ declare namespace annieUI {
* 刮刮卡类 * 刮刮卡类
* @class annieUI.ScratchCard * @class annieUI.ScratchCard
* @public * @public
* @extends annieUI.DrawingBoard * @extends annie.DrawingBoard
* @since 1.1.1 * @since 1.1.1
*/ */
class ScratchCard extends DrawingBoard { class ScratchCard extends DrawingBoard {
...@@ -779,13 +750,14 @@ declare namespace annieUI { ...@@ -779,13 +750,14 @@ declare namespace annieUI {
reset(backColorObj?: any): void; reset(backColorObj?: any): void;
/** /**
* 撤销步骤 没有任何功能,只是把从基类中的代码移除,调用不会产生任何效果 * 撤销步骤 没有任何功能,只是把从基类中的代码移除,调用不会产生任何效果
* method cancel * @method cancel
* @param step * @param step
* @public * @public
* @since 1.1.1 * @since 1.1.1
* @returns {boolean} * @return {boolean}
*/ */
cancel(step?: number): boolean; cancel(step?: number): boolean;
drawRadius: number; drawRadius: number;
destroy(): void;
} }
} }
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
var Sprite = annie.Sprite;
var Shape = annie.Shape;
/**
* 滚动视图,有些时候你的内容超过了一屏,需要上下或者左右滑动来查看内容,这个时候,你就应该用它了
* @class annieUI.ScrollPage
* @public
* @extends annie.Sprite
* @since 1.0.0
*/
var ScrollPage = (function (_super) {
__extends(ScrollPage, _super);
/**
* 构造函数
* @method ScrollPage
* @param {number} vW 可视区域宽
* @param {number} vH 可视区域高
* @param {number} maxDistance 最大滚动的长度
* @param {boolean} isVertical 是纵向还是横向,也就是说是滚x还是滚y,默认值为沿y方向滚动
* @example
* s.sPage=new annie.ScrollPage(640,s.stage.viewRect.height,4943);
* s.addChild(s.sPage);
* s.sPage.view.addChild(new home.Content());
* s.sPage.y=s.stage.viewRect.y;
* s.sPage.mouseEnable=false;
* <p><a href="https://github.com/flash2x/demo3" target="_blank">测试链接</a></p>
*/
function ScrollPage(vW, vH, maxDistance, isVertical) {
if (isVertical === void 0) { isVertical = true; }
_super.call(this);
/**
* 横向还是纵向 默认为纵向
* @property isVertical
* @type {boolean}
* @protected
* @since 1.0.0
* @default true
*/
this.isVertical = true;
/**
* 可见区域的宽
* @property viewWidth
* @type {number}
* @protected
* @since 1.0.0
* @default 0
*/
this.viewWidth = 0;
/**
* 可见区域的高
* @property viewHeight
* @type {number}
* @protected
* @since 1.0.0
* @default 0
*/
this.viewHeight = 0;
this._tweenId = 0;
/**
* 整个滚动的最大距离值
* @property maxDistance
* @type {number}
* @public
* @since 1.0.0
* @default 1040
*/
this.maxDistance = 1040;
/**
* @property 滚动距离
* @type {number}
* @protected
* @default 0
* @since 1.0.0
*/
this.distance = 0;
/**
* 最小鼠标滑动距离
* @property minDis
* @protected
* @type {number}
*/
this.minDis = 2;
// 遮罩对象
this.maskObj = new Shape();
/**
* 真正的容器对象,所有滚动的内容都应该是添加到这个容器中
* @property view
* @public
* @since 1.0.0
* @type {annie.Sprite}
*/
this.view = new Sprite();
// 最后鼠标经过的坐标值
this.lastValue = 0;
/**
* 速度
* @property speed
* @protected
* @since 1.0.0
* @type {number}
*/
this.speed = 0;
/**
* 加速度
* @property addSpeed
* @protected
* @since 1.0.0
* @type {number}
*/
this.addSpeed = 0;
/**
* 是否是停止滚动状态
* @property isStop
* @public
* @since 1.0.0
* @type {boolean}
* @default true
*/
this.isStop = true;
/**
* 滚动的最大速度,直接影响一次滑动之后最长可以滚多远
* @property maxSpeed
* @public
* @since 1.0.0
* @default 100
* @type {number}
*/
this.maxSpeed = 100;
/**
* 摩擦力,值越大,减速越快
* @property fSpeed
* @public
* @since 1.0.0
* @default 20
* @type {number}
*/
this.fSpeed = 20;
this.paramXY = "y";
this.stopTimes = -1;
this.isMouseDownState = 0;
//是否是通过scrollTo方法在滑动中
this.autoScroll = false;
var s = this;
s._instanceType = "annie.ScrollPage";
s.addChild(s.maskObj);
s.addChild(s.view);
s.view.mask = s.maskObj;
s.maskObj["_isUseToMask"] = 0;
s.maskObj.alpha = 0;
s.maxDistance = maxDistance;
s.setViewRect(vW, vH, isVertical);
var mouseEvent = s.onMouseEvent.bind(s);
s.addEventListener(annie.MouseEvent.MOUSE_DOWN, mouseEvent);
s.addEventListener(annie.MouseEvent.MOUSE_MOVE, mouseEvent);
s.addEventListener(annie.MouseEvent.MOUSE_UP, mouseEvent);
s.addEventListener(annie.MouseEvent.MOUSE_OUT, mouseEvent);
s.addEventListener(annie.Event.ENTER_FRAME, function () {
var view = s.view;
if (s.autoScroll)
return;
if (!s.isStop) {
if (Math.abs(s.speed) > 0) {
view[s.paramXY] += s.speed;
//是否超过了边界,如果超过了,则加快加速度,让其停止
if (view[s.paramXY] > 0 || view[s.paramXY] < s.distance - s.maxDistance) {
s.speed += s.addSpeed * s.fSpeed;
}
else {
s.speed += s.addSpeed;
}
//说明超过了界线,准备回弹
if (s.speed * s.addSpeed > 0) {
s.dispatchEvent("onScrollStop");
s.speed = 0;
}
}
else {
//检测是否超出了边界,如果超出了边界则回弹
if (s.addSpeed != 0) {
if (view[s.paramXY] > 0 || view[s.paramXY] < s.distance - s.maxDistance) {
var tarP = 0;
if (s.addSpeed > 0) {
if (s.distance < s.maxDistance) {
tarP = s.distance - s.maxDistance;
}
}
view[s.paramXY] += 0.4 * (tarP - view[s.paramXY]);
if (Math.abs(tarP - view[s.paramXY]) < 0.1) {
s.isStop = true;
if (s.addSpeed > 0) {
s.dispatchEvent("onScrollToEnd");
}
else {
s.dispatchEvent("onScrollToHead");
}
}
}
}
else {
s.isStop = true;
}
}
}
else {
if (s.stopTimes >= 0) {
s.stopTimes++;
if (s.stopTimes >= 15) {
s.speed = 0;
if (view[s.paramXY] > 0 || view[s.paramXY] < s.distance - s.maxDistance) {
s.isStop = false;
s.stopTimes = -1;
}
}
}
}
});
}
/**
* 设置可见区域,可见区域的坐标始终在本地坐标中0,0点位置
* @method setViewRect
* @param {number}w 设置可见区域的宽
* @param {number}h 设置可见区域的高
* @param {boolean} isVertical 方向
* @public
* @since 1.1.1
*/
ScrollPage.prototype.setViewRect = function (w, h, isVertical) {
var s = this;
s.maskObj.clear();
s.maskObj.beginFill("#000000");
s.maskObj.drawRect(0, 0, w, h);
s.viewWidth = w;
s.viewHeight = h;
s.maskObj.endFill();
s.isVertical = isVertical;
if (isVertical) {
s.distance = s.viewHeight;
s.paramXY = "y";
}
else {
s.distance = s.viewWidth;
s.paramXY = "x";
}
s.isVertical = isVertical;
};
ScrollPage.prototype.onMouseEvent = function (e) {
var s = this;
var view = s.view;
// if (s.distance < s.maxDistance) {
if (e.type == annie.MouseEvent.MOUSE_DOWN) {
if (!s.isStop) {
s.isStop = true;
}
if (s.autoScroll) {
s.autoScroll = false;
annie.Tween.kill(s._tweenId);
}
if (s.isVertical) {
s.lastValue = e.localY;
}
else {
s.lastValue = e.localX;
}
s.speed = 0;
s.isMouseDownState = 1;
}
else if (e.type == annie.MouseEvent.MOUSE_MOVE) {
if (s.isMouseDownState < 1)
return;
if (s.isMouseDownState == 1) {
s.dispatchEvent("onScrollStart");
}
s.isMouseDownState = 2;
var currentValue = void 0;
if (s.isVertical) {
currentValue = e.localY;
}
else {
currentValue = e.localX;
}
s.speed = currentValue - s.lastValue;
if (s.speed > s.minDis) {
s.addSpeed = -2;
if (s.speed > s.maxSpeed) {
s.speed = s.maxSpeed;
}
}
else if (s.speed < -s.minDis) {
if (s.speed < -s.maxSpeed) {
s.speed = -s.maxSpeed;
}
s.addSpeed = 2;
}
else {
s.speed = 0;
}
if (s.speed != 0) {
var speedPer = 1;
if (view[s.paramXY] > 0 || view[s.paramXY] < s.distance - s.maxDistance) {
speedPer = 0.2;
}
view[s.paramXY] += (currentValue - s.lastValue) * speedPer;
}
s.lastValue = currentValue;
s.stopTimes = 0;
}
else {
s.isStop = false;
s.stopTimes = -1;
if (s.speed == 0 && s.isMouseDownState == 2) {
s.dispatchEvent("onScrollStop");
}
s.isMouseDownState = 0;
}
// }
};
/**
* 滚到指定的坐标位置
* @method scrollTo
* @param {number} dis 需要去到的位置
* @param {number} time 滚动需要的时间 默认为0 即没有动画效果直接跳到指定页
* @since 1.1.1
* @public
*/
ScrollPage.prototype.scrollTo = function (dis, time) {
if (time === void 0) { time = 0; }
var s = this;
var newDis = s.paramXY == "x" ? s.viewWidth : s.viewHeight;
if (dis < 0) {
dis = 0;
}
else if (dis > s.maxDistance - newDis) {
dis = s.maxDistance - newDis;
}
if (time > 0) {
if (Math.abs(s.view[s.paramXY] + dis) > 2) {
s.autoScroll = true;
s.isStop = true;
s.isMouseDownState = 0;
var obj = {};
obj.onComplete = function () {
s.autoScroll = false;
};
obj[s.paramXY] = -dis;
s._tweenId = annie.Tween.to(s.view, time, obj);
if (s.speed == 0) {
s.dispatchEvent("onScrollStart");
}
}
}
else {
s.view[s.paramXY] = -dis;
}
};
ScrollPage.prototype.destroy = function () {
var s = this;
s.maskObj = null;
s.view = null;
_super.prototype.destroy.call(this);
};
return ScrollPage;
}(Sprite));
annieUI.ScrollPage = ScrollPage;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
var Sprite = annie.Sprite;
/**
* <h4><font color="red">小游戏不支持 小程序不支持</font></h4>
* 有时我们需要从外部获取一张个人头像,将它变成方形或者圆形展示出来。
* 又希望他能按照我们的尺寸展示,这个时候你就需要用到FacePhoto类啦。
* @class annieUI.FacePhoto
* @public
* @extends annie.Sprite
* @since 1.0.0
*/
var FacePhoto = (function (_super) {
__extends(FacePhoto, _super);
/**
* 构造函数
* @method FacePhoto
* @since 1.0.0
* @public
* @example
* var circleface = new annie.FacePhoto(),
* rectFace=new annie.FacePhoto();
* //圆形头像
* circleface.init('http://test.annie2x.com/biglong/logo.jpg', 100, 0);
* circleface.x = 260;
* circleface.y = 100;
* s.addChild(circleface);
* //方形头像
* rectFace.init('http://test.annie2x.com/biglong/logo.jpg', 200, 1);
* rectFace.x = 260;
* rectFace.y = 400;
* s.addChild(rectFace);
*/
function FacePhoto() {
_super.call(this);
this.maskType = 0;
var s = this;
s._instanceType = "annie.FacePhoto";
s.photo = new Image();
s.bitmap = new annie.Bitmap();
s.maskObj = new annie.Shape();
s.photo.onload = function (e) {
s.bitmap.bitmapData = s.photo;
s.maskObj.clear();
s.maskObj.beginFill("#000000");
var scale = s.radio / (s.photo.width < s.photo.height ? s.photo.width : s.photo.height);
s.bitmap.scaleX = s.bitmap.scaleY = scale;
s.bitmap.x = (s.radio - s.photo.width * scale) >> 1;
s.bitmap.y = (s.radio - s.photo.height * scale) >> 1;
if (s.maskType == 0) {
s.maskObj.drawCircle(s.radio >> 1, s.radio >> 1, s.radio >> 1);
}
else {
s.maskObj.drawRect(0, 0, s.radio, s.radio);
}
s.maskObj.endFill();
s.dispatchEvent("onComplete");
};
s.addChild(s.bitmap);
s.addChild(s.maskObj);
s.bitmap.mask = s.maskObj;
}
/**
* 被始化头像,可反复调用设置不同的遮罩类型或者不同的头像地址
* @method init
* @param {string} src 头像的地址
* @param {number} radio 指定头像的长宽或者直径
* @param {number} maskType 遮罩类型,是圆形遮罩还是方形遮罩 0 圆形 1方形 默认是0
*/
FacePhoto.prototype.init = function (src, radio, maskType) {
if (radio === void 0) { radio = 0; }
if (maskType === void 0) { maskType = 0; }
var s = this;
s.radio = radio;
if (s.photo.src != src)
s.photo.src = src;
if (s.maskType != maskType)
s.maskType = maskType;
};
FacePhoto.prototype.destroy = function () {
var s = this;
s.bitmap = null;
s.photo = null;
s.maskObj = null;
_super.prototype.destroy.call(this);
};
return FacePhoto;
}(Sprite));
annieUI.FacePhoto = FacePhoto;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
var Sprite = annie.Sprite;
/**
* 滑动页面类
* @class annieUI.SlidePage
* @public
* @extends annie.Sprite
* @since 1.0.0
*/
var SlidePage = (function (_super) {
__extends(SlidePage, _super);
/**
* 构造函数
* @method SlidePage
* @param {number} vW 宽
* @param {number} vH 高
* @param {boolean} isVertical 是横向还是纵向 默认纵向
* @param {Function} ease annie.Tween的缓存函数,也可以是自定义的缓动函数,自定义的话,请尊守annie.Tween缓动函数接口
*/
function SlidePage(vW, vH, isVertical, ease) {
if (isVertical === void 0) { isVertical = true; }
if (ease === void 0) { ease = null; }
_super.call(this);
/**
* 页面个数
* @property listLen
* @type {number}
* @protected
* @default 0
*/
this.listLen = 0;
/**
* 页面滑动容器
* @property view
* @type {annie.Sprite}
* @since 1.1.0
* @public
*/
this.view = new annie.Sprite();
this.maskObj = new annie.Shape();
/**
* 容器活动速度
* @property slideSpeed
* @type {number}
* @public
* @default 0.2
*/
this.slideSpeed = 0.2;
//是否滑动中断
this._isBreak = false;
/**
* 滚动距离
* @property distance
* @type {number}
* @protected
* @default 0
* @since 1.0.0
*/
this.distance = 0;
//触摸点结束点X
this.touchEndX = 0;
this.movingX = 0;
this.movingY = 0;
this._moveDis = 0;
//触摸点结束点Y
this.touchEndY = 0;
/**
* 当前页面索引ID 默认从0开始
* @property currentPageIndex
* @type {number}
* @public
* @since 1.0.3
* @default 0
*/
this.currentPageIndex = 0;
//上下的回弹率
this.reBound = 0.3;
//页面是否滑动跟随
this.isPageFollowToMove = false;
//页面的跟率
this.follow = 0.7;
/**
* 页面是否移动
* @property isMoving
* @type {boolean}
* @public
* @default false
* @public
*/
this.isMoving = false;
/**
* 页面宽
* @property viewWidth
* @type {number}
* @protected
*/
this.viewWidth = 0;
/**
* 页面高
* @property viewHeight
* @type {number}
* @protected
*/
this.viewHeight = 0;
/**
* 页面列表
* @property pageList
* @type {Array}
* @public
*/
this.pageList = [];
this.pageClassList = [];
this.lastX = 0;
this.lastY = 0;
/**
* 是否点击了鼠标
* @property isMouseDown
* @type {boolean}
* @public
*/
this.isMouseDown = false;
/**
* 是否可以下一页
* @property canSlideNext
* @since 1.0.3
* @default true
* @type {boolean}
* @public
*/
this.canSlideNext = true;
/**
* 是否可以上一页
* @property canSlidePrev
* @type {boolean}
* @public
* @default true
*/
this.canSlidePrev = true;
this.paramXY = "y";
var s = this;
s.isVertical = isVertical;
s._ease = ease;
if (isVertical) {
s.paramXY = "y";
s.distance = vH;
}
else {
s.paramXY = "x";
s.distance = vW;
}
s.addChild(s.maskObj);
s.addChild(s.view);
s.view.mask = s.maskObj;
s.maskObj["_isUseToMask"] = 0;
s.maskObj.alpha = 0;
s.setMask(vW, vH);
var me = s.onMouseEvent.bind(s);
s.addEventListener(annie.MouseEvent.MOUSE_DOWN, me);
s.addEventListener(annie.MouseEvent.MOUSE_MOVE, me);
s.addEventListener(annie.MouseEvent.MOUSE_UP, me);
}
/**
* 设置可见区域,可见区域的坐标始终在本地坐标中0,0点位置
* @method setMask
* @param {number}w 设置可见区域的宽
* @param {number}h 设置可见区域的高
* @public
* @since 1.0.0
*/
SlidePage.prototype.setMask = function (w, h) {
var s = this;
s.maskObj.clear();
s.maskObj.beginFill("#000000");
s.maskObj.drawRect(0, 0, w, h);
s.viewWidth = w;
s.viewHeight = h;
s.maskObj.endFill();
};
//触摸事件 onMouseEvent
SlidePage.prototype.onMouseEvent = function (e) {
var s = this;
if (s.isMoving)
return;
if (e.type == annie.MouseEvent.MOUSE_DOWN) {
s.touchEndX = e.localX;
s.touchEndY = e.localY;
s.movingX = s.movingY = 0;
s.isMouseDown = true;
s._isBreak = false;
s.lastX = e.localX;
s.lastY = e.localY;
s._moveDis = 0;
}
else if (e.type == annie.MouseEvent.MOUSE_MOVE) {
if (!s.isMouseDown)
return;
var mx = e.localX - s.touchEndX;
var my = e.localY - s.touchEndY;
var ts = my;
var fts = mx;
var lts = s.movingY;
s._moveDis = s.lastY - e.localY;
s.movingX = mx;
s.movingY = my;
if (!s.isVertical) {
ts = mx;
fts = my;
lts = s.movingX;
s._moveDis = s.lastX - e.localX;
}
if (Math.abs(ts) > Math.abs(fts)) {
if (!s.isPageFollowToMove) {
if (Math.abs(ts) - Math.abs(lts) < -1) {
s._isBreak = true;
}
}
if (ts > 0) {
if (s.currentPageIndex == 0) {
s.view[s.paramXY] -= s._moveDis * s.reBound;
}
else {
if (s.isPageFollowToMove) {
s.view[s.paramXY] -= s._moveDis * s.follow;
var nextId = s.currentPageIndex - 1;
if (!s.pageList[nextId]) {
s.pageList[nextId] = new s.pageClassList[nextId]();
}
if (s.pageList[nextId].parent != s.view) {
s.view.addChild(s.pageList[nextId]);
s.pageList[nextId][s.paramXY] = nextId * s.distance;
}
}
}
}
else if (ts < 0) {
if (s.currentPageIndex == s.listLen - 1) {
s.view[s.paramXY] -= s._moveDis * s.reBound;
}
else {
if (s.isPageFollowToMove) {
s.view[s.paramXY] -= s._moveDis * s.follow;
var nextId = s.currentPageIndex + 1;
if (!s.pageList[nextId]) {
s.pageList[nextId] = new s.pageClassList[nextId]();
}
if (s.pageList[nextId].parent != s.view) {
s.view.addChild(s.pageList[nextId]);
s.pageList[nextId][s.paramXY] = nextId * s.distance;
}
}
}
}
}
else {
s.movingX = s.movingY = 0;
}
s.lastX = e.localX;
s.lastY = e.localY;
}
else if (e.type == annie.MouseEvent.MOUSE_UP) {
if (!s.isMouseDown)
return;
var ts = s.movingY;
var fts = s.movingX;
s.isMouseDown = false;
if (!s.isVertical) {
ts = s.movingX;
fts = s.movingY;
}
if ((s.currentPageIndex == 0 && s.view[s.paramXY] > 0) || (s.currentPageIndex == (s.listLen - 1) && s.view[s.paramXY] < -s.currentPageIndex * s.distance)) {
var tweenData = {};
tweenData[s.paramXY] = -s.currentPageIndex * s.distance;
if (s._ease) {
tweenData.ease = s._ease;
}
annie.Tween.to(s.view, s.slideSpeed * s.reBound, tweenData);
}
else {
var id = s.currentPageIndex;
if (!s.isPageFollowToMove) {
if (Math.abs(ts) > 100 && !s._isBreak) {
s.slideTo(ts < 0 ? id + 1 : id - 1);
}
}
else {
if (Math.abs(s._moveDis) > 5 || Math.abs(ts * s.follow << 1) >= s.distance) {
s.slideTo(ts < 0 ? id + 1 : id - 1);
}
else {
var where = -s.currentPageIndex * s.distance;
if (where == s.view[s.paramXY])
return;
s.view.mouseEnable = false;
s.isMoving = true;
var tweenData = {};
tweenData[s.paramXY] = where;
if (s._ease) {
tweenData.ease = s._ease;
}
tweenData.onComplete = function () {
s.view.mouseEnable = true;
s.isMoving = false;
if (s.currentPageIndex > 0 && s.pageList[s.currentPageIndex - 1] && s.pageList[s.currentPageIndex - 1].parent == s.view) {
s.view.removeChild(s.pageList[s.currentPageIndex - 1]);
}
if (s.currentPageIndex < (s.listLen - 1) && s.pageList[s.currentPageIndex + 1] && s.pageList[s.currentPageIndex + 1].parent == s.view) {
s.view.removeChild(s.pageList[s.currentPageIndex + 1]);
}
};
annie.Tween.to(s.view, s.slideSpeed * 0.5, tweenData);
}
}
}
}
};
/**
* 滑动到指定页
* @method slideTo
* @public
* @since 1.1.1
* @param {number} index 要跳到页的索引
* @param {boolean} noTween 是否需要动画过渡,如果不需要设置成true
*/
SlidePage.prototype.slideTo = function (index, noTween) {
if (noTween === void 0) { noTween = false; }
var s = this;
if (s.isMoving || s.currentPageIndex == index) {
return;
}
var lastId = s.currentPageIndex;
var isNext = s.currentPageIndex < index ? true : false;
if (isNext) {
if (index < s.listLen && s.canSlideNext) {
s.currentPageIndex = index;
}
else {
return;
}
}
else {
if (index >= 0 && s.canSlidePrev) {
s.currentPageIndex = index;
}
else {
return;
}
}
if (!s.pageList[s.currentPageIndex]) {
s.pageList[s.currentPageIndex] = new s.pageClassList[s.currentPageIndex]();
}
s.pageList[s.currentPageIndex][s.paramXY] = s.currentPageIndex * s.distance;
if (isNext) {
s.pageList[lastId][s.paramXY] = (s.currentPageIndex - 1) * s.distance;
}
else {
s.pageList[lastId][s.paramXY] = (s.currentPageIndex + 1) * s.distance;
}
if (!s.isPageFollowToMove) {
s.view[s.paramXY] = -s.pageList[lastId][s.paramXY];
}
if (s.pageList[s.currentPageIndex] != s.view) {
s.view.addChild(s.pageList[s.currentPageIndex]);
}
if (noTween) {
s.dispatchEvent("onSlideStart", { currentPage: s.currentPageIndex, lastPage: lastId });
s.view[s.paramXY] = -s.currentPageIndex * s.distance;
s.view.removeChild(s.pageList[lastId]);
s.dispatchEvent("onSlideEnd");
}
else {
s.view.mouseEnable = false;
s.isMoving = true;
var tweenData = {};
tweenData[s.paramXY] = -s.currentPageIndex * s.distance;
if (s._ease) {
tweenData.ease = s._ease;
}
tweenData.onComplete = function () {
s.view.mouseEnable = true;
s.isMoving = false;
s.view.removeChild(s.pageList[lastId]);
s.dispatchEvent("onSlideEnd");
};
annie.Tween.to(s.view, s.slideSpeed, tweenData);
s.dispatchEvent("onSlideStart", { currentPage: s.currentPageIndex, lastPage: lastId });
}
};
/**
* 用于插入分页
* @method addPageList
* @param {Array} classList 每个页面的类,注意是类,不是对象
* @since 1.0.3
* @public
*/
SlidePage.prototype.addPageList = function (classList) {
var s = this;
s.pageClassList = s.pageClassList.concat(classList);
if (s.listLen == 0 && s.pageClassList.length > 0) {
var pageFirst = new s.pageClassList[0]();
s.pageList.push(pageFirst);
s.view.addChild(pageFirst);
}
s.listLen = s.pageClassList.length;
};
SlidePage.prototype.destroy = function () {
var s = this;
s.pageList = null;
s.pageClassList = null;
_super.prototype.destroy.call(this);
};
return SlidePage;
}(Sprite));
annieUI.SlidePage = SlidePage;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
var Sprite = annie.Sprite;
var Shape = annie.Shape;
var Event = annie.Event;
var MouseEvent = annie.MouseEvent;
var Point = annie.Point;
/**
* 电子杂志组件类
* @class annieUI.FlipBook
* @public
* @extends annie.Sprite
* @since 1.0.3
*/
var FlipBook = (function (_super) {
__extends(FlipBook, _super);
/**
* 初始化电子杂志
* @method FlipBook
* @param {number} width 单页宽
* @param {number} height 单页高
* @param {number} pageCount 总页数,一般为偶数
* @param {Function} getPageCallBack,通过此回调获取指定页的内容的显示对象
* @since 1.0.3
*/
function FlipBook(width, height, pageCount, getPageCallBack) {
_super.call(this);
//可设置或可调用接口,页数以单页数计算~
/**
* 总页数
* @property totalPage
* @type {number}
*/
this.totalPage = 0;
/**
* 当前页数
* @property
* @type {number}
* @since 1.0.3
*/
this.currPage = 0;
/**
* 翻页速度,0-1之间,值越小,速度越快
* @property
* @since 1.1.3
* @type {number}
*/
this.speed = 0.4;
this.state = "stop";
this.timerArg0 = 0;
this.timerArg1 = 0;
this.px = 0;
this.py = 0;
this.rPage0 = new Sprite();
this.rPage1 = new Sprite();
this.pageMC = new Sprite();
this.leftPage = null;
this.rightPage = null;
this.rMask0 = new Shape();
this.rMask1 = new Shape();
this.shadow0 = new Shape();
this.shadow1 = new Shape();
this.sMask0 = new Shape();
this.sMask1 = new Shape();
this.pages = [];
this.stageMP = new Point();
/**
* 指定是否能够翻页动作
* @property canFlip
* @since 1.0.3
* @type {boolean}
*/
this.canFlip = true;
var s = this;
s._instanceType = "annie.FlipBook";
s.getPageCallback = getPageCallBack;
s.bW = width;
s.bH = height;
s.totalPage = pageCount;
s.currPage = s.toPage = 0;
s.crossGap = Math.sqrt(s.bW * s.bW + s.bH * s.bH);
s.p1 = new Point(0, 0);
s.p2 = new Point(0, s.bH);
s.p3 = new Point(s.bW + s.bW, 0);
s.p4 = new Point(s.bW + s.bW, s.bH);
s.limitP1 = new Point(s.bW, 0);
s.limitP2 = new Point(s.bW, s.bH);
s.toPosArr = [s.p3, s.p4, s.p1, s.p2];
s.myPosArr = [s.p1, s.p2, s.p3, s.p4];
s.rPage0.mouseEnable = false;
s.rPage1.mouseEnable = false;
s.shadow0.mouseEnable = false;
s.shadow1.mouseEnable = false;
s.setShadowMask(s.shadow0, s.bW * 1.5, s.bH * 3);
s.setShadowMask(s.shadow1, s.bW * 1.5, s.bH * 3);
s.rPage1.mask = s.rMask1;
s.shadow1.mask = s.rMask1;
s.shadow0.mask = s.rMask0;
s.rPage0.mask = s.rMask0;
s.shadow0.visible = false;
s.shadow1.visible = false;
s.addChild(s.pageMC);
s.addChild(s.rPage0);
s.addChild(s.shadow0);
s.addChild(s.rPage1);
s.addChild(s.shadow1);
s.addChild(s.rMask0);
s.addChild(s.rMask1);
s.setPage(s.currPage);
var md = s.onMouseDown.bind(s);
var mu = s.onMouseUp.bind(s);
var mm = s.onMouseMove.bind(s);
var em = s.onEnterFrame.bind(s);
s.addEventListener(annie.Event.ADD_TO_STAGE, function (e) {
s.stage.addEventListener(MouseEvent.MOUSE_DOWN, md);
s.stage.addEventListener(MouseEvent.MOUSE_UP, mu);
s.stage.addEventListener(MouseEvent.MOUSE_MOVE, mm);
s.addEventListener(Event.ENTER_FRAME, em);
});
s.addEventListener(annie.Event.REMOVE_TO_STAGE, function (e) {
s.stage.removeEventListener(MouseEvent.MOUSE_DOWN, md);
s.stage.removeEventListener(MouseEvent.MOUSE_UP, mu);
s.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mm);
s.removeEventListener(Event.ENTER_FRAME, em);
});
}
FlipBook.prototype.drawPage = function (num, movePoint) {
var s = this;
var actionPoint;
var bArr;
if (num == 1) {
movePoint = s.checkLimit(movePoint, s.limitP1, s.bW);
movePoint = s.checkLimit(movePoint, s.limitP2, s.crossGap);
bArr = s.getBookArr(movePoint, s.p1, s.p2);
actionPoint = bArr[1];
s.getLayerArr(movePoint, actionPoint, s.p1, s.p2, s.limitP1, s.limitP2);
s.getShadow(s.shadow0, s.p1, movePoint, 0.5);
s.getShadow(s.shadow1, s.p1, movePoint, 0.45);
s.rPage1.rotation = s.angle(movePoint, actionPoint) + 90;
s.rPage1.x = bArr[3].x;
s.rPage1.y = bArr[3].y;
s.rPage0.x = s.p1.x;
s.rPage0.y = s.p1.y;
}
else if (num == 2) {
movePoint = s.checkLimit(movePoint, s.limitP2, s.bW);
movePoint = s.checkLimit(movePoint, s.limitP1, s.crossGap);
bArr = s.getBookArr(movePoint, s.p2, s.p1);
actionPoint = bArr[1];
s.getLayerArr(movePoint, actionPoint, s.p2, s.p1, s.limitP2, s.limitP1);
s.getShadow(s.shadow0, s.p2, movePoint, 0.5);
s.getShadow(s.shadow1, s.p2, movePoint, 0.45);
s.rPage1.rotation = s.angle(movePoint, actionPoint) - 90;
s.rPage1.x = bArr[2].x;
s.rPage1.y = bArr[2].y;
s.rPage0.x = s.p1.x;
s.rPage0.y = s.p1.y;
}
else if (num == 3) {
movePoint = s.checkLimit(movePoint, s.limitP1, s.bW);
movePoint = s.checkLimit(movePoint, s.limitP2, s.crossGap);
bArr = s.getBookArr(movePoint, s.p3, s.p4);
actionPoint = bArr[1];
s.getLayerArr(movePoint, actionPoint, s.p3, s.p4, s.limitP1, s.limitP2);
s.getShadow(s.shadow0, s.p3, movePoint, 0.5);
s.getShadow(s.shadow1, s.p3, movePoint, 0.4);
s.rPage1.rotation = s.angle(movePoint, actionPoint) + 90;
s.rPage1.x = movePoint.x;
s.rPage1.y = movePoint.y;
s.rPage0.x = s.limitP1.x;
s.rPage0.y = s.limitP1.y;
}
else {
movePoint = s.checkLimit(movePoint, s.limitP2, s.bW);
movePoint = s.checkLimit(movePoint, s.limitP1, s.crossGap);
bArr = s.getBookArr(movePoint, s.p4, s.p3);
actionPoint = bArr[1];
s.getLayerArr(movePoint, actionPoint, s.p4, s.p3, s.limitP2, s.limitP1);
s.getShadow(s.shadow0, s.p4, movePoint, 0.5);
s.getShadow(s.shadow1, s.p4, movePoint, 0.4);
s.rPage1.rotation = s.angle(movePoint, actionPoint) - 90;
s.rPage1.x = actionPoint.x;
s.rPage1.y = actionPoint.y;
s.rPage0.x = s.limitP1.x;
s.rPage0.y = s.limitP1.y;
}
s.getShape(s.rMask1, s.layer1Arr);
s.getShape(s.rMask0, s.layer0Arr);
};
FlipBook.prototype.checkLimit = function (point, limitPoint, limitGap) {
var s = this;
var gap = Math.abs(s.pos(limitPoint, point));
var angle = s.angle(limitPoint, point);
if (gap > limitGap) {
var tmp1 = limitGap * Math.sin((angle / 180) * Math.PI);
var tmp2 = limitGap * Math.cos((angle / 180) * Math.PI);
point = new Point(limitPoint.x - tmp2, limitPoint.y - tmp1);
}
return point;
};
FlipBook.prototype.getPage = function (index) {
var s = this;
if (!s.pages[index - 1]) {
s.pages[index - 1] = s.getPageCallback(index);
}
return s.pages[index - 1];
};
FlipBook.prototype.getBookArr = function (point, actionPoint1, actionPoint2) {
var s = this;
var bArr = [];
var gap1 = Math.abs(s.pos(actionPoint1, point) * 0.5);
var angle1 = s.angle(actionPoint1, point);
var tmp1_2 = gap1 / Math.cos((angle1 / 180) * Math.PI);
var tmpPoint1 = new Point(actionPoint1.x - tmp1_2, actionPoint1.y);
var angle2 = s.angle(point, tmpPoint1) - s.angle(point, actionPoint2);
var gap2 = s.pos(point, actionPoint2);
var tmp2_1 = gap2 * Math.sin((angle2 / 180) * Math.PI);
var tmp2_2 = gap2 * Math.cos((angle2 / 180) * Math.PI);
var tmpPoint2 = new Point(actionPoint1.x + tmp2_2, actionPoint1.y + tmp2_1);
var angle3 = s.angle(tmpPoint1, point);
var tmp3_1 = s.bW * Math.sin((angle3 / 180) * Math.PI);
var tmp3_2 = s.bW * Math.cos((angle3 / 180) * Math.PI);
var tmpPoint3 = new Point(tmpPoint2.x + tmp3_2, tmpPoint2.y + tmp3_1);
var tmpPoint4 = new Point(point.x + tmp3_2, point.y + tmp3_1);
bArr.push(point);
bArr.push(tmpPoint2);
bArr.push(tmpPoint3);
bArr.push(tmpPoint4);
return bArr;
};
FlipBook.prototype.getLayerArr = function (point1, point2, actionPoint1, actionPoint2, limitPoint1, limitPoint2) {
var s = this;
var arrLayer1 = [];
var arrLayer2 = [];
var gap1 = Math.abs(s.pos(actionPoint1, point1) * 0.5);
var angle1 = s.angle(actionPoint1, point1);
var tmp1_1 = gap1 / Math.sin((angle1 / 180) * Math.PI);
var tmp1_2 = gap1 / Math.cos((angle1 / 180) * Math.PI);
var tmpPoint1 = new Point(actionPoint1.x - tmp1_2, actionPoint1.y);
var tmpPoint2 = new Point(actionPoint1.x, actionPoint1.y - tmp1_1);
var tmpPoint3 = point2;
var gap2 = Math.abs(s.pos(point1, actionPoint2));
if (gap2 > s.bH) {
arrLayer1.push(tmpPoint3);
var pos = Math.abs(s.pos(tmpPoint3, actionPoint2) * 0.5);
var tmp3 = pos / Math.cos((angle1 / 180) * Math.PI);
tmpPoint2 = new Point(actionPoint2.x - tmp3, actionPoint2.y);
}
else {
arrLayer2.push(actionPoint2);
}
arrLayer1.push(tmpPoint2);
arrLayer1.push(tmpPoint1);
arrLayer1.push(point1);
s.layer1Arr = arrLayer1;
arrLayer2.push(limitPoint2);
arrLayer2.push(limitPoint1);
arrLayer2.push(tmpPoint1);
arrLayer2.push(tmpPoint2);
s.layer0Arr = arrLayer2;
};
FlipBook.prototype.getShape = function (shape, pointArr) {
var num = pointArr.length;
shape.clear();
shape.beginFill("#000");
shape.moveTo(pointArr[0].x, pointArr[0].y);
for (var i = 1; i < num; i++) {
shape.lineTo(pointArr[i].x, pointArr[i].y);
}
shape.endFill();
};
FlipBook.prototype.setShadowMask = function (shape, g_width, g_height) {
shape.beginLinearGradientFill([-g_width * 0.5, 4, g_width * 0.5, 4], [[0, "#000000", 0], [1, "#000000", 0.6]]);
shape.drawRect(-g_width * 0.5, -g_height * 0.5, g_width * 0.5, g_height);
shape.endFill();
shape.beginLinearGradientFill([-g_width * 0.5, 4, g_width * 0.5, 4], [[1, "#000000", 0], [0, "#000000", 0.6]]);
shape.drawRect(0, -g_height * 0.5, g_width * 0.5, g_height);
shape.endFill();
};
FlipBook.prototype.getShadow = function (shape, point1, point2, arg) {
var myScale;
var myAlpha;
var s = this;
shape.visible = true;
shape.x = point2.x + (point1.x - point2.x) * arg;
shape.y = point2.y + (point1.y - point2.y) * arg;
shape.rotation = s.angle(point1, point2);
myScale = Math.abs(point1.x - point2.x) * 0.5 / s.bW;
myAlpha = 1 - myScale * myScale;
shape.scaleX = myScale + 0.1;
shape.alpha = myAlpha + 0.1;
};
FlipBook.prototype.setPage = function (pageNum) {
var s = this;
if (pageNum > 0 && pageNum <= s.totalPage) {
s.leftPage = s.getPage(pageNum);
s.leftPage.x = s.leftPage.y = 0;
s.pageMC.addChild(s.leftPage);
}
if ((pageNum + 1) > 0 && (pageNum + 1) < s.totalPage) {
s.rightPage = s.getPage(pageNum + 1);
s.rightPage.x = s.bW;
s.rightPage.y = 0;
s.pageMC.addChild(s.rightPage);
}
};
FlipBook.prototype.onMouseDown = function (e) {
var s = this;
if (!s.canFlip || s.state != "stop") {
return;
}
s.stageMP.x = e.clientX;
s.stageMP.y = e.clientY;
var p = s.globalToLocal(s.stageMP);
s.stageMP = p;
s.timerArg0 = s.checkArea(p);
s.timerArg0 = s.timerArg0 < 0 ? -s.timerArg0 : s.timerArg0;
if (s.timerArg0 > 0) {
if ((s.timerArg0 < 3 && s.currPage > 0) || (s.timerArg0 > 2 && s.currPage <= s.totalPage - 2)) {
s.state = "start";
s.flushPage();
s.dispatchEvent("onFlipStart");
}
}
};
FlipBook.prototype.onMouseUp = function (e) {
var s = this;
if (s.state == "start") {
s.stageMP.x = e.clientX;
s.stageMP.y = e.clientY;
var p = s.globalToLocal(s.stageMP);
s.timerArg1 = s.checkArea(p);
s.state = "auto";
s.stageMP = p;
}
};
FlipBook.prototype.onMouseMove = function (e) {
var s = this;
if (s.state == "start") {
s.stageMP.x = e.clientX;
s.stageMP.y = e.clientY;
var p = s.globalToLocal(s.stageMP);
s.stageMP = p;
}
};
FlipBook.prototype.checkArea = function (point) {
var s = this;
var tmpN;
var minX = 0;
var maxX = s.bW + s.bW;
var minY = 0;
var maxY = s.bH;
var areaNum = 50;
if (point.x > minX && point.x <= maxX * 0.5) {
tmpN = (point.y > minY && point.y <= (maxY * 0.5)) ? 1 : (point.y > (maxY * 0.5) && point.y < maxY) ? 2 : 0;
if (point.x <= (minX + areaNum)) {
tmpN = (point.y > minY && point.y <= (minY + areaNum)) ? -1 : (point.y > (maxY - areaNum) && point.y < maxY) ? -2 : tmpN;
}
return tmpN;
}
else if (point.x > (maxX * 0.5) && point.x < maxX) {
tmpN = (point.y > minY && point.y <= (maxY * 0.5)) ? 3 : (point.y > (maxY * 0.5) && point.y < maxY) ? 4 : 0;
if (point.x >= (maxX - areaNum)) {
tmpN = (point.y > minY && point.y <= (minY + areaNum)) ? -3 : (point.y > (maxY - areaNum) && point.y < maxY) ? -4 : tmpN;
}
return tmpN;
}
return 0;
};
/**
* 跳到指定的页数
* @method flipTo
* @param {number} index 跳到指定的页数
* @since 1.0.3
*/
FlipBook.prototype.flipTo = function (index) {
var n;
var s = this;
index = index % 2 == 1 ? index - 1 : index;
n = index - s.currPage;
if (s.state == "stop" && index >= 0 && index <= s.totalPage && n != 0) {
s.timerArg0 = n < 0 ? 1 : 3;
s.timerArg1 = -1;
s.toPage = index > s.totalPage ? s.totalPage : index;
s.state = "auto";
s.flushPage();
}
};
/**
* @method nextPage
* @public
* @since 1.1.1
*/
FlipBook.prototype.nextPage = function () {
this.flipTo(this.currPage + 2);
};
/**
* @method prevPage
* @public
* @since 1.1.1
*/
FlipBook.prototype.prevPage = function () {
this.flipTo(this.currPage - 1);
};
/**
* @method startPage
* @public
* @since 1.1.1
*/
FlipBook.prototype.startPage = function () {
this.flipTo(0);
};
/**
* @method endPage
* @public
* @since 1.1.1
*/
FlipBook.prototype.endPage = function () {
this.flipTo(this.totalPage);
};
FlipBook.prototype.flushPage = function () {
var s = this;
var page0;
var page1;
var myPos = s.myPosArr[s.timerArg0 - 1];
var p = null;
if (s.timerArg0 == 1 || s.timerArg0 == 2) {
s.toPage = s.toPage == s.currPage ? s.currPage - 2 : s.toPage;
page0 = s.currPage;
page1 = s.toPage + 1;
this.pageMC.removeChild(s.leftPage);
if (s.toPage > 0) {
p = s.getPage(s.currPage - 2);
p.x = 0;
s.leftPage = p;
s.pageMC.addChild(p);
}
}
else if (s.timerArg0 == 3 || s.timerArg0 == 4) {
s.toPage = s.toPage == s.currPage ? s.currPage + 2 : s.toPage;
page0 = s.currPage + 1;
page1 = s.toPage;
s.pageMC.removeChild(s.rightPage);
if (s.toPage + 1 < s.totalPage) {
p = s.getPage(s.currPage + 3);
p.x = s.bW;
s.rightPage = p;
s.pageMC.addChild(p);
}
}
s.px = myPos.x;
s.py = myPos.y;
if (page0 > 0 && page0 <= s.totalPage) {
p = s.getPage(page0);
p.x = 0;
p.y = 0;
s.rPage0.addChild(p);
}
if (page1 > 0 && page1 <= s.totalPage) {
p = s.getPage(page1);
p.x = 0;
p.y = 0;
s.rPage1.addChild(p);
}
};
FlipBook.prototype.onEnterFrame = function (e) {
var s = this;
var toPos = s.toPosArr[s.timerArg0 - 1];
var myPos = s.myPosArr[s.timerArg0 - 1];
var tox;
var toy;
var toFlag;
var tmpX;
var tmpY;
var u;
if (s.state == "start") {
u = s.speed;
var p = s.stageMP;
s.px += (p.x - s.px) * u >> 0;
s.py += (p.y - s.py) * u >> 0;
var np = new Point(s.px, s.py);
s.drawPage(s.timerArg0, np);
}
else if (s.state == "auto") {
if (Math.abs(toPos.x - s.px) > s.bW * 1.5 && s.timerArg1 > 0) {
//不处于点翻区域并且翻页不过中线时
tox = myPos.x;
toy = myPos.y;
toFlag = 0;
}
else {
tox = toPos.x;
toy = toPos.y;
toFlag = 1;
}
tmpX = (tox - s.px) >> 0;
tmpY = (toy - s.py) >> 0;
if (s.timerArg1 < 0) {
u = s.speed * 0.7;
s.py = s.arc(s.bW, tmpX, toPos.y);
}
else {
u = s.speed;
s.py = tmpY * u + s.py;
}
s.px = tmpX * u + s.px;
s.drawPage(s.timerArg0, new Point(s.px, s.py));
if (tmpX == 0 && tmpY == 0) {
s.rPage0.removeAllChildren();
s.rPage1.removeAllChildren();
s.shadow0.visible = false;
s.shadow1.visible = false;
s.toPage = toFlag == 0 ? s.currPage : s.toPage;
s.currPage = s.toPage;
s.pageMC.removeAllChildren();
s.setPage(s.currPage);
s.state = "stop";
s.dispatchEvent("onFlipStop");
}
}
};
FlipBook.prototype.arc = function (argR, argN1, argN2) {
var arg = argR * 2;
var r = argR * argR + arg * arg;
var a = Math.abs(argN1) - argR;
return argN2 - (Math.sqrt(r - a * a) - arg);
};
FlipBook.prototype.angle = function (target1, target2) {
var tmpX = target1.x - target2.x;
var tmpY = target1.y - target2.y;
var tmp_angle = Math.atan2(tmpY, tmpX) * 180 / Math.PI;
return tmp_angle < 0 ? tmp_angle + 360 : tmp_angle;
};
FlipBook.prototype.pos = function (target1, target2) {
var tmpX = target1.x - target2.x;
var tmpY = target1.y - target2.y;
var tmpS = Math.sqrt(tmpX * tmpX + tmpY * tmpY);
return target1.x > target2.x ? tmpS : -tmpS;
};
FlipBook.prototype.destroy = function () {
var s = this;
s.layer0Arr = null;
s.layer1Arr = null;
s.toPosArr = null;
s.myPosArr = null;
s.rPage0 = null;
s.rMask0 = null;
s.rMask1 = null;
s.sMask0 = null;
s.sMask1 = null;
s.leftPage = null;
s.rightPage = null;
s.pageMC = null;
s.rightPage = null;
s.shadow0 = null;
s.shadow1 = null;
s.p1 = null;
s.p2 = null;
s.p3 = null;
s.p4 = null;
s.limitP1 = null;
s.limitP2 = null;
s.pages = null;
s.stageMP = null;
s.getPageCallback = null;
_super.prototype.destroy.call(this);
};
return FlipBook;
}(Sprite));
annieUI.FlipBook = FlipBook;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
/**
* 有些时候需要大量的有规则的滚动内容。这个时候就应该用到这个类了
* @class annieUI.ScrollList
* @public
* @extends annieUI.ScrollPage
* @since 1.0.9
*/
var ScrollList = (function (_super) {
__extends(ScrollList, _super);
/**
* 构造函数
* @method ScrollList
* @param {Class} itemClassName 可以做为Item的类
* @param {number} itemWidth item宽
* @param {number} itemHeight item高
* @param {number} vW 列表的宽
* @param {number} vH 列表的高
* @param {boolean} isVertical 是横向滚动还是纵向滚动 默认是纵向
* @param {number} cols 分几列,默认是1列
* @since 1.0.9
*/
function ScrollList(itemClassName, itemWidth, itemHeight, vW, vH, isVertical, cols) {
if (isVertical === void 0) { isVertical = true; }
if (cols === void 0) { cols = 1; }
_super.call(this, vW, vH, 0, isVertical);
this._items = null;
this._isInit = 0;
this.data = [];
this.downL = null;
this._lastFirstId = -1;
var s = this;
s._instanceType = "annie.ScrollList";
s._itemW = itemWidth;
s._itemH = itemHeight;
s._items = [];
s._itemClass = itemClassName;
s._itemCount = 0;
s._cols = cols;
s._updateViewRect();
s.addEventListener(annie.Event.ENTER_FRAME, s.flushData.bind(s));
}
Object.defineProperty(ScrollList.prototype, "loadingView", {
/**
* 获取下拉滚动的loadingView对象
* @property loadingView
* @since 1.0.9
* @return {DisplayObject}
*/
get: function () {
return this.downL;
},
enumerable: true,
configurable: true
});
/**
* 更新列表数据
* @method updateData
* @param {Array} data
* @param {boolean} isReset 是否重置数据列表。
* @since 1.0.9
*/
ScrollList.prototype.updateData = function (data, isReset) {
if (isReset === void 0) { isReset = false; }
var s = this;
if (!s._isInit || isReset) {
s.data = data;
}
else {
s.data = s.data.concat(data);
}
s._isInit = 1;
s._lastFirstId = -1;
s.maxDistance = Math.ceil(s.data.length / s._cols) * s._itemRow;
if (s.downL) {
s.downL[s.paramXY] = Math.max(s.distance, s.maxDistance);
var wh = s.downL.getWH();
s.maxDistance += (s.paramXY == "x" ? wh.width : wh.height);
}
};
ScrollList.prototype.flushData = function () {
var s = this;
if (s._isInit > 0) {
if (s.view._UI.UM || s._isInit == 1) {
s._isInit = 2;
var id = (Math.abs(Math.floor(s.view[s.paramXY] / s._itemRow)) - 1) * s._cols;
id = id < 0 ? 0 : id;
if (id != s._lastFirstId) {
s._lastFirstId = id;
if (id != s._items[0].id) {
for (var r = 0; r < s._cols; r++) {
if (s.speed > 0) {
s._items.unshift(s._items.pop());
}
else {
s._items.push(s._items.shift());
}
}
}
}
for (var i = 0; i < s._itemCount; i++) {
var item = s._items[i];
if (item._a2x_sl_id != id) {
item.initData(s.data[id] ? id : -1, s.data[id]);
item[s.paramXY] = Math.floor(id / s._cols) * s._itemRow;
item[s._disParam] = (id % s._cols) * s._itemCol;
//如果没有数据则隐藏
if (s.data[id]) {
item._a2x_sl_id = id;
item.visible = true;
}
else {
item._a2x_sl_id = -1;
item.visible = false;
}
}
id++;
}
}
}
};
/**
* 设置可见区域,可见区域的坐标始终在本地坐标中0,0点位置
* @method setViewRect
* @param {number}w 设置可见区域的宽
* @param {number}h 设置可见区域的高
* @param {boolean} isVertical 方向
* @public
* @since 1.1.1
*/
ScrollList.prototype.setViewRect = function (w, h, isVertical) {
_super.prototype.setViewRect.call(this, w, h, isVertical);
var s = this;
if (s._itemRow && s._itemCol) {
s._updateViewRect();
}
};
ScrollList.prototype._updateViewRect = function () {
var s = this;
if (s.isVertical) {
s._disParam = "x";
s._itemRow = s._itemH;
s._itemCol = s._itemW;
}
else {
s._disParam = "y";
s._itemRow = s._itemW;
s._itemCol = s._itemH;
}
var newCount = (Math.ceil(s.distance / s._itemRow) + 1) * s._cols;
if (newCount != s._itemCount) {
if (newCount > s._itemCount) {
for (var i = s._itemCount; i < newCount; i++) {
var item = new s._itemClass();
item.id = -1;
item.data = null;
s._items.push(item);
s.view.addChild(item);
}
}
else {
for (var i = 0; i < s._itemCount - newCount; i++) {
s.view.removeChild(s._items.pop());
}
}
s._itemCount = newCount;
s._lastFirstId = -1;
}
};
/**
* 设置加载数据时显示的loading对象
* @since 1.0.9
* @method setLoading
* @param {annie.DisplayObject} downLoading
*/
ScrollList.prototype.setLoading = function (downLoading) {
var s = this;
if (s.downL) {
s.view.removeChild(s.downL);
var wh = s.downL.getWH();
s.maxDistance -= (s.paramXY == "x" ? wh.width : wh.height);
s.downL = null;
}
if (downLoading) {
s.downL = downLoading;
s.view.addChild(downLoading);
s.downL[s.paramXY] = Math.max(s.distance, s.maxDistance);
var wh = s.downL.getWH();
s.maxDistance += (s.paramXY == "x" ? wh.width : wh.height);
}
else {
s.isStop = false;
}
};
ScrollList.prototype.destroy = function () {
var s = this;
s._items = null;
s._itemClass = null;
s.data = null;
s.downL = null;
_super.prototype.destroy.call(this);
};
return ScrollList;
}(annieUI.ScrollPage));
annieUI.ScrollList = ScrollList;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
/**
* <h4><font color="red">小游戏不支持 小程序不支持</font></h4>
* 画板类
* @class annieUI.DrawingBoard
* @public
* @extends annie.Bitmap
* @since 1.1.1
*/
var DrawingBoard = (function (_super) {
__extends(DrawingBoard, _super);
/**
* 构造函数
* @method DrawingBoard
* @param width 画板宽
* @param height 画板高
* @param bgColor 背景色 默认透明
* @since 1.1.1
*/
function DrawingBoard(width, height, bgColor) {
if (bgColor === void 0) { bgColor = ""; }
_super.call(this);
this.context = null;
this._isMouseDown = false;
this._drawRadius = 50;
/**
* 绘画颜色, 可以是任何的颜色类型
* @property drawColor
* @type {string}
* @public
* @since
* @type {any}
*/
this.drawColor = "#ffffff";
/**
* 背景色 可以是任何的颜色类型
* @property bgColor
* @type {any}
* @public
* @since 1.1.1
*/
this.bgColor = "";
/**
* 画板宽
* @property drawWidth
* @type {number}
* @readonly
* @public
* @since 1.1.1
*/
this.drawWidth = 0;
/**
* 画板高
* @property drawHeight
* @type {number}
* @readonly
* @public
* @since 1.1.1
*/
this.drawHeight = 0;
/**
* 总步数数据
* @property totalStepList
* @protected
* @type {any[]}
*/
this.totalStepList = [];
/**
* 当前步数所在的id
* @property currentStepId
* @protected
* @type {number}
*/
this.currentStepId = 0;
var s = this;
var bd = document.createElement("canvas");
bd.width = width;
bd.height = height;
s.context = bd.getContext("2d");
s.context.lineCap = "round";
s.context.lineJoin = "round";
s.bitmapData = bd;
s.drawHeight = height;
s.drawWidth = width;
s.reset(bgColor);
var mouseDown = s.onMouseDown.bind(s);
var mouseMove = s.onMouseMove.bind(s);
var mouseUp = s.onMouseUp.bind(s);
s.addEventListener(annie.MouseEvent.MOUSE_DOWN, mouseDown);
s.addEventListener(annie.MouseEvent.MOUSE_MOVE, mouseMove);
s.addEventListener(annie.MouseEvent.MOUSE_UP, mouseUp);
}
Object.defineProperty(DrawingBoard.prototype, "drawRadius", {
/**
* 绘画半径
* @property drawRadius
* @type {number}
* @public
* @since 1.1.1
*/
get: function () {
return this._drawRadius;
},
set: function (value) {
this._drawRadius = value;
},
enumerable: true,
configurable: true
});
;
DrawingBoard.prototype.onMouseDown = function (e) {
var s = this;
s._isMouseDown = true;
var ctx = s.context;
ctx.beginPath();
ctx.strokeStyle = s.drawColor;
ctx.lineWidth = s._drawRadius;
var lx = e.localX >> 0;
var ly = e.localY >> 0;
ctx.moveTo(lx, ly);
s.addStepObj = {};
s.addStepObj.c = s.drawColor;
s.addStepObj.r = s._drawRadius;
s.addStepObj.sx = lx;
s.addStepObj.sy = ly;
s.addStepObj.ps = [];
};
;
DrawingBoard.prototype.onMouseUp = function (e) {
var s = this;
if (s._isMouseDown) {
s._isMouseDown = false;
if (s.addStepObj.ps && s.addStepObj.ps.length > 0) {
s.currentStepId++;
s.totalStepList.push(s.addStepObj);
}
}
};
;
DrawingBoard.prototype.onMouseMove = function (e) {
var s = this;
if (s._isMouseDown) {
var ctx = s.context;
var lx = e.localX >> 0;
var ly = e.localY >> 0;
ctx.lineTo(lx, ly);
ctx.stroke();
s.addStepObj.ps.push(lx, ly);
}
};
;
/**
* 重置画板
* @method reset
* @param bgColor
* @public
* @since 1.1.1
*/
DrawingBoard.prototype.reset = function (bgColor) {
if (bgColor === void 0) { bgColor = ""; }
var s = this;
if (bgColor != "") {
s.bgColor = bgColor;
}
if (s.bgColor != "") {
s.context.fillStyle = s.bgColor;
s.context.fillRect(0, 0, s.bitmapData.width, s.bitmapData.height);
}
else {
s.context.clearRect(0, 0, s.bitmapData.width, s.bitmapData.height);
}
s.currentStepId = 0;
s.totalStepList = [];
};
/**
* 撤销步骤
* @method cancel
* @param {number} step 撤销几步 0则全部撤销,等同于reset
* @public
* @since 1.1.1
*/
DrawingBoard.prototype.cancel = function (step) {
if (step === void 0) { step = 0; }
var s = this;
if (step == 0) {
s.reset();
}
else {
if (s.currentStepId - step >= 0) {
s.currentStepId -= step;
s.totalStepList.splice(s.currentStepId, step);
if (s.bgColor != "") {
s.context.fillStyle = s.bgColor;
s.context.fillRect(0, 0, s.bitmapData.width, s.bitmapData.height);
}
else {
s.context.clearRect(0, 0, s.bitmapData.width, s.bitmapData.height);
}
var len = s.totalStepList.length;
for (var i = 0; i < len; i++) {
var ctx = s.context;
ctx.beginPath();
ctx.strokeStyle = s.totalStepList[i].c;
ctx.lineWidth = s.totalStepList[i].r;
ctx.moveTo(s.totalStepList[i].sx, s.totalStepList[i].sy);
var ps = s.totalStepList[i].ps;
var pLen = ps.length;
for (var m = 0; m < pLen; m += 2) {
ctx.lineTo(ps[m], ps[m + 1]);
ctx.stroke();
}
}
}
else {
return false;
}
}
return true;
};
DrawingBoard.prototype.destroy = function () {
var s = this;
s.context = null;
s.totalStepList = null;
s.drawColor = null;
s.bgColor = null;
s.addStepObj = null;
_super.prototype.destroy.call(this);
};
return DrawingBoard;
}(annie.Bitmap));
annieUI.DrawingBoard = DrawingBoard;
})(annieUI || (annieUI = {}));
/**
* @module annieUI
*/
var annieUI;
(function (annieUI) {
/**
* 刮刮卡类
* @class annieUI.ScratchCard
* @public
* @extends annie.DrawingBoard
* @since 1.1.1
*/
var ScratchCard = (function (_super) {
__extends(ScratchCard, _super);
/**
* 构造函数
* 请监听 "onDrawTime"事件来判断刮完多少百分比了。
* @method ScratchCard
* @param width 宽
* @param height 高
* @param frontColorObj 没刮开之前的图,可以为单色,也可以为位图填充。一般是用位图填充,如果生成位图填充,请自行复习canvas位图填充
* @param backColorObj 被刮开之后的图,可以为单色,也可以为位图填充。一般是用位图填充,如果生成位图填充,请自行复习canvas位图填充
* @param drawRadius 刮刮卡刮的时候的半径,默认为50
*/
function ScratchCard(width, height, frontColorObj, backColorObj, drawRadius) {
if (drawRadius === void 0) { drawRadius = 50; }
_super.call(this, width, height, frontColorObj);
this._drawList = [];
this._totalDraw = 1;
this._currentDraw = 0;
var s = this;
s.drawColor = backColorObj;
s.drawRadius = drawRadius;
s.addEventListener(annie.MouseEvent.MOUSE_MOVE, function (e) {
if (s._isMouseDown) {
//通过移动,计算刮开的面积
var dw = Math.floor(e.localX / s._drawRadius);
var dh = Math.floor(e.localY / s._drawRadius);
if (s._drawList[dw] && s._drawList[dw][dh]) {
s._drawList[dw][dh] = false;
s._currentDraw++;
//抛事件
var per = Math.floor(s._currentDraw / s._totalDraw * 100);
s.dispatchEvent("onDrawTime", { per: per });
}
}
});
}
/**
* 重置刮刮卡
* @method reset
* @param backColorObj 要更换的被刮出来的图片,不赋值的话默认之前设置的
* @since 1.1.1
* @public
*/
ScratchCard.prototype.reset = function (backColorObj) {
if (backColorObj === void 0) { backColorObj = ""; }
_super.prototype.reset.call(this, backColorObj);
var s = this;
if (s._drawList) {
if (backColorObj != "") {
s.drawColor = backColorObj;
}
s._currentDraw = 0;
var dw = Math.floor(s.drawWidth / s._drawRadius);
var dh = Math.floor(s.drawHeight / s._drawRadius);
s._totalDraw = dw * dh;
for (var i = 0; i < dw; i++) {
s._drawList[i] = [];
for (var j = 0; j < dh; j++) {
s._drawList[i][j] = true;
}
}
}
};
/**
* 撤销步骤 没有任何功能,只是把从基类中的代码移除,调用不会产生任何效果
* @method cancel
* @param step
* @public
* @since 1.1.1
* @return {boolean}
*/
ScratchCard.prototype.cancel = function (step) {
if (step === void 0) { step = 0; }
console.log("no support");
return false;
};
Object.defineProperty(ScratchCard.prototype, "drawRadius", {
set: function (value) {
var s = this;
s._drawRadius = value;
var dw = Math.floor(s.drawWidth / value);
var dh = Math.floor(s.drawHeight / value);
s._totalDraw = dw * dh;
for (var i = 0; i < dw; i++) {
s._drawList[i] = [];
for (var j = 0; j < dh; j++) {
s._drawList[i][j] = true;
}
}
},
enumerable: true,
configurable: true
});
ScratchCard.prototype.destroy = function () {
var s = this;
s._drawList = null;
_super.prototype.destroy.call(this);
};
return ScratchCard;
}(annieUI.DrawingBoard));
annieUI.ScratchCard = ScratchCard;
})(annieUI || (annieUI = {}));
var __extends=this&&this.__extends||function(e,t){function a(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)},annieUI;!function(e){var t=annie.Sprite,a=annie.Shape,i=function(e){function i(i,n,s,o){void 0===o&&(o=!0),e.call(this),this.isVertical=!0,this.viewWidth=0,this.viewHeight=0,this._tweenId=0,this.maxDistance=1040,this.distance=0,this.minDis=2,this.maskObj=new a,this.view=new t,this.lastValue=0,this.speed=0,this.addSpeed=0,this.isStop=!0,this.maxSpeed=100,this.fSpeed=20,this.paramXY="y",this.stopTimes=-1,this.isMouseDownState=0,this.autoScroll=!1;var r=this;r._instanceType="annie.ScrollPage",r.addChild(r.maskObj),r.addChild(r.view),r.view.mask=r.maskObj,r.maskObj._isUseToMask=0,r.maskObj.alpha=0,r.maxDistance=s,r.setViewRect(i,n,o);var l=r.onMouseEvent.bind(r);r.addEventListener(annie.MouseEvent.MOUSE_DOWN,l),r.addEventListener(annie.MouseEvent.MOUSE_MOVE,l),r.addEventListener(annie.MouseEvent.MOUSE_UP,l),r.addEventListener(annie.MouseEvent.MOUSE_OUT,l),r.addEventListener(annie.Event.ENTER_FRAME,function(){var e=r.view;if(!r.autoScroll)if(r.isStop)r.stopTimes>=0&&++r.stopTimes>=15&&(r.speed=0,(e[r.paramXY]>0||e[r.paramXY]<r.distance-r.maxDistance)&&(r.isStop=!1,r.stopTimes=-1));else if(Math.abs(r.speed)>0)e[r.paramXY]+=r.speed,e[r.paramXY]>0||e[r.paramXY]<r.distance-r.maxDistance?r.speed+=r.addSpeed*r.fSpeed:r.speed+=r.addSpeed,r.speed*r.addSpeed>0&&(r.dispatchEvent("onScrollStop"),r.speed=0);else if(0!=r.addSpeed){if(e[r.paramXY]>0||e[r.paramXY]<r.distance-r.maxDistance){var t=0;r.addSpeed>0&&r.distance<r.maxDistance&&(t=r.distance-r.maxDistance),e[r.paramXY]+=.4*(t-e[r.paramXY]),Math.abs(t-e[r.paramXY])<.1&&(r.isStop=!0,r.addSpeed>0?r.dispatchEvent("onScrollToEnd"):r.dispatchEvent("onScrollToHead"))}}else r.isStop=!0})}return __extends(i,e),i.prototype.setViewRect=function(e,t,a){var i=this;i.maskObj.clear(),i.maskObj.beginFill("#000000"),i.maskObj.drawRect(0,0,e,t),i.viewWidth=e,i.viewHeight=t,i.maskObj.endFill(),i.isVertical=a,a?(i.distance=i.viewHeight,i.paramXY="y"):(i.distance=i.viewWidth,i.paramXY="x"),i.isVertical=a},i.prototype.onMouseEvent=function(e){var t=this,a=t.view;if(e.type==annie.MouseEvent.MOUSE_DOWN)t.isStop||(t.isStop=!0),t.autoScroll&&(t.autoScroll=!1,annie.Tween.kill(t._tweenId)),t.isVertical?t.lastValue=e.localY:t.lastValue=e.localX,t.speed=0,t.isMouseDownState=1;else if(e.type==annie.MouseEvent.MOUSE_MOVE){if(t.isMouseDownState<1)return;1==t.isMouseDownState&&t.dispatchEvent("onScrollStart"),t.isMouseDownState=2;var i=void 0;if(i=t.isVertical?e.localY:e.localX,t.speed=i-t.lastValue,t.speed>t.minDis?(t.addSpeed=-2,t.speed>t.maxSpeed&&(t.speed=t.maxSpeed)):t.speed<-t.minDis?(t.speed<-t.maxSpeed&&(t.speed=-t.maxSpeed),t.addSpeed=2):t.speed=0,0!=t.speed){var n=1;(a[t.paramXY]>0||a[t.paramXY]<t.distance-t.maxDistance)&&(n=.2),a[t.paramXY]+=(i-t.lastValue)*n}t.lastValue=i,t.stopTimes=0}else t.isStop=!1,t.stopTimes=-1,0==t.speed&&2==t.isMouseDownState&&t.dispatchEvent("onScrollStop"),t.isMouseDownState=0},i.prototype.scrollTo=function(e,t){void 0===t&&(t=0);var a=this,i="x"==a.paramXY?a.viewWidth:a.viewHeight;if(e<0?e=0:e>a.maxDistance-i&&(e=a.maxDistance-i),t>0){if(Math.abs(a.view[a.paramXY]+e)>2){a.autoScroll=!0,a.isStop=!0,a.isMouseDownState=0;var n={};n.onComplete=function(){a.autoScroll=!1},n[a.paramXY]=-e,a._tweenId=annie.Tween.to(a.view,t,n),0==a.speed&&a.dispatchEvent("onScrollStart")}}else a.view[a.paramXY]=-e},i.prototype.destroy=function(){var t=this;t.maskObj=null,t.view=null,e.prototype.destroy.call(this)},i}(t);e.ScrollPage=i}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=function(e){function t(){e.call(this),this.maskType=0;var t=this;t._instanceType="annie.FacePhoto",t.photo=new Image,t.bitmap=new annie.Bitmap,t.maskObj=new annie.Shape,t.photo.onload=function(e){t.bitmap.bitmapData=t.photo,t.maskObj.clear(),t.maskObj.beginFill("#000000");var a=t.radio/(t.photo.width<t.photo.height?t.photo.width:t.photo.height);t.bitmap.scaleX=t.bitmap.scaleY=a,t.bitmap.x=t.radio-t.photo.width*a>>1,t.bitmap.y=t.radio-t.photo.height*a>>1,0==t.maskType?t.maskObj.drawCircle(t.radio>>1,t.radio>>1,t.radio>>1):t.maskObj.drawRect(0,0,t.radio,t.radio),t.maskObj.endFill(),t.dispatchEvent("onComplete")},t.addChild(t.bitmap),t.addChild(t.maskObj),t.bitmap.mask=t.maskObj}return __extends(t,e),t.prototype.init=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=0);var i=this;i.radio=t,i.photo.src!=e&&(i.photo.src=e),i.maskType!=a&&(i.maskType=a)},t.prototype.destroy=function(){var t=this;t.bitmap=null,t.photo=null,t.maskObj=null,e.prototype.destroy.call(this)},t}(t);e.FacePhoto=a}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=function(e){function t(t,a,i,n){void 0===i&&(i=!0),void 0===n&&(n=null),e.call(this),this.listLen=0,this.view=new annie.Sprite,this.maskObj=new annie.Shape,this.slideSpeed=.2,this._isBreak=!1,this.distance=0,this.touchEndX=0,this.movingX=0,this.movingY=0,this._moveDis=0,this.touchEndY=0,this.currentPageIndex=0,this.reBound=.3,this.isPageFollowToMove=!1,this.follow=.7,this.isMoving=!1,this.viewWidth=0,this.viewHeight=0,this.pageList=[],this.pageClassList=[],this.lastX=0,this.lastY=0,this.isMouseDown=!1,this.canSlideNext=!0,this.canSlidePrev=!0,this.paramXY="y";var s=this;s.isVertical=i,s._ease=n,i?(s.paramXY="y",s.distance=a):(s.paramXY="x",s.distance=t),s.addChild(s.maskObj),s.addChild(s.view),s.view.mask=s.maskObj,s.maskObj._isUseToMask=0,s.maskObj.alpha=0,s.setMask(t,a);var o=s.onMouseEvent.bind(s);s.addEventListener(annie.MouseEvent.MOUSE_DOWN,o),s.addEventListener(annie.MouseEvent.MOUSE_MOVE,o),s.addEventListener(annie.MouseEvent.MOUSE_UP,o)}return __extends(t,e),t.prototype.setMask=function(e,t){var a=this;a.maskObj.clear(),a.maskObj.beginFill("#000000"),a.maskObj.drawRect(0,0,e,t),a.viewWidth=e,a.viewHeight=t,a.maskObj.endFill()},t.prototype.onMouseEvent=function(e){var t=this;if(!t.isMoving)if(e.type==annie.MouseEvent.MOUSE_DOWN)t.touchEndX=e.localX,t.touchEndY=e.localY,t.movingX=t.movingY=0,t.isMouseDown=!0,t._isBreak=!1,t.lastX=e.localX,t.lastY=e.localY,t._moveDis=0;else if(e.type==annie.MouseEvent.MOUSE_MOVE){if(!t.isMouseDown)return;var a=e.localX-t.touchEndX,i=e.localY-t.touchEndY,n=i,s=a,o=t.movingY;if(t._moveDis=t.lastY-e.localY,t.movingX=a,t.movingY=i,t.isVertical||(n=a,s=i,o=t.movingX,t._moveDis=t.lastX-e.localX),Math.abs(n)>Math.abs(s)){if(t.isPageFollowToMove||Math.abs(n)-Math.abs(o)<-1&&(t._isBreak=!0),n>0){if(0==t.currentPageIndex)t.view[t.paramXY]-=t._moveDis*t.reBound;else if(t.isPageFollowToMove){t.view[t.paramXY]-=t._moveDis*t.follow;var r=t.currentPageIndex-1;t.pageList[r]||(t.pageList[r]=new t.pageClassList[r]),t.pageList[r].parent!=t.view&&(t.view.addChild(t.pageList[r]),t.pageList[r][t.paramXY]=r*t.distance)}}else if(n<0)if(t.currentPageIndex==t.listLen-1)t.view[t.paramXY]-=t._moveDis*t.reBound;else if(t.isPageFollowToMove){t.view[t.paramXY]-=t._moveDis*t.follow;var r=t.currentPageIndex+1;t.pageList[r]||(t.pageList[r]=new t.pageClassList[r]),t.pageList[r].parent!=t.view&&(t.view.addChild(t.pageList[r]),t.pageList[r][t.paramXY]=r*t.distance)}}else t.movingX=t.movingY=0;t.lastX=e.localX,t.lastY=e.localY}else if(e.type==annie.MouseEvent.MOUSE_UP){if(!t.isMouseDown)return;var n=t.movingY,s=t.movingX;if(t.isMouseDown=!1,t.isVertical||(n=t.movingX,s=t.movingY),0==t.currentPageIndex&&t.view[t.paramXY]>0||t.currentPageIndex==t.listLen-1&&t.view[t.paramXY]<-t.currentPageIndex*t.distance){var l={};l[t.paramXY]=-t.currentPageIndex*t.distance,t._ease&&(l.ease=t._ease),annie.Tween.to(t.view,t.slideSpeed*t.reBound,l)}else{var d=t.currentPageIndex;if(t.isPageFollowToMove)if(Math.abs(t._moveDis)>5||Math.abs(n*t.follow<<1)>=t.distance)t.slideTo(n<0?d+1:d-1);else{var p=-t.currentPageIndex*t.distance;if(p==t.view[t.paramXY])return;t.view.mouseEnable=!1,t.isMoving=!0;var l={};l[t.paramXY]=p,t._ease&&(l.ease=t._ease),l.onComplete=function(){t.view.mouseEnable=!0,t.isMoving=!1,t.currentPageIndex>0&&t.pageList[t.currentPageIndex-1]&&t.pageList[t.currentPageIndex-1].parent==t.view&&t.view.removeChild(t.pageList[t.currentPageIndex-1]),t.currentPageIndex<t.listLen-1&&t.pageList[t.currentPageIndex+1]&&t.pageList[t.currentPageIndex+1].parent==t.view&&t.view.removeChild(t.pageList[t.currentPageIndex+1])},annie.Tween.to(t.view,.5*t.slideSpeed,l)}else Math.abs(n)>100&&!t._isBreak&&t.slideTo(n<0?d+1:d-1)}}},t.prototype.slideTo=function(e,t){void 0===t&&(t=!1);var a=this;if(!a.isMoving&&a.currentPageIndex!=e){var i=a.currentPageIndex,n=a.currentPageIndex<e;if(n){if(!(e<a.listLen&&a.canSlideNext))return;a.currentPageIndex=e}else{if(!(e>=0&&a.canSlidePrev))return;a.currentPageIndex=e}if(a.pageList[a.currentPageIndex]||(a.pageList[a.currentPageIndex]=new a.pageClassList[a.currentPageIndex]),a.pageList[a.currentPageIndex][a.paramXY]=a.currentPageIndex*a.distance,a.pageList[i][a.paramXY]=n?(a.currentPageIndex-1)*a.distance:(a.currentPageIndex+1)*a.distance,a.isPageFollowToMove||(a.view[a.paramXY]=-a.pageList[i][a.paramXY]),a.pageList[a.currentPageIndex]!=a.view&&a.view.addChild(a.pageList[a.currentPageIndex]),t)a.dispatchEvent("onSlideStart",{currentPage:a.currentPageIndex,lastPage:i}),a.view[a.paramXY]=-a.currentPageIndex*a.distance,a.view.removeChild(a.pageList[i]),a.dispatchEvent("onSlideEnd");else{a.view.mouseEnable=!1,a.isMoving=!0;var s={};s[a.paramXY]=-a.currentPageIndex*a.distance,a._ease&&(s.ease=a._ease),s.onComplete=function(){a.view.mouseEnable=!0,a.isMoving=!1,a.view.removeChild(a.pageList[i]),a.dispatchEvent("onSlideEnd")},annie.Tween.to(a.view,a.slideSpeed,s),a.dispatchEvent("onSlideStart",{currentPage:a.currentPageIndex,lastPage:i})}}},t.prototype.addPageList=function(e){var t=this;if(t.pageClassList=t.pageClassList.concat(e),0==t.listLen&&t.pageClassList.length>0){var a=new t.pageClassList[0];t.pageList.push(a),t.view.addChild(a)}t.listLen=t.pageClassList.length},t.prototype.destroy=function(){var t=this;t.pageList=null,t.pageClassList=null,e.prototype.destroy.call(this)},t}(t);e.SlidePage=a}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=annie.Shape,i=annie.Event,n=annie.MouseEvent,s=annie.Point,o=function(e){function o(o,r,l,d){e.call(this),this.totalPage=0,this.currPage=0,this.speed=.4,this.state="stop",this.timerArg0=0,this.timerArg1=0,this.px=0,this.py=0,this.rPage0=new t,this.rPage1=new t,this.pageMC=new t,this.leftPage=null,this.rightPage=null,this.rMask0=new a,this.rMask1=new a,this.shadow0=new a,this.shadow1=new a,this.sMask0=new a,this.sMask1=new a,this.pages=[],this.stageMP=new s,this.canFlip=!0;var p=this;p._instanceType="annie.FlipBook",p.getPageCallback=d,p.bW=o,p.bH=r,p.totalPage=l,p.currPage=p.toPage=0,p.crossGap=Math.sqrt(p.bW*p.bW+p.bH*p.bH),p.p1=new s(0,0),p.p2=new s(0,p.bH),p.p3=new s(p.bW+p.bW,0),p.p4=new s(p.bW+p.bW,p.bH),p.limitP1=new s(p.bW,0),p.limitP2=new s(p.bW,p.bH),p.toPosArr=[p.p3,p.p4,p.p1,p.p2],p.myPosArr=[p.p1,p.p2,p.p3,p.p4],p.rPage0.mouseEnable=!1,p.rPage1.mouseEnable=!1,p.shadow0.mouseEnable=!1,p.shadow1.mouseEnable=!1,p.setShadowMask(p.shadow0,1.5*p.bW,3*p.bH),p.setShadowMask(p.shadow1,1.5*p.bW,3*p.bH),p.rPage1.mask=p.rMask1,p.shadow1.mask=p.rMask1,p.shadow0.mask=p.rMask0,p.rPage0.mask=p.rMask0,p.shadow0.visible=!1,p.shadow1.visible=!1,p.addChild(p.pageMC),p.addChild(p.rPage0),p.addChild(p.shadow0),p.addChild(p.rPage1),p.addChild(p.shadow1),p.addChild(p.rMask0),p.addChild(p.rMask1),p.setPage(p.currPage);var h=p.onMouseDown.bind(p),c=p.onMouseUp.bind(p),g=p.onMouseMove.bind(p),u=p.onEnterFrame.bind(p);p.addEventListener(annie.Event.ADD_TO_STAGE,function(e){p.stage.addEventListener(n.MOUSE_DOWN,h),p.stage.addEventListener(n.MOUSE_UP,c),p.stage.addEventListener(n.MOUSE_MOVE,g),p.addEventListener(i.ENTER_FRAME,u)}),p.addEventListener(annie.Event.REMOVE_TO_STAGE,function(e){p.stage.removeEventListener(n.MOUSE_DOWN,h),p.stage.removeEventListener(n.MOUSE_UP,c),p.stage.removeEventListener(n.MOUSE_MOVE,g),p.removeEventListener(i.ENTER_FRAME,u)})}return __extends(o,e),o.prototype.drawPage=function(e,t){var a,i,n=this;1==e?(t=n.checkLimit(t,n.limitP1,n.bW),t=n.checkLimit(t,n.limitP2,n.crossGap),i=n.getBookArr(t,n.p1,n.p2),a=i[1],n.getLayerArr(t,a,n.p1,n.p2,n.limitP1,n.limitP2),n.getShadow(n.shadow0,n.p1,t,.5),n.getShadow(n.shadow1,n.p1,t,.45),n.rPage1.rotation=n.angle(t,a)+90,n.rPage1.x=i[3].x,n.rPage1.y=i[3].y,n.rPage0.x=n.p1.x,n.rPage0.y=n.p1.y):2==e?(t=n.checkLimit(t,n.limitP2,n.bW),t=n.checkLimit(t,n.limitP1,n.crossGap),i=n.getBookArr(t,n.p2,n.p1),a=i[1],n.getLayerArr(t,a,n.p2,n.p1,n.limitP2,n.limitP1),n.getShadow(n.shadow0,n.p2,t,.5),n.getShadow(n.shadow1,n.p2,t,.45),n.rPage1.rotation=n.angle(t,a)-90,n.rPage1.x=i[2].x,n.rPage1.y=i[2].y,n.rPage0.x=n.p1.x,n.rPage0.y=n.p1.y):3==e?(t=n.checkLimit(t,n.limitP1,n.bW),t=n.checkLimit(t,n.limitP2,n.crossGap),i=n.getBookArr(t,n.p3,n.p4),a=i[1],n.getLayerArr(t,a,n.p3,n.p4,n.limitP1,n.limitP2),n.getShadow(n.shadow0,n.p3,t,.5),n.getShadow(n.shadow1,n.p3,t,.4),n.rPage1.rotation=n.angle(t,a)+90,n.rPage1.x=t.x,n.rPage1.y=t.y,n.rPage0.x=n.limitP1.x,n.rPage0.y=n.limitP1.y):(t=n.checkLimit(t,n.limitP2,n.bW),t=n.checkLimit(t,n.limitP1,n.crossGap),i=n.getBookArr(t,n.p4,n.p3),a=i[1],n.getLayerArr(t,a,n.p4,n.p3,n.limitP2,n.limitP1),n.getShadow(n.shadow0,n.p4,t,.5),n.getShadow(n.shadow1,n.p4,t,.4),n.rPage1.rotation=n.angle(t,a)-90,n.rPage1.x=a.x,n.rPage1.y=a.y,n.rPage0.x=n.limitP1.x,n.rPage0.y=n.limitP1.y),n.getShape(n.rMask1,n.layer1Arr),n.getShape(n.rMask0,n.layer0Arr)},o.prototype.checkLimit=function(e,t,a){var i=this,n=Math.abs(i.pos(t,e)),o=i.angle(t,e);if(n>a){var r=a*Math.sin(o/180*Math.PI),l=a*Math.cos(o/180*Math.PI);e=new s(t.x-l,t.y-r)}return e},o.prototype.getPage=function(e){var t=this;return t.pages[e-1]||(t.pages[e-1]=t.getPageCallback(e)),t.pages[e-1]},o.prototype.getBookArr=function(e,t,a){var i=this,n=[],o=Math.abs(.5*i.pos(t,e)),r=i.angle(t,e),l=o/Math.cos(r/180*Math.PI),d=new s(t.x-l,t.y),p=i.angle(e,d)-i.angle(e,a),h=i.pos(e,a),c=h*Math.sin(p/180*Math.PI),g=h*Math.cos(p/180*Math.PI),u=new s(t.x+g,t.y+c),v=i.angle(d,e),m=i.bW*Math.sin(v/180*Math.PI),w=i.bW*Math.cos(v/180*Math.PI),P=new s(u.x+w,u.y+m),M=new s(e.x+w,e.y+m);return n.push(e),n.push(u),n.push(P),n.push(M),n},o.prototype.getLayerArr=function(e,t,a,i,n,o){var r=this,l=[],d=[],p=Math.abs(.5*r.pos(a,e)),h=r.angle(a,e),c=p/Math.sin(h/180*Math.PI),g=p/Math.cos(h/180*Math.PI),u=new s(a.x-g,a.y),v=new s(a.x,a.y-c),m=t;if(Math.abs(r.pos(e,i))>r.bH){l.push(m);var w=Math.abs(.5*r.pos(m,i)),P=w/Math.cos(h/180*Math.PI);v=new s(i.x-P,i.y)}else d.push(i);l.push(v),l.push(u),l.push(e),r.layer1Arr=l,d.push(o),d.push(n),d.push(u),d.push(v),r.layer0Arr=d},o.prototype.getShape=function(e,t){var a=t.length;e.clear(),e.beginFill("#000"),e.moveTo(t[0].x,t[0].y);for(var i=1;i<a;i++)e.lineTo(t[i].x,t[i].y);e.endFill()},o.prototype.setShadowMask=function(e,t,a){e.beginLinearGradientFill([.5*-t,4,.5*t,4],[[0,"#000000",0],[1,"#000000",.6]]),e.drawRect(.5*-t,.5*-a,.5*t,a),e.endFill(),e.beginLinearGradientFill([.5*-t,4,.5*t,4],[[1,"#000000",0],[0,"#000000",.6]]),e.drawRect(0,.5*-a,.5*t,a),e.endFill()},o.prototype.getShadow=function(e,t,a,i){var n,s,o=this;e.visible=!0,e.x=a.x+(t.x-a.x)*i,e.y=a.y+(t.y-a.y)*i,e.rotation=o.angle(t,a),n=.5*Math.abs(t.x-a.x)/o.bW,s=1-n*n,e.scaleX=n+.1,e.alpha=s+.1},o.prototype.setPage=function(e){var t=this;e>0&&e<=t.totalPage&&(t.leftPage=t.getPage(e),t.leftPage.x=t.leftPage.y=0,t.pageMC.addChild(t.leftPage)),e+1>0&&e+1<t.totalPage&&(t.rightPage=t.getPage(e+1),t.rightPage.x=t.bW,t.rightPage.y=0,t.pageMC.addChild(t.rightPage))},o.prototype.onMouseDown=function(e){var t=this;if(t.canFlip&&"stop"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.stageMP=a,t.timerArg0=t.checkArea(a),t.timerArg0=t.timerArg0<0?-t.timerArg0:t.timerArg0,t.timerArg0>0&&(t.timerArg0<3&&t.currPage>0||t.timerArg0>2&&t.currPage<=t.totalPage-2)&&(t.state="start",t.flushPage(),t.dispatchEvent("onFlipStart"))}},o.prototype.onMouseUp=function(e){var t=this;if("start"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.timerArg1=t.checkArea(a),t.state="auto",t.stageMP=a}},o.prototype.onMouseMove=function(e){var t=this;if("start"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.stageMP=a}},o.prototype.checkArea=function(e){var t,a=this,i=a.bW+a.bW,n=a.bH;return e.x>0&&e.x<=.5*i?(t=e.y>0&&e.y<=.5*n?1:e.y>.5*n&&e.y<n?2:0,e.x<=50&&(t=e.y>0&&e.y<=50?-1:e.y>n-50&&e.y<n?-2:t),t):e.x>.5*i&&e.x<i?(t=e.y>0&&e.y<=.5*n?3:e.y>.5*n&&e.y<n?4:0,e.x>=i-50&&(t=e.y>0&&e.y<=50?-3:e.y>n-50&&e.y<n?-4:t),t):0},o.prototype.flipTo=function(e){var t,a=this;e=e%2==1?e-1:e,t=e-a.currPage,"stop"==a.state&&e>=0&&e<=a.totalPage&&0!=t&&(a.timerArg0=t<0?1:3,a.timerArg1=-1,a.toPage=e>a.totalPage?a.totalPage:e,a.state="auto",a.flushPage())},o.prototype.nextPage=function(){this.flipTo(this.currPage+2)},o.prototype.prevPage=function(){this.flipTo(this.currPage-1)},o.prototype.startPage=function(){this.flipTo(0)},o.prototype.endPage=function(){this.flipTo(this.totalPage)},o.prototype.flushPage=function(){var e,t,a=this,i=a.myPosArr[a.timerArg0-1],n=null;1==a.timerArg0||2==a.timerArg0?(a.toPage=a.toPage==a.currPage?a.currPage-2:a.toPage,e=a.currPage,t=a.toPage+1,this.pageMC.removeChild(a.leftPage),a.toPage>0&&(n=a.getPage(a.currPage-2),n.x=0,a.leftPage=n,a.pageMC.addChild(n))):3!=a.timerArg0&&4!=a.timerArg0||(a.toPage=a.toPage==a.currPage?a.currPage+2:a.toPage,e=a.currPage+1,t=a.toPage,a.pageMC.removeChild(a.rightPage),a.toPage+1<a.totalPage&&(n=a.getPage(a.currPage+3),n.x=a.bW,a.rightPage=n,a.pageMC.addChild(n))),a.px=i.x,a.py=i.y,e>0&&e<=a.totalPage&&(n=a.getPage(e),n.x=0,n.y=0,a.rPage0.addChild(n)),t>0&&t<=a.totalPage&&(n=a.getPage(t),n.x=0,n.y=0,a.rPage1.addChild(n))},o.prototype.onEnterFrame=function(e){var t,a,i,n,o,r,l=this,d=l.toPosArr[l.timerArg0-1],p=l.myPosArr[l.timerArg0-1];if("start"==l.state){r=l.speed;var h=l.stageMP;l.px+=(h.x-l.px)*r>>0,l.py+=(h.y-l.py)*r>>0;var c=new s(l.px,l.py);l.drawPage(l.timerArg0,c)}else"auto"==l.state&&(Math.abs(d.x-l.px)>1.5*l.bW&&l.timerArg1>0?(t=p.x,a=p.y,i=0):(t=d.x,a=d.y,i=1),n=t-l.px>>0,o=a-l.py>>0,l.timerArg1<0?(r=.7*l.speed,l.py=l.arc(l.bW,n,d.y)):(r=l.speed,l.py=o*r+l.py),l.px=n*r+l.px,l.drawPage(l.timerArg0,new s(l.px,l.py)),0==n&&0==o&&(l.rPage0.removeAllChildren(),l.rPage1.removeAllChildren(),l.shadow0.visible=!1,l.shadow1.visible=!1,l.toPage=0==i?l.currPage:l.toPage,l.currPage=l.toPage,l.pageMC.removeAllChildren(),l.setPage(l.currPage),l.state="stop",l.dispatchEvent("onFlipStop")))},o.prototype.arc=function(e,t,a){var i=2*e,n=e*e+i*i,s=Math.abs(t)-e;return a-(Math.sqrt(n-s*s)-i)},o.prototype.angle=function(e,t){var a=e.x-t.x,i=e.y-t.y,n=180*Math.atan2(i,a)/Math.PI;return n<0?n+360:n},o.prototype.pos=function(e,t){var a=e.x-t.x,i=e.y-t.y,n=Math.sqrt(a*a+i*i);return e.x>t.x?n:-n},o.prototype.destroy=function(){var t=this;t.layer0Arr=null,t.layer1Arr=null,t.toPosArr=null,t.myPosArr=null,t.rPage0=null,t.rMask0=null,t.rMask1=null,t.sMask0=null,t.sMask1=null,t.leftPage=null,t.rightPage=null,t.pageMC=null,t.rightPage=null,t.shadow0=null,t.shadow1=null,t.p1=null,t.p2=null,t.p3=null,t.p4=null,t.limitP1=null,t.limitP2=null,t.pages=null,t.stageMP=null,t.getPageCallback=null,e.prototype.destroy.call(this)},o}(t);e.FlipBook=o}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i,n,s,o,r){void 0===o&&(o=!0),void 0===r&&(r=1),e.call(this,n,s,0,o),this._items=null,this._isInit=0,this.data=[],this.downL=null,this._lastFirstId=-1;var l=this;l._instanceType="annie.ScrollList",l._itemW=a,l._itemH=i,l._items=[],l._itemClass=t,l._itemCount=0,l._cols=r,l._updateViewRect(),l.addEventListener(annie.Event.ENTER_FRAME,l.flushData.bind(l))}return __extends(t,e),Object.defineProperty(t.prototype,"loadingView",{get:function(){return this.downL},enumerable:!0,configurable:!0}),t.prototype.updateData=function(e,t){void 0===t&&(t=!1);var a=this;if(!a._isInit||t?a.data=e:a.data=a.data.concat(e),a._isInit=1,a._lastFirstId=-1,a.maxDistance=Math.ceil(a.data.length/a._cols)*a._itemRow,a.downL){a.downL[a.paramXY]=Math.max(a.distance,a.maxDistance);var i=a.downL.getWH();a.maxDistance+="x"==a.paramXY?i.width:i.height}},t.prototype.flushData=function(){var e=this;if(e._isInit>0&&(e.view._UI.UM||1==e._isInit)){e._isInit=2;var t=(Math.abs(Math.floor(e.view[e.paramXY]/e._itemRow))-1)*e._cols;if((t=t<0?0:t)!=e._lastFirstId&&(e._lastFirstId=t,t!=e._items[0].id))for(var a=0;a<e._cols;a++)e.speed>0?e._items.unshift(e._items.pop()):e._items.push(e._items.shift());for(var i=0;i<e._itemCount;i++){var n=e._items[i];n._a2x_sl_id!=t&&(n.initData(e.data[t]?t:-1,e.data[t]),n[e.paramXY]=Math.floor(t/e._cols)*e._itemRow,n[e._disParam]=t%e._cols*e._itemCol,e.data[t]?(n._a2x_sl_id=t,n.visible=!0):(n._a2x_sl_id=-1,n.visible=!1)),t++}}},t.prototype.setViewRect=function(t,a,i){e.prototype.setViewRect.call(this,t,a,i);var n=this;n._itemRow&&n._itemCol&&n._updateViewRect()},t.prototype._updateViewRect=function(){var e=this;e.isVertical?(e._disParam="x",e._itemRow=e._itemH,e._itemCol=e._itemW):(e._disParam="y",e._itemRow=e._itemW,e._itemCol=e._itemH);var t=(Math.ceil(e.distance/e._itemRow)+1)*e._cols;if(t!=e._itemCount){if(t>e._itemCount)for(var a=e._itemCount;a<t;a++){var i=new e._itemClass;i.id=-1,i.data=null,e._items.push(i),e.view.addChild(i)}else for(var a=0;a<e._itemCount-t;a++)e.view.removeChild(e._items.pop());e._itemCount=t,e._lastFirstId=-1}},t.prototype.setLoading=function(e){var t=this;if(t.downL){t.view.removeChild(t.downL);var a=t.downL.getWH();t.maxDistance-="x"==t.paramXY?a.width:a.height,t.downL=null}if(e){t.downL=e,t.view.addChild(e),t.downL[t.paramXY]=Math.max(t.distance,t.maxDistance);var a=t.downL.getWH();t.maxDistance+="x"==t.paramXY?a.width:a.height}else t.isStop=!1},t.prototype.destroy=function(){var t=this;t._items=null,t._itemClass=null,t.data=null,t.downL=null,e.prototype.destroy.call(this)},t}(e.ScrollPage);e.ScrollList=t}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i){void 0===i&&(i=""),e.call(this),this.context=null,this._isMouseDown=!1,this._drawRadius=50,this.drawColor="#ffffff",this.bgColor="",this.drawWidth=0,this.drawHeight=0,this.totalStepList=[],this.currentStepId=0;var n=this,s=document.createElement("canvas");s.width=t,s.height=a,n.context=s.getContext("2d"),n.context.lineCap="round",n.context.lineJoin="round",n.bitmapData=s,n.drawHeight=a,n.drawWidth=t,n.reset(i);var o=n.onMouseDown.bind(n),r=n.onMouseMove.bind(n),l=n.onMouseUp.bind(n);n.addEventListener(annie.MouseEvent.MOUSE_DOWN,o),n.addEventListener(annie.MouseEvent.MOUSE_MOVE,r),n.addEventListener(annie.MouseEvent.MOUSE_UP,l)}return __extends(t,e),Object.defineProperty(t.prototype,"drawRadius",{get:function(){return this._drawRadius},set:function(e){this._drawRadius=e},enumerable:!0,configurable:!0}),t.prototype.onMouseDown=function(e){var t=this;t._isMouseDown=!0;var a=t.context;a.beginPath(),a.strokeStyle=t.drawColor,a.lineWidth=t._drawRadius;var i=e.localX>>0,n=e.localY>>0;a.moveTo(i,n),t.addStepObj={},t.addStepObj.c=t.drawColor,t.addStepObj.r=t._drawRadius,t.addStepObj.sx=i,t.addStepObj.sy=n,t.addStepObj.ps=[]},t.prototype.onMouseUp=function(e){var t=this;t._isMouseDown&&(t._isMouseDown=!1,t.addStepObj.ps&&t.addStepObj.ps.length>0&&(t.currentStepId++,t.totalStepList.push(t.addStepObj)))},t.prototype.onMouseMove=function(e){var t=this;if(t._isMouseDown){var a=t.context,i=e.localX>>0,n=e.localY>>0;a.lineTo(i,n),a.stroke(),t.addStepObj.ps.push(i,n)}},t.prototype.reset=function(e){void 0===e&&(e="");var t=this;""!=e&&(t.bgColor=e),""!=t.bgColor?(t.context.fillStyle=t.bgColor,t.context.fillRect(0,0,t.bitmapData.width,t.bitmapData.height)):t.context.clearRect(0,0,t.bitmapData.width,t.bitmapData.height),t.currentStepId=0,t.totalStepList=[]},t.prototype.cancel=function(e){void 0===e&&(e=0);var t=this;if(0==e)t.reset();else{if(!(t.currentStepId-e>=0))return!1;t.currentStepId-=e,t.totalStepList.splice(t.currentStepId,e),""!=t.bgColor?(t.context.fillStyle=t.bgColor,t.context.fillRect(0,0,t.bitmapData.width,t.bitmapData.height)):t.context.clearRect(0,0,t.bitmapData.width,t.bitmapData.height);for(var a=t.totalStepList.length,i=0;i<a;i++){var n=t.context;n.beginPath(),n.strokeStyle=t.totalStepList[i].c,n.lineWidth=t.totalStepList[i].r,n.moveTo(t.totalStepList[i].sx,t.totalStepList[i].sy);for(var s=t.totalStepList[i].ps,o=s.length,r=0;r<o;r+=2)n.lineTo(s[r],s[r+1]),n.stroke()}}return!0},t.prototype.destroy=function(){var t=this;t.context=null,t.totalStepList=null,t.drawColor=null,t.bgColor=null,t.addStepObj=null,e.prototype.destroy.call(this)},t}(annie.Bitmap);e.DrawingBoard=t}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i,n,s){void 0===s&&(s=50),e.call(this,t,a,i),this._drawList=[],this._totalDraw=1,this._currentDraw=0;var o=this;o.drawColor=n,o.drawRadius=s,o.addEventListener(annie.MouseEvent.MOUSE_MOVE,function(e){if(o._isMouseDown){var t=Math.floor(e.localX/o._drawRadius),a=Math.floor(e.localY/o._drawRadius);if(o._drawList[t]&&o._drawList[t][a]){o._drawList[t][a]=!1,o._currentDraw++;var i=Math.floor(o._currentDraw/o._totalDraw*100);o.dispatchEvent("onDrawTime",{per:i})}}})}return __extends(t,e),t.prototype.reset=function(t){void 0===t&&(t=""),e.prototype.reset.call(this,t);var a=this;if(a._drawList){""!=t&&(a.drawColor=t),a._currentDraw=0;var i=Math.floor(a.drawWidth/a._drawRadius),n=Math.floor(a.drawHeight/a._drawRadius);a._totalDraw=i*n;for(var s=0;s<i;s++){a._drawList[s]=[];for(var o=0;o<n;o++)a._drawList[s][o]=!0}}},t.prototype.cancel=function(e){return void 0===e&&(e=0),console.log("no support"),!1},Object.defineProperty(t.prototype,"drawRadius",{set:function(e){var t=this;t._drawRadius=e;var a=Math.floor(t.drawWidth/e),i=Math.floor(t.drawHeight/e);t._totalDraw=a*i;for(var n=0;n<a;n++){t._drawList[n]=[];for(var s=0;s<i;s++)t._drawList[n][s]=!0}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._drawList=null,e.prototype.destroy.call(this)},t}(e.DrawingBoard);e.ScratchCard=t}(annieUI||(annieUI={}));
\ No newline at end of file
/**
* @note 函数 window.downloadApp
* @modify by zsl@duiba.com.cn
* @date 2016-07-31
* @modify 2016-09-01
*/
;
(function ($) {
var ua = navigator.userAgent.toLowerCase();
// -------------------------- downloadApp主要函数 --------------------------//
var downloadApp = function () {
if (window.downloadAppConfig) {
if (ua.match(/iphone/ig) || ua.match(/ipad/ig)) {
//ios
download();
} else {
if (window.downloadAppConfig.confirm || window.downloadAppConfig.confirm == 'true') {
$.modal({
type: 'confirm',
title: '下载确认',
section: '即将开始下载,是否继续',
callback: {
save: function () {
if (window.downloadAppConfig.stats) {
$.ajax({
url: window.downloadAppConfig.stats,
complete: function () {
download();
}
})
} else {
download();
}
}
}
})
} else {
download();
}
}
} else {
console.error('请先配置参数window.downloadAppConfig');
}
}
// -------------------------- format函数 --------------------------//
var formatUrl = function (downloadUrl) {
if (downloadUrl.indexOf('dbnewopen') != -1) {
window.location.href = downloadUrl;
} else {
if (downloadUrl.indexOf('?') !== -1) {
// modify by zsl date2016-07-28
if (downloadUrl.indexOf('#') !== -1) {
// 如果包含#号
window.location.href = downloadUrl.split('#')[0] + '&dbnewopen#' + downloadUrl.split('#')[1];
} else {
window.location.href = downloadUrl + '&dbnewopen';
}
} else if (downloadUrl !== '') {
window.location.href = downloadUrl + '?dbnewopen';
}
}
}
// -------------------------- URL处理函数 --------------------------//
var download = function () {
var openUrl = window.downloadAppConfig.openUrl || '';
var downloadUrl = '';
// 淘客url处理 start ------------------------------------------------------------
var TKHelper,
isSpecial = false;
if (window.TBSDK_ADA !== undefined) {
TKHelper = function (downloadUrl) {
var isTBSDK = function () {
isSpecial = true;
if (window.isSpecialApp) {
window.location.href = downloadUrl;
} else {
window.BC_SDK.openPage({
url: downloadUrl
});
}
};
// 如果包含手淘url 唤起手淘App的功能
if (downloadUrl.indexOf('taoquan.taobao.com') !== -1 || downloadUrl.indexOf('shop.m.taobao.com') !== -1) {
window.BC_SDK = TBSDK_ADA.init({
"appkey": '23402401',
openTBAPP: true
});
isTBSDK();
}
// 如果是s.click.taobao.com的URL,点击则调用百川goTaoke方法唤起手淘
if (downloadUrl.indexOf('s.click.taobao.com') !== -1) {
window.BC_SDK = TBSDK_ADA.init({
"appkey": '23454468',
"appSecret": '3846ae97316a0b31321a8f493f826986',
openTBAPP: true
});
isTBSDK();
}
};
}
// 淘客url处理 end -----------------------------------------------------------
// 特殊处理
var handleSpecial = function (downloadUrl) {
// 如果downloadUrl是weixin直接打开url(加了&dbnewopen SDK唤起weixin 中间会产生一个空白页)
if (downloadUrl && downloadUrl.indexOf('weixin://') !== -1) {
isSpecial = true;
window.location.href = downloadUrl;
return;
}
// @special openUrl为微信服务,
if (openUrl && openUrl.indexOf('weixin://') !== -1) {
return;
}
// 如果含有手淘url 唤起手淘App的功能
if (window.TBSDK_ADA !== undefined) {
TKHelper(downloadUrl);
}
};
if (ua.match(/iphone/ig) || ua.match(/ipad/ig)) {
// ios
downloadUrl = window.downloadAppConfig.iosDownloadUrl;
handleSpecial(downloadUrl);
if (isSpecial) {
return;
}
if (ua.match(/MicroMessenger/ig)) {
formatUrl(downloadUrl);
} else {
if (openUrl) {
window.location.href = openUrl;
} else {
if (downloadUrl.indexOf('itunes.apple.com') != -1) {
var ifr = document.createElement('iframe');
ifr.src = downloadUrl;
ifr.style.display = 'none';
window.setTimeout(function () {
document.body.appendChild(ifr);
}, 300)
} else {
formatUrl(downloadUrl);
}
}
}
} else {
// android
downloadUrl = window.downloadAppConfig.androidDownloadUrl;
handleSpecial(downloadUrl);
if (isSpecial) {
return;
}
// 如果有oepnUrl
if (openUrl) {
window.location.href = openUrl;
return;
}
if (downloadUrl.indexOf('.apk') != -1 || downloadUrl.indexOf('dbnewopen') != -1) {
window.location.href = downloadUrl;
} else {
formatUrl(downloadUrl);
}
}
}
window.downloadApp = downloadApp;
})(Zepto);
(function(d){var e=navigator.userAgent.toLowerCase(),g=function(a){-1!=a.indexOf("dbnewopen")?window.location.href=a:-1!==a.indexOf("?")?-1!==a.indexOf("#")?window.location.href=a.split("#")[0]+"&dbnewopen#"+a.split("#")[1]:window.location.href=a+"&dbnewopen":""!==a&&(window.location.href=a+"?dbnewopen")},c=function(){var a=window.downloadAppConfig.openUrl||"",b="",c,f=!1;void 0!==window.TBSDK_ADA&&(c=function(a){var b=function(){f=!0;window.isSpecialApp?window.location.href=a:window.BC_SDK.openPage({url:a})};
if(-1!==a.indexOf("taoquan.taobao.com")||-1!==a.indexOf("shop.m.taobao.com"))window.BC_SDK=TBSDK_ADA.init({appkey:"23402401",openTBAPP:!0}),b();-1!==a.indexOf("s.click.taobao.com")&&(window.BC_SDK=TBSDK_ADA.init({appkey:"23454468",appSecret:"3846ae97316a0b31321a8f493f826986",openTBAPP:!0}),b())});var d=function(b){b&&-1!==b.indexOf("weixin://")?(f=!0,window.location.href=b):a&&-1!==a.indexOf("weixin://")||void 0!==window.TBSDK_ADA&&c(b)};if(e.match(/iphone/ig)||e.match(/ipad/ig)){if(b=window.downloadAppConfig.iosDownloadUrl,
d(b),!f)if(e.match(/MicroMessenger/ig))g(b);else if(a)window.location.href=a;else if(-1!=b.indexOf("itunes.apple.com")){var h=document.createElement("iframe");h.src=b;h.style.display="none";window.setTimeout(function(){document.body.appendChild(h)},300)}else g(b)}else b=window.downloadAppConfig.androidDownloadUrl,d(b),f||(a?window.location.href=a:-1!=b.indexOf(".apk")||-1!=b.indexOf("dbnewopen")?window.location.href=b:g(b))};window.downloadApp=function(){window.downloadAppConfig?e.match(/iphone/ig)||
e.match(/ipad/ig)?c():window.downloadAppConfig.confirm||"true"==window.downloadAppConfig.confirm?d.modal({type:"confirm",title:"\u4e0b\u8f7d\u786e\u8ba4",section:"\u5373\u5c06\u5f00\u59cb\u4e0b\u8f7d\uff0c\u662f\u5426\u7ee7\u7eed",callback:{save:function(){window.downloadAppConfig.stats?d.ajax({url:window.downloadAppConfig.stats,complete:function(){c()}}):c()}}}):c():console.error("\u8bf7\u5148\u914d\u7f6e\u53c2\u6570window.downloadAppConfig")}})(Zepto);
\ No newline at end of file
; ;
(function ($) { (function () {
function safe_add(x, y) { function safe_add(x, y) {
var lsw = (x & 65535) + (y & 65535), msw = (x >> 16) + (y >> 16) + (lsw >> 16); var lsw = (x & 65535) + (y & 65535), msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 65535) return (msw << 16) | (lsw & 65535)
...@@ -194,11 +194,11 @@ ...@@ -194,11 +194,11 @@
var hexcase = 0; var hexcase = 0;
var b64pad = ""; var b64pad = "";
var chrsz = 8; var chrsz = 8;
$.extend({ /*$.extend({
duiba_b64_sha: function (input) { duiba_b64_sha: function (input) {
return binb2b64(core_sha1(str2binb(input), input.length * chrsz)) return binb2b64(core_sha1(str2binb(input), input.length * chrsz))
} }
}); });*/
function core_sha1(x, len) { function core_sha1(x, len) {
x[len >> 5] |= 128 << (24 - len % 32); x[len >> 5] |= 128 << (24 - len % 32);
...@@ -323,4 +323,4 @@ ...@@ -323,4 +323,4 @@
} }
window.duiba_md5 = duiba_md5; window.duiba_md5 = duiba_md5;
}(Zepto)); }());
\ No newline at end of file \ No newline at end of file
;(function(){function safe_add(x,y){var lsw=(x&65535)+(y&65535),msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&65535)}function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t)}function binl_md5(x,len){x[len>>5]|=128<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var i,olda,oldb,oldc,oldd,a=1732584193,b=-271733879,c=-1732584194,d=271733878;for(i=0;i<x.length;i+=16){olda=a;oldb=b;oldc=c;oldd=d;a=md5_ff(a,b,c,d,x[i],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}return[a,b,c,d]}function binl2rstr(input){var i,output="";for(i=0;i<input.length*32;i+=8){output+=String.fromCharCode((input[i>>5]>>>(i%32))&255)}return output}function rstr2binl(input){var i,output=[];output[(input.length>>2)-1]=undefined;for(i=0;i<output.length;i+=1){output[i]=0}for(i=0;i<input.length*8;i+=8){output[i>>5]|=(input.charCodeAt(i/8)&255)<<(i%32)}return output}function rstr_md5(s){return binl2rstr(binl_md5(rstr2binl(s),s.length*8))}function rstr_hmac_md5(key,data){var i,bkey=rstr2binl(key),ipad=[],opad=[],hash;ipad[15]=opad[15]=undefined;if(bkey.length>16){bkey=binl_md5(bkey,key.length*8)}for(i=0;i<16;i+=1){ipad[i]=bkey[i]^909522486;opad[i]=bkey[i]^1549556828}hash=binl_md5(ipad.concat(rstr2binl(data)),512+data.length*8);return binl2rstr(binl_md5(opad.concat(hash),512+128))}function rstr2hex(input){var hex_tab="0123456789abcdef",output="",x,i;for(i=0;i<input.length;i+=1){x=input.charCodeAt(i);output+=hex_tab.charAt((x>>>4)&15)+hex_tab.charAt(x&15)}return output}function str2rstr_utf8(input){return unescape(encodeURIComponent(input))}function raw_md5(s){return rstr_md5(str2rstr_utf8(s))}function hex_md5(s){return rstr2hex(raw_md5(s))}function raw_hmac_md5(k,d){return rstr_hmac_md5(str2rstr_utf8(k),str2rstr_utf8(d))}function hex_hmac_md5(k,d){return rstr2hex(raw_hmac_md5(k,d))}duiba_md5=function(string,key,raw){if(!key){if(!raw){return hex_md5(string)}else{return raw_md5(string)}}if(!raw){return hex_hmac_md5(key,string)}else{return raw_hmac_md5(key,string)}};var hexcase=0;var b64pad="";var chrsz=8;function core_sha1(x,len){x[len>>5]|=128<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++){if(j<16){w[j]=x[i+j]}else{w[j]=rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1)}var t=safe_add(safe_add(rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=rol(b,30);b=a;a=t}a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde)}return Array(a,b,c,d,e)}function sha1_ft(t,b,c,d){if(t<20){return(b&c)|((~b)&d)}if(t<40){return b^c^d}if(t<60){return(b&c)|(b&d)|(c&d)}return b^c^d}function sha1_kt(t){return(t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514}function core_hmac_sha1(key,data){var bkey=str2binb(key);if(bkey.length>16){bkey=core_sha1(bkey,key.length*chrsz)}var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++){ipad[i]=bkey[i]^909522486;opad[i]=bkey[i]^1549556828}var hash=core_sha1(ipad.concat(str2binb(data)),512+data.length*chrsz);return core_sha1(opad.concat(hash),512+160)}function safe_add(x,y){var lsw=(x&65535)+(y&65535);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&65535)}function rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function str2binb(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(32-chrsz-i%32)}return bin}function binb2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(32-chrsz-i%32))&mask)}return str}function binb2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&15)+hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&15)}return str}function binb2b64(binarray){var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var str="";for(var i=0;i<binarray.length*4;i+=3){var triplet=(((binarray[i>>2]>>8*(3-i%4))&255)<<16)|(((binarray[i+1>>2]>>8*(3-(i+1)%4))&255)<<8)|((binarray[i+2>>2]>>8*(3-(i+2)%4))&255);for(var j=0;j<4;j++){if(i*8+j*6>binarray.length*32){str+=b64pad}else{str+=tab.charAt((triplet>>6*(3-j))&63)}}}str=str+"=";return str}window.duiba_md5=duiba_md5}());
\ No newline at end of file
// Zepto.js
// (c) 2010-2017 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,
document = window.document,
elementDisplay = {}, classCache = {},
cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },
fragmentRE = /^\s*<(\w+|!)[^>]*>/,
singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rootNodeRE = /^(?:body|html)$/i,
capitalRE = /([A-Z])/g,
// special attributes that should be get/set via method calls
methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],
adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],
table = document.createElement('table'),
tableRow = document.createElement('tr'),
containers = {
'tr': document.createElement('tbody'),
'tbody': table, 'thead': table, 'tfoot': table,
'td': tableRow, 'th': tableRow,
'*': document.createElement('div')
},
simpleSelectorRE = /^[\w-]*$/,
class2type = {},
toString = class2type.toString,
zepto = {},
camelize, uniq,
tempParent = document.createElement('div'),
propMap = {
'tabindex': 'tabIndex',
'readonly': 'readOnly',
'for': 'htmlFor',
'class': 'className',
'maxlength': 'maxLength',
'cellspacing': 'cellSpacing',
'cellpadding': 'cellPadding',
'rowspan': 'rowSpan',
'colspan': 'colSpan',
'usemap': 'useMap',
'frameborder': 'frameBorder',
'contenteditable': 'contentEditable'
},
isArray = Array.isArray ||
function(object){ return object instanceof Array }
zepto.matches = function(element, selector) {
if (!selector || !element || element.nodeType !== 1) return false
var matchesSelector = element.matches || element.webkitMatchesSelector ||
element.mozMatchesSelector || element.oMatchesSelector ||
element.matchesSelector
if (matchesSelector) return matchesSelector.call(element, selector)
// fall back to performing a selector:
var match, parent = element.parentNode, temp = !parent
if (temp) (parent = tempParent).appendChild(element)
match = ~zepto.qsa(parent, selector).indexOf(element)
temp && tempParent.removeChild(element)
return match
}
function type(obj) {
return obj == null ? String(obj) :
class2type[toString.call(obj)] || "object"
}
function isFunction(value) { return type(value) == "function" }
function isWindow(obj) { return obj != null && obj == obj.window }
function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }
function isObject(obj) { return type(obj) == "object" }
function isPlainObject(obj) {
return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype
}
function likeArray(obj) {
var length = !!obj && 'length' in obj && obj.length,
type = $.type(obj)
return 'function' != type && !isWindow(obj) && (
'array' == type || length === 0 ||
(typeof length == 'number' && length > 0 && (length - 1) in obj)
)
}
function compact(array) { return filter.call(array, function(item){ return item != null }) }
function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }
camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }
function dasherize(str) {
return str.replace(/::/g, '/')
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
.replace(/_/g, '-')
.toLowerCase()
}
uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }
function classRE(name) {
return name in classCache ?
classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)'))
}
function maybeAddPx(name, value) {
return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value
}
function defaultDisplay(nodeName) {
var element, display
if (!elementDisplay[nodeName]) {
element = document.createElement(nodeName)
document.body.appendChild(element)
display = getComputedStyle(element, '').getPropertyValue("display")
element.parentNode.removeChild(element)
display == "none" && (display = "block")
elementDisplay[nodeName] = display
}
return elementDisplay[nodeName]
}
function children(element) {
return 'children' in element ?
slice.call(element.children) :
$.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })
}
function Z(dom, selector) {
var i, len = dom ? dom.length : 0
for (i = 0; i < len; i++) this[i] = dom[i]
this.length = len
this.selector = selector || ''
}
// `$.zepto.fragment` takes a html string and an optional tag name
// to generate DOM nodes from the given html string.
// The generated DOM nodes are returned as an array.
// This function can be overridden in plugins for example to make
// it compatible with browsers that don't support the DOM fully.
zepto.fragment = function(html, name, properties) {
var dom, nodes, container
// A special case optimization for a single tag
if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))
if (!dom) {
if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>")
if (name === undefined) name = fragmentRE.test(html) && RegExp.$1
if (!(name in containers)) name = '*'
container = containers[name]
container.innerHTML = '' + html
dom = $.each(slice.call(container.childNodes), function(){
container.removeChild(this)
})
}
if (isPlainObject(properties)) {
nodes = $(dom)
$.each(properties, function(key, value) {
if (methodAttributes.indexOf(key) > -1) nodes[key](value)
else nodes.attr(key, value)
})
}
return dom
}
// `$.zepto.Z` swaps out the prototype of the given `dom` array
// of nodes with `$.fn` and thus supplying all the Zepto functions
// to the array. This method can be overridden in plugins.
zepto.Z = function(dom, selector) {
return new Z(dom, selector)
}
// `$.zepto.isZ` should return `true` if the given object is a Zepto
// collection. This method can be overridden in plugins.
zepto.isZ = function(object) {
return object instanceof zepto.Z
}
// `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
// takes a CSS selector and an optional context (and handles various
// special cases).
// This method can be overridden in plugins.
zepto.init = function(selector, context) {
var dom
// If nothing given, return an empty Zepto collection
if (!selector) return zepto.Z()
// Optimize for string selectors
else if (typeof selector == 'string') {
selector = selector.trim()
// If it's a html fragment, create nodes from it
// Note: In both Chrome 21 and Firefox 15, DOM error 12
// is thrown if the fragment doesn't begin with <
if (selector[0] == '<' && fragmentRE.test(selector))
dom = zepto.fragment(selector, RegExp.$1, context), selector = null
// If there's a context, create a collection on that context first, and select
// nodes from there
else if (context !== undefined) return $(context).find(selector)
// If it's a CSS selector, use it to select nodes.
else dom = zepto.qsa(document, selector)
}
// If a function is given, call it when the DOM is ready
else if (isFunction(selector)) return $(document).ready(selector)
// If a Zepto collection is given, just return it
else if (zepto.isZ(selector)) return selector
else {
// normalize array if an array of nodes is given
if (isArray(selector)) dom = compact(selector)
// Wrap DOM nodes.
else if (isObject(selector))
dom = [selector], selector = null
// If it's a html fragment, create nodes from it
else if (fragmentRE.test(selector))
dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null
// If there's a context, create a collection on that context first, and select
// nodes from there
else if (context !== undefined) return $(context).find(selector)
// And last but no least, if it's a CSS selector, use it to select nodes.
else dom = zepto.qsa(document, selector)
}
// create a new Zepto collection from the nodes found
return zepto.Z(dom, selector)
}
// `$` will be the base `Zepto` object. When calling this
// function just call `$.zepto.init, which makes the implementation
// details of selecting nodes and creating Zepto collections
// patchable in plugins.
$ = function(selector, context){
return zepto.init(selector, context)
}
function extend(target, source, deep) {
for (key in source)
if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
if (isPlainObject(source[key]) && !isPlainObject(target[key]))
target[key] = {}
if (isArray(source[key]) && !isArray(target[key]))
target[key] = []
extend(target[key], source[key], deep)
}
else if (source[key] !== undefined) target[key] = source[key]
}
// Copy all but undefined properties from one or more
// objects to the `target` object.
$.extend = function(target){
var deep, args = slice.call(arguments, 1)
if (typeof target == 'boolean') {
deep = target
target = args.shift()
}
args.forEach(function(arg){ extend(target, arg, deep) })
return target
}
// `$.zepto.qsa` is Zepto's CSS selector implementation which
// uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.
// This method can be overridden in plugins.
zepto.qsa = function(element, selector){
var found,
maybeID = selector[0] == '#',
maybeClass = !maybeID && selector[0] == '.',
nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked
isSimple = simpleSelectorRE.test(nameOnly)
return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById
( (found = element.getElementById(nameOnly)) ? [found] : [] ) :
(element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :
slice.call(
isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName
maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class
element.getElementsByTagName(selector) : // Or a tag
element.querySelectorAll(selector) // Or it's not simple, and we need to query all
)
}
function filtered(nodes, selector) {
return selector == null ? $(nodes) : $(nodes).filter(selector)
}
$.contains = document.documentElement.contains ?
function(parent, node) {
return parent !== node && parent.contains(node)
} :
function(parent, node) {
while (node && (node = node.parentNode))
if (node === parent) return true
return false
}
function funcArg(context, arg, idx, payload) {
return isFunction(arg) ? arg.call(context, idx, payload) : arg
}
function setAttribute(node, name, value) {
value == null ? node.removeAttribute(name) : node.setAttribute(name, value)
}
// access className property while respecting SVGAnimatedString
function className(node, value){
var klass = node.className || '',
svg = klass && klass.baseVal !== undefined
if (value === undefined) return svg ? klass.baseVal : klass
svg ? (klass.baseVal = value) : (node.className = value)
}
// "true" => true
// "false" => false
// "null" => null
// "42" => 42
// "42.5" => 42.5
// "08" => "08"
// JSON => parse if valid
// String => self
function deserializeValue(value) {
try {
return value ?
value == "true" ||
( value == "false" ? false :
value == "null" ? null :
+value + "" == value ? +value :
/^[\[\{]/.test(value) ? $.parseJSON(value) :
value )
: value
} catch(e) {
return value
}
}
$.type = type
$.isFunction = isFunction
$.isWindow = isWindow
$.isArray = isArray
$.isPlainObject = isPlainObject
$.isEmptyObject = function(obj) {
var name
for (name in obj) return false
return true
}
$.isNumeric = function(val) {
var num = Number(val), type = typeof val
return val != null && type != 'boolean' &&
(type != 'string' || val.length) &&
!isNaN(num) && isFinite(num) || false
}
$.inArray = function(elem, array, i){
return emptyArray.indexOf.call(array, elem, i)
}
$.camelCase = camelize
$.trim = function(str) {
return str == null ? "" : String.prototype.trim.call(str)
}
// plugin compatibility
$.uuid = 0
$.support = { }
$.expr = { }
$.noop = function() {}
$.map = function(elements, callback){
var value, values = [], i, key
if (likeArray(elements))
for (i = 0; i < elements.length; i++) {
value = callback(elements[i], i)
if (value != null) values.push(value)
}
else
for (key in elements) {
value = callback(elements[key], key)
if (value != null) values.push(value)
}
return flatten(values)
}
$.each = function(elements, callback){
var i, key
if (likeArray(elements)) {
for (i = 0; i < elements.length; i++)
if (callback.call(elements[i], i, elements[i]) === false) return elements
} else {
for (key in elements)
if (callback.call(elements[key], key, elements[key]) === false) return elements
}
return elements
}
$.grep = function(elements, callback){
return filter.call(elements, callback)
}
if (window.JSON) $.parseJSON = JSON.parse
// Populate the class2type map
$.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
class2type[ "[object " + name + "]" ] = name.toLowerCase()
})
// Define methods that will be available on all
// Zepto collections
$.fn = {
constructor: zepto.Z,
length: 0,
// Because a collection acts like an array
// copy over these useful array functions.
forEach: emptyArray.forEach,
reduce: emptyArray.reduce,
push: emptyArray.push,
sort: emptyArray.sort,
splice: emptyArray.splice,
indexOf: emptyArray.indexOf,
concat: function(){
var i, value, args = []
for (i = 0; i < arguments.length; i++) {
value = arguments[i]
args[i] = zepto.isZ(value) ? value.toArray() : value
}
return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)
},
// `map` and `slice` in the jQuery API work differently
// from their array counterparts
map: function(fn){
return $($.map(this, function(el, i){ return fn.call(el, i, el) }))
},
slice: function(){
return $(slice.apply(this, arguments))
},
ready: function(callback){
// don't use "interactive" on IE <= 10 (it can fired premature)
if (document.readyState === "complete" ||
(document.readyState !== "loading" && !document.documentElement.doScroll))
setTimeout(function(){ callback($) }, 0)
else {
var handler = function() {
document.removeEventListener("DOMContentLoaded", handler, false)
window.removeEventListener("load", handler, false)
callback($)
}
document.addEventListener("DOMContentLoaded", handler, false)
window.addEventListener("load", handler, false)
}
return this
},
get: function(idx){
return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]
},
toArray: function(){ return this.get() },
size: function(){
return this.length
},
remove: function(){
return this.each(function(){
if (this.parentNode != null)
this.parentNode.removeChild(this)
})
},
each: function(callback){
emptyArray.every.call(this, function(el, idx){
return callback.call(el, idx, el) !== false
})
return this
},
filter: function(selector){
if (isFunction(selector)) return this.not(this.not(selector))
return $(filter.call(this, function(element){
return zepto.matches(element, selector)
}))
},
add: function(selector,context){
return $(uniq(this.concat($(selector,context))))
},
is: function(selector){
return typeof selector == 'string' ? this.length > 0 && zepto.matches(this[0], selector) :
selector && this.selector == selector.selector
},
not: function(selector){
var nodes=[]
if (isFunction(selector) && selector.call !== undefined)
this.each(function(idx){
if (!selector.call(this,idx)) nodes.push(this)
})
else {
var excludes = typeof selector == 'string' ? this.filter(selector) :
(likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)
this.forEach(function(el){
if (excludes.indexOf(el) < 0) nodes.push(el)
})
}
return $(nodes)
},
has: function(selector){
return this.filter(function(){
return isObject(selector) ?
$.contains(this, selector) :
$(this).find(selector).size()
})
},
eq: function(idx){
return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)
},
first: function(){
var el = this[0]
return el && !isObject(el) ? el : $(el)
},
last: function(){
var el = this[this.length - 1]
return el && !isObject(el) ? el : $(el)
},
find: function(selector){
var result, $this = this
if (!selector) result = $()
else if (typeof selector == 'object')
result = $(selector).filter(function(){
var node = this
return emptyArray.some.call($this, function(parent){
return $.contains(parent, node)
})
})
else if (this.length == 1) result = $(zepto.qsa(this[0], selector))
else result = this.map(function(){ return zepto.qsa(this, selector) })
return result
},
closest: function(selector, context){
var nodes = [], collection = typeof selector == 'object' && $(selector)
this.each(function(_, node){
while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))
node = node !== context && !isDocument(node) && node.parentNode
if (node && nodes.indexOf(node) < 0) nodes.push(node)
})
return $(nodes)
},
parents: function(selector){
var ancestors = [], nodes = this
while (nodes.length > 0)
nodes = $.map(nodes, function(node){
if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {
ancestors.push(node)
return node
}
})
return filtered(ancestors, selector)
},
parent: function(selector){
return filtered(uniq(this.pluck('parentNode')), selector)
},
children: function(selector){
return filtered(this.map(function(){ return children(this) }), selector)
},
contents: function() {
return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })
},
siblings: function(selector){
return filtered(this.map(function(i, el){
return filter.call(children(el.parentNode), function(child){ return child!==el })
}), selector)
},
empty: function(){
return this.each(function(){ this.innerHTML = '' })
},
// `pluck` is borrowed from Prototype.js
pluck: function(property){
return $.map(this, function(el){ return el[property] })
},
show: function(){
return this.each(function(){
this.style.display == "none" && (this.style.display = '')
if (getComputedStyle(this, '').getPropertyValue("display") == "none")
this.style.display = defaultDisplay(this.nodeName)
})
},
replaceWith: function(newContent){
return this.before(newContent).remove()
},
wrap: function(structure){
var func = isFunction(structure)
if (this[0] && !func)
var dom = $(structure).get(0),
clone = dom.parentNode || this.length > 1
return this.each(function(index){
$(this).wrapAll(
func ? structure.call(this, index) :
clone ? dom.cloneNode(true) : dom
)
})
},
wrapAll: function(structure){
if (this[0]) {
$(this[0]).before(structure = $(structure))
var children
// drill down to the inmost element
while ((children = structure.children()).length) structure = children.first()
$(structure).append(this)
}
return this
},
wrapInner: function(structure){
var func = isFunction(structure)
return this.each(function(index){
var self = $(this), contents = self.contents(),
dom = func ? structure.call(this, index) : structure
contents.length ? contents.wrapAll(dom) : self.append(dom)
})
},
unwrap: function(){
this.parent().each(function(){
$(this).replaceWith($(this).children())
})
return this
},
clone: function(){
return this.map(function(){ return this.cloneNode(true) })
},
hide: function(){
return this.css("display", "none")
},
toggle: function(setting){
return this.each(function(){
var el = $(this)
;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide()
})
},
prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },
next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },
html: function(html){
return 0 in arguments ?
this.each(function(idx){
var originHtml = this.innerHTML
$(this).empty().append( funcArg(this, html, idx, originHtml) )
}) :
(0 in this ? this[0].innerHTML : null)
},
text: function(text){
return 0 in arguments ?
this.each(function(idx){
var newText = funcArg(this, text, idx, this.textContent)
this.textContent = newText == null ? '' : ''+newText
}) :
(0 in this ? this.pluck('textContent').join("") : null)
},
attr: function(name, value){
var result
return (typeof name == 'string' && !(1 in arguments)) ?
(0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :
this.each(function(idx){
if (this.nodeType !== 1) return
if (isObject(name)) for (key in name) setAttribute(this, key, name[key])
else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))
})
},
removeAttr: function(name){
return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){
setAttribute(this, attribute)
}, this)})
},
prop: function(name, value){
name = propMap[name] || name
return (typeof name == 'string' && !(1 in arguments)) ?
(this[0] && this[0][name]) :
this.each(function(idx){
if (isObject(name)) for (key in name) this[propMap[key] || key] = name[key]
else this[name] = funcArg(this, value, idx, this[name])
})
},
removeProp: function(name){
name = propMap[name] || name
return this.each(function(){ delete this[name] })
},
data: function(name, value){
var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()
var data = (1 in arguments) ?
this.attr(attrName, value) :
this.attr(attrName)
return data !== null ? deserializeValue(data) : undefined
},
val: function(value){
if (0 in arguments) {
if (value == null) value = ""
return this.each(function(idx){
this.value = funcArg(this, value, idx, this.value)
})
} else {
return this[0] && (this[0].multiple ?
$(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :
this[0].value)
}
},
offset: function(coordinates){
if (coordinates) return this.each(function(index){
var $this = $(this),
coords = funcArg(this, coordinates, index, $this.offset()),
parentOffset = $this.offsetParent().offset(),
props = {
top: coords.top - parentOffset.top,
left: coords.left - parentOffset.left
}
if ($this.css('position') == 'static') props['position'] = 'relative'
$this.css(props)
})
if (!this.length) return null
if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))
return {top: 0, left: 0}
var obj = this[0].getBoundingClientRect()
return {
left: obj.left + window.pageXOffset,
top: obj.top + window.pageYOffset,
width: Math.round(obj.width),
height: Math.round(obj.height)
}
},
css: function(property, value){
if (arguments.length < 2) {
var element = this[0]
if (typeof property == 'string') {
if (!element) return
return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)
} else if (isArray(property)) {
if (!element) return
var props = {}
var computedStyle = getComputedStyle(element, '')
$.each(property, function(_, prop){
props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))
})
return props
}
}
var css = ''
if (type(property) == 'string') {
if (!value && value !== 0)
this.each(function(){ this.style.removeProperty(dasherize(property)) })
else
css = dasherize(property) + ":" + maybeAddPx(property, value)
} else {
for (key in property)
if (!property[key] && property[key] !== 0)
this.each(function(){ this.style.removeProperty(dasherize(key)) })
else
css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'
}
return this.each(function(){ this.style.cssText += ';' + css })
},
index: function(element){
return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])
},
hasClass: function(name){
if (!name) return false
return emptyArray.some.call(this, function(el){
return this.test(className(el))
}, classRE(name))
},
addClass: function(name){
if (!name) return this
return this.each(function(idx){
if (!('className' in this)) return
classList = []
var cls = className(this), newName = funcArg(this, name, idx, cls)
newName.split(/\s+/g).forEach(function(klass){
if (!$(this).hasClass(klass)) classList.push(klass)
}, this)
classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "))
})
},
removeClass: function(name){
return this.each(function(idx){
if (!('className' in this)) return
if (name === undefined) return className(this, '')
classList = className(this)
funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){
classList = classList.replace(classRE(klass), " ")
})
className(this, classList.trim())
})
},
toggleClass: function(name, when){
if (!name) return this
return this.each(function(idx){
var $this = $(this), names = funcArg(this, name, idx, className(this))
names.split(/\s+/g).forEach(function(klass){
(when === undefined ? !$this.hasClass(klass) : when) ?
$this.addClass(klass) : $this.removeClass(klass)
})
})
},
scrollTop: function(value){
if (!this.length) return
var hasScrollTop = 'scrollTop' in this[0]
if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset
return this.each(hasScrollTop ?
function(){ this.scrollTop = value } :
function(){ this.scrollTo(this.scrollX, value) })
},
scrollLeft: function(value){
if (!this.length) return
var hasScrollLeft = 'scrollLeft' in this[0]
if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset
return this.each(hasScrollLeft ?
function(){ this.scrollLeft = value } :
function(){ this.scrollTo(value, this.scrollY) })
},
position: function() {
if (!this.length) return
var elem = this[0],
// Get *real* offsetParent
offsetParent = this.offsetParent(),
// Get correct offsets
offset = this.offset(),
parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
offset.top -= parseFloat( $(elem).css('margin-top') ) || 0
offset.left -= parseFloat( $(elem).css('margin-left') ) || 0
// Add offsetParent borders
parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0
parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0
// Subtract the two offsets
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
}
},
offsetParent: function() {
return this.map(function(){
var parent = this.offsetParent || document.body
while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static")
parent = parent.offsetParent
return parent
})
}
}
// for now
$.fn.detach = $.fn.remove
// Generate the `width` and `height` functions
;['width', 'height'].forEach(function(dimension){
var dimensionProperty =
dimension.replace(/./, function(m){ return m[0].toUpperCase() })
$.fn[dimension] = function(value){
var offset, el = this[0]
if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :
isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :
(offset = this.offset()) && offset[dimension]
else return this.each(function(idx){
el = $(this)
el.css(dimension, funcArg(this, value, idx, el[dimension]()))
})
}
})
function traverseNode(node, fun) {
fun(node)
for (var i = 0, len = node.childNodes.length; i < len; i++)
traverseNode(node.childNodes[i], fun)
}
// Generate the `after`, `prepend`, `before`, `append`,
// `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.
adjacencyOperators.forEach(function(operator, operatorIndex) {
var inside = operatorIndex % 2 //=> prepend, append
$.fn[operator] = function(){
// arguments can be nodes, arrays of nodes, Zepto objects and HTML strings
var argType, nodes = $.map(arguments, function(arg) {
var arr = []
argType = type(arg)
if (argType == "array") {
arg.forEach(function(el) {
if (el.nodeType !== undefined) return arr.push(el)
else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())
arr = arr.concat(zepto.fragment(el))
})
return arr
}
return argType == "object" || arg == null ?
arg : zepto.fragment(arg)
}),
parent, copyByClone = this.length > 1
if (nodes.length < 1) return this
return this.each(function(_, target){
parent = inside ? target : target.parentNode
// convert all methods to a "before" operation
target = operatorIndex == 0 ? target.nextSibling :
operatorIndex == 1 ? target.firstChild :
operatorIndex == 2 ? target :
null
var parentInDocument = $.contains(document.documentElement, parent)
nodes.forEach(function(node){
if (copyByClone) node = node.cloneNode(true)
else if (!parent) return $(node).remove()
parent.insertBefore(node, target)
if (parentInDocument) traverseNode(node, function(el){
if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&
(!el.type || el.type === 'text/javascript') && !el.src){
var target = el.ownerDocument ? el.ownerDocument.defaultView : window
target['eval'].call(target, el.innerHTML)
}
})
})
})
}
// after => insertAfter
// prepend => prependTo
// before => insertBefore
// append => appendTo
$.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){
$(html)[operator](this)
return this
}
})
zepto.Z.prototype = Z.prototype = $.fn
// Export internal API functions in the `$.zepto` namespace
zepto.uniq = uniq
zepto.deserializeValue = deserializeValue
$.zepto = zepto
return $
})()
// If `$` is not yet defined, point it to `Zepto`
window.Zepto = Zepto
window.$ === undefined && (window.$ = Zepto)
// Zepto.js
// (c) 2010-2016 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function($){
var _zid = 1, undefined,
slice = Array.prototype.slice,
isFunction = $.isFunction,
isString = function(obj){ return typeof obj == 'string' },
handlers = {},
specialEvents={},
focusinSupported = 'onfocusin' in window,
focus = { focus: 'focusin', blur: 'focusout' },
hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }
specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'
function zid(element) {
return element._zid || (element._zid = _zid++)
}
function findHandlers(element, event, fn, selector) {
event = parse(event)
if (event.ns) var matcher = matcherFor(event.ns)
return (handlers[zid(element)] || []).filter(function(handler) {
return handler
&& (!event.e || handler.e == event.e)
&& (!event.ns || matcher.test(handler.ns))
&& (!fn || zid(handler.fn) === zid(fn))
&& (!selector || handler.sel == selector)
})
}
function parse(event) {
var parts = ('' + event).split('.')
return {e: parts[0], ns: parts.slice(1).sort().join(' ')}
}
function matcherFor(ns) {
return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')
}
function eventCapture(handler, captureSetting) {
return handler.del &&
(!focusinSupported && (handler.e in focus)) ||
!!captureSetting
}
function realEvent(type) {
return hover[type] || (focusinSupported && focus[type]) || type
}
function add(element, events, fn, data, selector, delegator, capture){
var id = zid(element), set = (handlers[id] || (handlers[id] = []))
events.split(/\s/).forEach(function(event){
if (event == 'ready') return $(document).ready(fn)
var handler = parse(event)
handler.fn = fn
handler.sel = selector
// emulate mouseenter, mouseleave
if (handler.e in hover) fn = function(e){
var related = e.relatedTarget
if (!related || (related !== this && !$.contains(this, related)))
return handler.fn.apply(this, arguments)
}
handler.del = delegator
var callback = delegator || fn
handler.proxy = function(e){
e = compatible(e)
if (e.isImmediatePropagationStopped()) return
e.data = data
var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))
if (result === false) e.preventDefault(), e.stopPropagation()
return result
}
handler.i = set.length
set.push(handler)
if ('addEventListener' in element)
element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))
})
}
function remove(element, events, fn, selector, capture){
var id = zid(element)
;(events || '').split(/\s/).forEach(function(event){
findHandlers(element, event, fn, selector).forEach(function(handler){
delete handlers[id][handler.i]
if ('removeEventListener' in element)
element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))
})
})
}
$.event = { add: add, remove: remove }
$.proxy = function(fn, context) {
var args = (2 in arguments) && slice.call(arguments, 2)
if (isFunction(fn)) {
var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }
proxyFn._zid = zid(fn)
return proxyFn
} else if (isString(context)) {
if (args) {
args.unshift(fn[context], fn)
return $.proxy.apply(null, args)
} else {
return $.proxy(fn[context], fn)
}
} else {
throw new TypeError("expected function")
}
}
$.fn.bind = function(event, data, callback){
return this.on(event, data, callback)
}
$.fn.unbind = function(event, callback){
return this.off(event, callback)
}
$.fn.one = function(event, selector, data, callback){
return this.on(event, selector, data, callback, 1)
}
var returnTrue = function(){return true},
returnFalse = function(){return false},
ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,
eventMethods = {
preventDefault: 'isDefaultPrevented',
stopImmediatePropagation: 'isImmediatePropagationStopped',
stopPropagation: 'isPropagationStopped'
}
function compatible(event, source) {
if (source || !event.isDefaultPrevented) {
source || (source = event)
$.each(eventMethods, function(name, predicate) {
var sourceMethod = source[name]
event[name] = function(){
this[predicate] = returnTrue
return sourceMethod && sourceMethod.apply(source, arguments)
}
event[predicate] = returnFalse
})
try {
event.timeStamp || (event.timeStamp = Date.now())
} catch (ignored) { }
if (source.defaultPrevented !== undefined ? source.defaultPrevented :
'returnValue' in source ? source.returnValue === false :
source.getPreventDefault && source.getPreventDefault())
event.isDefaultPrevented = returnTrue
}
return event
}
function createProxy(event) {
var key, proxy = { originalEvent: event }
for (key in event)
if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]
return compatible(proxy, event)
}
$.fn.delegate = function(selector, event, callback){
return this.on(event, selector, callback)
}
$.fn.undelegate = function(selector, event, callback){
return this.off(event, selector, callback)
}
$.fn.live = function(event, callback){
$(document.body).delegate(this.selector, event, callback)
return this
}
$.fn.die = function(event, callback){
$(document.body).undelegate(this.selector, event, callback)
return this
}
$.fn.on = function(event, selector, data, callback, one){
var autoRemove, delegator, $this = this
if (event && !isString(event)) {
$.each(event, function(type, fn){
$this.on(type, selector, data, fn, one)
})
return $this
}
if (!isString(selector) && !isFunction(callback) && callback !== false)
callback = data, data = selector, selector = undefined
if (callback === undefined || data === false)
callback = data, data = undefined
if (callback === false) callback = returnFalse
return $this.each(function(_, element){
if (one) autoRemove = function(e){
remove(element, e.type, callback)
return callback.apply(this, arguments)
}
if (selector) delegator = function(e){
var evt, match = $(e.target).closest(selector, element).get(0)
if (match && match !== element) {
evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})
return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))
}
}
add(element, event, callback, data, selector, delegator || autoRemove)
})
}
$.fn.off = function(event, selector, callback){
var $this = this
if (event && !isString(event)) {
$.each(event, function(type, fn){
$this.off(type, selector, fn)
})
return $this
}
if (!isString(selector) && !isFunction(callback) && callback !== false)
callback = selector, selector = undefined
if (callback === false) callback = returnFalse
return $this.each(function(){
remove(this, event, callback, selector)
})
}
$.fn.trigger = function(event, args){
event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)
event._args = args
return this.each(function(){
// handle focus(), blur() by calling them directly
if (event.type in focus && typeof this[event.type] == "function") this[event.type]()
// items in the collection might not be DOM elements
else if ('dispatchEvent' in this) this.dispatchEvent(event)
else $(this).triggerHandler(event, args)
})
}
// triggers event handlers on current element just as if an event occurred,
// doesn't trigger an actual event, doesn't bubble
$.fn.triggerHandler = function(event, args){
var e, result
this.each(function(i, element){
e = createProxy(isString(event) ? $.Event(event) : event)
e._args = args
e.target = element
$.each(findHandlers(element, event.type || event), function(i, handler){
result = handler.proxy(e)
if (e.isImmediatePropagationStopped()) return false
})
})
return result
}
// shortcut methods for `.bind(event, fn)` for each event type
;('focusin focusout focus blur load resize scroll unload click dblclick '+
'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+
'change select keydown keypress keyup error').split(' ').forEach(function(event) {
$.fn[event] = function(callback) {
return (0 in arguments) ?
this.bind(event, callback) :
this.trigger(event)
}
})
$.Event = function(type, props) {
if (!isString(type)) props = type, type = props.type
var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true
if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])
event.initEvent(type, bubbles, true)
return compatible(event)
}
})(Zepto)
;(function($){
var jsonpID = +new Date(),
document = window.document,
key,
name,
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
scriptTypeRE = /^(?:text|application)\/javascript/i,
xmlTypeRE = /^(?:text|application)\/xml/i,
jsonType = 'application/json',
htmlType = 'text/html',
blankRE = /^\s*$/,
originAnchor = document.createElement('a')
originAnchor.href = window.location.href
// trigger a custom event and return false if it was cancelled
function triggerAndReturn(context, eventName, data) {
var event = $.Event(eventName)
$(context).trigger(event, data)
return !event.isDefaultPrevented()
}
// trigger an Ajax "global" event
function triggerGlobal(settings, context, eventName, data) {
if (settings.global) return triggerAndReturn(context || document, eventName, data)
}
// Number of active Ajax requests
$.active = 0
function ajaxStart(settings) {
if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')
}
function ajaxStop(settings) {
if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')
}
// triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable
function ajaxBeforeSend(xhr, settings) {
var context = settings.context
if (settings.beforeSend.call(context, xhr, settings) === false ||
triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)
return false
triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])
}
function ajaxSuccess(data, xhr, settings, deferred) {
var context = settings.context, status = 'success'
settings.success.call(context, data, status, xhr)
if (deferred) deferred.resolveWith(context, [data, status, xhr])
triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])
ajaxComplete(status, xhr, settings)
}
// type: "timeout", "error", "abort", "parsererror"
function ajaxError(error, type, xhr, settings, deferred) {
var context = settings.context
settings.error.call(context, xhr, type, error)
if (deferred) deferred.rejectWith(context, [xhr, type, error])
triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])
ajaxComplete(type, xhr, settings)
}
// status: "success", "notmodified", "error", "timeout", "abort", "parsererror"
function ajaxComplete(status, xhr, settings) {
var context = settings.context
settings.complete.call(context, xhr, status)
triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])
ajaxStop(settings)
}
function ajaxDataFilter(data, type, settings) {
if (settings.dataFilter == empty) return data
var context = settings.context
return settings.dataFilter.call(context, data, type)
}
// Empty function, used as default callback
function empty() {}
$.ajaxJSONP = function(options, deferred){
if (!('type' in options)) return $.ajax(options)
var _callbackName = options.jsonpCallback,
callbackName = ($.isFunction(_callbackName) ?
_callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),
script = document.createElement('script'),
originalCallback = window[callbackName],
responseData,
abort = function(errorType) {
$(script).triggerHandler('error', errorType || 'abort')
},
xhr = { abort: abort }, abortTimeout
if (deferred) deferred.promise(xhr)
$(script).on('load error', function(e, errorType){
clearTimeout(abortTimeout)
$(script).off().remove()
if (e.type == 'error' || !responseData) {
ajaxError(null, errorType || 'error', xhr, options, deferred)
} else {
ajaxSuccess(responseData[0], xhr, options, deferred)
}
window[callbackName] = originalCallback
if (responseData && $.isFunction(originalCallback))
originalCallback(responseData[0])
originalCallback = responseData = undefined
})
if (ajaxBeforeSend(xhr, options) === false) {
abort('abort')
return xhr
}
window[callbackName] = function(){
responseData = arguments
}
script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName)
document.head.appendChild(script)
if (options.timeout > 0) abortTimeout = setTimeout(function(){
abort('timeout')
}, options.timeout)
return xhr
}
$.ajaxSettings = {
// Default type of request
type: 'GET',
// Callback that is executed before request
beforeSend: empty,
// Callback that is executed if the request succeeds
success: empty,
// Callback that is executed the the server drops error
error: empty,
// Callback that is executed on request complete (both: error and success)
complete: empty,
// The context for the callbacks
context: null,
// Whether to trigger "global" Ajax events
global: true,
// Transport
xhr: function () {
return new window.XMLHttpRequest()
},
// MIME types mapping
// IIS returns Javascript as "application/x-javascript"
accepts: {
script: 'text/javascript, application/javascript, application/x-javascript',
json: jsonType,
xml: 'application/xml, text/xml',
html: htmlType,
text: 'text/plain'
},
// Whether the request is to another domain
crossDomain: false,
// Default timeout
timeout: 0,
// Whether data should be serialized to string
processData: true,
// Whether the browser should be allowed to cache GET responses
cache: true,
//Used to handle the raw response data of XMLHttpRequest.
//This is a pre-filtering function to sanitize the response.
//The sanitized response should be returned
dataFilter: empty
}
function mimeToDataType(mime) {
if (mime) mime = mime.split(';', 2)[0]
return mime && ( mime == htmlType ? 'html' :
mime == jsonType ? 'json' :
scriptTypeRE.test(mime) ? 'script' :
xmlTypeRE.test(mime) && 'xml' ) || 'text'
}
function appendQuery(url, query) {
if (query == '') return url
return (url + '&' + query).replace(/[&?]{1,2}/, '?')
}
// serialize payload and append it to the URL for GET requests
function serializeData(options) {
if (options.processData && options.data && $.type(options.data) != "string")
options.data = $.param(options.data, options.traditional)
if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))
options.url = appendQuery(options.url, options.data), options.data = undefined
}
$.ajax = function(options){
var settings = $.extend({}, options || {}),
deferred = $.Deferred && $.Deferred(),
urlAnchor, hashIndex
for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]
ajaxStart(settings)
if (!settings.crossDomain) {
urlAnchor = document.createElement('a')
urlAnchor.href = settings.url
// cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049
urlAnchor.href = urlAnchor.href
settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)
}
if (!settings.url) settings.url = window.location.toString()
if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)
serializeData(settings)
var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url)
if (hasPlaceholder) dataType = 'jsonp'
if (settings.cache === false || (
(!options || options.cache !== true) &&
('script' == dataType || 'jsonp' == dataType)
))
settings.url = appendQuery(settings.url, '_=' + Date.now())
if ('jsonp' == dataType) {
if (!hasPlaceholder)
settings.url = appendQuery(settings.url,
settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')
return $.ajaxJSONP(settings, deferred)
}
var mime = settings.accepts[dataType],
headers = { },
setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },
protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol,
xhr = settings.xhr(),
nativeSetHeader = xhr.setRequestHeader,
abortTimeout
if (deferred) deferred.promise(xhr)
if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')
setHeader('Accept', mime || '*/*')
if (mime = settings.mimeType || mime) {
if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]
xhr.overrideMimeType && xhr.overrideMimeType(mime)
}
if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))
setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')
if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])
xhr.setRequestHeader = setHeader
xhr.onreadystatechange = function(){
if (xhr.readyState == 4) {
xhr.onreadystatechange = empty
clearTimeout(abortTimeout)
var result, error = false
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {
dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))
if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')
result = xhr.response
else {
result = xhr.responseText
try {
// http://perfectionkills.com/global-eval-what-are-the-options/
// sanitize response accordingly if data filter callback provided
result = ajaxDataFilter(result, dataType, settings)
if (dataType == 'script') (1,eval)(result)
else if (dataType == 'xml') result = xhr.responseXML
else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)
} catch (e) { error = e }
if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)
}
ajaxSuccess(result, xhr, settings, deferred)
} else {
ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)
}
}
}
if (ajaxBeforeSend(xhr, settings) === false) {
xhr.abort()
ajaxError(null, 'abort', xhr, settings, deferred)
return xhr
}
var async = 'async' in settings ? settings.async : true
xhr.open(settings.type, settings.url, async, settings.username, settings.password)
if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]
for (name in headers) nativeSetHeader.apply(xhr, headers[name])
if (settings.timeout > 0) abortTimeout = setTimeout(function(){
xhr.onreadystatechange = empty
xhr.abort()
ajaxError(null, 'timeout', xhr, settings, deferred)
}, settings.timeout)
// avoid sending empty string (#319)
xhr.send(settings.data ? settings.data : null)
return xhr
}
// handle optional data/success arguments
function parseArguments(url, data, success, dataType) {
if ($.isFunction(data)) dataType = success, success = data, data = undefined
if (!$.isFunction(success)) dataType = success, success = undefined
return {
url: url
, data: data
, success: success
, dataType: dataType
}
}
$.get = function(/* url, data, success, dataType */){
return $.ajax(parseArguments.apply(null, arguments))
}
$.post = function(/* url, data, success, dataType */){
var options = parseArguments.apply(null, arguments)
options.type = 'POST'
return $.ajax(options)
}
$.getJSON = function(/* url, data, success */){
var options = parseArguments.apply(null, arguments)
options.dataType = 'json'
return $.ajax(options)
}
$.fn.load = function(url, data, success){
if (!this.length) return this
var self = this, parts = url.split(/\s/), selector,
options = parseArguments(url, data, success),
callback = options.success
if (parts.length > 1) options.url = parts[0], selector = parts[1]
options.success = function(response){
self.html(selector ?
$('<div>').html(response.replace(rscript, "")).find(selector)
: response)
callback && callback.apply(self, arguments)
}
$.ajax(options)
return this
}
var escape = encodeURIComponent
function serialize(params, obj, traditional, scope){
var type, array = $.isArray(obj), hash = $.isPlainObject(obj)
$.each(obj, function(key, value) {
type = $.type(value)
if (scope) key = traditional ? scope :
scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'
// handle data in serializeArray() format
if (!scope && array) params.add(value.name, value.value)
// recurse into nested objects
else if (type == "array" || (!traditional && type == "object"))
serialize(params, value, traditional, key)
else params.add(key, value)
})
}
$.param = function(obj, traditional){
var params = []
params.add = function(key, value) {
if ($.isFunction(value)) value = value()
if (value == null) value = ""
this.push(escape(key) + '=' + escape(value))
}
serialize(params, obj, traditional)
return params.join('&').replace(/%20/g, '+')
}
})(Zepto)
var Zepto=function(){function g(b){return null==b?String(b):P[Y.call(b)]||"object"}function n(b){return"function"==g(b)}function F(b){return null!=b&&b==b.window}function A(b){return"object"==g(b)}function D(b){return A(b)&&!F(b)&&Object.getPrototypeOf(b)==Object.prototype}function B(b){var m=!!b&&"length"in b&&b.length,a=f.type(b);return"function"!=a&&!F(b)&&("array"==a||0===m||"number"==typeof m&&0<m&&m-1 in b)}function I(b){return a.call(b,function(b){return null!=b})}function r(b){return b.replace(/::/g,
"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function K(b){return b in l?l[b]:l[b]=new RegExp("(^|\\s)"+b+"(\\s|$)")}function J(b,m){return"number"!=typeof m||x[r(b)]?m:m+"px"}function C(b){return"children"in b?c.call(b.children):f.map(b.childNodes,function(b){if(1==b.nodeType)return b})}function E(b,m){var a,c=b?b.length:0;for(a=0;a<c;a++)this[a]=b[a];this.length=c;this.selector=m||""}function G(b,a,c){for(k in a)c&&(D(a[k])||
L(a[k]))?(D(a[k])&&!D(b[k])&&(b[k]={}),L(a[k])&&!L(b[k])&&(b[k]=[]),G(b[k],a[k],c)):a[k]!==p&&(b[k]=a[k])}function v(b,a){return null==a?f(b):f(b).filter(a)}function t(b,a,c,d){return n(a)?a.call(b,c,d):a}function w(b,a){var c=b.className||"",m=c&&c.baseVal!==p;if(a===p)return m?c.baseVal:c;m?c.baseVal=a:b.className=a}function y(b){try{return b?"true"==b||("false"==b?!1:"null"==b?null:+b+""==b?+b:/^[\[\{]/.test(b)?f.parseJSON(b):b):b}catch(m){return b}}function H(b,a){a(b);for(var c=0,m=b.childNodes.length;c<
m;c++)H(b.childNodes[c],a)}var p,k,z,u=[],M=u.concat,a=u.filter,c=u.slice,d=window.document,e={},l={},x={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},N=/^\s*<(\w+|!)[^>]*>/,h=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/^(?:body|html)$/i,aa=/([A-Z])/g,ba="val css html text data width height offset".split(" "),O=d.createElement("table"),V=d.createElement("tr"),W={tr:d.createElement("tbody"),tbody:O,
thead:O,tfoot:O,td:V,th:V,"*":d.createElement("div")},ca=/^[\w-]*$/,P={},Y=P.toString,q={},X=d.createElement("div"),Q={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(b){return b instanceof Array};q.matches=function(b,a){if(!a||!b||1!==b.nodeType)return!1;var c=
b.matches||b.webkitMatchesSelector||b.mozMatchesSelector||b.oMatchesSelector||b.matchesSelector;if(c)return c.call(b,a);var m=b.parentNode;(c=!m)&&(m=X).appendChild(b);a=~q.qsa(m,a).indexOf(b);c&&X.removeChild(b);return a};var R=function(b){return b.replace(/-+(.)?/g,function(b,a){return a?a.toUpperCase():""})};var S=function(b){return a.call(b,function(a,c){return b.indexOf(a)==c})};q.fragment=function(b,a,T){var m;h.test(b)&&(m=f(d.createElement(RegExp.$1)));if(!m){b.replace&&(b=b.replace(Z,"<$1></$2>"));
a===p&&(a=N.test(b)&&RegExp.$1);a in W||(a="*");var e=W[a];e.innerHTML=""+b;m=f.each(c.call(e.childNodes),function(){e.removeChild(this)})}if(D(T)){var g=f(m);f.each(T,function(b,a){if(-1<ba.indexOf(b))g[b](a);else g.attr(b,a)})}return m};q.Z=function(b,a){return new E(b,a)};q.isZ=function(b){return b instanceof q.Z};q.init=function(b,a){if(b)if("string"==typeof b)if(b=b.trim(),"<"==b[0]&&N.test(b))a=q.fragment(b,RegExp.$1,a),b=null;else{if(a!==p)return f(a).find(b);a=q.qsa(d,b)}else{if(n(b))return f(d).ready(b);
if(q.isZ(b))return b;if(L(b))a=I(b);else if(A(b))a=[b],b=null;else if(N.test(b))a=q.fragment(b.trim(),RegExp.$1,a),b=null;else{if(a!==p)return f(a).find(b);a=q.qsa(d,b)}}else return q.Z();return q.Z(a,b)};var f=function(b,a){return q.init(b,a)};f.extend=function(b){var a=c.call(arguments,1);if("boolean"==typeof b){var d=b;b=a.shift()}a.forEach(function(a){G(b,a,d)});return b};q.qsa=function(b,a){var m,d="#"==a[0],f=!d&&"."==a[0],e=d||f?a.slice(1):a,g=ca.test(e);return b.getElementById&&g&&d?(m=b.getElementById(e))?
[m]:[]:1!==b.nodeType&&9!==b.nodeType&&11!==b.nodeType?[]:c.call(g&&!d&&b.getElementsByClassName?f?b.getElementsByClassName(e):b.getElementsByTagName(a):b.querySelectorAll(a))};f.contains=d.documentElement.contains?function(b,a){return b!==a&&b.contains(a)}:function(b,a){for(;a&&(a=a.parentNode);)if(a===b)return!0;return!1};f.type=g;f.isFunction=n;f.isWindow=F;f.isArray=L;f.isPlainObject=D;f.isEmptyObject=function(b){for(var a in b)return!1;return!0};f.isNumeric=function(b){var a=Number(b),c=typeof b;
return null!=b&&"boolean"!=c&&("string"!=c||b.length)&&!isNaN(a)&&isFinite(a)||!1};f.inArray=function(b,a,c){return u.indexOf.call(a,b,c)};f.camelCase=R;f.trim=function(b){return null==b?"":String.prototype.trim.call(b)};f.uuid=0;f.support={};f.expr={};f.noop=function(){};f.map=function(b,a){var c=[],d;if(B(b))for(d=0;d<b.length;d++){var m=a(b[d],d);null!=m&&c.push(m)}else for(d in b)m=a(b[d],d),null!=m&&c.push(m);return 0<c.length?f.fn.concat.apply([],c):c};f.each=function(b,a){var c;if(B(b))for(c=
0;c<b.length&&!1!==a.call(b[c],c,b[c]);c++);else for(c in b)if(!1===a.call(b[c],c,b[c]))break;return b};f.grep=function(b,c){return a.call(b,c)};window.JSON&&(f.parseJSON=JSON.parse);f.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(b,a){P["[object "+a+"]"]=a.toLowerCase()});f.fn={constructor:q.Z,length:0,forEach:u.forEach,reduce:u.reduce,push:u.push,sort:u.sort,splice:u.splice,indexOf:u.indexOf,concat:function(){var b,a=[];for(b=0;b<arguments.length;b++){var c=
arguments[b];a[b]=q.isZ(c)?c.toArray():c}return M.apply(q.isZ(this)?this.toArray():this,a)},map:function(b){return f(f.map(this,function(a,c){return b.call(a,c,a)}))},slice:function(){return f(c.apply(this,arguments))},ready:function(b){if("complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)setTimeout(function(){b(f)},0);else{var a=function(){d.removeEventListener("DOMContentLoaded",a,!1);window.removeEventListener("load",a,!1);b(f)};d.addEventListener("DOMContentLoaded",
a,!1);window.addEventListener("load",a,!1)}return this},get:function(b){return b===p?c.call(this):this[0<=b?b:b+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(b){u.every.call(this,function(a,c){return!1!==b.call(a,c,a)});return this},filter:function(b){return n(b)?this.not(this.not(b)):f(a.call(this,function(a){return q.matches(a,b)}))},add:function(b,
a){return f(S(this.concat(f(b,a))))},is:function(b){return"string"==typeof b?0<this.length&&q.matches(this[0],b):b&&this.selector==b.selector},not:function(b){var a=[];if(n(b)&&b.call!==p)this.each(function(c){b.call(this,c)||a.push(this)});else{var d="string"==typeof b?this.filter(b):B(b)&&n(b.item)?c.call(b):f(b);this.forEach(function(b){0>d.indexOf(b)&&a.push(b)})}return f(a)},has:function(b){return this.filter(function(){return A(b)?f.contains(this,b):f(this).find(b).size()})},eq:function(b){return-1===
b?this.slice(b):this.slice(b,+b+1)},first:function(){var b=this[0];return b&&!A(b)?b:f(b)},last:function(){var b=this[this.length-1];return b&&!A(b)?b:f(b)},find:function(b){var a=this;return b?"object"==typeof b?f(b).filter(function(){var b=this;return u.some.call(a,function(a){return f.contains(a,b)})}):1==this.length?f(q.qsa(this[0],b)):this.map(function(){return q.qsa(this,b)}):f()},closest:function(b,a){var c=[],d="object"==typeof b&&f(b);this.each(function(m,f){for(;f&&!(d?0<=d.indexOf(f):q.matches(f,
b));)f=f!==a&&!(null!=f&&f.nodeType==f.DOCUMENT_NODE)&&f.parentNode;f&&0>c.indexOf(f)&&c.push(f)});return f(c)},parents:function(b){for(var a=[],c=this;0<c.length;)c=f.map(c,function(b){if((b=b.parentNode)&&(null==b||b.nodeType!=b.DOCUMENT_NODE)&&0>a.indexOf(b))return a.push(b),b});return v(a,b)},parent:function(b){return v(S(this.pluck("parentNode")),b)},children:function(b){return v(this.map(function(){return C(this)}),b)},contents:function(){return this.map(function(){return this.contentDocument||
c.call(this.childNodes)})},siblings:function(b){return v(this.map(function(b,c){return a.call(C(c.parentNode),function(b){return b!==c})}),b)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(b){return f.map(this,function(a){return a[b]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display="");if("none"==getComputedStyle(this,"").getPropertyValue("display")){var b=this.style,a=this.nodeName;if(!e[a]){var c=d.createElement(a);
d.body.appendChild(c);var f=getComputedStyle(c,"").getPropertyValue("display");c.parentNode.removeChild(c);"none"==f&&(f="block");e[a]=f}b.display=e[a]}})},replaceWith:function(b){return this.before(b).remove()},wrap:function(b){var a=n(b);if(this[0]&&!a)var c=f(b).get(0),d=c.parentNode||1<this.length;return this.each(function(m){f(this).wrapAll(a?b.call(this,m):d?c.cloneNode(!0):c)})},wrapAll:function(b){if(this[0]){f(this[0]).before(b=f(b));for(var a;(a=b.children()).length;)b=a.first();f(b).append(this)}return this},
wrapInner:function(b){var a=n(b);return this.each(function(c){var d=f(this),m=d.contents();c=a?b.call(this,c):b;m.length?m.wrapAll(c):d.append(c)})},unwrap:function(){this.parent().each(function(){f(this).replaceWith(f(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(b){return this.each(function(){var a=f(this);(b===p?"none"==a.css("display"):b)?a.show():a.hide()})},prev:function(b){return f(this.pluck("previousElementSibling")).filter(b||
"*")},next:function(b){return f(this.pluck("nextElementSibling")).filter(b||"*")},html:function(b){return 0 in arguments?this.each(function(a){var c=this.innerHTML;f(this).empty().append(t(this,b,a,c))}):0 in this?this[0].innerHTML:null},text:function(b){return 0 in arguments?this.each(function(a){a=t(this,b,a,this.textContent);this.textContent=null==a?"":""+a}):0 in this?this.pluck("textContent").join(""):null},attr:function(b,a){var c;return"string"!=typeof b||1 in arguments?this.each(function(c){if(1===
this.nodeType)if(A(b))for(k in b){var d=k;c=b[k];null==c?this.removeAttribute(d):this.setAttribute(d,c)}else d=b,c=t(this,a,c,this.getAttribute(b)),null==c?this.removeAttribute(d):this.setAttribute(d,c)}):0 in this&&1==this[0].nodeType&&null!=(c=this[0].getAttribute(b))?c:p},removeAttr:function(b){return this.each(function(){1===this.nodeType&&b.split(" ").forEach(function(b){this.removeAttribute(b)},this)})},prop:function(b,a){b=Q[b]||b;return"string"!=typeof b||1 in arguments?this.each(function(c){if(A(b))for(k in b)this[Q[k]||
k]=b[k];else this[b]=t(this,a,c,this[b])}):this[0]&&this[0][b]},removeProp:function(b){b=Q[b]||b;return this.each(function(){delete this[b]})},data:function(b,a){var c="data-"+b.replace(aa,"-$1").toLowerCase();c=1 in arguments?this.attr(c,a):this.attr(c);return null!==c?y(c):p},val:function(b){return 0 in arguments?(null==b&&(b=""),this.each(function(a){this.value=t(this,b,a,this.value)})):this[0]&&(this[0].multiple?f(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):
this[0].value)},offset:function(b){if(b)return this.each(function(a){var c=f(this);a=t(this,b,a,c.offset());var d=c.offsetParent().offset();a={top:a.top-d.top,left:a.left-d.left};"static"==c.css("position")&&(a.position="relative");c.css(a)});if(!this.length)return null;if(d.documentElement!==this[0]&&!f.contains(d.documentElement,this[0]))return{top:0,left:0};var a=this[0].getBoundingClientRect();return{left:a.left+window.pageXOffset,top:a.top+window.pageYOffset,width:Math.round(a.width),height:Math.round(a.height)}},
css:function(b,a){if(2>arguments.length){var c=this[0];if("string"==typeof b)return c?c.style[R(b)]||getComputedStyle(c,"").getPropertyValue(b):void 0;if(L(b)){if(!c)return;var d={},e=getComputedStyle(c,"");f.each(b,function(b,a){d[a]=c.style[R(a)]||e.getPropertyValue(a)});return d}}var m="";if("string"==g(b))a||0===a?m=r(b)+":"+J(b,a):this.each(function(){this.style.removeProperty(r(b))});else for(k in b)b[k]||0===b[k]?m+=r(k)+":"+J(k,b[k])+";":this.each(function(){this.style.removeProperty(r(k))});
return this.each(function(){this.style.cssText+=";"+m})},index:function(b){return b?this.indexOf(f(b)[0]):this.parent().children().indexOf(this[0])},hasClass:function(b){return b?u.some.call(this,function(b){return this.test(w(b))},K(b)):!1},addClass:function(b){return b?this.each(function(a){if("className"in this){z=[];var c=w(this);t(this,b,a,c).split(/\s+/g).forEach(function(b){f(this).hasClass(b)||z.push(b)},this);z.length&&w(this,c+(c?" ":"")+z.join(" "))}}):this},removeClass:function(b){return this.each(function(a){if("className"in
this){if(b===p)return w(this,"");z=w(this);t(this,b,a,z).split(/\s+/g).forEach(function(b){z=z.replace(K(b)," ")});w(this,z.trim())}})},toggleClass:function(b,a){return b?this.each(function(c){var d=f(this);t(this,b,c,w(this)).split(/\s+/g).forEach(function(b){(a===p?!d.hasClass(b):a)?d.addClass(b):d.removeClass(b)})}):this},scrollTop:function(b){if(this.length){var a="scrollTop"in this[0];return b===p?a?this[0].scrollTop:this[0].pageYOffset:this.each(a?function(){this.scrollTop=b}:function(){this.scrollTo(this.scrollX,
b)})}},scrollLeft:function(b){if(this.length){var a="scrollLeft"in this[0];return b===p?a?this[0].scrollLeft:this[0].pageXOffset:this.each(a?function(){this.scrollLeft=b}:function(){this.scrollTo(b,this.scrollY)})}},position:function(){if(this.length){var b=this[0],a=this.offsetParent(),c=this.offset(),d=U.test(a[0].nodeName)?{top:0,left:0}:a.offset();c.top-=parseFloat(f(b).css("margin-top"))||0;c.left-=parseFloat(f(b).css("margin-left"))||0;d.top+=parseFloat(f(a[0]).css("border-top-width"))||0;d.left+=
parseFloat(f(a[0]).css("border-left-width"))||0;return{top:c.top-d.top,left:c.left-d.left}}},offsetParent:function(){return this.map(function(){for(var b=this.offsetParent||d.body;b&&!U.test(b.nodeName)&&"static"==f(b).css("position");)b=b.offsetParent;return b})}};f.fn.detach=f.fn.remove;["width","height"].forEach(function(b){var a=b.replace(/./,function(b){return b[0].toUpperCase()});f.fn[b]=function(c){var d,e=this[0];return c===p?F(e)?e["inner"+a]:null!=e&&e.nodeType==e.DOCUMENT_NODE?e.documentElement["scroll"+
a]:(d=this.offset())&&d[b]:this.each(function(a){e=f(this);e.css(b,t(this,c,a,e[b]()))})}});["after","prepend","before","append"].forEach(function(b,a){var c=a%2;f.fn[b]=function(){var b,e=f.map(arguments,function(a){var c=[];b=g(a);return"array"==b?(a.forEach(function(b){if(b.nodeType!==p)return c.push(b);if(f.zepto.isZ(b))return c=c.concat(b.get());c=c.concat(q.fragment(b))}),c):"object"==b||null==a?a:q.fragment(a)}),l,h=1<this.length;return 1>e.length?this:this.each(function(b,g){l=c?g:g.parentNode;
g=0==a?g.nextSibling:1==a?g.firstChild:2==a?g:null;var m=f.contains(d.documentElement,l);e.forEach(function(b){if(h)b=b.cloneNode(!0);else if(!l)return f(b).remove();l.insertBefore(b,g);m&&H(b,function(b){if(!(null==b.nodeName||"SCRIPT"!==b.nodeName.toUpperCase()||b.type&&"text/javascript"!==b.type||b.src)){var a=b.ownerDocument?b.ownerDocument.defaultView:window;a.eval.call(a,b.innerHTML)}})})})};f.fn[c?b+"To":"insert"+(a?"Before":"After")]=function(a){f(a)[b](this);return this}});q.Z.prototype=
E.prototype=f.fn;q.uniq=S;q.deserializeValue=y;f.zepto=q;return f}();window.Zepto=Zepto;void 0===window.$&&(window.$=Zepto);
(function(g){function n(a){return a._zid||(a._zid=J++)}function F(a,c,d,e){c=A(c);if(c.ns)var g=new RegExp("(?:^| )"+c.ns.replace(" "," .* ?")+"(?: |$)");return(t[n(a)]||[]).filter(function(a){return a&&(!c.e||a.e==c.e)&&(!c.ns||g.test(a.ns))&&(!d||n(a.fn)===n(d))&&(!e||a.sel==e)})}function A(a){a=(""+a).split(".");return{e:a[0],ns:a.slice(1).sort().join(" ")}}function D(a){return p[a]||y&&H[a]||a}function B(a,c,d,e,l,k,N){var h=n(a),x=t[h]||(t[h]=[]);c.split(/\s/).forEach(function(c){if("ready"==
c)return g(document).ready(d);var h=A(c);h.fn=d;h.sel=l;h.e in p&&(d=function(a){var c=a.relatedTarget;if(!c||c!==this&&!g.contains(this,c))return h.fn.apply(this,arguments)});var n=(h.del=k)||d;h.proxy=function(c){c=r(c);if(!c.isImmediatePropagationStopped()){c.data=e;var d=n.apply(a,c._args==C?[c]:[c].concat(c._args));!1===d&&(c.preventDefault(),c.stopPropagation());return d}};h.i=x.length;x.push(h);"addEventListener"in a&&a.addEventListener(D(h.e),h.proxy,h.del&&!y&&h.e in H||!!N)})}function I(a,
c,d,e,g){var l=n(a);(c||"").split(/\s/).forEach(function(c){F(a,c,d,e).forEach(function(c){delete t[l][c.i];"removeEventListener"in a&&a.removeEventListener(D(c.e),c.proxy,c.del&&!y&&c.e in H||!!g)})})}function r(a,c){if(c||!a.isDefaultPrevented){c||(c=a);g.each(M,function(d,e){var g=c[d];a[d]=function(){this[e]=k;return g&&g.apply(c,arguments)};a[e]=z});try{a.timeStamp||(a.timeStamp=Date.now())}catch(d){}if(c.defaultPrevented!==C?c.defaultPrevented:"returnValue"in c?!1===c.returnValue:c.getPreventDefault&&
c.getPreventDefault())a.isDefaultPrevented=k}return a}function K(a){var c,d={originalEvent:a};for(c in a)u.test(c)||a[c]===C||(d[c]=a[c]);return r(d,a)}var J=1,C,E=Array.prototype.slice,G=g.isFunction,v=function(a){return"string"==typeof a},t={},w={},y="onfocusin"in window,H={focus:"focusin",blur:"focusout"},p={mouseenter:"mouseover",mouseleave:"mouseout"};w.click=w.mousedown=w.mouseup=w.mousemove="MouseEvents";g.event={add:B,remove:I};g.proxy=function(a,c){var d=2 in arguments&&E.call(arguments,
2);if(G(a)){var e=function(){return a.apply(c,d?d.concat(E.call(arguments)):arguments)};e._zid=n(a);return e}if(v(c))return d?(d.unshift(a[c],a),g.proxy.apply(null,d)):g.proxy(a[c],a);throw new TypeError("expected function");};g.fn.bind=function(a,c,d){return this.on(a,c,d)};g.fn.unbind=function(a,c){return this.off(a,c)};g.fn.one=function(a,c,d,e){return this.on(a,c,d,e,1)};var k=function(){return!0},z=function(){return!1},u=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,M={preventDefault:"isDefaultPrevented",
stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};g.fn.delegate=function(a,c,d){return this.on(c,a,d)};g.fn.undelegate=function(a,c,d){return this.off(c,a,d)};g.fn.live=function(a,c){g(document.body).delegate(this.selector,a,c);return this};g.fn.die=function(a,c){g(document.body).undelegate(this.selector,a,c);return this};g.fn.on=function(a,c,d,e,l){var k,n,h=this;if(a&&!v(a))return g.each(a,function(a,e){h.on(a,c,d,e,l)}),h;v(c)||G(e)||!1===e||(e=d,
d=c,c=C);if(e===C||!1===d)e=d,d=C;!1===e&&(e=z);return h.each(function(h,x){l&&(k=function(a){I(x,a.type,e);return e.apply(this,arguments)});c&&(n=function(a){var d=g(a.target).closest(c,x).get(0);if(d&&d!==x){var h=g.extend(K(a),{currentTarget:d,liveFired:x});return(k||e).apply(d,[h].concat(E.call(arguments,1)))}});B(x,a,e,d,c,n||k)})};g.fn.off=function(a,c,d){var e=this;if(a&&!v(a))return g.each(a,function(a,d){e.off(a,c,d)}),e;v(c)||G(d)||!1===d||(d=c,c=C);!1===d&&(d=z);return e.each(function(){I(this,
a,d,c)})};g.fn.trigger=function(a,c){a=v(a)||g.isPlainObject(a)?g.Event(a):r(a);a._args=c;return this.each(function(){if(a.type in H&&"function"==typeof this[a.type])this[a.type]();else"dispatchEvent"in this?this.dispatchEvent(a):g(this).triggerHandler(a,c)})};g.fn.triggerHandler=function(a,c){var d,e;this.each(function(l,k){d=K(v(a)?g.Event(a):a);d._args=c;d.target=k;g.each(F(k,a.type||a),function(a,c){e=c.proxy(d);if(d.isImmediatePropagationStopped())return!1})});return e};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(a){g.fn[a]=
function(c){return 0 in arguments?this.bind(a,c):this.trigger(a)}});g.Event=function(a,c){v(a)||(c=a,a=c.type);var d=document.createEvent(w[a]||"Events"),e=!0;if(c)for(var g in c)"bubbles"==g?e=!!c[g]:d[g]=c[g];d.initEvent(a,e,!0);return r(d)}})(Zepto);
(function(g){function n(a,c,d,e){if(a.global)return a=c||t,d=g.Event(d),g(a).trigger(d,e),!d.isDefaultPrevented()}function F(a){a.global&&0===g.active++&&n(a,null,"ajaxStart")}function A(a,c){var d=c.context;if(!1===c.beforeSend.call(d,a,c)||!1===n(c,d,"ajaxBeforeSend",[a,c]))return!1;n(c,d,"ajaxSend",[a,c])}function D(a,c,d,e){var g=d.context;d.success.call(g,a,"success",c);e&&e.resolveWith(g,[a,"success",c]);n(d,g,"ajaxSuccess",[c,d,a]);I("success",c,d)}function B(a,c,d,e,g){var l=e.context;e.error.call(l,
d,c,a);g&&g.rejectWith(l,[d,c,a]);n(e,l,"ajaxError",[d,e,a||c]);I(c,d,e)}function I(a,c,d){var e=d.context;d.complete.call(e,c,a);n(d,e,"ajaxComplete",[c,d]);d.global&&!--g.active&&n(d,null,"ajaxStop")}function r(){}function K(a){a&&(a=a.split(";",2)[0]);return a&&("text/html"==a?"html":"application/json"==a?"json":p.test(a)?"script":k.test(a)&&"xml")||"text"}function J(a,c){return""==c?a:(a+"&"+c).replace(/[&?]{1,2}/,"?")}function C(a){a.processData&&a.data&&"string"!=g.type(a.data)&&(a.data=g.param(a.data,
a.traditional));!a.data||a.type&&"GET"!=a.type.toUpperCase()&&"jsonp"!=a.dataType||(a.url=J(a.url,a.data),a.data=void 0)}function E(a,c,d,e){g.isFunction(c)&&(e=d,d=c,c=void 0);g.isFunction(d)||(e=d,d=void 0);return{url:a,data:c,success:d,dataType:e}}function G(a,c,d,e){var l,k=g.isArray(c),n=g.isPlainObject(c);g.each(c,function(c,x){l=g.type(x);e&&(c=d?e:e+"["+(n||"object"==l||"array"==l?c:"")+"]");!e&&k?a.add(x.name,x.value):"array"==l||!d&&"object"==l?G(a,x,d,c):a.add(c,x)})}var v=+new Date,t=
window.document,w,y,H=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,p=/^(?:text|application)\/javascript/i,k=/^(?:text|application)\/xml/i,z=/^\s*$/,u=t.createElement("a");u.href=window.location.href;g.active=0;g.ajaxJSONP=function(a,c){if(!("type"in a))return g.ajax(a);var d=a.jsonpCallback,e=(g.isFunction(d)?d():d)||"Zepto"+v++,l=t.createElement("script"),k=window[e],n,h=function(a){g(l).triggerHandler("error",a||"abort")},p={abort:h},r;c&&c.promise(p);g(l).on("load error",function(d,h){clearTimeout(r);
g(l).off().remove();"error"!=d.type&&n?D(n[0],p,a,c):B(null,h||"error",p,a,c);window[e]=k;n&&g.isFunction(k)&&k(n[0]);k=n=void 0});if(!1===A(p,a))return h("abort"),p;window[e]=function(){n=arguments};l.src=a.url.replace(/\?(.+)=\?/,"?$1="+e);t.head.appendChild(l);0<a.timeout&&(r=setTimeout(function(){h("timeout")},a.timeout));return p};g.ajaxSettings={type:"GET",beforeSend:r,success:r,error:r,complete:r,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",
json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:r};g.ajax=function(a){var c=g.extend({},a||{}),d=g.Deferred&&g.Deferred();for(w in g.ajaxSettings)void 0===c[w]&&(c[w]=g.ajaxSettings[w]);F(c);if(!c.crossDomain){var e=t.createElement("a");e.href=c.url;e.href=e.href;c.crossDomain=u.protocol+"//"+u.host!==e.protocol+"//"+e.host}c.url||(c.url=window.location.toString());-1<(e=c.url.indexOf("#"))&&(c.url=
c.url.slice(0,e));C(c);var l=c.dataType;(e=/\?.+=\?/.test(c.url))&&(l="jsonp");!1!==c.cache&&(a&&!0===a.cache||"script"!=l&&"jsonp"!=l)||(c.url=J(c.url,"_="+Date.now()));if("jsonp"==l)return e||(c.url=J(c.url,c.jsonp?c.jsonp+"=?":!1===c.jsonp?"":"callback=?")),g.ajaxJSONP(c,d);a=c.accepts[l];var k={};e=function(a,c){k[a.toLowerCase()]=[a,c]};var n=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,h=c.xhr(),p=h.setRequestHeader,v;d&&d.promise(h);c.crossDomain||e("X-Requested-With","XMLHttpRequest");
e("Accept",a||"*/*");if(a=c.mimeType||a)-1<a.indexOf(",")&&(a=a.split(",",2)[0]),h.overrideMimeType&&h.overrideMimeType(a);(c.contentType||!1!==c.contentType&&c.data&&"GET"!=c.type.toUpperCase())&&e("Content-Type",c.contentType||"application/x-www-form-urlencoded");if(c.headers)for(y in c.headers)e(y,c.headers[y]);h.setRequestHeader=e;h.onreadystatechange=function(){if(4==h.readyState){h.onreadystatechange=r;clearTimeout(v);var a=!1;if(200<=h.status&&300>h.status||304==h.status||0==h.status&&"file:"==
n){l=l||K(c.mimeType||h.getResponseHeader("content-type"));if("arraybuffer"==h.responseType||"blob"==h.responseType)var e=h.response;else{e=h.responseText;try{e=c.dataFilter==r?e:c.dataFilter.call(c.context,e,l),"script"==l?(0,eval)(e):"xml"==l?e=h.responseXML:"json"==l&&(e=z.test(e)?null:g.parseJSON(e))}catch(O){a=O}if(a)return B(a,"parsererror",h,c,d)}D(e,h,c,d)}else B(h.statusText||null,h.status?"error":"abort",h,c,d)}};if(!1===A(h,c))return h.abort(),B(null,"abort",h,c,d),h;h.open(c.type,c.url,
"async"in c?c.async:!0,c.username,c.password);if(c.xhrFields)for(y in c.xhrFields)h[y]=c.xhrFields[y];for(y in k)p.apply(h,k[y]);0<c.timeout&&(v=setTimeout(function(){h.onreadystatechange=r;h.abort();B(null,"timeout",h,c,d)},c.timeout));h.send(c.data?c.data:null);return h};g.get=function(){return g.ajax(E.apply(null,arguments))};g.post=function(){var a=E.apply(null,arguments);a.type="POST";return g.ajax(a)};g.getJSON=function(){var a=E.apply(null,arguments);a.dataType="json";return g.ajax(a)};g.fn.load=
function(a,c,d){if(!this.length)return this;var e=this,l=a.split(/\s/);a=E(a,c,d);var k=a.success;if(1<l.length){a.url=l[0];var n=l[1]}a.success=function(a){e.html(n?g("<div>").html(a.replace(H,"")).find(n):a);k&&k.apply(e,arguments)};g.ajax(a);return this};var M=encodeURIComponent;g.param=function(a,c){var d=[];d.add=function(a,c){g.isFunction(c)&&(c=c());null==c&&(c="");this.push(M(a)+"="+M(c))};G(d,a,c);return d.join("&").replace(/%20/g,"+")}})(Zepto);
\ No newline at end of file
{}
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"timestamp": 1530520559768, "timestamp": 1530520559768,
"data": { "data": {
"totalScore": 238, "totalScore": 238,
"maxScore": 93, "maxScore": 1,
"maxScoreTime": "2018-06-29 19:47:35", "maxScoreTime": "2018-06-29 19:47:35",
"rank": 1, "rank": 1,
"percentage": 100.00, "percentage": 100.00,
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"code": 0, "code": 0,
"btnText": "开始游戏", "btnText": "开始游戏",
"btnDisable": false, "btnDisable": false,
"text": "今日剩余50次免费机会", "text": "免费1次",
"btnEventType": null, "btnEventType": null,
"btnEvent": null "btnEvent": null
}, },
......
{
"success": true,
"code": 10000,
"desc": null,
"desc2": "游戏超时了!下次稍微玩快一点哦!",
"data": {
"orderId": 1915551,
"rsp": {
"totalScore": 122,
"maxScore": 122,
"maxScoreTime": "2018-04-17 11:02:47",
"rank": 1,
"percentage": 99.00,
"token": "/*de1p57gzlWHPB0oxj33*/var/*pnNUF3DoYb6UMSp*/__076KsOqa/*jStvZLjEnH6r*/=\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\n/*iGQdoj9XO*/./*kxZHMxtNo8sW*/\\u0066r\\u006fm\\u0043ha\\u0072C\\u006fde/*B5lirw9zGMC*/;\nvar/*iMApn8H9LUexXgbq*/_x_2Bd = [/*epZtAGJKfksd3iwfxiE*/1054,3876,579,3959,2426,/*MJaFDXV3qltvP2Hr8*/];//5EytlwVm1NmyByt\nvar/*IZSeCiQS00d8GgDzJU4*/_$FoT6/*XJPkgG6t6m50Lg884*/=/*VCuLfpxk0GhGj4ZI*/function(/*ydNqBRjn2zqwQaaH*/){\n/*Jd7gaLF*/return/*9bVQp56BlvY6Is*/arguments[/*DYU0QuRhm7O*/0]^/*vPlAmDixThZl5sdS0*/\n/*SUX4jR7Lr*/_x_2Bd[/*cFsu01*/0];/*sMsujZbxAJGEZBNaR*/}/*SeL3fXntthVJ1*/;\nvar/*UvC6bSrbN3q1kTX*/_$yI02/*ED2tBjL*/=/*kZfLU2GU0*/function(/*kVI9fRD*/){\n/*IIKDIdasg*/return/*1akA7xnetiDFXSCxW*/arguments[/*8q3UIK1ImBWXDZ*/0]^/*Ln4pcuWYo*/\n/*IFOh800sJKIrE*/_x_2Bd[/*jWGzQ60W*/1];/*TDeh2yiXeU*/}/*STSgKSxup5mJN*/;\nvar/*LeZ5io7XL*/_$GVG/*CtKFl79h*/=/*2wn0o*/function(/*TamhA*/){\n/*wYRLLfV*/return/*WajQjGl*/arguments[/*j7abTeE163AWK25tc*/0]^/*0FTVKrQ6hyjAu0G*/\n/*U2OCtGr3zVObvGOR*/_x_2Bd[/*jhbqR5luLc*/2];/*ZU5wcoaUR8to79*/}/*UHPyh8x9z*/;\nvar/*8VE8Y*/_$JbA/*cZuGYBOVDXRTRLNPx*/=/*WuSIVm*/function(/*WNtlYFZpPjT5fjem*/){\n/*SM97WURugN1*/return/*saMik5gAlMoHLN*/arguments[/*XhuNwkhNNsy4utIt*/0]^/*VRqr79EYun0t0quipIX*/\n/*uJQ7rEffyge4W4DXC*/_x_2Bd[/*qOmLavolgEHN6fA*/3];/*EX3UIquaRiOqQqsG9K*/}/*8zpCJAHGLeNPF7tv9Gp*/;\nvar/*l0HkqSs*/_$nRJ/*prCzB3y*/=/*j5OlWzh*/function(/*LLVPz0AitK28rLGLZ*/){\n/*Q7c6PQ1JSsAMib*/return/*bDpOMHAYScvJK*/arguments[/*A6vDwo*/0]^/*lUjmizrojuv1*/\n/*bnY8NxTbZwnEAqe*/_x_2Bd[/*xjRkXZD6Uk4WCyGAeb*/4];/*SKUacoLVZpka*/}/*tdKZZW5Cx3UtId*/;\n/*f4EasWboA3cfq*/\\u0065\\u0076\\u0061\\u006c/*E1Xnnbc*/(__076KsOqa(32)\n+/*uoLZy03O3nwxjEAnD1*/__076KsOqa(956/0xA,116,~(0x6f^/*0Mm*/-1),Math.abs(107)&-1,_$GVG(-1-~/*4jBm*/(0x226^0)),110,0x20,0x3d64>>/*g3bES7ay8Kdp*/4>>4,-1-~/*DZb*/(0x20^0),34,\n113,1090/0xA,0x6441>>/*FiUizY7o3*/4>>4,115&(-1^0x00),110,_$yI02(0xf4922/0400),0x6b,34/*NiH838QMhyVPMs*/));/*miSpZLDi8rhs6*/\n",
"consumerId": 1539361,
"status": {
"code": 0,
"btnText": "开始游戏",
"btnDisable": false,
"text": "1积分/次",
"btnEventType": null,
"btnEvent": null
}
}
}
}
\ No newline at end of file
{
"timestamp": 12345678,
"success": true,
"data": {
"reviveCardNum": 2,
"status": true
}
}
\ No newline at end of file
{
"success": true,
"data": [
{
"totalScore": 123,
"maxScore": 123,
"consumerId": 12345,
"credits": 12121,
"allowStart": true,
"ngameId": 3849,
"lock": true,
"status": {
"code": 0,
"btnText": "开始游戏",
"btnDisable": false,
"text": "1积分/次",
"btnEventType": "",
"btnEvent": ""
}
},
{
"totalScore": 123,
"maxScore": 123,
"consumerId": 12345,
"credits": 12121,
"allowStart": true,
"ngameId": 3850,
"lock": true,
"status": {
"code": 0,
"btnText": "开始游戏",
"btnDisable": false,
"text": "1积分/次",
"btnEventType": "",
"btnEvent": ""
}
},
{
"totalScore": 123,
"maxScore": 123,
"consumerId": 12345,
"credits": 12121,
"allowStart": true,
"ngameId": 3851,
"lock": true,
"status": {
"code": 0,
"btnText": "开始游戏",
"btnDisable": false,
"text": "1积分/次",
"btnEventType": "",
"btnEvent": ""
}
}
]
}
\ No newline at end of file
{
"timestamp":12345678,
"success":true,
"data":0
}
\ No newline at end of file
{
"success": true,
"data": {
"consumerId": 123456,
"totalScore": 500,
"ngameRealTimeRankRsp": {
"userList": [
{
"cid": 12345,
"rank": 1,
"maxScore": 666,
"nickName": "嘻嘻啊哈哈",
"avatar": "http://1213123"
},
{
"cid": 123456,
"rank": 2,
"maxScore": 665,
"nickName": "嘻嘻啊哈哈1",
"avatar": "http://12131232"
}
],
"user": {
"cid": 123456,
"rank": 2,
"maxScore": 665,
"nickName": "嘻嘻啊哈哈1",
"avatar": "http://12131232"
},
"inRank": true
}
}
}
\ No newline at end of file
{
"name": "Annie2xProject",
"language": "javascript",
"type": "canvas",
"version": "1.0.0",
"description": "通过Flash2x工具转换的项目.",
"main": "index.html",
"scripts": {
"postinstall": "npm link duiba-tc duiba-tl duiba-tw duiba-wx"
},
"author": "anlun214 qq:58529016",
"license": "MIT",
"devDependencies": {},
"dependencies": {
"tslib": "^1.9.3"
}
}
{"gameWinSkin":["src/gameWinSkin/gameWinSkinAuto.js","src/gameWinSkin/GameWinSkin.js","src/gameWinSkin/OptionItem.js"],"gameLoseSkin":["src/gameLoseSkin/gameLoseSkinAuto.js","src/gameLoseSkin/GameLoseSkin.js","src/gameLoseSkin/OptionItemSkin.js"],"gameWinnerSkin":["src/gameWinnerSkin/gameWinnerSkinAuto.js","src/gameWinnerSkin/GameWinnerSkin.js"],"gameEndSkin":["src/gameEndSkin/gameEndSkinAuto.js","src/gameEndSkin/GameEndSkin.js"],"gameStartSkin":["src/gameStartSkin/gameStartSkinAuto.js","src/gameStartSkin/GameStartSkin.js"],"gamePlaySkin":["src/gamePlaySkin/gamePlaySkinAuto.js","src/gamePlaySkin/GamePlaySkin.js","src/gamePlaySkin/Level2.js","src/gamePlaySkin/Level1.js"],"gameEndRankSkin":["src/gameEndRankSkin/gameEndRankSkinAuto.js","src/gameEndRankSkin/GameEndRankSkin.js","src/gameEndRankSkin/RoleListItem.js","src/gameEndRankSkin/RankListItem.js"],"gameRealTimeRankSkin":["src/gameRealTimeRankSkin/gameRealTimeRankSkinAuto.js","src/gameRealTimeRankSkin/GameRealTimeRankSkin.js","src/gameRealTimeRankSkin/AlwaysRankListItem.js","src/gameRealTimeRankSkin/Gold.js"],"gameGuideSkin":["src/gameGuideSkin/gameGuideSkinAuto.js","src/gameGuideSkin/GameGuideSkin.js"],"msgSkin":["src/msgSkin/msgSkinAuto.js","src/msgSkin/MsgSkin.js"],"ruleSkin":["src/ruleSkin/ruleSkinAuto.js","src/ruleSkin/RuleSkin.js"],"waitingSkin":["src/waitingSkin/waitingSkinAuto.js","src/waitingSkin/WaitingSkin.js"]}
\ No newline at end of file
/**
* Created by anlun on 16/7/16.
*/
var fs = require('fs');
var path = require('path');
var merge = require('merge-stream');
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var del = require('del');
var resourcePath = 'resource';
var releasedPath = "released";
var releasedSrcPath = "released/src";
var releasedResPath = "released/resource";
var replace = require('gulp-replace');
var buildJsConfig = require('./build.json');
var gulpSequence = require('gulp-sequence');
var gulpPngquant = require('gulp-pngquant');
var base64 = require('base64-min');
var isPageToOne = false;
var isHasF2xShare = false;
var shareList = {};
function getFolders(dir) {
return fs.readdirSync(dir)
.filter(function (file) {
return fs.statSync(path.join(dir, file)).isDirectory();
});
}
gulp.task('delReleased', function () {
return del(releasedPath);
});
gulp.task('buildJS', function () {
for (var item in buildJsConfig) {
var houzui = ".min.js";
if (isPageToOne) {
houzui = ".js";
buildJsConfig[item].unshift("released/resource/" + item + "/" + item + ".res.js");
}
gulp.src(buildJsConfig[item])
.pipe(concat(item + houzui))
.pipe(uglify())
.pipe(gulp.dest(releasedSrcPath));
}
if (isPageToOne) {
gulp.src(
[
'./libs/zepto.min.js',
'./libs/annieCore.min.js',
'./libs/annieUI.min.js',
'./libs/downloadApp.js',
'./libs/security.js',
'./released/output.js'])
.pipe(concat('all.js'))
.pipe(uglify())
.pipe(gulp.dest('released'))
// del('released/libs');
// del('released/output.js');
} else {
gulp.src("src/Main.js")
.pipe(uglify())
.pipe(rename("f2xMain.min.js"))
.pipe(gulp.dest(releasedSrcPath));
}
});
gulp.task('output', function (params) {
var date = new Date();
var shareContent = "";
if (isHasF2xShare) {
var shareValue = [];
for (var item in shareList) {
shareValue.push("\"" + item + "\"");
}
shareContent = "Flash2x._shareSceneList=[" + shareValue.join() + "];"
}
// gulp.src("src/Main.js")
// .pipe(uglify()).pipe(replace("window.addEventListener", shareContent+"Flash2x._isReleased="+date.getTime()+";window.addEventListener"))
// .pipe(rename("f2xMain.min.js"))
// .pipe(gulp.dest(releasedSrcPath));
return gulp.src("output.js")
.pipe(replace("!function", shareContent + "Flash2x._isReleased=" + date.getTime() + ";F2xExtend = __extends;!function"))
.pipe(gulp.dest(releasedPath));
})
gulp.task('replaceIndexHtml', function () {
return gulp.src('index.html')
.pipe(replace("Main.js", "f2xMain.min.js"))
.pipe(gulp.dest(releasedPath));
});
gulp.task('copyResource', function () {
return gulp.src("resource/**/*").pipe(gulp.dest('released/resource'));
});
gulp.task('copyLibs', function () {
return gulp.src("libs/**/*.js").pipe(gulp.dest('released/libs'));
});
gulp.task('replaceResJson', function () {
var rex1 = /[\s\r\n\t]+/g;
var rex2 = /,?\{"src":"src\/.*?","type":"javascript"\}/g;
var rex3 = /"src":"src\/.+?\.js/;
var rex4 = /\[,/g;
var rex5 = /,\]/g;
var folders = getFolders(resourcePath);
folders.map(function (folder) {
gulp.src(path.join(resourcePath, folder, '/*.res.json'))
.pipe(replace(rex1, ""))
.pipe(replace(rex2, ""))
.pipe(replace(rex3, '"src":"src/' + folder + '.min.js'))
.pipe(replace(rex4, '['))
.pipe(replace(rex5, ']'))
.pipe(gulp.dest(releasedResPath + "/" + folder))
});
});
gulp.task('PNGMin', function () {
var folders = getFolders(releasedResPath);
folders.map(function (folder) {
gulp.src(path.join(resourcePath, folder, '/*.png'))
.pipe(gulpPngquant())
.pipe(gulp.dest(releasedResPath + "/" + folder));
});
});
gulp.task('base64Json', function () {
isPageToOne = true;
var content;
var f2xShare = {};
var f2xShareContent = "Flash2x.res.f2xShare={};";
for (var item in buildJsConfig) {
var resourceJson = require("./released/resource/" + item + "/" + item + ".res.json");
var resContent = [];
for (var i = resourceJson.length - 1; i >= 0; i--) {
if (resourceJson[i].type == "javascript") {
resourceJson.splice(i, 1);
} else {
var url = resourceJson[i].src;
var index = url.indexOf("?");
if (index > 0) {
url = url.substr(0, index);
}
if (url.indexOf(".json") > 0) {
var jsonData = require("./released/" + url);
resContent.push(resourceJson[i].id + ":\'" + JSON.stringify(jsonData, null, "") + "\'");
} else {
var head;
if (url.indexOf(".jpg") > 0) {
head = "data:image/jpg;base64,";
} else if (url.indexOf(".png") > 0) {
head = "data:image/png;base64,";
} else if (url.indexOf(".mp3") > 0) {
head = "data:audio/mp3;base64,";
}
if (url.indexOf("f2xShare") > 0) {
shareList[item] = true;
isHasF2xShare = true;
if (!f2xShare[resourceJson[i].id]) {
f2xShare[resourceJson[i].id] = true;
var base64Res = base64.encodeFile("released/" + url);
f2xShareContent += "Flash2x.res.f2xShare." + resourceJson[i].id + "=\"" + head + base64Res + "\";";
}
resContent.push(resourceJson[i].id + ":Flash2x.res.f2xShare." + resourceJson[i].id);
} else {
var base64Res = base64.encodeFile("released/" + url);
resContent.push(resourceJson[i].id + ":\"" + head + base64Res + "\"");
}
}
}
}
content = "Flash2x." + item + "Res={" + resContent.join() + "};";
fs.writeFile(path.join(__dirname, "/released/resource/" + item + "/" + item + ".res.js"), content, "utf8", function (err) {
});
}
if (isHasF2xShare) {
fs.writeFile(path.join(__dirname, "/released/src/f2xShare.js"), f2xShareContent, "utf8", function (err) {
});
}
});
gulp.task('clear', function () {
setTimeout(function () {
del("released/resource/f2xShare");
for (var item in buildJsConfig) {
del("released/resource/" + item);
del("released/src/" + item + ".min.js");
}
}, 100);
});
gulp.task('default', gulpSequence('delReleased', 'copyResource', 'copyLibs', 'replaceIndexHtml', 'replaceResJson', 'PNGMin', 'buildJS'));
// gulp.task('packToOne', gulpSequence('output'));
gulp.task('packToOne', gulpSequence('base64Json', 'output', 'buildJS', 'clear'));
////
/*
* @Author: 周成
* @Date: 2018-01-24 14:32:14
* @Last Modified by: 周成
* @Last Modified time: 2018-01-29 20:58:10
*/
const co = require('co');
const OSS = require('ali-oss');
const chalk = require('chalk');
const ProgressBar = require('progress');
class TuiaAutoUpload {
constructor(props, type) {
this.type = type;
const defaultOptions = {
dir: undefined,
originDir: undefined
}
this.options = Object.assign({}, defaultOptions, props);
if (!this.options.dir || !this.options.originDir) {
console.log(chalk.red('缺少参数,初始化失败'))
return;
}
this.init();
}
init() {
var _this = this;
this.client = new OSS({
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAIdGi1IOap7fkF',
accessKeySecret: 'SKrOOp6EVtDGEV47yn0t2h97gyNioQ',
bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba'
});
this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), {
complete: '●',
incomplete: '○',
width: 20,
total: this.files().length,
callback: () => {
console.log(chalk.green('\n All complete.'));
console.log(chalk.blue(`\n 本次队列文件共${this.files().length}个,已存在文件${this.existFiles}个,上传文件${this.uploadFiles}个,上传失败文件${this.errorFiles}个\n`));
}
})
return this;
}
files() {
var _this = this;
if (this._files) return this._files;
this._files = [];
/**
* 文件遍历方法
* @param filePath 需要遍历的文件路径
*/
function fileDisplay(filePath) {
//根据文件路径读取文件,返回文件列表
var files = fs.readdirSync(filePath);
files.forEach(function (filename) {
//获取当前文件的绝对路径
var filedir = path.join(filePath, filename);
//根据文件路径获取文件信息,返回一个fs.Stats对象
var stats = fs.statSync(filedir);
var isFile = stats.isFile();//是文件
var isDir = stats.isDirectory();//是文件夹
if (isFile) {
var sep = '/';
if ('win32' == process.platform)
sep = '\\';
var newDirArr = filedir.split(sep);
newDirArr.shift();
_this._files.push(newDirArr.join('/'));
}
if (isDir) {
fileDisplay(filedir);//递归,如果是文件夹,就继续遍历该文件夹下面的文件
}
});
}
//调用文件遍历方法
fileDisplay(this.options.dir);
return this._files;
}
start() {
this.files().map((file, index) => {
let _this = this;
const path1 = path.join(__dirname,'released', file);
let originFile;
this.existFiles = 0;
this.uploadFiles = 0;
this.errorFiles = 0;
co(function* () {
const originPath = `${_this.options.originDir}${file}`;
try {
originFile = yield _this.client.head(originPath);
} catch (error) {
originFile = error;
}
if (_this.type === 'prod') {
if (originFile.status === 404) {
yield _this.client.put(originPath, path1);
_this.uploadFiles += 1;
} else {
_this.existFiles += 1;
}
} else if (_this.type === 'dev') {
if (originFile.status === 404 || originFile.status === 200) {
_this.existFiles += 1;
}
yield _this.client.put(originPath, path1, {
headers: {
'Cache-Control': 'no-cache'
}
})
_this.uploadFiles += 1;
}
_this.bar.tick();
}).catch(function (err) {
_this.errorFiles += 1;
console.log(err);
});
});
}
}
gulp.task('publish-dev', function () {
const configFileName = 'project.json';
if (!fs.existsSync(configFileName)) {
throw new Error(`${configFileName}不存在.`)
}
let config = fs.readFileSync('project.json');
config = JSON.parse(config + '');
if (!config.type) {
throw new Error(`${configFileName}的type不存在.`)
}
if (!config.name) {
throw new Error(`${configFileName}的name不存在.`)
}
const now = new Date();
const version = Math.round(now.getTime() / 1000);
console.log(`版本号:${version}`)
const autoupload = new TuiaAutoUpload({
dir: './released/',
// dir: path.join(__dirname, './released/'),
originDir: `/db_games/${config.type}/${config.name}/${version}/`
}, "dev")
autoupload.start()
});
gulp.task('publish-prod', function () {
const configFileName = 'project.json';
if (!fs.existsSync(configFileName)) {
throw new Error(`${configFileName}不存在.`)
}
let config = fs.readFileSync('project.json');
config = JSON.parse(config + '');
if (!config.type) {
throw new Error(`${configFileName}的type不存在.`)
}
if (!config.name) {
throw new Error(`${configFileName}的name不存在.`)
}
const now = new Date();
const version = Math.round(now.getTime() / 1000);
console.log(`版本号:${version}`)
const autoupload = new TuiaAutoUpload({
dir: './released/',
// dir: path.join(__dirname, './released/'),
originDir: `/db_games/${config.type}/${config.name}/${version}/`
}, "prod")
autoupload.start()
});
\ No newline at end of file
<!--作者:小可 QQ:58529016 Email:anlun214@qq.com,欢迎合作洽谈!-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Flash2AnnieEngine</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no">
<!--如果需要往qq里分享则需要开启下面三个属性-->
<!--<meta itemprop="name" content="Flash2x开发神器!">-->
<!--<meta itemprop="description" content="用Flash2x开发Html5项目,让制作更简单,让动画更高效!">-->
<!--<meta itemprop="image" content="http://web.flash2x.org/Public/images/Flash2xLogo.png">-->
<script src="libs2/annieCore.min.js"></script>
<!--如果有用到annieUI组件类,则需要开启下面的js-->
<script src="libs2/annieUI.min.js"></script>
<script src="libs2/zepto.min.js"></script>
<script src="libs2/downloadApp.js"></script>
<script src="libs2/security.js"></script>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0px;
border: 0px;
overflow: hidden;
position: absolute;
background-color: #000;
}
</style>
</head>
<body>
<script src="output.js"></script>
<!--如果不想canvas全屏而是作为html中的一个标签,请设置div的style.width和style.height为实际值如<div id="annieEngine" style="width:320px;height:576px;line-height:0;font-size:0"></div>-->
<div id="annieEngine" style="line-height:0;font-size:0"></div>
<script>
var gameId = 1;
var CFG = {
appInfo: {
"appId": 1,
"earnCreditsUrl": "https://www.baidu.com/",
"loginProgram": "",
"open": false,
"openLogin": false
},
gameInfo: {
"id": 1317,
"oaId": 19951,
"offDate": "2018-04-17 11:00",
"openTotalScoreSwitch": false,
"rankPrize": true,
"skincontent": ""
},
extra: {
"embedDomain": "//embedlog.duibatest.com.cn"
},
defenseStrategy: {
"scoreUnit": 10
}
}
var recordUrl = 'record/';
function resolve(a) {
var b = eval(a);
return b;
}
</script>
</body>
</html>
\ No newline at end of file
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),annie;!function(e){var t=function(){function e(){this._instanceId=0,this._instanceType="AObject",this._instanceId=e._object_id++}return Object.defineProperty(e.prototype,"instanceId",{get:function(){return this._instanceId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instanceType",{get:function(){return this._instanceType},enumerable:!0,configurable:!0}),e._object_id=0,e}();e.AObject=t;var n=function(t){function n(){var e=t.call(this)||this;return e.eventTypes=null,e._instanceType="annie.EventDispatcher",e.eventTypes={},e}return __extends(n,t),n.getMouseEventCount=function(e){void 0===e&&(e="");var t=0;if(""==e)for(var i in n._MECO)0==i.indexOf("onMouse")&&(t+=n._MECO[i]);else n._MECO[e]&&(t=n._MECO[e]);return t},n.prototype.addEventListener=function(e,t){if(!e)throw new Error("添加侦听的type值为undefined");if(!t)throw new Error("侦听回调函数不能为null");var n=this;n.eventTypes[e]||(n.eventTypes[e]=[]),n.eventTypes[e].indexOf(t)<0&&(n.eventTypes[e].unshift(t),0==e.indexOf("onMouse")&&n._changeMouseCount(e,!0))},n.prototype._changeMouseCount=function(e,t){var i=t?1:-1;n._MECO[e]||(n._MECO[e]=0),n._MECO[e]+=i,n._MECO[e]<0&&(n._MECO[e]=0),n._totalMEC+=i},n.prototype.dispatchEvent=function(t,n){void 0===n&&(n=null);var i=this;"string"==typeof t&&(t=new e.Event(t));var r=i.eventTypes[t.type];if(r){var a=r.length;null==t.target&&(t.target=i),null!=n&&(t.data=n);for(var o=a-1;o>=0;o--)r[o]?r[o](t):r.splice(o,1);return!0}return!1},n.prototype.hasEventListener=function(e){return!!(this.eventTypes[e]&&this.eventTypes[e].length>0)},n.prototype.removeEventListener=function(e,t){var n=this,i=n.eventTypes[e];if(i)for(var r=i.length,a=r-1;a>=0;a--)i[a]===t&&(i.splice(a,1),0==e.indexOf("onMouse")&&n._changeMouseCount(e,!1))},n.prototype.removeAllEventListener=function(){var e=this;for(var t in e.eventTypes)if(0==t.indexOf("onMouse"))for(var n=0;n<e.eventTypes[t].length;n++)e._changeMouseCount(t,!1);e.eventTypes={}},n._MECO={},n._totalMEC=0,n}(t);e.EventDispatcher=n}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t){var n=e.call(this)||this;return n.type="",n.target=null,n.data=null,n._pd=!1,n._instanceType="annie.Event",n.type=t,n}return __extends(t,e),t.prototype.preventDefault=function(){this._pd=!0},t.RESIZE="onResize",t.ON_PLAY_UPDATE="onPlayUpdate",t.ON_PLAY_END="onPlayEnd",t.ON_PLAY_START="onPlayStart",t.ON_FLIP_START="onFlipStart",t.ON_FLIP_STOP="onFlipStop",t.ON_SCROLL_TO_HEAD="onScrollToHead",t.ON_SCROLL_STOP="onScrollStop",t.ON_SCROLL_START="onScrollStart",t.ON_SCROLL_TO_END="onScrollToEnd",t.ON_SLIDE_START="onSlideStart",t.ON_SLIDE_END="onSlideEnd",t.INIT_TO_STAGE="onInitStage",t.ADD_TO_STAGE="onAddToStage",t.REMOVE_TO_STAGE="onRemoveToStage",t.ENTER_FRAME="onEnterFrame",t.END_FRAME="onEndFrame",t.CALL_FRAME="onCallFrame",t.COMPLETE="onComplete",t.PROGRESS="onProgress",t.ERROR="onError",t.ABORT="onAbort",t.START="onStart",t.TIMER="onTimer",t.TIMER_COMPLETE="onTimerComplete",t}(e.AObject);e.Event=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n.clientX=0,n.clientY=0,n.stageX=0,n.stageY=0,n.localX=0,n.localY=0,n.currentTarget=null,n.identifier=0,n._instanceType="annie.MouseEvent",n}return __extends(t,e),t.prototype.updateAfterEvent=function(){this.target.stage._cp=!0},t.MOUSE_DOWN="onMouseDown",t.MOUSE_UP="onMouseUp",t.CLICK="onMouseClick",t.MOUSE_MOVE="onMouseMove",t.MOUSE_OVER="onMouseOver",t.MOUSE_OUT="onMouseOut",t}(e.Event);e.MouseEvent=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(n){var i=t.call(this,n)||this;return i.clientPoint1=new e.Point,i.clientPoint2=new e.Point,i.scale=0,i.rotate=0,i._instanceType="annie.TouchEvent",i}return __extends(n,t),n.prototype.updateAfterEvent=function(){this.target.stage._cp=!0},n.ON_MULTI_TOUCH="onMultiTouch",n}(e.Event);e.TouchEvent=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t,n){void 0===t&&(t=0),void 0===n&&(n=0);var i=e.call(this)||this;i.x=0,i.y=0;var r=i;return r._instanceType="annie.Point",r.x=t,r.y=n,i}return __extends(t,e),t.distance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;return 4==n?Math.sqrt((e[0]-e[2])*(e[0]-e[2])+(e[1]-e[3])*(e[1]-e[3])):2==n?Math.sqrt((e[0].x-e[1].x)*(e[0].x-e[1].x)+(e[0].y-e[1].y)*(e[0].y-e[1].y)):void 0},t}(e.AObject);e.Point=t}(annie||(annie={}));var annie;!function(e){function t(e){switch(e){case r:case-a:return 0;case i:case-i:return-1;case a:case-r:return 0;default:return Math.cos(e)}}function n(e){switch(e){case r:case-a:return 1;case i:case-i:return 0;case a:case-r:return-1;default:return Math.sin(e)}}var i=Math.PI,r=i>>1,a=i+r,o=Math.PI/180,s=function(i){function r(t,n,r,a,o,s){void 0===t&&(t=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===a&&(a=1),void 0===o&&(o=0),void 0===s&&(s=0);var l=i.call(this)||this;l.a=1,l.b=0,l.c=0,l.d=1,l.tx=0,l.ty=0,l.transformPoint=function(t,n,i){void 0===i&&(i=null);var r=this;return i||(i=new e.Point),i.x=t*r.a+n*r.c+r.tx,i.y=t*r.b+n*r.d+r.ty,i},l.prepend=function(e){var t=this,n=e.a,i=e.b,r=e.c,a=e.d,o=e.tx,s=e.ty,l=t.a,u=t.c,d=t.tx;t.a=n*l+r*t.b,t.b=i*l+a*t.b,t.c=n*u+r*t.d,t.d=i*u+a*t.d,t.tx=n*d+r*t.ty+o,t.ty=i*d+a*t.ty+s};var u=l;return u._instanceType="annie.Matrix",u.a=t,u.b=n,u.c=r,u.d=a,u.tx=o,u.ty=s,l}return __extends(r,i),r.prototype.clone=function(){var e=this;return new r(e.a,e.b,e.c,e.d,e.tx,e.ty)},r.prototype.setFrom=function(e){var t=this;t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.tx=e.tx,t.ty=e.ty},r.prototype.identity=function(){var e=this;e.a=e.d=1,e.b=e.c=e.tx=e.ty=0},r.prototype.invert=function(){var e=this,t=new r(e.a,e.b,e.c,e.d,e.tx,e.ty),n=e.a,i=e.b,a=e.c,o=e.d,s=e.tx,l=e.ty;if(0==i&&0==a)return 0==n||0==o?t.a=t.d=t.tx=t.ty=0:(n=t.a=1/n,o=t.d=1/o,t.tx=-n*s,t.ty=-o*l),t;var u=n*o-i*a;if(0==u)return t.identity(),t;u=1/u;var d=t.a=o*u;return i=t.b=-i*u,a=t.c=-a*u,o=t.d=n*u,t.tx=-(d*s+a*l),t.ty=-(i*s+o*l),t},r.prototype.createBox=function(e,i,r,a,s,l,u,d,c){var p=this;if(0!=s?l=u=s%360:(l%=360,u%=360),0==l&&0==u)p.a=r,p.b=p.c=0,p.d=a;else{l*=o,u*=o;var h=t(l),f=n(l);l==u?(p.a=h*r,p.b=f*r):(p.a=t(u)*r,p.b=n(u)*r),p.c=-f*a,p.d=h*a}p.tx=e+d-(d*p.a+c*p.c),p.ty=i+c-(d*p.b+c*p.d)},r.isEqual=function(e,t){return e.tx==t.tx&&e.ty==t.ty&&e.a==t.a&&e.b==t.b&&e.c==t.c&&e.d==t.d},r.prototype.concat=function(e){var t=this,n=t.a,i=t.b,r=t.c,a=t.d,o=t.tx,s=t.ty,l=e.a,u=e.b,d=e.c,c=e.d,p=e.tx,h=e.ty;t.a=n*l+i*d,t.b=n*u+i*c,t.c=r*l+a*d,t.d=r*u+a*c,t.tx=o*l+s*d+p,t.ty=o*u+s*c+h},r.prototype.rotate=function(e){var t=this,n=Math.sin(e),i=Math.cos(e),r=t.a,a=t.b,o=t.c,s=t.d,l=t.tx,u=t.ty;t.a=r*i-a*n,t.b=r*n+a*i,t.c=o*i-s*n,t.d=o*n+s*i,t.tx=l*i-u*n,t.ty=l*n+u*i},r.prototype.scale=function(e,t){var n=this;n.a*=e,n.d*=t,n.c*=e,n.b*=t,n.tx*=e,n.ty*=t},r.prototype.translate=function(e,t){var n=this;n.tx+=e,n.ty+=t},r}(e.AObject);e.Matrix=s}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t,n,i,r){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0);var a=e.call(this)||this;a.x=0,a.y=0,a.width=0,a.height=0;var o=a;return o._instanceType="annie.Rectangle",o.x=t,o.y=n,o.height=r,o.width=i,a}return __extends(t,e),t.prototype.isPointIn=function(e){var t=this;return e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height},t.createFromRects=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0==e.length)return null;if(1==e.length)return e[0];for(var n=e[0],i=n.x,r=n.y,a=n.width,o=n.height,s=void 0,l=void 0,u=void 0,d=void 0,c=1;c<e.length;c++)s=i+a,u=r+o,l=e[c].x+e[c].width,d=e[c].y+e[c].height,(i>e[c].x||0==s)&&(i=e[c].x),(r>e[c].y||0==u)&&(r=e[c].y),s<l&&(s=l),u<d&&(u=d),n.x=i,n.y=r,n.width=s-i,n.height=u-r;return n},t.createFromPoints=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=t[0].x,r=t[0].y,a=t[0].x,o=t[0].y,s=1;s<t.length;s++)null!=t[s]&&(i>t[s].x&&(i=t[s].x),r>t[s].y&&(r=t[s].y),a<t[s].x&&(a=t[s].x),o<t[s].y&&(o=t[s].y));return e.x=i,e.y=r,e.width=a-i,e.height=o-r,e},t.createRectform2Point=function(e,t,n){var i=t.x,r=t.y,a=t.x,o=t.y;i>n.x&&(i=n.x),r>n.y&&(r=n.y),a<n.x&&(a=n.x),o<n.y&&(o=n.y),e.x=i,e.y=r,e.width=a-i,e.height=o-r},t.testRectCross=function(e,t){var n,i,r,a;return n=e.x+e.width/2,i=e.y+e.height/2,r=t.x+t.width/2,a=t.y+t.height/2,Math.abs(n-r)<=e.width/2+t.width/2&&Math.abs(i-a)<=e.height/2+t.height/2},t}(e.AObject);e.Rectangle=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(){var n=t.call(this)||this;return n._UI={UD:!1,UM:!0,UA:!0,UF:!1},n.stage=null,n.parent=null,n.cAlpha=1,n.isUseToMask=!1,n.cMatrix=new e.Matrix,n._enterFrameEvent=null,n.mouseEnable=!0,n.cFilters=[],n.name="",n._x=0,n._y=0,n._scaleX=1,n._scaleY=1,n._rotation=0,n._alpha=1,n._skewX=0,n._skewY=0,n._anchorX=0,n._anchorY=0,n._visible=!0,n.blendMode="normal",n._matrix=new e.Matrix,n.mask=null,n._filters=[],n._cp=!0,n._dragBounds=new e.Rectangle,n._isDragCenter=!1,n._lastDragPoint=new e.Point,n._texture=null,n._offsetX=0,n._offsetY=0,n._bounds=new e.Rectangle,n._drawRect=new e.Rectangle,n._instanceType="annie.DisplayObject",n}return __extends(n,t),Object.defineProperty(n.prototype,"x",{get:function(){return this._x},set:function(e){this._setProperty("_x",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},set:function(e){this._setProperty("_y",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleX",{get:function(){return this._scaleX},set:function(e){this._setProperty("_scaleX",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleY",{get:function(){return this._scaleY},set:function(e){this._setProperty("_scaleY",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._setProperty("_rotation",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"alpha",{get:function(){return this._alpha},set:function(e){this._setProperty("_alpha",e,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"skewX",{get:function(){return this._skewX},set:function(e){this._setProperty("_skewX",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"skewY",{get:function(){return this._skewY},set:function(e){this._setProperty("_skewY",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"anchorX",{get:function(){return this._anchorX},set:function(e){this._setProperty("_anchorX",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"anchorY",{get:function(){return this._anchorY},set:function(e){this._setProperty("_anchorY",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._setProperty("_visible",e,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"matrix",{get:function(){return this._matrix},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"filters",{get:function(){return this._filters},set:function(e){this._setProperty("_filters",e,2)},enumerable:!0,configurable:!0}),n.prototype.globalToLocal=function(e,t){return void 0===t&&(t=null),this.cMatrix.invert().transformPoint(e.x,e.y,t)},n.prototype.localToGlobal=function(e,t){return void 0===t&&(t=null),this.parent?this.parent.cMatrix.transformPoint(e.x,e.y,t):this.cMatrix.transformPoint(e.x,e.y,t)},n.prototype.startDrag=function(t,n){void 0===t&&(t=!1),void 0===n&&(n=null);var i=this;if(!i.stage)return void trace("The DisplayObject is not on stage");e.Stage._dragDisplay=i,i._isDragCenter=t,i._lastDragPoint.x=Number.MAX_VALUE,i._lastDragPoint.y=Number.MAX_VALUE,n?(i._dragBounds.x=n.x,i._dragBounds.y=n.y,i._dragBounds.width=n.width,i._dragBounds.height=n.height):(i._dragBounds.x=0,i._dragBounds.y=0,i._dragBounds.width=0,i._dragBounds.height=0)},n.prototype.stopDrag=function(){e.Stage._dragDisplay==this&&(e.Stage._dragDisplay=null)},n.prototype.hitTestPoint=function(e,t){void 0===t&&(t=!1);var i=this;if(!i.visible)return null;if(t&&!i.mouseEnable)return null;if(t){if(i.getBounds().isPointIn(i.globalToLocal(e,n._bp)))return i}else if(i.getBounds().isPointIn(e))return i;return null},n.prototype.getBounds=function(){return this._bounds},n.prototype.getDrawRect=function(){var t=this,i=t.getBounds();if(t.mask){var r=t.mask.getDrawRect();i.x<r.x&&(i.x=r.x),i.y<r.y&&(i.y=r.y),i.width>r.width&&(i.width=r.width),i.height>r.height&&(i.height=r.height)}return t.matrix.transformPoint(i.x,i.y,n._p1),t.matrix.transformPoint(i.x+i.width,i.y,n._p2),t.matrix.transformPoint(i.x+i.width,i.y+i.height,n._p3),t.matrix.transformPoint(i.x,i.y+i.height,n._p4),e.Rectangle.createFromPoints(t._drawRect,n._p1,n._p2,n._p3,n._p4),t._drawRect},n.prototype.update=function(t){void 0===t&&(t=!1);var n=this;n.hasEventListener("onEnterFrame")&&(n._enterFrameEvent||(n._enterFrameEvent=new e.Event("onEnterFrame")),n.dispatchEvent(n._enterFrameEvent));var i=n._UI;if(n._cp&&(i.UM=i.UA=i.UF=!0,n._cp=!1),i.UM&&n._matrix.createBox(n._x,n._y,n._scaleX,n._scaleY,n._rotation,n._skewX,n._skewY,n._anchorX,n._anchorY),n.parent){var r=n.parent._UI;r.UM&&(i.UM=!0),r.UA&&(i.UA=!0),r.UF&&(i.UF=!0)}if(i.UM&&(n.cMatrix.setFrom(n._matrix),n.parent&&n.cMatrix.prepend(n.parent.cMatrix)),i.UA&&(n.cAlpha=n._alpha,n.parent&&(n.cAlpha*=n.parent.cAlpha)),i.UF){n.cFilters.length=0;var a=n._filters;if(a)for(var o=a.length,s=0;s<o;s++)n.cFilters.push(a[s]);if(n.parent&&n.parent.cFilters.length>0)for(var o=n.parent.cFilters.length,l=n.parent.cFilters,s=o-1;s>=0;s--)n.cFilters.unshift(l[s])}},n.prototype.render=function(e){var t=this,n=t.cFilters,i=n.length,r=-1;if(i)for(var a=0;a<i;a++)if("Shadow"==t.cFilters[a].type){r=a;break}if(r>=0){var o=e._ctx;o.shadowBlur=n[r].blur,o.shadowColor=n[r].color,o.shadowOffsetX=n[r].offsetX,o.shadowOffsetY=n[r].offsetY,e.draw(t),o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0}else e.draw(t)},n.prototype._onDispatchBubbledEvent=function(e,t){void 0===t&&(t=!1);var n=this;("onRemoveToStage"!=e||n.stage)&&(n.stage=n.parent.stage,n.dispatchEvent(e),"onRemoveToStage"==e&&(n.stage=null))},Object.defineProperty(n.prototype,"width",{get:function(){return this.getWH().width},set:function(e){var t=this,n=t.width;if(e>0&&n>0){var i=e/n;t.scaleX*=i}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.getWH().height},set:function(e){var t=this,n=t.height;if(e>0&&n>0){var i=e/n;t.scaleY*=i}},enumerable:!0,configurable:!0}),n.prototype.getWH=function(){var e=this;e.update();var t=e.getDrawRect();return{width:t.width,height:t.height}},n.prototype._setProperty=function(e,t,n){var i=this;if(i[e]!=t){i[e]=t;var r=i._UI;0==n?r.UM=!0:1==n?r.UA=!0:2==n?r.UF=!0:3==n&&(r.UD=!0)}},n._bp=new e.Point,n._p1=new e.Point,n._p2=new e.Point,n._p3=new e.Point,n._p4=new e.Point,n._canvas=window.document.createElement("canvas"),n}(e.EventDispatcher);e.DisplayObject=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var i=t.call(this)||this;i._bitmapData=null,i._realCacheImg=null,i.rect=null,i._isCache=!1,i.hitTestWidthPixel=!1;var r=i;return r._instanceType="annie.Bitmap",r.rect=n,r.bitmapData=e,i}return __extends(n,t),Object.defineProperty(n.prototype,"bitmapData",{get:function(){return this._bitmapData},set:function(e){var t=this;t._setProperty("_bitmapData",e,3),e?(t._bounds.width=t.rect?t.rect.width:e.width,t._bounds.height=t.rect?t.rect.height:e.height):t._bounds.width=t._bounds.height=0},enumerable:!0,configurable:!0}),n.prototype.update=function(e){void 0===e&&(e=!1);var n=this;if(n._visible){t.prototype.update.call(this,e);var i=n._bitmapData;if((n._UI.UD||n._UI.UF)&&i){if(0==i.width||0==i.height)return;if(n._UI.UD=!1,n.cFilters.length>0){n._realCacheImg||(n._realCacheImg=window.document.createElement("canvas"));var r=n._realCacheImg,a=n.rect,o=a?a.width:i.width,s=a?a.height:i.height,l=o+20,u=s+20;r.width=l,r.height=u;var d=r.getContext("2d");d.clearRect(0,0,l,u),d.translate(10,10),d.shadowBlur=0,d.shadowColor="#0",d.shadowOffsetX=0,d.shadowOffsetY=0,a?d.drawImage(n._bitmapData,a.x,a.y,o,s,0,0,o,s):d.drawImage(n._bitmapData,0,0);var c=n.cFilters,p=c.length;if(p>0){for(var h=d.getImageData(0,0,l,u),f=0;f<p;f++)c[f].drawFilter(h);d.putImageData(h,0,0)}n._texture=n._realCacheImg,n._offsetX=-10,n._offsetY=-10,n._isCache=!0}else n._isCache=!1,n._offsetX=0,n._offsetY=0,n._texture=i;var _=void 0,v=void 0;n.rect?(_=n.rect.width,v=n.rect.height):(_=n._texture.width+2*n._offsetX,v=n._texture.height+2*n._offsetY),n._bounds.width=_,n._bounds.height=v}n._UI.UF=!1,n._UI.UM=!1,n._UI.UA=!1}},n.convertToImage=function(e,t){if(void 0===t&&(t=!0),e.rect){var n=window.document.createElement("canvas"),i=e.rect.width,r=e.rect.height;n.width=i,n.height=r;var a=n.getContext("2d"),o=e.rect;if(a.drawImage(e.bitmapData,o.x,o.y,i,r,0,0,i,r),t){var s=new Image;return s.src=n.toDataURL(),s}return n}return e.bitmapData},n.prototype.hitTestPoint=function(t,n){void 0===n&&(n=!1);var i=this;if(n&&!i.mouseEnable)return null;var r=i.globalToLocal(t);if(r.x+=i._offsetX,r.y+=i._offsetY,i.getBounds().isPointIn(r)){if(!i.hitTestWidthPixel)return i;var a=i._texture;if(!a||0==a.width||0==a.height)return null;var o=e.DisplayObject._canvas;o.width=1,o.height=1;var s=o.getContext("2d");if(s.clearRect(0,0,1,1),i.rect&&(r.x+=i.rect.x,r.y+=i.rect.y),s.setTransform(1,0,0,1,-r.x,-r.y),s.drawImage(a,0,0),s.getImageData(0,0,1,1).data[3]>0)return i}return null},n}(e.DisplayObject);e.Bitmap=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._command=[],e.hitTestWidthPixel=!0,e.beginRadialGradientFill=function(e,t,i){this._fill(n.getGradientColor(e,t,i))},e.beginRadialGradientStroke=function(e,t,i,r,a,o,s){void 0===r&&(r=1),void 0===a&&(a="butt"),void 0===o&&(o="miter"),void 0===s&&(s=10),this._stroke(n.getGradientColor(e,t,i),r,a,o,s)},e.decodePath=function(e){for(var t,i=this,r=["moveTo","lineTo","quadraticCurveTo","bezierCurveTo","closePath"],a=[2,2,4,6,0],o=0,s=e.length,l=0,u=0,d=n.BASE_64;o<s;){var c=e.charAt(o),p=d[c],h=p>>3,f=r[h];if(!f||3&p)throw"bad path data (@"+o+"): "+c;var _=a[h];h||(l=u=0),t=[],o++;for(var v=2+(p>>2&1),m=0;m<_;m++){var g=d[e.charAt(o)],y=g>>5?-1:1;g=(31&g)<<6|d[e.charAt(o+1)],3==v&&(g=g<<6|d[e.charAt(o+2)]),g=y*g/10,m%2?l=g+=l:u=g+=u,t[m]=g,o+=v}i.addDraw(f,t)}},e._instanceType="annie.Shape",e._texture=window.document.createElement("canvas"),e}return __extends(n,t),n.getGradientColor=function(t,n,i){var r,a=e.DisplayObject._canvas.getContext("2d");r=4==i.length?a.createLinearGradient(i[0],i[1],i[2],i[3]):a.createRadialGradient(i[0],i[1],i[2],i[3],i[4],i[5]);for(var o=0,s=t.length;o<s;o++)r.addColorStop(n[o],t[o]);return r},n.getBitmapStyle=function(t){return e.DisplayObject._canvas.getContext("2d").createPattern(t,"repeat")},n.getRGBA=function(e,t){if(0==e.indexOf("0x")&&(e=e.replace("0x","#")),e.length<7&&(e="#000000"),1!=t){e="rgba("+parseInt("0x"+e.substr(1,2))+","+parseInt("0x"+e.substr(3,2))+","+parseInt("0x"+e.substr(5,2))+","+t+")"}return e},n.prototype.addDraw=function(e,t){var n=this;n._UI.UD=!0,n._command.push([1,e,t])},n.prototype.drawRoundRect=function(e,t,n,i,r,a,o,s){void 0===r&&(r=0),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0);var l=(n<i?n:i)/2,u=0,d=0,c=0,p=0;r<0&&(r*=u=-1),r>l&&(r=l),a<0&&(a*=d=-1),a>l&&(a=l),s<0&&(s*=c=-1),s>l&&(s=l),o<0&&(o*=p=-1),o>l&&(o=l);var h=this._command;h.push([1,"moveTo",[e+n-a,t]]),h.push([1,"arcTo",[e+n+a*d,t-a*d,e+n,t+a,a]]),h.push([1,"lineTo",[e+n,t+i-s]]),h.push([1,"arcTo",[e+n+s*c,t+i+s*c,e+n-s,t+i,s]]),h.push([1,"lineTo",[e+o,t+i]]),h.push([1,"arcTo",[e-o*p,t+i+o*p,e,t+i-o,o]]),h.push([1,"lineTo",[e,t+r]]),h.push([1,"arcTo",[e-r*u,t-r*u,e+r,t,r]]),h.push([1,"closePath",[]])},n.prototype.moveTo=function(e,t){this._command.push([1,"moveTo",[e,t]])},n.prototype.lineTo=function(e,t){this._command.push([1,"lineTo",[e,t]])},n.prototype.arcTo=function(e,t){this._command.push([1,"arcTo",[e,t]])},n.prototype.quadraticCurveTo=function(e,t,n,i){this._command.push([1,"quadraticCurveTo",[e,t,n,i]])},n.prototype.bezierCurveTo=function(e,t,n,i,r,a){this._command.push([1,"bezierCurveTo",[e,t,n,i,r,a]])},n.prototype.closePath=function(){this._command.push([1,"closePath",[]])},n.prototype.drawRect=function(e,t,n,i){var r=this._command;r.push([1,"moveTo",[e,t]]),r.push([1,"lineTo",[e+n,t]]),r.push([1,"lineTo",[e+n,t+i]]),r.push([1,"lineTo",[e,t+i]]),r.push([1,"closePath",[]])},n.prototype.drawArc=function(e,t,n,i,r){this._command.push([1,"arc",[e,t,n,i/180*Math.PI,r/180*Math.PI]])},n.prototype.drawCircle=function(e,t,n){this._command.push([1,"arc",[e,t,n,0,2*Math.PI]])},n.prototype.drawEllipse=function(e,t,n,i){var r=.5522848,a=n/2*r,o=i/2*r,s=e+n,l=t+i,u=e+n/2,d=t+i/2,c=this._command;c.push([1,"moveTo",[e,d]]),c.push([1,"bezierCurveTo",[e,d-o,u-a,t,u,t]]),c.push([1,"bezierCurveTo",[u+a,t,s,d-o,s,d]]),c.push([1,"bezierCurveTo",[s,d+o,u+a,l,u,l]]),c.push([1,"bezierCurveTo",[u-a,l,e,d+o,e,d]])},n.prototype.clear=function(){var e=this;e._command=[],e._UI.UD=!0,e._texture&&(e._texture.width=0,e._texture.height=0),e._offsetX=0,e._offsetY=0,e._bounds.width=0,e._bounds.height=0},n.prototype.beginFill=function(e){this._fill(e)},n.prototype.beginLinearGradientFill=function(e,t,i){this._fill(n.getGradientColor(e,t,i))},n.prototype.beginBitmapFill=function(e,t){var i=this;t&&(i._isBitmapFill=t),i._fill(n.getBitmapStyle(e))},n.prototype._fill=function(e){var t=this._command;t.push([0,"fillStyle",e]),t.push([1,"beginPath",[]]),this._UI.UD=!0},n.prototype.beginStroke=function(e,t,n,i,r){void 0===t&&(t=1),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),this._stroke(e,t,n,i,r)},n.prototype.beginLinearGradientStroke=function(e,t,i,r,a,o,s){void 0===r&&(r=1),void 0===a&&(a="butt"),void 0===o&&(o="miter"),void 0===s&&(s=10),this._stroke(n.getGradientColor(e,t,i),r,a,o,s)},n.prototype.beginBitmapStroke=function(e,t,i,r,a,o){void 0===i&&(i=1),void 0===r&&(r="butt"),void 0===a&&(a="miter"),void 0===o&&(o=10);var s=this;t&&(s._isBitmapStroke=t),s._stroke(n.getBitmapStyle(e),i,r,a,o)},n.prototype._stroke=function(e,t,n,i,r){var a=this._command;a.push([0,"lineWidth",t]),a.push([0,"lineCap",n]),a.push([0,"lineJoin",i]),a.push([0,"miterLimit",r]),a.push([0,"strokeStyle",e]),a.push([1,"beginPath",[]]),this._UI.UD=!0},n.prototype.endFill=function(){var e=this,t=e._command,n=e._isBitmapFill;n&&t.push([2,"setTransform",[n.a,n.b,n.c,n.d,n.tx,n.ty]]),t.push([1,"fill",[]]),n&&(e._isBitmapFill=null)},n.prototype.endStroke=function(){var e=this,t=e._command,n=e._isBitmapStroke;n&&t.push([2,"setTransform",[n.a,n.b,n.c,n.d,n.tx,n.ty]]),t.push([1,"stroke",[]]),n&&(e._isBitmapStroke=null)},n.prototype.update=function(e){void 0===e&&(e=!1);var n=this;if(n._visible){if(t.prototype.update.call(this,e),n._UI.UD||n._UI.UF){var i=n._command.length,r=void 0,a=void 0,o=void 0,s=void 0,l=void 0;if(i>0){var u=void 0,d=0,c=0,p=0;for(l=0;l<i;l++)if(u=n._command[l],1==u[0]){if("moveTo"==u[1]||"lineTo"==u[1]||"arcTo"==u[1]||"bezierCurveTo"==u[1])void 0==r&&(r=u[2][0]),void 0==a&&(a=u[2][1]),void 0==o&&(o=u[2][0]),void 0==s&&(s=u[2][1]),"bezierCurveTo"==u[1]?(r=Math.min(r,u[2][0],u[2][2],u[2][4]),a=Math.min(a,u[2][1],u[2][3],u[2][5]),o=Math.max(o,u[2][0],u[2][2],u[2][4]),s=Math.max(s,u[2][1],u[2][3],u[2][5]),d=u[2][4],c=u[2][5]):(r=Math.min(r,u[2][0]),a=Math.min(a,u[2][1]),o=Math.max(o,u[2][0]),s=Math.max(s,u[2][1]),d=u[2][0],c=u[2][1]);else if("quadraticCurveTo"==u[1]){var h=.5*(d+u[2][0]),f=.5*(c+u[2][1]),_=.5*(u[2][0]+u[2][2]),v=.5*(u[2][1]+u[2][3]);void 0==r&&(r=h),void 0==a&&(a=f),void 0==o&&(o=h),void 0==s&&(s=f),r=Math.min(r,h,_,u[2][2]),a=Math.min(a,f,v,u[2][3]),o=Math.max(o,h,_,u[2][2]),s=Math.max(s,f,v,u[2][3]),d=u[2][2],c=u[2][3]}else if("arc"==u[1]){var m=u[2][0],g=u[2][1],y=u[2][2],b=m-y,x=g-y,w=m+y,E=g+y;void 0==r&&(r=b),void 0==a&&(a=x),void 0==o&&(o=w),void 0==s&&(s=E),r=Math.min(r,b),a=Math.min(a,x),o=Math.max(o,w),s=Math.max(s,E)}}else"lineWidth"==u[1]&&p<u[2]&&(p=u[2]);if(void 0!=r||p>0){void 0==r&&(r=0,a=0),r-=20+p>>1,a-=20+p>>1,o+=20+p>>1,s+=20+p>>1;var T=o-r,M=s-a;if(n._offsetX=r,n._offsetY=a,n._bounds.x=r,n._bounds.y=a,n._bounds.width=T-20,n._bounds.height=M-20,!n.isUseToMask&&!n.parent.isUseToMask){var F=n._texture,L=F.getContext("2d");F.width=T,F.height=M,L.clearRect(0,0,T,M),L.setTransform(1,0,0,1,-r,-a),n._drawShape(L);var P=n.cFilters,C=P.length;if(C>0){for(var O=L.getImageData(0,0,T,M),S=0;S<C;S++)P[S].drawFilter(O);L.putImageData(O,0,0)}}}}n._UI.UD=!1}n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1}},n.prototype._drawShape=function(e){for(var t,n=this,i=n._command,r=i.length,a=n._offsetX,o=n._offsetY,s=0;s<r;s++)if(t=i[s],t[0]>0){var l=t[2].length;if(0==l)e[t[1]]();else if(2==l)e[t[1]](t[2][0],t[2][1]);else if(4==l)e[t[1]](t[2][0],t[2][1],t[2][2],t[2][3]);else if(5==l)e[t[1]](t[2][0],t[2][1],t[2][2],t[2][3],t[2][4]);else if(6==l){var u=t[2][4],d=t[2][5];2==t[0]&&(u-=a,d-=o),e[t[1]](t[2][0],t[2][1],t[2][2],t[2][3],u,d)}}else e[t[1]]=t[2]},n.prototype.hitTestPoint=function(t,n){void 0===n&&(n=!1);var i=this;if(n&&!i.mouseEnable)return null;var r=t;if(n&&(r=i.globalToLocal(t)),i.getBounds().isPointIn(r)){if(!i.hitTestWidthPixel)return i;var a=i._texture;if(!a||0==a.width||0==a.height)return null;var o=e.DisplayObject._canvas;o.width=1,o.height=1,r.x-=i._offsetX,r.y-=i._offsetY;var s=o.getContext("2d");if(s.clearRect(0,0,1,1),s.setTransform(1,0,0,1,-r.x,-r.y),s.drawImage(a,0,0),s.getImageData(0,0,1,1).data[3]>0)return i}return null},n.prototype.changeColor=function(e){for(var t=this,n=t._command.length,i=t._command,r=0;r<n;r++)0==i[r][0]&&("fillStyle"==i[r][1]&&e.fillColor&&i[r][2]!=e.fillColor&&(i[r][2]=e.fillColor,t._UI.UD=!0),"strokeStyle"==i[r][1]&&e.strokeColor&&i[r][2]!=e.strokeColor&&(i[r][2]=e.strokeColor,t._UI.UD=!0),"lineWidth"==i[r][1]&&e.lineWidth&&i[r][2]!=e.lineWidth&&(i[r][2]=e.lineWidth,t._UI.UD=!0))},n.BASE_64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63},n}(e.DisplayObject);e.Shape=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e.mouseChildren=!0,e.children=[],e._instanceType="annie.Sprite",e}return __extends(n,t),Object.defineProperty(n.prototype,"cacheAsBitmap",{get:function(){return this._cacheAsBitmap},set:function(t){var n=this;n._texture||(n._texture=new Image),t?n._texture.src=e.toDisplayDataURL(n):(n._texture.src="",n._offsetX=0,n._offsetY=0),n._cacheAsBitmap=t},enumerable:!0,configurable:!0}),n.prototype.addChild=function(e){this.addChildAt(e,this.children.length)},n.prototype.removeChild=function(e){for(var t=this,n=t.children.length,i=0;i<n;i++)if(t.children[i]==e){t.removeChildAt(i);break}},n._getElementsByName=function(e,t,i,r,a){var o=t.children.length;if(o>0)for(var s,l=void 0,u=0;u<o;u++){if(l=t.children[u],(s=l.name)&&""!=s&&e.test(s)&&(a.push(l),i))return;r&&null!=l.children&&n._getElementsByName(e,l,i,r,a)}},n.prototype.getChildByName=function(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!e)return null;var r,a=this;r="string"==typeof e?new RegExp("^"+e+"$"):e;var o=[];n._getElementsByName(r,a,t,i,o);var s=o.length;return 0==s?null:1==s?o[0]:o},n.prototype.addChildAt=function(e,t){if(e){var n,i=this,r=i==e.parent;if(e.parent)if(r){n=i.children.length;for(var a=0;a<n;a++)if(i.children[a]==e){i.children.splice(a,1);break}}else e.parent.removeChild(e);e.parent=i,n=i.children.length,t>=n?i.children.push(e):0==t?i.children.unshift(e):i.children.splice(t,0,e),i.stage&&!r&&(e._cp=!0,e._onDispatchBubbledEvent("onAddToStage"))}},n.prototype.getChildAt=function(e){return this.children.length-1>=e?this.children[e]:null},n.prototype.getChildIndex=function(e){for(var t=this.children.length,n=0;n<t;n++)if(this.children[n]==e)return n;return-1},n.prototype._onDispatchBubbledEvent=function(e,n){void 0===n&&(n=!1);var i=this,r=i.children.length;if("onRemoveToStage"!=e||i.stage){i.stage=i.parent.stage;for(var a=0;a<r;a++)i.children[a]._onDispatchBubbledEvent(e,n);t.prototype._onDispatchBubbledEvent.call(this,e,n)}},n.prototype.removeChildAt=function(e){var t,n=this,i=n.children.length-1;i<0||(t=e==i?n.children.pop():0==e?n.children.shift():n.children.splice(e,1)[0],t._onDispatchBubbledEvent("onRemoveToStage"),t.parent=null)},n.prototype.removeAllChildren=function(){for(var e=this,t=e.children.length,n=t-1;n>=0;n--)e.removeChildAt(0)},n.prototype.update=function(e){void 0===e&&(e=!1);var n=this;if(n._visible){if(t.prototype.update.call(this,e),!n._cacheAsBitmap)for(var i=n.children.length,r=void 0,a=[],o=i-1;o>=0;o--)if(r=n.children[o],n._visible){if(r.mask&&a.indexOf(r.mask.instanceId)<0){var s=null;r.mask.parent=n,n.totalFrames&&r.mask.totalFrames?(r.mask.gotoAndStop(n.currentFrame),(s=r.mask.getChildAt(0))&&(s.isUseToMask=!0,s.hitTestWidthPixel=!1)):(r.mask.isUseToMask=!0,r.mask.hitTestWidthPixel=!1),r.mask._cp=!0,r.mask.update(e),r.mask.isUseToMask=!1,s&&(s.isUseToMask=!1),a.push(r.mask.instanceId)}r.update(e)}n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1}},n.prototype.hitTestPoint=function(t,n){void 0===n&&(n=!1);var i=this;if(!i._visible)return null;if(n&&!i.mouseEnable)return null;if(i._cacheAsBitmap){var r=i.globalToLocal(t),a=i._texture;if(!a||0==a.width||0==a.height)return null;var o=e.DisplayObject._canvas;o.width=1,o.height=1,r.x-=i._offsetX,r.y-=i._offsetY;var s=o.getContext("2d");if(s.clearRect(0,0,1,1),s.setTransform(1,0,0,1,-r.x,-r.y),s.drawImage(a,0,0),s.getImageData(0,0,1,1).data[3]>0)return i}else for(var l=i.children.length,u=void 0,d=void 0,c=l-1;c>=0;c--)if(d=i.children[c],(!d.mask||d.mask.hitTestPoint(t,n))&&(u=d.hitTestPoint(t,n)))return u;return null},n.prototype.getBounds=function(){var t=this,n=t._bounds;if(n.x=0,n.y=0,n.width=0,n.height=0,t._cacheAsBitmap)t._texture&&(n.x=t._offsetX,n.y=t._offsetY,n.width=t._texture.width,n.height=t._texture.height);else{var i=t.children.length;if(i>0){for(var r=0;r<i;r++)t.children[r].visible&&e.Rectangle.createFromRects(n,t.children[r].getDrawRect());if(t.mask){var a=t.mask.getDrawRect();n.x<a.x&&(n.x=a.x),n.y<a.y&&(n.y=a.y),n.width>a.width&&(n.width=a.width),n.height>a.height&&(n.height=a.height)}}}return n},n.prototype.render=function(e){var n=this;if(!n._cp)if(n._cacheAsBitmap)t.prototype.render.call(this,e);else if(n.cAlpha>0&&n._visible){for(var i=void 0,r=void 0,a=n.children.length,o=0;o<a;o++)r=n.children[o],r.cAlpha>0&&r._visible&&(i?r.mask?r.mask!=i&&(e.endMask(),i=r.mask,e.beginMask(i)):(e.endMask(),i=null):r.mask&&(i=r.mask,e.beginMask(i)),r.render(e));i&&e.endMask()}},n}(e.DisplayObject);e.Sprite=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t,n){var i=e.call(this)||this;i.media=null,i.type="",i._loop=0;var r=i;return r._instanceType="annie.Media","string"==typeof t?(r.media=document.createElement(n),r.media.src=t):r.media=t,r._SBWeixin=r._weixinSB.bind(r),r.media.addEventListener("ended",function(){r._loop--,r._loop>0?r.play(0,r._loop):r.media.pause(),r.dispatchEvent("onPlayEnd")}.bind(r)),r.type=n.toLocaleUpperCase(),r.media.addEventListener("timeupdate",function(){r.dispatchEvent("onPlayUpdate",{currentTime:r.media.currentTime})}),r.media.addEventListener("play",function(){r.dispatchEvent("onPlayStart")}),i}return __extends(t,e),t.prototype.play=function(e,t){void 0===e&&(e=0),void 0===t&&(t=1);var n=this;n._loop=t;try{n.media.currentTime=e}catch(e){trace(e)}var i=window;if(i.WeixinJSBridge)try{
i.WeixinJSBridge.invoke("getNetworkType",{},n._SBWeixin)}catch(e){n.media.play()}else n.media.play()},t.prototype._weixinSB=function(){this.media.play()},t.prototype.stop=function(){this.media.pause(),this.media.currentTime=0},t.prototype.pause=function(e){void 0===e&&(e=!0),e?this.media.pause():this.media.play()},Object.defineProperty(t.prototype,"volume",{get:function(){return this.media.volume},set:function(e){this.media.volume=e,this.media.muted=0==e},enumerable:!0,configurable:!0}),t}(e.EventDispatcher);e.Media=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(i){var r=t.call(this,i,"Audio")||this,a=r;return a._instanceType="annie.Sound",e.Sound._soundList.push(a),a.volume=n._volume,r}return __extends(n,t),n.prototype.destory=function(){for(var t=e.Sound._soundList.length,n=t-1;n>=0;n--)e.Sound._soundList[n]&&e.Sound._soundList[n]!=this||e.Sound._soundList.splice(n,1)},n.stopAllSounds=function(){for(var t=e.Sound._soundList.length,n=t-1;n>=0;n--)e.Sound._soundList[n]?e.Sound._soundList[n].stop():e.Sound._soundList.splice(n,1)},n.setAllSoundsVolume=function(t){for(var i=e.Sound._soundList.length,r=i-1;r>=0;r--)e.Sound._soundList[r]?e.Sound._soundList[r].volume=t:e.Sound._soundList.splice(r,1);n._volume=t},n._soundList=[],n._volume=1,n}(e.Media);e.Sound=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t,n,i){void 0===n&&(n=0),void 0===i&&(i=0);var r=e.call(this,t,"Video")||this,a=r;return a._instanceType="annie.Video",a.media.setAttribute("playsinline","true"),a.media.setAttribute("webkit-playsinline","true"),a.media.setAttribute("x-webkit-airplay","true"),a.media.setAttribute("x5-video-player-type","h5"),a.media.poster="",a.media.preload="auto",a.media.controls=!1,n&&i&&(a.media.width=n,a.media.height=i),r}return __extends(t,e),t}(e.Media);e.Video=t}(annie||(annie={}));var annie;!function(e){var t=function(){function e(){var e=this;e.frameChildList=new Array,e.keyIndex=0,e.eventName="",e.soundName="",e.soundScene="",e.soundTimes=1}return e.prototype.setDisplayInfo=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this,r={display:e,x:0,y:0,scaleX:1,scaleY:1,rotation:0,skewX:0,skewY:0,alpha:1};Flash2x.d(r,t,n),i.frameChildList.push(r)},e.prototype.setGraphicInfo=function(e,t,n){var i=this,r=i.frameChildList.length-1;i.frameChildList[r].graphicInfo={loopType:e,firstFrame:t,parentFrameIndex:n}},e}(),n=function(n){function i(){var t=n.call(this)||this;t._timeline=[],t.floatView=new e.Sprite,t.currentFrame=1,t.isPlaying=!0,t.isFront=!0,t.totalFrames=1,t._scriptLayer=[],t._labelFrame={},t._frameLabel={},t._isNeedUpdateChildren=!0,t._isUpdateFrame=!1,t._goFrame=1,t._mouseEvent=function(e){var t=this,n=2;"onMouseDown"==e.type?t.currentFrame>2&&(n=3):n=1,t.gotoAndStop(n)};var i=t;return i._instanceType="annie.MovieClip",i.addChild(i.floatView),t}return __extends(i,n),i.prototype.stop=function(){this.isPlaying=!1},i.prototype.as=function(e,t){this._scriptLayer[t]=e},i.prototype.addFrameScript=function(e,t){this.as(t,e)},i.prototype.removeFrameScript=function(e){var t=this;t._scriptLayer[e]&&(t._scriptLayer[e]=null)},i.prototype.a=function(){var e=this;return e._currentLayer=[],e._timeline.unshift(e._currentLayer),e},i.prototype.b=function(e){var n=this;n._currentLayerFrame=new t,n._currentLayerFrame.keyIndex=n._currentLayer.length;for(var i=0;i<e;i++)n._currentLayer.push(n._currentLayerFrame);return n.totalFrames<n._currentLayer.length&&(n.totalFrames=n._currentLayer.length),n},i.prototype.c=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this;return i._currentLayerFrame.setDisplayInfo(e,t,n),i},i.prototype.g=function(e,t,n){var i=this;return i._currentLayerFrame.setGraphicInfo(e,t,n),i},i.prototype.setGraphicInfo=function(e){this._graphicInfo=e},i.prototype.initButton=function(){var e=this;e.mouseChildren=!1,e.totalFrames>1&&(e._scriptLayer[0]=function(){e.stop()},e.addEventListener("onMouseDown",e._mouseEvent.bind(e)),e.addEventListener("onMouseUp",e._mouseEvent.bind(e)),e.addEventListener("onMouseOut",e._mouseEvent.bind(e)))},i.prototype.d=function(e,t){var n=this;return n._labelFrame[e]=t+1,n._frameLabel[t+1]=e,n},i.prototype.getCurrentLabel=function(){var e=this;return e._frameLabel[e.currentFrame]?e._frameLabel[e.currentFrame]:""},i.prototype.e=function(e){var t=this;return t._currentLayerFrame.eventName=e,t},i.prototype.f=function(e,t,n){var i=this;return i._currentLayerFrame.soundName=t,i._currentLayerFrame.soundScene=e,i._currentLayerFrame.soundTimes=n,i},i.prototype.nextFrame=function(){var e=this;e._goFrame<e.totalFrames&&(e._goFrame++,e._isNeedUpdateChildren=!0),e.isPlaying=!1,e._isUpdateFrame=!1},i.prototype.prevFrame=function(){var e=this;e._goFrame>1&&(e._goFrame--,e._isNeedUpdateChildren=!0),e.isPlaying=!1,e._isUpdateFrame=!1},i.prototype.gotoAndStop=function(e){var t=this;t.isPlaying=!1;var n;"string"==typeof e?void 0!=t._labelFrame[e]?n=t._labelFrame[e]:trace("未找到帧标签叫'"+e+"'的帧"):"number"==typeof e&&(e>t.totalFrames&&(e=t.totalFrames),e<1&&(e=1),n=e),t._goFrame!=n&&(t._goFrame=n,t._isNeedUpdateChildren=!0,t._isUpdateFrame=!1)},i.prototype.play=function(e){void 0===e&&(e=!0);var t=this;t.isPlaying=!0,t.isFront=void 0==e||e,t._isUpdateFrame=!0},i.prototype.gotoAndPlay=function(e,t){void 0===t&&(t=!0);var n=this;n.isFront=void 0==t||t,n.isPlaying=!0;var i;"string"==typeof e?void 0!=n._labelFrame[e]?i=n._labelFrame[e]:trace("未找到帧标签叫'"+e+"'的帧"):"number"==typeof e&&(e>n.totalFrames&&(e=n.totalFrames),e<1&&(e=1),i=e),n._goFrame!=i&&(n._goFrame=i,n._isUpdateFrame=!1,n._isNeedUpdateChildren=!0)},i.prototype.setFrameChild=function(e,t){e._donotUpdateinMC=e._donotUpdateinMC||{};for(var n in t)null!=t[n]?e._donotUpdateinMC[n]=t[n]:delete e._donotUpdateinMC[t[n]]},i.prototype.update=function(t){void 0===t&&(t=!1);var i=this;if(!i._cacheAsBitmap&&t){if(i._graphicInfo){var r=i.parent.currentFrame?i.parent.currentFrame:1,a=1,o=i._graphicInfo.parentFrameIndex+1,s=i._graphicInfo.firstFrame+1;"play once"==i._graphicInfo.loopType?r-o>=0&&(a=r-o+s)>i.totalFrames&&(a=i.totalFrames):"loop"==i._graphicInfo.loopType?(r-o>=0&&(a=(r-o+s)%i.totalFrames),0==a&&(a=i.totalFrames)):a=s,i._goFrame!=a&&(i._goFrame=a,i._isNeedUpdateChildren=!0),i.isPlaying=!1}else i.isPlaying&&i._isUpdateFrame&&(i.isFront?++i._goFrame>i.totalFrames&&(i._goFrame=1):--i._goFrame<1&&(i._goFrame=i.totalFrames),i._isNeedUpdateChildren=!0);var l=i.currentFrame=i._goFrame;if(i._isUpdateFrame=!0,i._isNeedUpdateChildren){var u=-1,d=i._timeline.length,c=0,p=null,h=null,f=null,_=0,v=i.children,m=void 0,g=[];for(m=0;m<i.children.length-1;m++)v[m].parent=null;for(i.children=[],m=0;m<d;m++)if(c=i._timeline[m].length,l<=c){if(void 0==(p=i._timeline[m][l-1]))continue;if(p.keyIndex==l-1&&(""!=p.soundName&&Flash2x.getMediaByName(p.soundScene,p.soundName).play(0,p.soundTimes),""!=p.eventName&&i.hasEventListener(e.Event.CALL_FRAME))){var y=new e.Event(e.Event.CALL_FRAME);y.data={frameIndex:l,frameName:p.eventName},g.push(y)}_=p.frameChildList.length;for(var b=0;b<_;b++){if(f=p.frameChildList[b],h=f.display,h.x=f.x,h.y=f.y,h.scaleX=f.scaleX,h.scaleY=f.scaleY,h.rotation=f.rotation,h.skewX=f.skewX,h.skewY=f.skewY,h.alpha=f.alpha,f.filters?h.filters=f.filters:h.filters=null,f.graphicInfo?h._graphicInfo=f.graphicInfo:h._graphicInfo&&(h._graphicInfo=null),void 0!=h._donotUpdateinMC)for(var x in h._donotUpdateinMC)void 0!=h._donotUpdateinMC[x]&&(h[x]=h._donotUpdateinMC[x]);h.parent=i,i.children.push(h),u=v.indexOf(h),u<0?(h._onDispatchBubbledEvent("onAddToStage"),h._cp=!0):v.splice(u,1)}}i._isNeedUpdateChildren=!1;var w=v.length;for(m=0;m<w;m++)v[m].parent||(v[m].parent=i,v[m]._onDispatchBubbledEvent("onRemoveToStage",!0),v[m]._cp=!0,v[m].parent=null);if(i.children.push(i.floatView),(1==l&&!i.isFront||l==i.totalFrames&&i.isFront)&&i.hasEventListener(e.Event.END_FRAME)){var E=new e.Event(e.Event.END_FRAME);E.data={frameIndex:l,frameName:1==l?"firstFrame":"endFrame"},g.push(E)}for(w=g.length,m=0;m<w;m++)i.dispatchEvent(g[m]);void 0!=i._scriptLayer[l-1]&&i._scriptLayer[l-1]()}}n.prototype.update.call(this,t)},i.prototype._onDispatchBubbledEvent=function(e,t){if(void 0===t&&(t=!1),n.prototype._onDispatchBubbledEvent.call(this,e),t){var i=this;i._goFrame=1,i.currentFrame=1,i.isPlaying=!0,i.isFront=!0,i._isNeedUpdateChildren=!0,i._isUpdateFrame=!1}},i}(e.Sprite);e.MovieClip=n}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(){var n=t.call(this)||this;n.htmlElement=null,n._isAdded=!1;var i=n;return i._instanceType="annie.FloatDisplay",i.addEventListener(e.Event.REMOVE_TO_STAGE,function(e){i.htmlElement&&(i.htmlElement.style.display="none")}),i.addEventListener(e.Event.ADD_TO_STAGE,function(e){if(i.htmlElement){var t=i.htmlElement.style;i._isAdded?i.htmlElement&&i.visible&&(t.display="block"):(i._isAdded=!0,i.stage.rootDiv.insertBefore(i.htmlElement,i.stage.rootDiv.childNodes[0]),i.stage._floatDisplayList.push(i))}}),n}return __extends(n,t),n.prototype.init=function(e){var t,n=this;t="string"==typeof e?document.getElementById(e):"annie.Video"==e._instanceType?e.media:e;var i=t.style;i.position="absolute",i.display="none",i.transformOrigin=i.WebkitTransformOrigin="0 0 0";var r=n.getStyle(t,"width"),a=n.getStyle(t,"height"),o=0,s=0;r.indexOf("px")&&(o=parseInt(r)),a.indexOf("px")&&(s=parseInt(a)),n._bounds.width=o,n._bounds.height=s,n.htmlElement=t},n.prototype.delElement=function(){var e=this,t=e.htmlElement;t&&(t.style.display="none",t.parentNode&&t.parentNode.removeChild(t),e._isAdded=!1,e.htmlElement=null);for(var n=e.stage._floatDisplayList,i=n.length,r=0;r<i;r++)if(n[r]==e){n.splice(r,1);break}},n.prototype.getStyle=function(e,t){if(e.style[t])return e.style[t];if(document.defaultView&&document.defaultView.getComputedStyle){t=t.replace(/([A-Z])/g,"-$1"),t=t.toLowerCase();var n=document.defaultView.getComputedStyle(e,"");return n&&n.getPropertyValue(t)}return null},n.prototype.updateStyle=function(){var t=this,n=t.htmlElement;if(n){var i=n.style,r=t._visible;if(r)for(var a=t.parent;a;){if(!a._visible){r=!1;break}a=a.parent}var o=r?"block":"none";if(o!=i.display&&(i.display=o),r||t._UI.UM||t._UI.UA||t._UI.UF){if(t._UI.UM){var s=t.cMatrix,l=e.devicePixelRatio;i.transform=i.webkitTransform="matrix("+(s.a/l).toFixed(4)+","+(s.b/l).toFixed(4)+","+(s.c/l).toFixed(4)+","+(s.d/l).toFixed(4)+","+(s.tx/l).toFixed(4)+","+(s.ty/l).toFixed(4)+")"}t._UI.UA&&(i.opacity=t.cAlpha),t._UI.UF=!1,t._UI.UM=!1,t._UI.UA=!1}}},n}(e.DisplayObject);e.FloatDisplay=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t._textAlign="left",t._lineHeight=0,t._lineWidth=0,t._lineType="single",t._text="",t._font="Arial",t._size=12,t._color="#fff",t._italic=!1,t._bold=!1,t._border=!1,t._instanceType="annie.TextField",t._texture=window.document.createElement("canvas"),t}return __extends(t,e),Object.defineProperty(t.prototype,"textAlign",{get:function(){return this._textAlign},set:function(e){this._setProperty("_textAlign",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._setProperty("_lineHeight",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(e){this._setProperty("_lineWidth",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineType",{get:function(){return this._lineType},set:function(e){this._setProperty("_lineType",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._text},set:function(e){this._setProperty("_text",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this._font},set:function(e){this._setProperty("_font",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},set:function(e){this._setProperty("_size",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._setProperty("_color",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return this._italic},set:function(e){this._setProperty("_italic",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bold",{get:function(){return this._bold},set:function(e){this._setProperty("_bold",e,3)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"border",{get:function(){return this._border},set:function(e){this._setProperty("_border",e,3)},enumerable:!0,configurable:!0}),t.prototype._prepContext=function(e){var t=this,n=t.size||12;n+="px ",n+=t.font,t._bold&&(n="bold "+n),t._italic&&(n="italic "+n),e.font=n,e.textAlign=this._textAlign||"left",e.textBaseline="top",e.fillStyle=this._color},t.prototype._getMeasuredWidth=function(e){return this._texture.getContext("2d").measureText(e).width},t.prototype.update=function(t){void 0===t&&(t=!1),e.prototype.update.call(this,t);var n=this;if(n._visible){if(n._UI.UD||n._UI.UF){n._text+="";var i=n._texture,r=i.getContext("2d"),a=n._text.toString().split(/(?:\r\n|\r|\n)/),o=[];n._prepContext(r);var s=void 0;if(s=n.lineHeight?n.lineHeight:1.2*n._getMeasuredWidth("M"),n.lineWidth?n.lineWidth<s&&(n.lineWidth=s):n.lineWidth=10*s,n._text.indexOf("\n")<0&&"single"==n.lineType){o.push(a[0]);var l=a[0];if(n._getMeasuredWidth(l)>n.lineWidth)for(var u=n._getMeasuredWidth(l[0]),d=l[0],c=0,p=l.length,h=1;h<p;h++){if(c=r.measureText(l[h]).width,(u+=c)>n.lineWidth){o[0]=d;break}d+=l[h]}}else for(var f=0,_=a.length;f<_;f++){var l=a[f];if(l){for(var u=n._getMeasuredWidth(l[0]),d=l[0],c=0,p=l.length,h=1;h<p;h++)c=r.measureText(l[h]).width,u+=c,u>this.lineWidth?(o.push(d),d=l[h],u=c):d+=l[h];o.push(d)}}var v=s*o.length,m=n.lineWidth,g=0;"center"==n.textAlign?g=.5*m:"right"==n.textAlign&&(g=m),i.width=m+20,i.height=v+20,r.clearRect(0,0,i.width,i.width),n.border&&(r.beginPath(),r.strokeStyle="#000",r.lineWidth=1,r.strokeRect(10.5,10.5,m,v),r.closePath()),r.setTransform(1,0,0,1,g+10,10),n._prepContext(r);for(var f=0;f<o.length;f++)r.fillText(o[f],0,f*s,m);var y=n.cFilters,b=y.length;if(b>0){for(var x=r.getImageData(0,0,m,v),f=0;f<b;f++)y[f].drawFilter(x);r.putImageData(x,0,0)}n._offsetX=-10,n._offsetY=-10,n._UI.UD=!1,n._bounds.height=v,n._bounds.width=m}n._UI.UM=!1,n._UI.UA=!1,n._UI.UF=!1}},t.prototype.getBounds=function(){return this._bounds},t}(e.DisplayObject);e.TextField=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(n){var i=t.call(this)||this;i.inputType="singleline",i.isAutoDownKeyBoard=!0;var r=null,a=i;a._instanceType="annie.InputText","multiline"!=n?(r=document.createElement("input"),n.indexOf("multiline")>=0&&(n="input"),r.type=n):(r=document.createElement("textarea"),r.style.resize="none",r.style.overflow="hidden"),a.inputType=n;var o=function(){a.isAutoDownKeyBoard&&"pc"!=e.osType&&a.htmlElement&&a.htmlElement.blur()}.bind(a);return a.addEventListener(e.Event.REMOVE_TO_STAGE,function(t){a.stage.removeEventListener(e.MouseEvent.MOUSE_UP,o)}),a.addEventListener(e.Event.ADD_TO_STAGE,function(t){a.stage.addEventListener(e.MouseEvent.MOUSE_UP,o)}),a.init(r),i}return __extends(n,t),n.prototype.init=function(e){t.prototype.init.call(this,e);var n=this;n.htmlElement.style.outline="none",n.htmlElement.style.borderWidth="thin",n.htmlElement.style.borderColor="#000"},n.prototype.initInfo=function(e,t,n,i,r,a,o,s,l){var u=this;u.htmlElement.placeholder=e,u.htmlElement.style.width=t+"px",u.htmlElement.style.height=n+"px",u.htmlElement.style.font=a+"px "+o,u.htmlElement.style.color=i,u.htmlElement.style.textAlign=r,u.border=s,"multiLine"==u.inputType&&(u.htmlElement.style.lineHeight=l+"px")},Object.defineProperty(n.prototype,"bold",{get:function(){return"bold"==this.htmlElement.style.fontWeight},set:function(e){var t=this.htmlElement.style;t.fontWeight=e?"bold":"normal"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"italic",{get:function(){return"italic"==this.htmlElement.style.fontStyle},set:function(e){var t=this.htmlElement.style;t.fontStyle=e?"italic":"normal"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.htmlElement.style.color},set:function(e){this.htmlElement.style.color=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"border",{get:function(){return"none"!=this.htmlElement.style.borderStyle},set:function(e){var t=this;e?(t.htmlElement.style.borderStyle="inset",t.htmlElement.style.backgroundColor="#fff"):(t.htmlElement.style.borderStyle="none",t.htmlElement.style.backgroundColor="transparent")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){var e=this;if(e.htmlElement)return e.htmlElement.value},set:function(e){var t=this;t.htmlElement&&(t.htmlElement.value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxCharacters",{get:function(){var e=this.htmlElement.getAttribute("maxlength");return null===e?0:e},set:function(e){this.htmlElement.setAttribute("maxlength",e)},enumerable:!0,configurable:!0}),n}(e.FloatDisplay);e.InputText=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(i,r,a,o,s,l){void 0===i&&(i="annieEngine"),void 0===r&&(r=640),void 0===a&&(a=1040),void 0===o&&(o=30),void 0===s&&(s="fixedHeight"),void 0===l&&(l=0);var u=t.call(this)||this;u.iosTouchendPreventDefault=!0,u.isPreventDefaultEvent=!0,u.rootDiv=null,u.renderObj=null,u.renderType=0,u.pause=!1,u.viewRect=new e.Rectangle,u.isMultiTouch=!1,u.isMultiMouse=!1,u.autoSteering=!1,u.autoResize=!1,u.desWidth=0,u.desHeight=0,u.divHeight=0,u.divWidth=0,u.bgColor="",u.scaleMode="onScale",u._flush=0,u._currentFlush=0,u._lastDpList={},u._rid=-1,u._floatDisplayList=[],u._ml=[],u._mp=[],u._mouseDownPoint={},u._mouseEventTypes={mousedown:"onMouseDown",mouseup:"onMouseUp",mousemove:"onMouseMove",touchstart:"onMouseDown",touchmove:"onMouseMove",touchend:"onMouseUp"},u.muliPoints=[],u._mP1=new e.Point,u._mP2=new e.Point,u.onMouseEvent=function(t){var i=this;if(i.isMultiTouch&&t.targetTouches)if(2==t.targetTouches.length){i._mP1.x=t.targetTouches[0].clientX-t.target.offsetLeft,i._mP1.y=t.targetTouches[0].clientY-t.target.offsetTop,i._mP2.x=t.targetTouches[1].clientX-t.target.offsetLeft,i._mP2.y=t.targetTouches[1].clientY-t.target.offsetTop;var r=Math.atan2(i._mP1.y-i._mP2.y,i._mP1.x-i._mP2.x)/Math.PI*180,a=e.Point.distance(i._mP1,i._mP2);if(i.muliPoints.push({p1:i._mP1,p2:i._mP2,angle:r,dis:a}),i.muliPoints.length>=2){i._touchEvent||(i._touchEvent=new e.TouchEvent(e.TouchEvent.ON_MULTI_TOUCH),i._touchEvent.target=i);var o=i.muliPoints.length;i._touchEvent.rotate=2*(i.muliPoints[o-1].angle-i.muliPoints[o-2].angle),i._touchEvent.scale=(i.muliPoints[o-1].dis-i.muliPoints[o-2].dis)/(i.divHeight>i.divWidth?i.desWidth:i.desHeight)*4,i._touchEvent.clientPoint1.x=i.muliPoints[o-1].p1.x*e.devicePixelRatio,i._touchEvent.clientPoint2.x=i.muliPoints[o-1].p2.x*e.devicePixelRatio,i._touchEvent.clientPoint1.y=i.muliPoints[o-1].p1.y*e.devicePixelRatio,i._touchEvent.clientPoint2.y=i.muliPoints[o-1].p2.y*e.devicePixelRatio,i.dispatchEvent(i._touchEvent),i.muliPoints=[]}}else i.muliPoints=[];if(!(i.isMultiMouse||t.targetTouches&&t.targetTouches.length>1)&&e.EventDispatcher._totalMEC>0){var s,l=void 0,u=i._mouseEventTypes[t.type],d=void 0,c=void 0,p=void 0,h=void 0,f=void 0,_=void 0;"pc"==e.osType?(t.identifier=0,l=[t]):l=t.changedTouches;for(var v=0;v<l.length;v++)if(f=0,d=[],_="m"+l[v].identifier,h=i._mp.length>0?i._mp.shift():new e.Point,h.x=(l[v].clientX-l[v].target.offsetLeft)*e.devicePixelRatio,h.y=(l[v].clientY-l[v].target.offsetTop)*e.devicePixelRatio,c=i.globalToLocal(h,e.DisplayObject._bp),e.EventDispatcher.getMouseEventCount()>0&&(i._ml[f]?(s=i._ml[f],s.type=u):(s=new e.MouseEvent(u),i._ml[f]=s),d.push(s),i._initMouseEvent(s,h,c,_),f++),"onMouseDown"==u?i._mouseDownPoint[_]=h:"onMouseUp"==u&&i._mouseDownPoint[_]&&e.Point.distance(i._mouseDownPoint[_],h)<20&&e.EventDispatcher.getMouseEventCount("onMouseClick")>0&&(i._ml[f]?(s=i._ml[f],s.type="onMouseClick"):(s=new e.MouseEvent("onMouseClick"),i._ml[f]=s),d.push(s),i._initMouseEvent(s,h,c,_),f++),f>0){var m=i.hitTestPoint(h,!0),g=[];if(m)for(;m;)!1===m.mouseChildren&&(g.length=0),g.push(m),m=m.parent;else g.push(i);var o=g.length;g.reverse();for(var y=0;y<o;y++){m=g[y];for(var b=0;b<f;b++)!1===d[b]._pd&&m.hasEventListener(d[b].type)&&(d[b].currentTarget=m,d[b].target=g[o-1],p=m.globalToLocal(h,e.DisplayObject._bp),d[b].localX=p.x,d[b].localY=p.y,m.dispatchEvent(d[b]))}if("onMouseDown"!=u){if((e.EventDispatcher.getMouseEventCount("onMouseOver")>0||e.EventDispatcher.getMouseEventCount("onMouseOut")>0)&&i._lastDpList[_]){var x=i._lastDpList[_].length,w=g.length;o=x>w?x:w;for(var E=!1,T=void 0,M=void 0,y=1;y<o;y++)E||i._lastDpList[_][y]!=g[y]&&(E=!0,i._ml[f]?(T=i._ml[f],T.type="onMouseOver"):(T=new e.MouseEvent("onMouseOver"),i._ml[f]=T),i._initMouseEvent(T,h,c,_),f++,i._ml[f]?(M=i._ml[f],M.type="onMouseOut"):(M=new e.MouseEvent("onMouseOut"),i._ml[f]=M),i._initMouseEvent(M,h,c,_)),E&&(i._lastDpList[_][y]&&!1===M._pd&&(m=i._lastDpList[_][y],m.hasEventListener("onMouseOut")&&(M.currentTarget=m,M.target=i._lastDpList[_][x-1],p=m.globalToLocal(h,e.DisplayObject._bp),M.localX=p.x,M.localY=p.y,m.dispatchEvent(M))),g[y]&&!1===T._pd&&(m=g[y],m.hasEventListener("onMouseOver")&&(T.currentTarget=m,T.target=g[w-1],p=m.globalToLocal(h,e.DisplayObject._bp),T.localX=p.x,T.localY=p.y,m.dispatchEvent(T))))}i._mp.push(h)}var F=n._dragDisplay;if(F&&F.stage&&F.parent){var L=F.x,P=F.y;p=F.parent.globalToLocal(h,e.DisplayObject._bp),F._isDragCenter?(L=p.x,P=p.y):(F._lastDragPoint.x!=Number.MAX_VALUE&&(L+=p.x-F._lastDragPoint.x,P+=p.y-F._lastDragPoint.y),F._lastDragPoint.x=p.x,F._lastDragPoint.y=p.y),p.x=L,p.y=P,0!=F._dragBounds.width&&(F._dragBounds.isPointIn(p)||(L<F._dragBounds.x?L=F._dragBounds.x:L>F._dragBounds.x+F._dragBounds.width&&(L=F._dragBounds.x+F._dragBounds.width),P<F._dragBounds.y?P=F._dragBounds.y:P>F._dragBounds.y+F._dragBounds.height&&(P=F._dragBounds.y+F._dragBounds.height))),F.x=L,F.y=P}"onMouseUp"==u?(F&&(F._lastDragPoint.x=Number.MAX_VALUE,F._lastDragPoint.y=Number.MAX_VALUE),delete i._mouseDownPoint[_],delete i._lastDpList[_]):i._lastDpList[_]=g}}"_a2x_canvas"==t.target.id&&i.isPreventDefaultEvent&&("touchend"==t.type&&"ios"==e.osType&&i.iosTouchendPreventDefault&&t.preventDefault(),("touchmove"==t.type||"touchstart"==t.type&&"android"==e.osType)&&t.preventDefault()),i._cp&&i.update()},u.setAlign=function(){var t=this,n=t.divHeight*e.devicePixelRatio,i=t.divWidth*e.devicePixelRatio,r=t.desHeight,a=t.desWidth;t.anchorX=a/2,t.anchorY=r/2;var o=n>i,s=r>a,l=1,u=1;if(t.x=(i-a)/2,t.y=(n-r)/2,t.autoSteering&&s!=o){var d=n;n=i,i=d}if("noScale"!=t.scaleMode)switch(l=n/r,u=i/a,t.scaleMode){case"noBorder":u>l?l=u:u=l;break;case"showAll":u<l?l=u:u=l;break;case"fixedWidth":l=u;break;case"fixedHeight":u=l}t.scaleX=u,t.scaleY=l,t.viewRect.x=(a-i/u)/2,t.viewRect.y=(r-n/l)/2,t.viewRect.width=a-2*t.viewRect.x,t.viewRect.height=r-2*t.viewRect.y,t.autoSteering?t.rotation=s==o?0:r>a?-90:90:t.rotation=0},u.resize=function(){var e=this,t=e.getRootDivWH(e.rootDiv);e._UI.UM=!0,e.divHeight=t.h,e.divWidth=t.w,e.renderObj.reSize(),e.setAlign(),e.update()};var d=u;u._instanceType="annie.Stage",d.stage=u;d.name="stageInstance_"+d.instanceId;var c=document.getElementById(i);d.renderType=l,d.desWidth=r,d.desHeight=a,d.rootDiv=c,d.setFrameRate(o),d.scaleMode=s,d.anchorX=r/2,d.anchorY=a/2,d.renderObj=new e.CanvasRender(d),d.renderObj.init(),window.addEventListener("resize",function(t){clearTimeout(d._rid),d._rid=setTimeout(function(){d.autoResize&&d.resize();var t=new e.Event("onResize");d.dispatchEvent(t)},300)}),setTimeout(function(){if(d.resize(),n.addUpdateObj(d),e.debug&&!n._isLoadedVConsole){var t=document.createElement("script");t.onload=function(){d.dispatchEvent(new e.Event("onInitStage")),t.onload=null},document.head.appendChild(t),t.src="libs/vConsole.min.js"}else d.dispatchEvent(new e.Event("onInitStage"))},100);var p=d.rootDiv,h=d.onMouseEvent.bind(d);return"pc"!=e.osType?(p.addEventListener("touchstart",h,!1),p.addEventListener("touchmove",h,!1),p.addEventListener("touchend",h,!1)):(p.addEventListener("mousedown",h,!1),p.addEventListener("mousemove",h,!1),p.addEventListener("mouseup",h,!1)),u}return __extends(n,t),n.prototype.update=function(e){void 0===e&&(e=!1);var n=this;if(!n.pause){t.prototype.update.call(this,e);for(var i=n._floatDisplayList,r=i.length,a=0;a<r;a++)i[a].updateStyle()}},n.prototype.render=function(e){this.pause||(e.begin(),t.prototype.render.call(this,e))},n.prototype._initMouseEvent=function(e,t,n,i){e._pd=!1,e.clientX=t.x,e.clientY=t.y,e.stageX=n.x,e.stageY=n.y,e.identifier=i},n.prototype.flush=function(){var e=this;0==e._flush?(e.update(!0),e.render(e.renderObj)):0==e._currentFlush?(e.update(!0),e.render(e.renderObj),e._currentFlush=e._flush):e._currentFlush--},n.prototype.setFrameRate=function(e){var t=this;t._flush=60/e-1>>0,t._flush<0&&(t._flush=0)},n.prototype.getFrameRate=function(){return 60/(this._flush+1)},n.prototype.getRootDivWH=function(e){var t=e.style.width,n=e.style.height,i=document.body.clientWidth,r=document.body.clientHeight,a=parseInt(t),o=parseInt(n);return"NaN"==a.toString()?a=i:t.indexOf("%")>0&&(a*=i/100),"NaN"==o.toString()?o=r:n.indexOf("%")>0&&(o*=r/100),{w:a,h:o}},n.prototype.kill=function(){n.removeUpdateObj(this)},n.prototype.getBounds=function(){return this.viewRect},n.flushAll=function(){for(var e=n.allUpdateObjList.length,t=0;t<e;t++)n.allUpdateObjList[t]&&n.allUpdateObjList[t].flush();requestAnimationFrame(n.flushAll)},n.addUpdateObj=function(e){for(var t=!1,i=n.allUpdateObjList.length,r=0;r<i;r++)if(n.allUpdateObjList[r]===e){t=!0;break}t||n.allUpdateObjList.unshift(e)},n.removeUpdateObj=function(e){for(var t=n.allUpdateObjList.length,i=0;i<t;i++)if(n.allUpdateObjList[i]===e){n.allUpdateObjList.splice(i,1);break}},n._dragDisplay=null,n._isLoadedVConsole=!1,n.allUpdateObjList=[],n}(e.Sprite);e.Stage=t}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(t,n,i,r){void 0===t&&(t="black"),void 0===n&&(n=2),void 0===i&&(i=2),void 0===r&&(r=2);var a=e.call(this)||this;a.color="black",a.offsetX=2,a.offsetY=2,a.blur=2,a.type="Shadow";var o=a;return o._instanceType="annie.ShadowFilter",o.offsetX=n,o.offsetY=i,o.blur=r,o.color=t,a}return __extends(t,e),t.prototype.toString=function(){var e=this;return e.type+e.offsetX+e.offsetY+e.blur+e.color},t.prototype.drawFilter=function(e){void 0===e&&(e=null)},t}(e.AObject);e.ShadowFilter=t;var n=function(e){function t(t,n,i,r,a,o,s,l){void 0===t&&(t=1),void 0===n&&(n=1),void 0===i&&(i=1),void 0===r&&(r=1),void 0===a&&(a=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===l&&(l=0);var u=e.call(this)||this;u.redMultiplier=0,u.redOffset=0,u.greenMultiplier=0,u.greenOffset=0,u.blueMultiplier=0,u.blueOffset=0,u.alphaMultiplier=0,u.alphaOffset=0,u.type="Color";var d=u;return d._instanceType="annie.ColorFilter",d.redMultiplier=t,d.greenMultiplier=n,d.blueMultiplier=i,d.alphaMultiplier=r,d.redOffset=a,d.greenOffset=o,d.blueOffset=s,d.alphaOffset=l,u}return __extends(t,e),t.prototype.drawFilter=function(e){if(void 0===e&&(e=null),e)for(var t=this,n=e.data,i=n.length,r=0;r<i;r+=4)n[r]=n[r]*t.redMultiplier+t.redOffset,n[r+1]=n[r+1]*t.greenMultiplier+t.greenOffset,n[r+2]=n[r+2]*t.blueMultiplier+t.blueOffset,n[r+3]=n[r+3]*t.alphaMultiplier+t.alphaOffset},t.prototype.toString=function(){var e=this;return e.type+e.redMultiplier+e.greenMultiplier+e.blueMultiplier+e.alphaMultiplier+e.redOffset+e.greenOffset+e.blueOffset+e.alphaOffset},t}(e.AObject);e.ColorFilter=n;var i=function(e){function t(n,i,r,a){var o=e.call(this)||this;o.brightness=0,o.contrast=0,o.saturation=0,o.hue=0,o.type="ColorMatrix";var s=o;s._instanceType="annie.ColorMatrixFilter",s.brightness=n,s.contrast=i,s.saturation=r,s.hue=a,s.colorMatrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n=s._cleanValue(n,255),0!=n&&s._multiplyMatrix([1,0,0,0,n,0,1,0,0,n,0,0,1,0,n,0,0,0,1,0,0,0,0,0,1]),i=o._cleanValue(i,100);var l;if(0!=i&&(i<0?l=127+i/100*127:(l=i%1,l=0==l?t.DELTA_INDEX[i]:t.DELTA_INDEX[i<<0]*(1-l)+t.DELTA_INDEX[1+(i<<0)]*l,l=127*l+127),s._multiplyMatrix([l/127,0,0,0,.5*(127-l),0,l/127,0,0,.5*(127-l),0,0,l/127,0,.5*(127-l),0,0,0,1,0,0,0,0,0,1])),0!=(r=o._cleanValue(r,100))){l=1+(r>0?3*r/100:r/100);var u=.3086,d=.6094,c=.082;s._multiplyMatrix([u*(1-l)+l,d*(1-l),c*(1-l),0,0,u*(1-l),d*(1-l)+l,c*(1-l),0,0,u*(1-l),d*(1-l),c*(1-l)+l,0,0,0,0,0,1,0,0,0,0,0,1])}if(0!=(a=o._cleanValue(a,180)/180*Math.PI)){var p=Math.cos(a),h=Math.sin(a),u=.213,d=.715,c=.072;s._multiplyMatrix([u+p*(1-u)+h*-u,d+p*-d+h*-d,c+p*-c+h*(1-c),0,0,u+p*-u+.143*h,d+p*(1-d)+.14*h,c+p*-c+-.283*h,0,0,u+p*-u+h*-(1-u),d+p*-d+h*d,c+p*(1-c)+h*c,0,0,0,0,0,1,0,0,0,0,0,1])}return o}return __extends(t,e),t.prototype.drawFilter=function(e){if(void 0===e&&(e=null),e)for(var t,n,i,r,a=e.data,o=a.length,s=this.colorMatrix,l=s[0],u=s[1],d=s[2],c=s[3],p=s[4],h=s[5],f=s[6],_=s[7],v=s[8],m=s[9],g=s[10],y=s[11],b=s[12],x=s[13],w=s[14],E=s[15],T=s[16],M=s[17],F=s[18],L=s[19],P=0;P<o;P+=4)t=a[P],n=a[P+1],i=a[P+2],r=a[P+3],a[P]=t*l+n*u+i*d+r*c+p,a[P+1]=t*h+n*f+i*_+r*v+m,a[P+2]=t*g+n*y+i*b+r*x+w,a[P+3]=t*E+n*T+i*M+r*F+L},t.prototype._multiplyMatrix=function(e){var t,n,i,r=[];for(t=0;t<5;t++){for(n=0;n<5;n++)r[n]=this.colorMatrix[n+5*t];for(n=0;n<5;n++){var a=0;for(i=0;i<5;i++)a+=e[n+5*i]*r[i];this.colorMatrix[n+5*t]=a}}},t.prototype._cleanValue=function(e,t){return Math.min(t,Math.max(-t,e))},t.prototype.toString=function(){var e=this;return e.type+e.brightness+e.hue+e.saturation+e.contrast},t.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],t}(e.AObject);e.ColorMatrixFilter=i;var r=function(e){function t(t,n,i){void 0===t&&(t=2),void 0===n&&(n=2),void 0===i&&(i=1);var r=e.call(this)||this;r.type="blur",r.blurX=0,r.blurY=0,r.quality=1;var a=r;return a._instanceType="annie.BlurFilter",a.blurX=t,a.blurY=n,a.quality=i,r}return __extends(t,e),t.prototype.toString=function(){var e=this;return e.type+e.blurX+e.blurY+e.quality},t.prototype.drawFilter=function(e){void 0===e&&(e=null);var n=this,i=n.blurX>>1;if(isNaN(i)||i<0)return!1;var r=n.blurY>>1;if(isNaN(r)||r<0)return!1;if(0==i&&0==r)return!1;var a=n.quality;(isNaN(a)||a<1)&&(a=1),a|=0,a>3&&(a=3),a<1&&(a=1);var o=e.data,s=0,l=0,u=0,d=0,c=0,p=0,h=0,f=0,_=0,v=0,m=0,g=0,y=0,b=0,x=0,w=i+i+1|0,E=r+r+1|0,T=0|e.width,M=0|e.height,F=T-1|0,L=M-1|0,P=i+1|0,C=r+1|0,O={r:0,b:0,g:0,a:0},S=O;for(u=1;u<w;u++)S=S.n={r:0,b:0,g:0,a:0};S.n=O;var I={r:0,b:0,g:0,a:0},D=I;for(u=1;u<E;u++)D=D.n={r:0,b:0,g:0,a:0};D.n=I;for(var U=null,R=0|t.MUL_TABLE[i],A=0|t.SHG_TABLE[i],k=0|t.MUL_TABLE[r],j=0|t.SHG_TABLE[r];a-- >0;){h=p=0;var B=R,N=A;for(l=M;--l>-1;){for(f=P*(g=o[0|p]),_=P*(y=o[p+1|0]),v=P*(b=o[p+2|0]),m=P*(x=o[p+3|0]),S=O,u=P;--u>-1;)S.r=g,S.g=y,S.b=b,S.a=x,S=S.n;for(u=1;u<P;u++)d=p+((F<u?F:u)<<2)|0,f+=S.r=o[d],_+=S.g=o[d+1],v+=S.b=o[d+2],m+=S.a=o[d+3],S=S.n;for(U=O,s=0;s<T;s++)o[p++]=f*B>>>N,o[p++]=_*B>>>N,o[p++]=v*B>>>N,o[p++]=m*B>>>N,d=h+((d=s+i+1)<F?d:F)<<2,f-=U.r-(U.r=o[d]),_-=U.g-(U.g=o[d+1]),v-=U.b-(U.b=o[d+2]),m-=U.a-(U.a=o[d+3]),U=U.n;h+=T}for(B=k,N=j,s=0;s<T;s++){for(p=s<<2|0,f=C*(g=o[p])|0,_=C*(y=o[p+1|0])|0,v=C*(b=o[p+2|0])|0,m=C*(x=o[p+3|0])|0,D=I,u=0;u<C;u++)D.r=g,D.g=y,D.b=b,D.a=x,D=D.n;for(c=T,u=1;u<=r;u++)p=c+s<<2,f+=D.r=o[p],_+=D.g=o[p+1],v+=D.b=o[p+2],m+=D.a=o[p+3],D=D.n,u<L&&(c+=T);if(p=s,U=I,a>0)for(l=0;l<M;l++)d=p<<2,o[d+3]=x=m*B>>>N,x>0?(o[d]=f*B>>>N,o[d+1]=_*B>>>N,o[d+2]=v*B>>>N):o[d]=o[d+1]=o[d+2]=0,d=s+((d=l+C)<L?d:L)*T<<2,f-=U.r-(U.r=o[d]),
_-=U.g-(U.g=o[d+1]),v-=U.b-(U.b=o[d+2]),m-=U.a-(U.a=o[d+3]),U=U.n,p+=T;else for(l=0;l<M;l++)d=p<<2,o[d+3]=x=m*B>>>N,x>0?(x=255/x,o[d]=(f*B>>>N)*x,o[d+1]=(_*B>>>N)*x,o[d+2]=(v*B>>>N)*x):o[d]=o[d+1]=o[d+2]=0,d=s+((d=l+C)<L?d:L)*T<<2,f-=U.r-(U.r=o[d]),_-=U.g-(U.g=o[d+1]),v-=U.b-(U.b=o[d+2]),m-=U.a-(U.a=o[d+3]),U=U.n,p+=T}}},t.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],t.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],t}(e.AObject);e.BlurFilter=r}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(e){var n=t.call(this)||this;return n.rootContainer=null,n._instanceType="annie.CanvasRender",n._stage=e,n}return __extends(n,t),n.prototype.begin=function(){var e=this,t=e.rootContainer;e._ctx.setTransform(1,0,0,1,0,0),""!=e._stage.bgColor?(e._ctx.fillStyle=e._stage.bgColor,e._ctx.fillRect(0,0,t.width,t.height)):e._ctx.clearRect(0,0,t.width,t.height)},n.prototype.beginMask=function(e){var t=this,n=!1;if(e.children&&e.children.length>0&&(e=e.children[0]),e._command&&e._command.length>0){t._ctx.save(),t._ctx.globalAlpha=0;var i=e.cMatrix;t._ctx.setTransform(i.a,i.b,i.c,i.d,i.tx,i.ty),e._drawShape(t._ctx,!0),t._ctx.restore(),n=!0}t._ctx.save(),n&&t._ctx.clip()},n.prototype.endMask=function(){this._ctx.restore()},n.prototype.draw=function(e){var t=this;if(!e._cp){var n=e._texture;if(n&&n.width>0&&n.height>0){var i=t._ctx;i.globalAlpha=e.cAlpha;var r=e.cMatrix;if(i.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty),e.rect&&!e._isCache){var a=e.rect;i.drawImage(n,a.x,a.y,a.width,a.height,0,0,a.width,a.height)}else i.translate(e._offsetX,e._offsetY),i.drawImage(n,0,0)}}},n.prototype.init=function(){var e=this;e.rootContainer||(e.rootContainer=document.createElement("canvas"),e._stage.rootDiv.appendChild(e.rootContainer),e.rootContainer.id="_a2x_canvas");var t=e.rootContainer;e._ctx=t.getContext("2d")},n.prototype.reSize=function(){var t=this,n=t.rootContainer;n.width=t._stage.divWidth*e.devicePixelRatio,n.height=t._stage.divHeight*e.devicePixelRatio,n.style.width=t._stage.divWidth+"px",n.style.height=t._stage.divHeight+"px"},n}(e.AObject);e.CanvasRender=t}(annie||(annie={}));var annie;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._req=null,e.headers=[],e.responseType=null,e.url="",e.method="get",e.data=null,e._fqs=function(e,t){var n=[];if(e)for(var i in e)n.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i]));return t&&(n=n.concat(t)),n.join("&")},e._fus=function(e,t){var n=this;if(null==t||""==t)return e;var i=[],r=e.indexOf("?");if(-1!=r){var a=e.slice(r+1);return i=i.concat(a.split("&")),e.slice(0,r)+"?"+n._fqs(t,i)}return e+"?"+n._fqs(t,i)},e._instanceType="annie.URLLoader",e}return __extends(n,t),n.prototype.loadCancel=function(){var e=this;e._req&&e._req.abort()},n.prototype.load=function(t,n){void 0===n&&(n="form");var i=this;if(i.loadCancel(),null==i.responseType||""==i.responseType){var r=t.split("."),a=r[r.length-1],o=a.split("?")[0].toLocaleLowerCase();i.responseType="mp3"==o||"ogg"==o||"wav"==o?"sound":"jpg"==o||"jpeg"==o||"png"==o||"gif"==o?"image":"css"==o?"css":"mp4"==o?"video":"svg"==o?"svg":"xml"==o?"xml":"json"==o?"json":"txt"==o?"text":"js"==o||"swf"==o?"js":"unKnow"}if(!i._req){i._req=new XMLHttpRequest;var s=i._req;s.withCredentials=!1,s.onprogress=function(e){!e||e.loaded>0&&0==e.total||i.dispatchEvent("onProgress",{loadedBytes:e.loaded,totalBytes:e.total})},s.onerror=function(e){if(++u>2)i.dispatchEvent("onError",{id:2,msg:e.message});else if(s.abort(),i.data)if("form"==n)s.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"),s.send(i._fqs(i.data,null));else{var t="application/json";"json"!=n&&(t="multipart/form-data"),s.setRequestHeader("Content-type",t+";charset=UTF-8"),s.send(i.data)}else s.send()},s.onreadystatechange=function(t){var n=t.target;if(4==n.readyState)if(200==s.status){var r=!1,a=new e.Event("onComplete"),o=n.response;a.data={type:i.responseType,response:null};var l=void 0;switch(i.responseType){case"css":l=document.createElement("link"),l.rel="stylesheet",l.href=i.url;break;case"image":case"sound":case"video":var u;"image"==i.responseType?(r=!0,u=document.createElement("img"),u.onload=function(){URL.revokeObjectURL(u.src),u.onload=null,i.dispatchEvent(a)},u.src=URL.createObjectURL(o),l=u):"sound"==i.responseType?(u=document.createElement("AUDIO"),u.preload=!0,u.src=i.url,l=new e.Sound(i.url)):"video"==i.responseType&&(u=document.createElement("VIDEO"),u.preload=!0,u.src=i.url,l=new e.Video(u));break;case"json":l=JSON.parse(o);break;case"js":l="JS_CODE",e.Eval(o);break;case"text":case"unKnow":case"xml":default:l=o}a.data.response=l,i.data=null,i.responseType="",r||i.dispatchEvent(a)}else i.dispatchEvent("onError",{id:0,msg:"访问地址不存在"})}}var l=i._req,u=0;if(i.data&&"get"==i.method.toLocaleLowerCase()?(i.url=i._fus(t,i.data),i.data=null):i.url=t,"image"==i.responseType||"sound"==i.responseType||"video"==i.responseType?l.responseType="blob":l.responseType="text",l.open(i.method,i.url,!0),i.headers.length>0){for(var d=0;d<i.headers.length;d+=2)l.setRequestHeader(i.headers[d],i.headers[d+1]);i.headers.length=0}if(i.data)if("form"==n)l.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"),l.send(i._fqs(i.data,null));else{var c="application/json";"json"!=n&&(c="multipart/form-data"),l.setRequestHeader("Content-type",c+";charset=UTF-8"),l.send(i.data)}else l.send()},n.prototype.addHeader=function(e,t){this.headers.push(e,t)},n}(e.EventDispatcher);e.URLLoader=t}(annie||(annie={}));var Flash2x;!function(Flash2x){function _loadConfig(){_JSONQueue.load(_domain+"resource/"+_loadSceneNames[_loadIndex]+"/"+_loadSceneNames[_loadIndex]+".res.json?t="+_time)}function onCFGComplete(e){var t=e.data.response;_currentConfig.push(t),_totalLoadRes+=t.length,_loadIndex++,_loadSceneNames[_loadIndex]?_loadConfig():(_loadIndex=0,_loadSinglePer=1/_totalLoadRes,_loadRes())}function _onRESProgress(e){_progressCallback&&_progressCallback(100*(_loadPer+e.data.loadedBytes/e.data.totalBytes*_loadSinglePer)>>0)}function _onRESComplete(e){var t=_loadSceneNames[_loadIndex];if(Flash2x._isReleased){if("f2xShare"==t)return _currentConfig.shift(),_loadSceneNames.shift(),void _loadRes();var n=Flash2x,i=n[t+"Res"];for(var r in i){var a;i[r].indexOf("audio/")>0?a=new annie.Sound(i[r]):i[r].indexOf("image/")>0?(a=new Image,a.src=i[r]):a=JSON.parse(i[r]),Flash2x.res[t][r]=a}delete n[t+"Res"]}else"js"!=e.data.type&&"css"!=e.data.type&&(Flash2x.res[t][_currentConfig[_loadIndex][0].id]=e.data.response);_checkComplete()}function _checkComplete(){if(_loadedLoadRes++,_loadPer=_loadedLoadRes/_totalLoadRes,_currentConfig[_loadIndex].shift(),_currentConfig[_loadIndex].length>0)_loadRes();else{var e={};e.sceneName=_loadSceneNames[_loadIndex],_loadIndex++,e.sceneId=_loadIndex,e.sceneTotal=_loadSceneNames.length,_loadIndex==_loadSceneNames.length?(_isLoading=!1,setTimeout(function(){_completeCallback(e)},100)):(_completeCallback(e),_loadRes()),Flash2x.res[e.sceneName]._f2x_had_loaded_scene=!0}}function _loadRes(){var e=_domain+_currentConfig[_loadIndex][0].src;Flash2x._isReleased&&(_loaderQueue.responseType="js",e+="?v="+Flash2x._isReleased),_loaderQueue.load(e)}function isLoadedScene(e){return!(void 0==Flash2x.res[e]||null==Flash2x.res[e]||!Flash2x.res[e]._f2x_had_loaded_scene)}function unLoadScene(sceneName){delete Flash2x.res[sceneName];var scene=eval(sceneName);for(var i in scene)delete scene[i];eval(sceneName+"=null;")}function getMediaByName(e,t){var n=Flash2x.res;return n[e][t]?n[e][t]:null}function b(e,t){var n=Flash2x.res;if(n[e][t])return new annie.Bitmap(n[e][t]);for(var i=0;n[e]["F2xSSIMG"+i];){var r=n[e]["F2xSSIMGData"+i];if(void 0!=r[t]){!0;var a=r[t],o=n[e]["F2xSSIMG"+i];return new annie.Bitmap(o,a)}i++}return null}function d(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&(void 0!=t.x&&(e.x=t.x),void 0!=t.y&&(e.y=t.y),void 0!=t.a&&(e.scaleX=t.a),void 0!=t.b&&(e.scaleY=t.b),void 0!=t.r&&(e.rotation=t.r),void 0!=t.c&&(e.skewX=t.c),void 0!=t.d&&(e.skewY=t.d),void 0!=t.o&&(e.alpha=t.o),void 0!=t.v&&(e.visible=t.v)),n&&n.length>0){for(var i=0,r=[];void 0!=n[i];)if(0==n[i])r.push(new ColorFilter(n[i+1],n[i+2],n[i+3],n[i+4],n[i+5],n[i+6],n[i+7],n[i+8])),i+=9;else if(1==n[i])r.push(new BlurFilter(n[i+1],n[i+2],n[i+3])),i+=4;else if(2==n[i]){var a=.5*(n[i+1]+n[i+2]),o=Shape.getRGBA(n[i+4],n[i+5]),s=n[i+7]*Math.cos(n[i+6]/180*Math.PI),l=n[i+7]*Math.sin(n[i+6]/180*Math.PI);r.push(new ShadowFilter(o,s,l,a)),i+=8}else if(3==n[i]){var u=.5*(n[i+1]+n[i+2]),o=Shape.getRGBA(n[i+4],n[i+5]);r.push(new ShadowFilter(o,0,0,u)),i+=6}else 4==n[i]&&(r.push(new ColorMatrixFilter(n[i+1],n[i+2],n[i+3],n[i+4])),i+=5);e.filters=r}}function t(e,t,n,i,r,a,o,s,l,u,d,c,p,h,f){void 0===c&&(c=!1),void 0===p&&(p=!1),void 0===h&&(h="single"),void 0===f&&(f=!1);var _;return 0==e||1==e?(_=new annie.TextField,_.text=t,_.font=r,_.size=n,_.lineWidth=s+2*o,_.lineHeight=u,_.textAlign=d,_.italic=c,_.bold=p,_.color=i,_.lineType=h,_.border=f):(_=new annie.InputText(h),_.initInfo(t,s+2*o,l+2*a,i,d,n,r,f,u/n),c&&(_.italic=!0),p&&(_.bold=!0)),_}function sb(e,t){var n="_f2x_s"+t;if(Flash2x.res[e][n])return Flash2x.res[e][n];var i=null,r=b(e,t);return r?(i=r.rect?annie.Bitmap.convertToImage(r,!1):r.bitmapData,Flash2x.res[e][n]=i,i):(trace("error:矢量位图填充时,未找到位图资源!"),null)}function s(e,t,n){var i=new annie.Shape;return t&&(0==t.type?i.beginFill(t.color):1==t.type?i.beginRadialGradientFill(t.gradient[0],t.gradient[1],t.points):2==t.type?i.beginLinearGradientFill(t.gradient[0],t.gradient[1],t.points):i.beginBitmapFill(sb(t.bitmapScene,t.bitmapName),t.matrix)),n&&(0==n.type?i.beginStroke(n.color,n.lineWidth,n.caps,n.joints,n.miter):1==n.type?i.beginRadialGradientStroke(n.gradient[0],n.gradient[1],n.points,n.lineWidth,n.caps,n.joints,n.miter):2==n.type?i.beginLinearGradientStroke(n.gradient[0],n.gradient[1],n.points,n.lineWidth,n.caps,n.joints,n.miter):i.beginBitmapStroke(sb(n.bitmapScene,n.bitmapName),n.matrix,n.lineWidth,n.caps,n.joints,n.miter)),0==e.type?i.decodePath(e.data):1==e.type?i.drawRoundRect(e.data.x,e.data.y,e.data.w,e.data.h,e.data.topLeftRadius,e.data.topRightRadius,e.data.bottomLeftRadius,e.data.bottomRightRadius):i.drawEllipse(e.data.x,e.data.y,e.data.w,e.data.h),t&&i.endFill(),n&&i.endStroke(),i}function ajax(e){var t=new URLLoader;t.addHeader("X-Requested-With","XMLHttpRequest"),t.method=void 0==e.type?"get":e.type,t.data=void 0==e.data?null:e.data,t.responseType=void 0==e.responseType?"text":e.responseType,void 0!=e.success&&t.addEventListener(annie.Event.COMPLETE,e.success),void 0!=e.error&&t.addEventListener(annie.Event.ERROR,e.error),t.load(e.url)}function jsonp(e,t,n,i){var r=window;1==t&&(r[n]=i);var a=document.createElement("script"),o=document.getElementsByTagName("head")[0];a.onload=function(e){0==t&&i(r[n]),e.path[0].src="",r[n]=null,delete r[n],o.removeChild(e.path[0])},o.appendChild(a);var s;s=e.indexOf("?")>0?"&":"?",a.src=e+s+"a_n_n_i_e="+Math.random()+"&callback="+n}function getQueryString(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),n=window.location.search.substr(1).match(t);return null!=n?decodeURIComponent(n[2]):null}var URLLoader=annie.URLLoader,Event=annie.Event,ColorFilter=annie.ColorFilter,Shape=annie.Shape,BlurFilter=annie.BlurFilter,ShadowFilter=annie.ShadowFilter,ColorMatrixFilter=annie.ColorMatrixFilter;Flash2x._isReleased=!1,Flash2x._shareSceneList=[],Flash2x.res={};var _isLoading,_loadSceneNames,_domain,_loadIndex,_totalLoadRes,_loadedLoadRes,_completeCallback,_progressCallback,_JSONQueue,_loaderQueue,_isInited,_currentConfig,_time,_loadPer,_loadSinglePer;Flash2x.loadScene=function(e,t,n,i){if(void 0===i&&(i=""),_isLoading&&(_JSONQueue.loadCancel(),_loaderQueue.loadCancel()),_loadSceneNames=[],_domain=i,"string"==typeof e)if(isLoadedScene(e)){var r={};r.sceneName=e,r.sceneId=1,r.sceneTotal=1,n(r)}else Flash2x.res[e]={},_loadSceneNames.push(e);else for(var a=e.length,o=0,s=0;s<a;s++)if(isLoadedScene(e[s])){var r={};r.sceneName=e[s],r.sceneId=++o,r.sceneTotal=a,n(r)}else Flash2x.res[e[s]]={},_loadSceneNames.push(e[s]);if(0!=_loadSceneNames.length)if(_isInited||(_time=(new Date).getTime(),_JSONQueue=new URLLoader,_JSONQueue.addEventListener(Event.COMPLETE,onCFGComplete),_loaderQueue=new URLLoader,_loaderQueue.addEventListener(Event.COMPLETE,_onRESComplete),_loaderQueue.addEventListener(Event.PROGRESS,_onRESProgress),_isInited=!0),_loadPer=0,_loadIndex=0,_totalLoadRes=0,_loadedLoadRes=0,_isLoading=!0,_completeCallback=n,_progressCallback=t,_currentConfig=[],Flash2x._isReleased){if(Flash2x._shareSceneList.length>0&&!isLoadedScene("f2xShare"))for(var s=0;s<_loadSceneNames.length;s++)if(Flash2x._shareSceneList.indexOf(_loadSceneNames[s])>=0){_loadSceneNames.unshift("f2xShare");break}_loadIndex=0,_totalLoadRes=_loadSceneNames.length,_loadSinglePer=1/_totalLoadRes;for(var s=0;s<_totalLoadRes;s++)_currentConfig.push([{src:"src/"+_loadSceneNames[s]+".swf"}]);_loadRes()}else _loadConfig()},Flash2x.isLoadedScene=isLoadedScene,Flash2x.unLoadScene=unLoadScene,Flash2x.getMediaByName=getMediaByName,Flash2x.b=b,Flash2x.d=d,Flash2x.t=t,Flash2x.sb=sb,Flash2x.s=s,Flash2x.ajax=ajax,Flash2x.jsonp=jsonp,Flash2x.getQueryString=getQueryString}(Flash2x||(Flash2x={}));var annie;!function(e){var t=!0,n=function(e){function t(){var t=e.call(this)||this;return t.currentFrame=0,t.totalFrames=0,t._isLoop=0,t._delay=0,t._isFront=!0,t._cParams=null,t._loop=!1,t}return __extends(t,e),t.prototype.init=function(e,t,n,i){if(void 0===i&&(i=!0),t<=0||"number"!=typeof t)throw new Error("annie.Tween.to()或者annie.Tween.from()方法的第二个参数一定要是大于0的数字");var r=this;r.currentFrame=1;var a=60*t>>0;r.totalFrames=a>0?a:1,r.target=e,r._isTo=i,r._isLoop=0,r._startData={},r._disData={},r._delay=0,r._isFront=!0,r._ease=null,r._update=null,r._cParams=null,r._loop=!1,r._completeFun=null;for(var o in n)switch(o){case"useFrame":1==n[o]&&(r.totalFrames=t);break;case"yoyo":!1===n[o]?r._isLoop=0:!0===n[o]?r._isLoop=Number.MAX_VALUE:r._isLoop=n[o];break;case"delay":n.useFrame?r._delay=n[o]:r._delay=60*n[o]>>0;break;case"ease":r._ease=n[o];break;case"onUpdate":r._update=n[o];break;case"onComplete":r._completeFun=n[o];break;case"completeParams":r._cParams=n[o];break;case"loop":r._loop=n[o];break;default:"number"==typeof n[o]&&(i?(r._startData[o]=e[o],r._disData[o]=n[o]-e[o]):(r._startData[o]=n[o],r._disData[o]=e[o]-n[o],e[o]=n[o]))}},t.prototype.update=function(){var e=this;if(e._isFront&&e._delay>0)return void e._delay--;var t=e.currentFrame/e.totalFrames;if(!(t<0||t>1)){e._ease&&(t=e._ease(t));var n=!1;for(var r in e._disData)n=!0,e.target[r]=e._startData[r]+e._disData[r]*t;if(!n)return void i.kill(e.instanceId);e._update&&e._update(t);var a=e._completeFun,o=e._cParams;e._isFront?++e.currentFrame>e.totalFrames&&(e._loop?e.currentFrame=1:e._isLoop>0?(e._isFront=!1,e.currentFrame=e.totalFrames,e._isLoop--):i.kill(e.instanceId),a&&a(o)):--e.currentFrame<0&&(e._isLoop>0?(e._isFront=!0,e.currentFrame=1):i.kill(e.instanceId),a&&a(o))}},t}(e.AObject);e.TweenObj=n;var i=function(){function i(){}return i.to=function(e,t,n){return i.createTween(e,t,n,!0)},i.from=function(e,t,n){return i.createTween(e,t,n,!1)},i.createTween=function(t,r,a,o){for(var s,l=i._tweenList.length,u=0;u<l;u++)if(s=i._tweenList[u],t==s.target)for(var d in s._startData)void 0!=a[d]&&(delete s._startData[d],delete s._disData[d]);return l=i._tweenPool.length,l>0?(s=i._tweenPool.shift(),s._instanceId=e.AObject._object_id++):s=new n,i._tweenList.push(s),s.init(t,r,a,o),s.instanceId},i.killAll=function(){for(var e,t=i._tweenList.length,n=0;n<t;n++)e=i._tweenList[n],e.target=null,e._completeFun=null,e._cParams=null,e._update=null,e._ease=null,e._loop=!1,i._tweenPool.push(e);i._tweenList.length=0},i.kill=function(e){for(var t,n=i._tweenList.length,r=0;r<n;r++)if(t=i._tweenList[r],t.instanceId==e){t.target=null,t._completeFun=null,t._cParams=null,t._update=null,t._ease=null,t._loop=null,i._tweenPool.push(t),i._tweenList.splice(r,1);break}},i.quadraticIn=function(e){return e*e},i.quadraticOut=function(e){return e*(2-e)},i.quadraticInOut=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},i.cubicIn=function(e){return e*e*e},i.cubicOut=function(e){return--e*e*e+1},i.cubicInOut=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},i.quarticIn=function(e){return e*e*e*e},i.quarticOut=function(e){return 1- --e*e*e*e},i.quarticInOut=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},i.quinticIn=function(e){return e*e*e*e*e},i.quinticOut=function(e){return--e*e*e*e*e+1},i.quinticInOut=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},i.sinusoidalIn=function(e){return 1-Math.cos(e*Math.PI/2)},i.sinusoidalOut=function(e){return Math.sin(e*Math.PI/2)},i.sinusoidalInOut=function(e){return.5*(1-Math.cos(Math.PI*e))},i.exponentialIn=function(e){return 0===e?0:Math.pow(1024,e-1)},i.exponentialOut=function(e){return 1===e?1:1-Math.pow(2,-10*e)},i.exponentialInOut=function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},i.circularIn=function(e){return 1-Math.sqrt(1-e*e)},i.circularOut=function(e){return Math.sqrt(1- --e*e)},i.circularInOut=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},i.elasticIn=function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},i.elasticOut=function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},i.elasticInOut=function(e){return 0===e?0:1===e?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1)},i.backIn=function(e){var t=1.70158;return e*e*((t+1)*e-t)},i.backOut=function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},i.backInOut=function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},i.bounceIn=function(e){return 1-i.bounceOut(1-e)},i.bounceOut=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},i.bounceInOut=function(e){return e<.5?.5*i.bounceIn(2*e):.5*i.bounceOut(2*e-1)+.5},i.flush=function(){if(t)for(var e=i._tweenList.length,n=e-1;n>=0;n--)i._tweenList[n]?i._tweenList[n].update():i._tweenList.splice(n,1);t=!t},i._tweenPool=[],i._tweenList=[],i}();e.Tween=i}(annie||(annie={}));var annie;!function(e){var t=function(e){function t(n,i){void 0===i&&(i=0);var r=e.call(this)||this;r._currentCount=0,r._delay=0,r._frameDelay=0,r._currentFrameDelay=0,r._repeatCount=0,r._running=!1,n<=0&&(n=1);var a=r;return a._delay=n,a._frameDelay=Math.ceil(.001*n*60),a._repeatCount=i,t._timerList.push(a),r}return __extends(t,e),t.prototype.reset=function(){var e=this;e._running=!1,e._currentCount=0,e._currentFrameDelay=0},t.prototype.start=function(){var e=this;e._running=!0,e._currentCount==e._repeatCount&&(e._currentCount=0)},t.prototype.stop=function(){this._running=!1},Object.defineProperty(t.prototype,"currentCount",{get:function(){return this._currentCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){return this._delay},set:function(e){this._delay=e,this._frameDelay=Math.ceil(.001*e*60)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"repeatCount",{get:function(){return this._repeatCount},set:function(e){e<0&&(e=0),this._repeatCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"running",{get:function(){return this._running},enumerable:!0,configurable:!0}),t.prototype.kill=function(){for(var e=t._timerList.length,n=this,i=0;i<e;i++)if(t._timerList[i]._instanceId==n._instanceId){t._timerList.splice(i,1);break}},t.prototype.update=function(){var e=this;e._running&&++e._currentFrameDelay==e._frameDelay&&(e._repeatCount&&e._currentCount++,e._currentFrameDelay=0,e.dispatchEvent("onTimer"),e._repeatCount&&e._currentCount==e._repeatCount&&(e._running=!1,e.dispatchEvent("onTimerComplete")))},t.flush=function(){for(var e=t._timerList.length,n=e-1;n>=0;n--)t._timerList[n]?t._timerList[n].update():t._timerList.splice(n,1)},t._timerList=[],t}(e.EventDispatcher);e.Timer=t}(annie||(annie={}));var annie;!function(e){function t(e){window.location.href=e}function n(e){var t=new XMLHttpRequest;t.open("get",e,!0),t.send()}e.Eval=eval.bind(window),e.debug=!1,e.version="1.1.3",e.osType=function(){var e=navigator.userAgent.toLocaleLowerCase(),t=/android/,n=/iphone|ipod|ipad/;return t.test(e)?"android":n.test(e)?"ios":"pc"}(),e.devicePixelRatio=window.devicePixelRatio?window.devicePixelRatio:1,e.StageScaleMode={EXACT_FIT:"exactFit",NO_BORDER:"noBorder",NO_SCALE:"noScale",SHOW_ALL:"showAll",FIXED_WIDTH:"fixedWidth",FIXED_HEIGHT:"fixedHeight"},e.navigateToURL=t,e.sendToURL=n;var i=null;e.toDisplayDataURL=function(t,n,r,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===a&&(a=""),i||(i=new e.CanvasRender(null)),i._stage=t,i.rootContainer=e.DisplayObject._canvas;var o={p:t.parent,x:t.x,y:t.y,scX:t.scaleX,scY:t.scaleY,r:t.rotation,skX:t.skewX,skY:t.skewY};t.parent=null,t.x=t.y=0,t.scaleX=t.scaleY=1,t.rotation=t.skewX=t.skewY=0;var s=t.getBounds(),l=n?n.width:s.width,u=n?n.height:s.height;return t.x=n?-n.x:-s.x,t.y=n?-n.y:-s.y,t._offsetX=n?n.x:s.x,t._offsetY=n?n.y:s.y,i.rootContainer.width=l,i.rootContainer.height=u,i._ctx=i.rootContainer.getContext("2d"),""==a?i._ctx.clearRect(0,0,l,u):(i._ctx.fillStyle=a,i._ctx.fillRect(0,0,l,u)),t._cp=!0,t.update(),t.render(i),t._cp=!0,t.parent=o.p,t.x=o.x,t.y=o.y,t.scaleX=o.scX,t.scaleY=o.scY,t.rotation=o.r,t.skewX=o.skX,t.skewY=o.skY,t.update(),r||(r={type:"png"}),i.rootContainer.toDataURL("image/"+r.type,r.quality)},e.getStagePixels=function(t,n){var i=t.localToGlobal(new e.Point(n.x,n.y));return t.renderObj.rootContainer.getContext("2d").getImageData(i.x,i.y,n.width,n.height)}}(annie||(annie={}));var trace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n in arguments)console.log(arguments[n])},globalDispatcher=new annie.EventDispatcher,F2xContainer=annie.Sprite,F2xMovieClip=annie.MovieClip,F2xText=annie.TextField,F2xInputText=annie.InputText,F2xBitmap=annie.Bitmap,F2xShape=annie.Shape;annie.Stage.addUpdateObj(annie.Tween),annie.Stage.addUpdateObj(annie.Timer),annie.Stage.flushAll();
\ No newline at end of file
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function i(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(i.prototype=a.prototype,new i)}}(),annieUI;!function(e){var t=annie.Sprite,a=annie.Shape,i=function(e){function i(i,n,r,o){void 0===o&&(o=!0);var s=e.call(this)||this;s.isVertical=!0,s.viewWidth=0,s.viewHeight=0,s._tweenId=0,s.maxDistance=1040,s.distance=0,s.minDis=2,s.maskObj=new a,s.view=new t,s.lastValue=0,s.speed=0,s.addSpeed=0,s.isStop=!0,s.maxSpeed=100,s.fSpeed=20,s.paramXY="y",s.stopTimes=-1,s.isMouseDownState=0,s.autoScroll=!1;var d=s;return d._instanceType="annieUI.ScrollPage",d.maskObj.alpha=0,d.addChild(d.maskObj),d.addChild(d.view),d.view.mask=d.maskObj,d.maxDistance=r,d.setViewRect(i,n,o),d.addEventListener(annie.MouseEvent.MOUSE_DOWN,d.onMouseEvent.bind(d)),d.addEventListener(annie.MouseEvent.MOUSE_MOVE,d.onMouseEvent.bind(d)),d.addEventListener(annie.MouseEvent.MOUSE_UP,d.onMouseEvent.bind(d)),d.addEventListener(annie.MouseEvent.MOUSE_OUT,d.onMouseEvent.bind(d)),d.addEventListener(annie.Event.ENTER_FRAME,function(){var e=d.view;if(!d.autoScroll)if(d.isStop)d.stopTimes>=0&&++d.stopTimes>=15&&(d.speed=0,(e[d.paramXY]>0||e[d.paramXY]<d.distance-d.maxDistance)&&(d.isStop=!1,d.stopTimes=-1));else if(Math.abs(d.speed)>0)e[d.paramXY]+=d.speed,e[d.paramXY]>0||e[d.paramXY]<d.distance-d.maxDistance?d.speed+=d.addSpeed*d.fSpeed:d.speed+=d.addSpeed,d.speed*d.addSpeed>0&&(d.dispatchEvent("onScrollStop"),d.speed=0);else if(0!=d.addSpeed){if(e[d.paramXY]>0||e[d.paramXY]<d.distance-d.maxDistance){var t=0;d.addSpeed>0&&d.distance<d.maxDistance&&(t=d.distance-d.maxDistance),e[d.paramXY]+=.4*(t-e[d.paramXY]),Math.abs(t-e[d.paramXY])<.1&&(d.isStop=!0,d.addSpeed>0?d.dispatchEvent("onScrollToEnd"):d.dispatchEvent("onScrollToHead"))}}else d.isStop=!0}),s}return __extends(i,e),i.prototype.setViewRect=function(e,t,a){var i=this;i.maskObj.clear(),i.maskObj.beginFill("#000000"),i.maskObj.drawRect(0,0,e,t),i.viewWidth=e,i.viewHeight=t,i.maskObj.endFill(),i.isVertical=a,a?(i.distance=i.viewHeight,i.paramXY="y"):(i.distance=i.viewWidth,i.paramXY="x"),i.isVertical=a},i.prototype.onMouseEvent=function(e){var t=this,a=t.view;if(e.type==annie.MouseEvent.MOUSE_DOWN)t.isStop||(t.isStop=!0),t.autoScroll&&(t.autoScroll=!1,annie.Tween.kill(t._tweenId)),t.isVertical?t.lastValue=e.localY:t.lastValue=e.localX,t.speed=0,t.isMouseDownState=1;else if(e.type==annie.MouseEvent.MOUSE_MOVE){if(t.isMouseDownState<1)return;1==t.isMouseDownState&&t.dispatchEvent("onScrollStart"),t.isMouseDownState=2;var i=void 0;if(i=t.isVertical?e.localY:e.localX,t.speed=i-t.lastValue,t.speed>t.minDis?(t.addSpeed=-2,t.speed>t.maxSpeed&&(t.speed=t.maxSpeed)):t.speed<-t.minDis?(t.speed<-t.maxSpeed&&(t.speed=-t.maxSpeed),t.addSpeed=2):t.speed=0,0!=t.speed){var n=1;(a[t.paramXY]>0||a[t.paramXY]<t.distance-t.maxDistance)&&(n=.2),a[t.paramXY]+=(i-t.lastValue)*n}t.lastValue=i,t.stopTimes=0}else t.isStop=!1,t.stopTimes=-1,0==t.speed&&2==t.isMouseDownState&&t.dispatchEvent("onScrollStop"),t.isMouseDownState=0},i.prototype.scrollTo=function(e,t){void 0===t&&(t=0);var a=this,i="x"==a.paramXY?a.viewWidth:a.viewHeight;if(e<0?e=0:e>a.maxDistance-i&&(e=a.maxDistance-i),Math.abs(a.view[a.paramXY]+e)>2){a.autoScroll=!0,a.isStop=!0,a.isMouseDownState=0;var n={};n.onComplete=function(){a.autoScroll=!1},n[a.paramXY]=-e,a._tweenId=annie.Tween.to(a.view,t,n),0==a.speed&&a.dispatchEvent("onScrollStart")}},i}(t);e.ScrollPage=i}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=function(e){function t(){var t=e.call(this)||this;t.maskType=0;var a=t;return a._instanceType="annieUI.FacePhoto",a.photo=new Image,a.bitmap=new annie.Bitmap,a.maskObj=new annie.Shape,a.photo.onload=function(e){a.bitmap.bitmapData=a.photo,a.maskObj.clear(),a.maskObj.beginFill("#000000");var t=a.radio/(a.photo.width<a.photo.height?a.photo.width:a.photo.height);a.bitmap.scaleX=a.bitmap.scaleY=t,a.bitmap.x=a.radio-a.photo.width*t>>1,a.bitmap.y=a.radio-a.photo.height*t>>1,0==a.maskType?a.maskObj.drawCircle(a.radio>>1,a.radio>>1,a.radio>>1):a.maskObj.drawRect(0,0,a.radio,a.radio),a.maskObj.endFill(),a.dispatchEvent("onComplete")},a.addChild(a.bitmap),a.bitmap.mask=a.maskObj,t}return __extends(t,e),t.prototype.init=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=0);var i=this;i.radio=t,i.photo.src!=e&&(i.photo.src=e),i.maskType!=a&&(i.maskType=a)},t}(t);e.FacePhoto=a}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=function(e){function t(t,a,i,n){void 0===i&&(i=!0),void 0===n&&(n=null);var r=e.call(this)||this;r.listLen=0,r.view=new annie.Sprite,r.maskObj=new annie.Shape,r.slideSpeed=.2,r._isBreak=!1,r.distance=0,r.touchEndX=0,r.movingX=0,r.movingY=0,r._moveDis=0,r.touchEndY=0,r.currentPageIndex=0,r.reBound=.3,r.isPageFollowToMove=!1,r.follow=.7,r.isMoving=!1,r.viewWidth=0,r.viewHeight=0,r.pageList=[],r.pageClassList=[],r.lastX=0,r.lastY=0,r.isMouseDown=!1,r.canSlideNext=!0,r.canSlidePrev=!0,r.paramXY="y";var o=r;o.isVertical=i,o._ease=n,i?(o.paramXY="y",o.distance=a):(o.paramXY="x",o.distance=t),o.maskObj.alpha=0,o.addChild(o.maskObj),o.addChild(o.view),o.view.mask=o.maskObj,o.setMask(t,a);var s=o.onMouseEvent.bind(o);return o.addEventListener(annie.MouseEvent.MOUSE_DOWN,s),o.addEventListener(annie.MouseEvent.MOUSE_MOVE,s),o.addEventListener(annie.MouseEvent.MOUSE_UP,s),r}return __extends(t,e),t.prototype.setMask=function(e,t){var a=this;a.maskObj.clear(),a.maskObj.beginFill("#000000"),a.maskObj.drawRect(0,0,e,t),a.viewWidth=e,a.viewHeight=t,a.maskObj.endFill()},t.prototype.onMouseEvent=function(e){var t=this;if(!t.isMoving)if(e.type==annie.MouseEvent.MOUSE_DOWN)t.touchEndX=e.localX,t.touchEndY=e.localY,t.movingX=t.movingY=0,t.isMouseDown=!0,t._isBreak=!1,t.lastX=e.localX,t.lastY=e.localY,t._moveDis=0;else if(e.type==annie.MouseEvent.MOUSE_MOVE){if(!t.isMouseDown)return;var a=e.localX-t.touchEndX,i=e.localY-t.touchEndY,n=i,r=a,o=t.movingY;if(t._moveDis=t.lastY-e.localY,t.movingX=a,t.movingY=i,t.isVertical||(n=a,r=i,o=t.movingX,t._moveDis=t.lastX-e.localX),Math.abs(n)>Math.abs(r)){if(t.isPageFollowToMove||Math.abs(n)-Math.abs(o)<-1&&(t._isBreak=!0),n>0){if(0==t.currentPageIndex)t.view[t.paramXY]-=t._moveDis*t.reBound;else if(t.isPageFollowToMove){t.view[t.paramXY]-=t._moveDis*t.follow;var s=t.currentPageIndex-1;t.pageList[s]||(t.pageList[s]=new t.pageClassList[s]),t.pageList[s].parent!=t.view&&(t.view.addChild(t.pageList[s]),t.pageList[s][t.paramXY]=s*t.distance)}}else if(n<0)if(t.currentPageIndex==t.listLen-1)t.view[t.paramXY]-=t._moveDis*t.reBound;else if(t.isPageFollowToMove){t.view[t.paramXY]-=t._moveDis*t.follow;var s=t.currentPageIndex+1;t.pageList[s]||(t.pageList[s]=new t.pageClassList[s]),t.pageList[s].parent!=t.view&&(t.view.addChild(t.pageList[s]),t.pageList[s][t.paramXY]=s*t.distance)}}else t.movingX=t.movingY=0;t.lastX=e.localX,t.lastY=e.localY}else if(e.type==annie.MouseEvent.MOUSE_UP){if(!t.isMouseDown)return;var n=t.movingY,r=t.movingX;if(t.isMouseDown=!1,t.isVertical||(n=t.movingX,r=t.movingY),0==t.currentPageIndex&&t.view[t.paramXY]>0||t.currentPageIndex==t.listLen-1&&t.view[t.paramXY]<-t.currentPageIndex*t.distance){var d={};d[t.paramXY]=-t.currentPageIndex*t.distance,t._ease&&(d.ease=t._ease),annie.Tween.to(t.view,t.slideSpeed*t.reBound,d)}else{var p=t.currentPageIndex;if(t.isPageFollowToMove)if(Math.abs(t._moveDis)>5||Math.abs(n*t.follow<<1)>=t.distance)t.slideTo(n<0?p+1:p-1);else{var l=-t.currentPageIndex*t.distance;if(l==t.view[t.paramXY])return;t.view.mouseEnable=!1,t.isMoving=!0;var d={};d[t.paramXY]=l,t._ease&&(d.ease=t._ease),d.onComplete=function(){t.view.mouseEnable=!0,t.isMoving=!1,t.currentPageIndex>0&&t.pageList[t.currentPageIndex-1]&&t.pageList[t.currentPageIndex-1].parent==t.view&&t.view.removeChild(t.pageList[t.currentPageIndex-1]),t.currentPageIndex<t.listLen-1&&t.pageList[t.currentPageIndex+1]&&t.pageList[t.currentPageIndex+1].parent==t.view&&t.view.removeChild(t.pageList[t.currentPageIndex+1])},annie.Tween.to(t.view,.5*t.slideSpeed,d)}else Math.abs(n)>100&&!t._isBreak&&t.slideTo(n<0?p+1:p-1)}}},t.prototype.slideTo=function(e,t){void 0===t&&(t=!1);var a=this;if(!a.isMoving&&a.currentPageIndex!=e){var i=a.currentPageIndex,n=a.currentPageIndex<e;if(n){if(!(e<a.listLen&&a.canSlideNext))return;a.currentPageIndex=e}else{if(!(e>=0&&a.canSlidePrev))return;a.currentPageIndex=e}if(a.pageList[a.currentPageIndex]||(a.pageList[a.currentPageIndex]=new a.pageClassList[a.currentPageIndex]),a.pageList[a.currentPageIndex][a.paramXY]=a.currentPageIndex*a.distance,a.pageList[i][a.paramXY]=n?(a.currentPageIndex-1)*a.distance:(a.currentPageIndex+1)*a.distance,a.isPageFollowToMove||(a.view[a.paramXY]=-a.pageList[i][a.paramXY]),a.pageList[a.currentPageIndex]!=a.view&&a.view.addChild(a.pageList[a.currentPageIndex]),t)a.dispatchEvent("onSlideStart",{currentPage:a.currentPageIndex,lastPage:i}),a.view[a.paramXY]=-a.currentPageIndex*a.distance,a.view.removeChild(a.pageList[i]),a.dispatchEvent("onSlideEnd");else{a.view.mouseEnable=!1,a.isMoving=!0;var r={};r[a.paramXY]=-a.currentPageIndex*a.distance,a._ease&&(r.ease=a._ease),r.onComplete=function(){a.view.mouseEnable=!0,a.isMoving=!1,a.view.removeChild(a.pageList[i]),a.dispatchEvent("onSlideEnd")},annie.Tween.to(a.view,a.slideSpeed,r),a.dispatchEvent("onSlideStart",{currentPage:a.currentPageIndex,lastPage:i})}}},t.prototype.addPageList=function(e){var t=this;if(t.pageClassList=t.pageClassList.concat(e),0==t.listLen&&t.pageClassList.length>0){var a=new t.pageClassList[0];t.pageList.push(a),t.view.addChild(a)}t.listLen=t.pageClassList.length},t}(t);e.SlidePage=a}(annieUI||(annieUI={}));var annieUI;!function(e){var t=annie.Sprite,a=annie.Shape,i=annie.Event,n=annie.MouseEvent,r=annie.Point,o=function(e){function o(o,s,d,p){var l=e.call(this)||this;l.totalPage=0,l.currPage=0,l.speed=.4,l.state="stop",l.timerArg0=0,l.timerArg1=0,l.px=0,l.py=0,l.rPage0=new t,l.rPage1=new t,l.pageMC=new t,l.leftPage=null,l.rightPage=null,l.rMask0=new a,l.rMask1=new a,l.shadow0=new a,l.shadow1=new a,l.sMask0=new a,l.sMask1=new a,l.pages=[],l.stageMP=new r,l.canFlip=!0;var c=l;c._instanceType="annieUI.FlipBook",c.getPageCallback=p,c.bW=o,c.bH=s,c.totalPage=d,c.currPage=c.toPage=0,c.crossGap=Math.sqrt(c.bW*c.bW+c.bH*c.bH),c.p1=new r(0,0),c.p2=new r(0,c.bH),c.p3=new r(c.bW+c.bW,0),c.p4=new r(c.bW+c.bW,c.bH),c.limitP1=new r(c.bW,0),c.limitP2=new r(c.bW,c.bH),c.toPosArr=[c.p3,c.p4,c.p1,c.p2],c.myPosArr=[c.p1,c.p2,c.p3,c.p4],c.addChild(c.pageMC),c.addChild(c.rPage0),c.addChild(c.shadow0),c.addChild(c.rPage1),c.addChild(c.shadow1),c.rPage0.mouseEnable=!1,c.rPage1.mouseEnable=!1,c.shadow0.mouseEnable=!1,c.shadow1.mouseEnable=!1,c.setShadowMask(c.shadow0,c.sMask0,1.5*c.bW,3*c.bH),c.setShadowMask(c.shadow1,c.sMask1,1.5*c.bW,3*c.bH),c.shadow0.visible=!1,c.shadow1.visible=!1,c.rPage1.mask=c.rMask1,c.rPage0.mask=c.rMask0,c.setPage(c.currPage);var g=c.onMouseDown.bind(c),h=c.onMouseUp.bind(c),u=c.onMouseMove.bind(c),v=c.onEnterFrame.bind(c);return c.addEventListener(annie.Event.ADD_TO_STAGE,function(e){c.stage.addEventListener(n.MOUSE_DOWN,g),c.stage.addEventListener(n.MOUSE_UP,h),c.stage.addEventListener(n.MOUSE_MOVE,u),c.addEventListener(i.ENTER_FRAME,v)}),c.addEventListener(annie.Event.REMOVE_TO_STAGE,function(e){c.stage.removeEventListener(n.MOUSE_DOWN,g),c.stage.removeEventListener(n.MOUSE_UP,h),c.stage.removeEventListener(n.MOUSE_MOVE,u),c.removeEventListener(i.ENTER_FRAME,v)}),l}return __extends(o,e),o.prototype.drawPage=function(e,t){var a,i,n=this;1==e?(t=n.checkLimit(t,n.limitP1,n.bW),t=n.checkLimit(t,n.limitP2,n.crossGap),i=n.getBookArr(t,n.p1,n.p2),a=i[1],n.getLayerArr(t,a,n.p1,n.p2,n.limitP1,n.limitP2),n.getShadow(n.shadow0,n.sMask0,n.p1,t,[n.p1,n.p3,n.p4,n.p2],.5),n.getShadow(n.shadow1,n.sMask1,n.p1,t,n.layer1Arr,.45),n.rPage1.rotation=n.angle(t,a)+90,n.rPage1.x=i[3].x,n.rPage1.y=i[3].y,n.rPage0.x=n.p1.x,n.rPage0.y=n.p1.y):2==e?(t=n.checkLimit(t,n.limitP2,n.bW),t=n.checkLimit(t,n.limitP1,n.crossGap),i=n.getBookArr(t,n.p2,n.p1),a=i[1],n.getLayerArr(t,a,n.p2,n.p1,n.limitP2,n.limitP1),n.getShadow(n.shadow0,n.sMask0,n.p2,t,[n.p1,n.p3,n.p4,n.p2],.5),n.getShadow(n.shadow1,n.sMask1,n.p2,t,n.layer1Arr,.45),n.rPage1.rotation=n.angle(t,a)-90,n.rPage1.x=i[2].x,n.rPage1.y=i[2].y,n.rPage0.x=n.p1.x,n.rPage0.y=n.p1.y):3==e?(t=n.checkLimit(t,n.limitP1,n.bW),t=n.checkLimit(t,n.limitP2,n.crossGap),i=n.getBookArr(t,n.p3,n.p4),a=i[1],n.getLayerArr(t,a,n.p3,n.p4,n.limitP1,n.limitP2),n.getShadow(n.shadow0,n.sMask0,n.p3,t,[n.p1,n.p3,n.p4,n.p2],.5),n.getShadow(n.shadow1,n.sMask1,n.p3,t,n.layer1Arr,.4),n.rPage1.rotation=n.angle(t,a)+90,n.rPage1.x=t.x,n.rPage1.y=t.y,n.rPage0.x=n.limitP1.x,n.rPage0.y=n.limitP1.y):(t=n.checkLimit(t,n.limitP2,n.bW),t=n.checkLimit(t,n.limitP1,n.crossGap),i=n.getBookArr(t,n.p4,n.p3),a=i[1],n.getLayerArr(t,a,n.p4,n.p3,n.limitP2,n.limitP1),n.getShadow(n.shadow0,n.sMask0,n.p4,t,[n.p1,n.p3,n.p4,n.p2],.5),n.getShadow(n.shadow1,n.sMask1,n.p4,t,n.layer1Arr,.4),n.rPage1.rotation=n.angle(t,a)-90,n.rPage1.x=a.x,n.rPage1.y=a.y,n.rPage0.x=n.limitP1.x,n.rPage0.y=n.limitP1.y),n.getShape(n.rMask1,n.layer1Arr),n.getShape(n.rMask0,n.layer0Arr)},o.prototype.checkLimit=function(e,t,a){var i=this,n=Math.abs(i.pos(t,e)),o=i.angle(t,e);if(n>a){var s=a*Math.sin(o/180*Math.PI),d=a*Math.cos(o/180*Math.PI);e=new r(t.x-d,t.y-s)}return e},o.prototype.getPage=function(e){var t=this;return t.pages[e-1]||(t.pages[e-1]=t.getPageCallback(e)),t.pages[e-1]},o.prototype.getBookArr=function(e,t,a){var i=this,n=[],o=Math.abs(.5*i.pos(t,e)),s=i.angle(t,e),d=o/Math.cos(s/180*Math.PI),p=new r(t.x-d,t.y),l=i.angle(e,p)-i.angle(e,a),c=i.pos(e,a),g=c*Math.sin(l/180*Math.PI),h=c*Math.cos(l/180*Math.PI),u=new r(t.x+h,t.y+g),v=i.angle(p,e),m=i.bW*Math.sin(v/180*Math.PI),w=i.bW*Math.cos(v/180*Math.PI),P=new r(u.x+w,u.y+m),M=new r(e.x+w,e.y+m);return n.push(e),n.push(u),n.push(P),n.push(M),n},o.prototype.getLayerArr=function(e,t,a,i,n,o){var s=this,d=[],p=[],l=Math.abs(.5*s.pos(a,e)),c=s.angle(a,e),g=l/Math.sin(c/180*Math.PI),h=l/Math.cos(c/180*Math.PI),u=new r(a.x-h,a.y),v=new r(a.x,a.y-g),m=t;if(Math.abs(s.pos(e,i))>s.bH){d.push(m);var w=Math.abs(.5*s.pos(m,i)),P=w/Math.cos(c/180*Math.PI);v=new r(i.x-P,i.y)}else p.push(i);d.push(v),d.push(u),d.push(e),s.layer1Arr=d,p.push(o),p.push(n),p.push(u),p.push(v),s.layer0Arr=p},o.prototype.getShape=function(e,t){var a=t.length;e.clear(),e.beginFill("#000"),e.moveTo(t[0].x,t[0].y);for(var i=1;i<a;i++)e.lineTo(t[i].x,t[i].y);e.endFill()},o.prototype.setShadowMask=function(e,t,a,i){e.beginLinearGradientFill(["rgba(0,0,0,0)","rgba(0,0,0,0.6)"],[0,1],[.5*-a,4,.5*a,4]),e.drawRect(.5*-a,.5*-i,.5*a,i),e.endFill(),e.beginLinearGradientFill(["rgba(0,0,0,0)","rgba(0,0,0,0.6)"],[1,0],[.5*-a,4,.5*a,4]),e.drawRect(0,.5*-i,.5*a,i),e.endFill(),e.mask=t},o.prototype.getShadow=function(e,t,a,i,n,r){var o,s,d=this;e.visible=!0,e.x=i.x+(a.x-i.x)*r,e.y=i.y+(a.y-i.y)*r,e.rotation=d.angle(a,i),o=.5*Math.abs(a.x-i.x)/d.bW,s=1-o*o,e.scaleX=o+.1,e.alpha=s+.1,d.getShape(t,n)},o.prototype.setPage=function(e){var t=this;e>0&&e<=t.totalPage&&(t.leftPage=t.getPage(e),t.leftPage.x=t.leftPage.y=0,t.pageMC.addChild(t.leftPage)),e+1>0&&e+1<t.totalPage&&(t.rightPage=t.getPage(e+1),t.rightPage.x=t.bW,t.rightPage.y=0,t.pageMC.addChild(t.rightPage))},o.prototype.onMouseDown=function(e){var t=this;if(t.canFlip&&"stop"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.stageMP=a,t.timerArg0=t.checkArea(a),t.timerArg0=t.timerArg0<0?-t.timerArg0:t.timerArg0,t.timerArg0>0&&(t.timerArg0<3&&t.currPage>0||t.timerArg0>2&&t.currPage<=t.totalPage-2)&&(t.state="start",t.flushPage(),e.updateAfterEvent(),t.dispatchEvent("onFlipStart"))}},o.prototype.onMouseUp=function(e){var t=this;if("start"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.timerArg1=t.checkArea(a),t.state="auto",t.stageMP=a}},o.prototype.onMouseMove=function(e){var t=this;if("start"==t.state){t.stageMP.x=e.clientX,t.stageMP.y=e.clientY;var a=t.globalToLocal(t.stageMP);t.stageMP=a}},o.prototype.checkArea=function(e){var t,a=this,i=a.bW+a.bW,n=a.bH;return e.x>0&&e.x<=.5*i?(t=e.y>0&&e.y<=.5*n?1:e.y>.5*n&&e.y<n?2:0,e.x<=50&&(t=e.y>0&&e.y<=50?-1:e.y>n-50&&e.y<n?-2:t),t):e.x>.5*i&&e.x<i?(t=e.y>0&&e.y<=.5*n?3:e.y>.5*n&&e.y<n?4:0,e.x>=i-50&&(t=e.y>0&&e.y<=50?-3:e.y>n-50&&e.y<n?-4:t),t):0},o.prototype.flipTo=function(e){var t,a=this;e=e%2==1?e-1:e,t=e-a.currPage,"stop"==a.state&&e>=0&&e<=a.totalPage&&0!=t&&(a.timerArg0=t<0?1:3,a.timerArg1=-1,a.toPage=e>a.totalPage?a.totalPage:e,a.state="auto",a.flushPage())},o.prototype.nextPage=function(){this.flipTo(this.currPage+2)},o.prototype.prevPage=function(){this.flipTo(this.currPage-1)},o.prototype.startPage=function(){this.flipTo(0)},o.prototype.endPage=function(){this.flipTo(this.totalPage)},o.prototype.flushPage=function(){var e,t,a=this,i=a.myPosArr[a.timerArg0-1],n=null;1==a.timerArg0||2==a.timerArg0?(a.toPage=a.toPage==a.currPage?a.currPage-2:a.toPage,e=a.currPage,t=a.toPage+1,this.pageMC.removeChild(a.leftPage),a.toPage>0&&(n=a.getPage(a.currPage-2),n.x=0,a.leftPage=n,a.pageMC.addChild(n))):3!=a.timerArg0&&4!=a.timerArg0||(a.toPage=a.toPage==a.currPage?a.currPage+2:a.toPage,e=a.currPage+1,t=a.toPage,a.pageMC.removeChild(a.rightPage),a.toPage+1<a.totalPage&&(n=a.getPage(a.currPage+3),n.x=a.bW,a.rightPage=n,a.pageMC.addChild(n))),a.px=i.x,a.py=i.y,e>0&&e<=a.totalPage&&(n=a.getPage(e),n.x=0,n.y=0,a.rPage0.addChild(n)),t>0&&t<=a.totalPage&&(n=a.getPage(t),n.x=0,n.y=0,a.rPage1.addChild(n))},o.prototype.onEnterFrame=function(e){var t,a,i,n,o,s,d=this,p=d.toPosArr[d.timerArg0-1],l=d.myPosArr[d.timerArg0-1];if("start"==d.state){s=d.speed;var c=d.stageMP;d.px+=(c.x-d.px)*s>>0,d.py+=(c.y-d.py)*s>>0;var g=new r(d.px,d.py);d.drawPage(d.timerArg0,g)}else"auto"==d.state&&(Math.abs(p.x-d.px)>1.5*d.bW&&d.timerArg1>0?(t=l.x,a=l.y,i=0):(t=p.x,a=p.y,i=1),n=t-d.px>>0,o=a-d.py>>0,d.timerArg1<0?(s=.7*d.speed,d.py=d.arc(d.bW,n,p.y)):(s=d.speed,d.py=o*s+d.py),d.px=n*s+d.px,d.drawPage(d.timerArg0,new r(d.px,d.py)),0==n&&0==o&&(d.rPage0.removeAllChildren(),d.rPage1.removeAllChildren(),d.shadow0.visible=!1,d.shadow1.visible=!1,d.toPage=0==i?d.currPage:d.toPage,d.currPage=d.toPage,d.pageMC.removeAllChildren(),d.setPage(d.currPage),d.state="stop",d.dispatchEvent("onFlipStop")))},o.prototype.arc=function(e,t,a){var i=2*e,n=e*e+i*i,r=Math.abs(t)-e;return a-(Math.sqrt(n-r*r)-i)},o.prototype.angle=function(e,t){var a=e.x-t.x,i=e.y-t.y,n=180*Math.atan2(i,a)/Math.PI;return n<0?n+360:n},o.prototype.pos=function(e,t){var a=e.x-t.x,i=e.y-t.y,n=Math.sqrt(a*a+i*i);return e.x>t.x?n:-n},o}(t);e.FlipBook=o}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i,n,r,o,s){void 0===o&&(o=!0),void 0===s&&(s=1);var d=e.call(this,n,r,0,o)||this;d._items=null,d.data=[],d.downL=null,d._lastFirstId=-1;var p=d;return p._isInit=!1,p._instanceType="annieUI.ScrollList",p._itemW=a,p._itemH=i,p._items=[],p._itemClass=t,p._itemCount=0,p._cols=s,p._updateViewRect(),p.addEventListener(annie.Event.ENTER_FRAME,p.flushData.bind(p)),d}return __extends(t,e),Object.defineProperty(t.prototype,"loadingView",{get:function(){return this.downL},enumerable:!0,configurable:!0}),t.prototype.updateData=function(e,t){void 0===t&&(t=!1);var a=this;if(!a._isInit||t?(a.data=e,a._isInit=!0):a.data=a.data.concat(e),a._lastFirstId=-1,a.maxDistance=Math.ceil(a.data.length/a._cols)*a._itemRow,a.downL){a.downL[a.paramXY]=Math.max(a.distance,a.maxDistance);var i=a.downL.getWH();a.maxDistance+="x"==a.paramXY?i.width:i.height}},t.prototype.flushData=function(){var e=this;if(e._isInit){var t=(Math.abs(Math.floor(e.view[e.paramXY]/e._itemRow))-1)*e._cols;if((t=t<0?0:t)!=e._lastFirstId){var a=-1==e._lastFirstId;if(e._lastFirstId=t,t!=e._items[0].id)for(var i=0;i<e._cols;i++)e.speed>0?e._items.unshift(e._items.pop()):e._items.push(e._items.shift());for(var n=0;n<e._itemCount;n++){var r=e._items[n];(r.id!=t||a)&&(r.initData(e.data[t]?t:-1,e.data[t]),r.visible=!!e.data[t],r[e.paramXY]=Math.floor(t/e._cols)*e._itemRow,r[e._disParam]=t%e._cols*e._itemCol),t++}}}},t.prototype.setViewRect=function(t,a,i){e.prototype.setViewRect.call(this,t,a,i);var n=this;n._itemRow&&n._itemCol&&n._updateViewRect()},t.prototype._updateViewRect=function(){var e=this;e.isVertical?(e._disParam="x",e._itemRow=e._itemH,e._itemCol=e._itemW):(e._disParam="y",e._itemRow=e._itemW,e._itemCol=e._itemH);var t=(Math.ceil(e.distance/e._itemRow)+1)*e._cols;if(t!=e._itemCount){if(t>e._itemCount)for(var a=e._itemCount;a<t;a++){var i=new e._itemClass;i.id=-1,i.data=null,e._items.push(i),e.view.addChild(i)}else for(var a=0;a<e._itemCount-t;a++)e.view.removeChild(e._items.pop());e._itemCount=t,e._lastFirstId=-1}},t.prototype.setLoading=function(e){var t=this;if(t.downL){t.view.removeChild(t.downL);var a=t.downL.getWH();t.maxDistance-="x"==t.paramXY?a.width:a.height,t.downL=null}if(e){t.downL=e,t.view.addChild(e),t.downL[t.paramXY]=Math.max(t.distance,t.maxDistance);var a=t.downL.getWH();t.maxDistance+="x"==t.paramXY?a.width:a.height}else t.isStop=!1},t}(e.ScrollPage);e.ScrollList=t}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i){void 0===i&&(i="");var n=e.call(this)||this;n.context=null,n._isMouseDown=!1,n._drawRadius=50,n.drawColor="#ffffff",n.bgColor="",n.drawWidth=0,n.drawHeight=0,n.totalStepList=[],n.currentStepId=0;var r=n,o=document.createElement("canvas");o.width=t,o.height=a,r.context=o.getContext("2d"),r.context.lineCap="round",r.context.lineJoin="round",r.bitmapData=o,r.drawHeight=a,r.drawWidth=t,r.reset(i);var s=r.onMouseDown.bind(r),d=r.onMouseMove.bind(r),p=r.onMouseUp.bind(r);return r.addEventListener(annie.MouseEvent.MOUSE_DOWN,s),r.addEventListener(annie.MouseEvent.MOUSE_MOVE,d),r.addEventListener(annie.MouseEvent.MOUSE_UP,p),n}return __extends(t,e),Object.defineProperty(t.prototype,"drawRadius",{get:function(){return this._drawRadius},set:function(e){this._drawRadius=e},enumerable:!0,configurable:!0}),t.prototype.onMouseDown=function(e){var t=this;t._isMouseDown=!0;var a=t.context;a.beginPath(),a.strokeStyle=t.drawColor,a.lineWidth=t._drawRadius;var i=e.localX>>0,n=e.localY>>0;a.moveTo(i,n),t.addStepObj={},t.addStepObj.c=t.drawColor,t.addStepObj.r=t._drawRadius,t.addStepObj.sx=i,t.addStepObj.sy=n,t.addStepObj.ps=[]},t.prototype.onMouseUp=function(e){var t=this;t._isMouseDown&&(t._isMouseDown=!1,t.addStepObj.ps&&t.addStepObj.ps.length>0&&(t.currentStepId++,t.totalStepList.push(t.addStepObj)))},t.prototype.onMouseMove=function(e){var t=this;if(t._isMouseDown){var a=t.context,i=e.localX>>0,n=e.localY>>0;a.lineTo(i,n),a.stroke(),t.addStepObj.ps.push(i,n)}},t.prototype.reset=function(e){void 0===e&&(e="");var t=this;""!=e&&(t.bgColor=e),""!=t.bgColor?(t.context.fillStyle=t.bgColor,t.context.fillRect(0,0,t.bitmapData.width,t.bitmapData.height)):t.context.clearRect(0,0,t.bitmapData.width,t.bitmapData.height),t.currentStepId=0,t.totalStepList=[]},t.prototype.cancel=function(e){void 0===e&&(e=0);var t=this;if(0==e)t.reset();else{if(!(t.currentStepId-e>=0))return!1;t.currentStepId-=e,t.totalStepList.splice(t.currentStepId,e),""!=t.bgColor?(t.context.fillStyle=t.bgColor,t.context.fillRect(0,0,t.bitmapData.width,t.bitmapData.height)):t.context.clearRect(0,0,t.bitmapData.width,t.bitmapData.height);for(var a=t.totalStepList.length,i=0;i<a;i++){var n=t.context;n.beginPath(),n.strokeStyle=t.totalStepList[i].c,n.lineWidth=t.totalStepList[i].r,n.moveTo(t.totalStepList[i].sx,t.totalStepList[i].sy);for(var r=t.totalStepList[i].ps,o=r.length,s=0;s<o;s+=2)n.lineTo(r[s],r[s+1]),n.stroke()}}return!0},t}(annie.Bitmap);e.DrawingBoard=t}(annieUI||(annieUI={}));var annieUI;!function(e){var t=function(e){function t(t,a,i,n,r){void 0===r&&(r=50);var o=e.call(this,t,a,i)||this;o._drawList=[],o._totalDraw=1,o._currentDraw=0;var s=o;return s.drawColor=n,s.drawRadius=r,s.addEventListener(annie.MouseEvent.MOUSE_MOVE,function(e){if(s._isMouseDown){var t=Math.floor(e.localX/s._drawRadius),a=Math.floor(e.localY/s._drawRadius);if(s._drawList[t]&&s._drawList[t][a]){s._drawList[t][a]=!1,s._currentDraw++;var i=Math.floor(s._currentDraw/s._totalDraw*100);s.dispatchEvent("onDrawTime",{per:i})}}}),o}return __extends(t,e),t.prototype.reset=function(t){void 0===t&&(t=""),e.prototype.reset.call(this,t);var a=this;if(a._drawList){""!=t&&(a.drawColor=t),a._currentDraw=0;var i=Math.floor(a.drawWidth/a._drawRadius),n=Math.floor(a.drawHeight/a._drawRadius);a._totalDraw=i*n;for(var r=0;r<i;r++){a._drawList[r]=[];for(var o=0;o<n;o++)a._drawList[r][o]=!0}}},t.prototype.cancel=function(e){return void 0===e&&(e=0),trace("no support"),!1},Object.defineProperty(t.prototype,"drawRadius",{set:function(e){var t=this;t._drawRadius=e;var a=Math.floor(t.drawWidth/e),i=Math.floor(t.drawHeight/e);t._totalDraw=a*i;for(var n=0;n<a;n++){t._drawList[n]=[];for(var r=0;r<i;r++)t._drawList[n][r]=!0}},enumerable:!0,configurable:!0}),t}(e.DrawingBoard);e.ScratchCard=t}(annieUI||(annieUI={}));
\ No newline at end of file
/**
* @note 函数 window.downloadApp
* @modify by zsl@duiba.com.cn
* @date 2016-07-31
* @modify 2016-09-01
*/
;
(function($) {
var ua = navigator.userAgent.toLowerCase();
// -------------------------- downloadApp主要函数 --------------------------//
var downloadApp = function() {
if (window.downloadAppConfig) {
if (ua.match(/iphone/ig) || ua.match(/ipad/ig)){
//ios
download();
}else{
if (window.downloadAppConfig.confirm || window.downloadAppConfig.confirm == 'true') {
$.modal({
type: 'confirm',
title: '下载确认',
section: '即将开始下载,是否继续',
callback: {
save: function() {
if (window.downloadAppConfig.stats) {
$.ajax({
url: window.downloadAppConfig.stats,
complete: function() {
download();
}
})
} else {
download();
}
}
}
})
}else{
download();
}
}
}else {
console.error('请先配置参数window.downloadAppConfig');
}
}
// -------------------------- format函数 --------------------------//
var formatUrl = function(downloadUrl) {
if (downloadUrl.indexOf('dbnewopen') != -1) {
window.location.href = downloadUrl;
} else {
if (downloadUrl.indexOf('?') !== -1) {
// modify by zsl date2016-07-28
if (downloadUrl.indexOf('#') !== -1) {
// 如果包含#号
window.location.href = downloadUrl.split('#')[0] + '&dbnewopen#' + downloadUrl.split('#')[1];
}else {
window.location.href = downloadUrl + '&dbnewopen';
}
} else if (downloadUrl !== '') {
window.location.href = downloadUrl + '?dbnewopen';
}
}
}
// -------------------------- URL处理函数 --------------------------//
var download = function() {
var openUrl = window.downloadAppConfig.openUrl || '';
var downloadUrl = '';
// 淘客url处理 start ------------------------------------------------------------
var TKHelper,
isSpecial = false;
if ( window.TBSDK_ADA !== undefined ) {
TKHelper = function(downloadUrl) {
var isTBSDK = function() {
isSpecial = true;
if (window.isSpecialApp) {
window.location.href = downloadUrl;
} else {
window.BC_SDK.openPage({
url: downloadUrl
});
}
};
// 如果包含手淘url 唤起手淘App的功能
if (downloadUrl.indexOf('taoquan.taobao.com') !== -1 || downloadUrl.indexOf('shop.m.taobao.com') !== -1 ) {
window.BC_SDK = TBSDK_ADA.init({
"appkey": '23402401',
openTBAPP: true
});
isTBSDK();
}
// 如果是s.click.taobao.com的URL,点击则调用百川goTaoke方法唤起手淘
if(downloadUrl.indexOf('s.click.taobao.com') !== -1) {
window.BC_SDK = TBSDK_ADA.init({
"appkey": '23454468',
"appSecret": '3846ae97316a0b31321a8f493f826986',
openTBAPP: true
});
isTBSDK();
}
};
}
// 淘客url处理 end -----------------------------------------------------------
// 特殊处理
var handleSpecial = function(downloadUrl) {
// 如果downloadUrl是weixin直接打开url(加了&dbnewopen SDK唤起weixin 中间会产生一个空白页)
if (downloadUrl && downloadUrl.indexOf('weixin://') !== -1) {
isSpecial = true;
window.location.href = downloadUrl;
return;
}
// @special openUrl为微信服务,
if (openUrl && openUrl.indexOf('weixin://') !== -1) {
return;
}
// 如果含有手淘url 唤起手淘App的功能
if (window.TBSDK_ADA !== undefined ) {
TKHelper(downloadUrl);
}
};
if (ua.match(/iphone/ig) || ua.match(/ipad/ig)) {
// ios
downloadUrl = window.downloadAppConfig.iosDownloadUrl;
handleSpecial(downloadUrl);
if(isSpecial){
return;
}
if (ua.match(/MicroMessenger/ig)) {
formatUrl(downloadUrl);
} else {
if (openUrl) {
window.location.href = openUrl;
} else {
if (downloadUrl.indexOf('itunes.apple.com') != -1) {
var ifr = document.createElement('iframe');
ifr.src = downloadUrl;
ifr.style.display = 'none';
window.setTimeout(function() {
document.body.appendChild(ifr);
}, 300)
} else {
formatUrl(downloadUrl);
}
}
}
} else {
// android
downloadUrl = window.downloadAppConfig.androidDownloadUrl;
handleSpecial(downloadUrl);
if(isSpecial){
return;
}
// 如果有oepnUrl
if (openUrl) {
window.location.href = openUrl;
return;
}
if (downloadUrl.indexOf('.apk') != -1 || downloadUrl.indexOf('dbnewopen') != -1) {
window.location.href = downloadUrl;
} else {
formatUrl(downloadUrl);
}
}
}
window.downloadApp = downloadApp;
})(Zepto);
/*!
* vconsole v2.5.0 (https://github.com/WechatFE/vConsole)
* Copyright 2016, WechatFE Team
* MIT license
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vConsole=t():e.vConsole=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var l=o[n]={exports:{},id:n,loaded:!1};return e[n].call(l.exports,l,l.exports,t),l.loaded=!0,l.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var l=o(1),i=n(l),r=o(15),a=n(r),c=o(16),s=n(c),d=o(23),u=n(d),v=o(25),f=n(v),p=new i["default"],g=new s["default"]("default","Log");p.addPlugin(g);var b=new u["default"]("system","System");p.addPlugin(b);var h=new f["default"]("network","Network");p.addPlugin(h),p.VConsolePlugin=a["default"],t["default"]=p,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function l(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(2),c=l(a),s=o(3),d=n(s),u=o(4),v=l(u);o(6);var f=o(10),p=l(f),g=o(11),b=l(g),h=o(12),m=l(h),y=o(13),_=l(y),w=o(14),x=l(w),k=function(){function e(){i(this,e);var t=this;this.version=c["default"].version,this.html=p["default"],this.$dom=null,this.activedTab="",this.tabList=[],this.pluginList={},this.isReady=!1,this.switchPos={x:10,y:10,startX:0,startY:0,endX:0,endY:0},this.tool=d,this.$=v["default"];var o=function(){t._render(),t._mockTap(),t._bindEvent(),t._autoRun()};void 0!==document?"complete"==document.readyState?o():v["default"].bind(window,"load",o):!function(){var e=void 0,t=function n(){document&&"complete"==document.readyState?(e&&clearTimeout(e),o()):e=setTimeout(n,1)};e=setTimeout(t,1)}()}return r(e,[{key:"_render",value:function(){var e="#__vconsole";if(!v["default"].one(e)){var t=document.createElement("div");t.innerHTML=this.html,document.documentElement.appendChild(t.children[0])}this.$dom=v["default"].one(e);var o=v["default"].one(".vc-switch",this.$dom),n=1*d.getStorage("switch_x"),l=1*d.getStorage("switch_y");(n||l)&&(n+o.offsetWidth>document.documentElement.offsetWidth&&(n=document.documentElement.offsetWidth-o.offsetWidth),l+o.offsetHeight>document.documentElement.offsetHeight&&(l=document.documentElement.offsetHeight-o.offsetHeight),0>n&&(n=0),0>l&&(l=0),this.switchPos.x=n,this.switchPos.y=l,v["default"].one(".vc-switch").style.right=n+"px",v["default"].one(".vc-switch").style.bottom=l+"px"),v["default"].one(".vc-mask",this.$dom).style.display="none"}},{key:"_mockTap",value:function(){var e=700,t=10,o=void 0,n=void 0,l=void 0,i=!1,r=null;this.$dom.addEventListener("touchstart",function(e){if(void 0===o){var t=e.targetTouches[0];n=t.pageX,l=t.pageY,o=e.timeStamp,r=e.target.nodeType===Node.TEXT_NODE?e.target.parentNode:e.target}},!1),this.$dom.addEventListener("touchmove",function(e){var o=e.changedTouches[0];(Math.abs(o.pageX-n)>t||Math.abs(o.pageY-l)>t)&&(i=!0)}),this.$dom.addEventListener("touchend",function(t){if(i===!1&&t.timeStamp-o<e&&null!=r){var n=r.tagName.toLowerCase(),l=!1;switch(n){case"textarea":l=!0;break;case"input":switch(r.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":l=!1;break;default:l=!r.disabled&&!r.readOnly}}l?r.focus():t.preventDefault();var a=t.changedTouches[0],c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,c.initEvent("click",!0,!0),r.dispatchEvent(c)}o=void 0,i=!1,r=null},!1)}},{key:"_bindEvent",value:function(){var e=this,t=v["default"].one(".vc-switch",e.$dom);v["default"].bind(t,"touchstart",function(t){e.switchPos.startX=t.touches[0].pageX,e.switchPos.startY=t.touches[0].pageY}),v["default"].bind(t,"touchend",function(t){e.switchPos.x=e.switchPos.endX,e.switchPos.y=e.switchPos.endY,e.switchPos.startX=0,e.switchPos.startY=0,e.switchPos.endX=0,e.switchPos.endY=0,d.setStorage("switch_x",e.switchPos.x),d.setStorage("switch_y",e.switchPos.y)}),v["default"].bind(t,"touchmove",function(o){if(o.touches.length>0){var n=o.touches[0].pageX-e.switchPos.startX,l=o.touches[0].pageY-e.switchPos.startY,i=e.switchPos.x-n,r=e.switchPos.y-l;i+t.offsetWidth>document.documentElement.offsetWidth&&(i=document.documentElement.offsetWidth-t.offsetWidth),r+t.offsetHeight>document.documentElement.offsetHeight&&(r=document.documentElement.offsetHeight-t.offsetHeight),0>i&&(i=0),0>r&&(r=0),t.style.right=i+"px",t.style.bottom=r+"px",e.switchPos.endX=i,e.switchPos.endY=r,o.preventDefault()}}),v["default"].bind(v["default"].one(".vc-switch",e.$dom),"click",function(){e.show()}),v["default"].bind(v["default"].one(".vc-hide",e.$dom),"click",function(){e.hide()}),v["default"].bind(v["default"].one(".vc-mask",e.$dom),"click",function(t){return t.target!=v["default"].one(".vc-mask")?!1:void e.hide()}),v["default"].delegate(v["default"].one(".vc-tabbar",e.$dom),"click",".vc-tab",function(t){var o=this.dataset.tab;o!=e.activedTab&&e.showTab(o)}),v["default"].bind(v["default"].one(".vc-panel",e.$dom),"transitionend webkitTransitionEnd oTransitionEnd otransitionend",function(t){return t.target!=v["default"].one(".vc-panel")?!1:void(v["default"].hasClass(e.$dom,"vc-toggle")||(t.target.style.display="none"))});var o=v["default"].one(".vc-content",e.$dom),n=!1;v["default"].bind(o,"touchstart",function(e){var t=o.scrollTop,l=o.scrollHeight,i=t+o.offsetHeight;0===t?(o.scrollTop=1,0===o.scrollTop&&(v["default"].hasClass(e.target,"vc-cmd-input")||(n=!0))):i===l&&(o.scrollTop=t-1,o.scrollTop===t&&(v["default"].hasClass(e.target,"vc-cmd-input")||(n=!0)))}),v["default"].bind(o,"touchmove",function(e){n&&e.preventDefault()}),v["default"].bind(o,"touchend",function(e){n=!1})}},{key:"_autoRun",value:function(){this.isReady=!0;for(var e in this.pluginList)this._initPlugin(this.pluginList[e]);this.tabList.length>0&&this.showTab(this.tabList[0])}},{key:"_initPlugin",value:function(e){var t=this;e.trigger("init"),e.trigger("renderTab",function(o){t.tabList.push(e.id);var n=v["default"].render(b["default"],{id:e.id,name:e.name});v["default"].one(".vc-tabbar",t.$dom).appendChild(n);var l=v["default"].render(m["default"],{id:e.id});o&&(d.isString(o)?l.innerHTML+=o:d.isFunction(o.appendTo)?o.appendTo(l):d.isElement(o)&&l.appendChild(o)),v["default"].one(".vc-content",t.$dom).appendChild(l)}),e.trigger("addTopBar",function(o){if(o)for(var n=v["default"].one(".vc-topbar",t.$dom),l=function(t){var l=o[t],i=v["default"].render(_["default"],{name:l.name||"Undefined",className:l.className||"",pluginID:e.id});if(l.data)for(var r in l.data)i.dataset[r]=l.data[r];d.isFunction(l.onClick)&&v["default"].bind(i,"click",function(t){var o=l.onClick.call(i);o===!1||(v["default"].removeClass(v["default"].all(".vc-topbar-"+e.id),"vc-actived"),v["default"].addClass(i,"vc-actived"))}),n.appendChild(i)},i=0;i<o.length;i++)l(i)}),e.trigger("addTool",function(t){if(t)for(var o=v["default"].one(".vc-tool-last"),n=function(n){var l=t[n],i=v["default"].render(x["default"],{name:l.name||"Undefined",pluginID:e.id});1==l.global&&v["default"].addClass(i,"vc-global-tool"),d.isFunction(l.onClick)&&v["default"].bind(i,"click",function(e){l.onClick.call(i)}),o.parentNode.insertBefore(i,o)},l=0;l<t.length;l++)n(l)}),e.trigger("ready")}},{key:"_triggerPluginsEvent",value:function(e){for(var t in this.pluginList)this.pluginList[t].trigger(e)}},{key:"_triggerPluginEvent",value:function(e,t){var o=this.pluginList[e];o&&o.trigger(t)}},{key:"addPlugin",value:function(e){return void 0!==this.pluginList[e.id]?(console.warn("Plugin "+e.id+" has already been added."),!1):(this.pluginList[e.id]=e,this.isReady&&(this._initPlugin(e),1==this.tabList.length&&this.showTab(this.tabList[0])),!0)}},{key:"removePlugin",value:function(e){e=(e+"").toLowerCase();var t=this.pluginList[e];if(void 0===t)return console.warn("Plugin "+e+" does not exist."),!1;if(t.trigger("remove"),this.isReady){var o=v["default"].one("#__vc_tab_"+e);o&&o.parentNode.removeChild(o);for(var n=v["default"].all(".vc-topbar-"+e,this.$dom),l=0;l<n.length;l++)n[l].parentNode.removeChild(n[l]);var i=v["default"].one("#__vc_log_"+e);i&&i.parentNode.removeChild(i);for(var r=v["default"].all(".vc-tool-"+e,this.$dom),a=0;a<r.length;a++)r[a].parentNode.removeChild(r[a])}var c=this.tabList.indexOf(e);c>-1&&this.tabList.splice(c,1);try{delete this.pluginList[e]}catch(s){this.pluginList[e]=void 0}return this.activedTab==e&&this.tabList.length>0&&this.showTab(this.tabList[0]),!0}},{key:"show",value:function(){var e=this,t=v["default"].one(".vc-panel",this.$dom);t.style.display="block",setTimeout(function(){v["default"].addClass(e.$dom,"vc-toggle"),e._triggerPluginsEvent("showConsole");var t=v["default"].one(".vc-mask",e.$dom);t.style.display="block"},10)}},{key:"hide",value:function(){v["default"].removeClass(this.$dom,"vc-toggle"),this._triggerPluginsEvent("hideConsole");var e=v["default"].one(".vc-mask",this.$dom),t=v["default"].one(".vc-panel",this.$dom);v["default"].bind(e,"transitionend",function(o){e.style.display="none",t.style.display="none"})}},{key:"showTab",value:function(e){var t=v["default"].one("#__vc_log_"+e);v["default"].removeClass(v["default"].all(".vc-tab",this.$dom),"vc-actived"),v["default"].addClass(v["default"].one("#__vc_tab_"+e),"vc-actived"),v["default"].removeClass(v["default"].all(".vc-logbox",this.$dom),"vc-actived"),v["default"].addClass(t,"vc-actived");var o=v["default"].all(".vc-topbar-"+e,this.$dom);v["default"].removeClass(v["default"].all(".vc-toptab",this.$dom),"vc-toggle"),v["default"].addClass(o,"vc-toggle"),o.length>0?v["default"].addClass(v["default"].one(".vc-content",this.$dom),"vc-has-topbar"):v["default"].removeClass(v["default"].one(".vc-content",this.$dom),"vc-has-topbar"),v["default"].removeClass(v["default"].all(".vc-tool",this.$dom),"vc-toggle"),v["default"].addClass(v["default"].all(".vc-tool-"+e,this.$dom),"vc-toggle"),this._triggerPluginEvent(this.activedTab,"hide"),this.activedTab=e,this._triggerPluginEvent(this.activedTab,"show")}}]),e}();t["default"]=k,e.exports=t["default"]},function(e,t){e.exports={name:"vconsole",version:"2.5.0",description:"A lightweight, extendable front-end developer tool for mobile web page.",homepage:"https://github.com/WechatFE/vConsole",main:"dist/vconsole.min.js",scripts:{test:"mocha",dist:"webpack && npm test"},keywords:["console","debug","mobile"],repository:{type:"git",url:"git+https://github.com/WechatFE/vConsole.git"},dependencies:{},devDependencies:{"babel-core":"^6.7.7","babel-loader":"^6.2.4","babel-plugin-add-module-exports":"^0.1.4","babel-preset-es2015":"^6.6.0","babel-preset-stage-3":"^6.5.0",chai:"^3.5.0","css-loader":"^0.23.1","extract-text-webpack-plugin":"^1.0.1","html-loader":"^0.4.3",jsdom:"^9.2.1","json-loader":"^0.5.4",less:"^2.5.3","less-loader":"^2.2.3",mocha:"^2.5.3","style-loader":"^0.13.1",webpack:"~1.12.11"},author:"WechatFE Team",license:"MIT"}},function(e,t){"use strict";function o(e){var t=e>0?new Date(e):new Date,o=t.getDate()<10?"0"+t.getDate():t.getDate(),n=t.getMonth()<9?"0"+(t.getMonth()+1):t.getMonth()+1,l=t.getFullYear(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),r=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),a=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=t.getMilliseconds()<10?"0"+t.getMilliseconds():t.getMilliseconds();return 100>c&&(c="0"+c),{time:+t,year:l,month:n,day:o,hour:i,minute:r,second:a,millisecond:c}}function n(e){return"[object Number]"==Object.prototype.toString.call(e)}function l(e){return"[object String]"==Object.prototype.toString.call(e)}function i(e){return"[object Array]"==Object.prototype.toString.call(e)}function r(e){return"[object Boolean]"==Object.prototype.toString.call(e)}function a(e){return"[object Undefined]"==Object.prototype.toString.call(e)}function c(e){return"[object Null]"==Object.prototype.toString.call(e)}function s(e){return"[object Symbol]"==Object.prototype.toString.call(e)}function d(e){return!("[object Object]"!=Object.prototype.toString.call(e)&&(n(e)||l(e)||r(e)||i(e)||c(e)||u(e)||a(e)||s(e)))}function u(e){return"[object Function]"==Object.prototype.toString.call(e)}function v(e){return"object"===("undefined"==typeof HTMLElement?"undefined":y(HTMLElement))?e instanceof HTMLElement:e&&"object"===("undefined"==typeof e?"undefined":y(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function f(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML}function p(e){function t(e){for(var t=p.length-1;t>=0;t--)if(p[t].child==e)return!0;return!1}function o(e){if(d(e)){if(t(e))return void(v+="CircularObject");p.push({parent:parent,child:e});var g=Object.keys(e);v+="{",f++;for(var b=0;b<g.length;b++){var h=g[b];e.hasOwnProperty&&!e.hasOwnProperty(h)||(v+=h+": ",o(e[h],e),b<g.length-1&&(v+=", "))}f--,v+="}",p.pop()}else if(i(e)){if(t(e))return void(v+="CircularArray");p.push({parent:parent,child:e}),v+="[",f++;for(var m=0;m<e.length;m++)o(e[m],e),m<e.length-1&&(v+=", ");f--,v+="]",p.pop()}else v+=l(e)?'"'+e+'"':n(e)?e:r(e)?e:c(e)?"null":a(e)?"undefined":u(e)?"function()":s(e)?"symbol":"unknown"}var v="",f=0,p=[];return o(e,null),v}function g(e){if(!d(e)&&!i(e))return[];var t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=[];for(var n in e)t.indexOf(n)<0&&o.push(n);return o=o.sort()}function b(e){return Object.prototype.toString.call(e).replace("[object ","").replace("]","")}function h(e,t){window.localStorage&&(e="vConsole_"+e,localStorage.setItem(e,t))}function m(e){return window.localStorage?(e="vConsole_"+e,localStorage.getItem(e)):void 0}Object.defineProperty(t,"__esModule",{value:!0});var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.getDate=o,t.isNumber=n,t.isString=l,t.isArray=i,t.isBoolean=r,t.isUndefined=a,t.isNull=c,t.isSymbol=s,t.isObject=d,t.isFunction=u,t.isElement=v,t.htmlEncode=f,t.JSONStringify=p,t.getObjAllKeys=g,t.getObjName=b,t.setStorage=h,t.getStorage=m},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var l=o(3),i=o(5),r=n(i),a={};a.one=function(e,t){return t?t.querySelector(e):document.querySelector(e)},a.all=function(e,t){var o=void 0,n=[];return o=t?t.querySelectorAll(e):document.querySelectorAll(e),o&&o.length>0&&(n=Array.prototype.slice.call(o)),n},a.addClass=function(e,t){if(e){(0,l.isArray)(e)||(e=[e]);for(var o=0;o<e.length;o++){var n=e[o].className||"",i=n.split(" ");i.indexOf(t)>-1||(i.push(t),e[o].className=i.join(" "))}}},a.removeClass=function(e,t){if(e){(0,l.isArray)(e)||(e=[e]);for(var o=0;o<e.length;o++){for(var n=e[o].className.split(" "),i=0;i<n.length;i++)n[i]==t&&(n[i]="");e[o].className=n.join(" ").trim()}}},a.hasClass=function(e,t){if(!e)return!1;for(var o=e.className.split(" "),n=0;n<o.length;n++)if(o[n]==t)return!0;return!1},a.bind=function(e,t,o,n){if(e){void 0===n&&(n=!1),(0,l.isArray)(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].addEventListener(t,o,n)}},a.delegate=function(e,t,o,n){e&&e.addEventListener(t,function(t){var l=a.all(o,e);if(l)e:for(var i=0;i<l.length;i++)for(var r=t.target;r;){if(r==l[i]){n.call(r,t);break e}if(r=r.parentNode,r==e)break}},!1)},a.render=r["default"],t["default"]=a,e.exports=t["default"]},function(e,t){"use strict";function o(e,t,o){var n=/\{\{([^\}]+)\}\}/g,l="var arr = [];\n",i=0,r=[],a=function(e,t){""!==e&&(l+=t?e.match(/^ ?else/g)?"} "+e+" {\n":e.match(/\/(if|for|switch)/g)?"}\n":e.match(/^ ?if|for|switch/g)?e+" {\n":e.match(/^ ?(break|continue) ?$/g)?e+";\n":e.match(/^ ?(case|default)/g)?e+":\n":"arr.push("+e+");\n":'arr.push("'+e.replace(/"/g,'\\"')+'");\n')};for(e=e.replace(/(\{\{ ?switch(.+?)\}\})[\r\n\t ]+\{\{/g,"$1{{"),e=e.replace(/^\n/,"").replace(/\n/g,"\\\n");r=n.exec(e);)a(e.slice(i,r.index),!1),a(r[1],!0),i=r.index+r[0].length;a(e.substr(i,e.length-i),!1),l+='return arr.join("");',l="with (this) {\n"+l+"\n}";var c=new Function(l).apply(t);if(!o){var s=document.createElement("div");s.innerHTML=c,c=s.children[0]}return c}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){var n=o(7);"string"==typeof n&&(n=[[e.id,n,""]]);o(9)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,o){t=e.exports=o(8)(),t.push([e.id,'#__vconsole{color:#000;font-size:13px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}#__vconsole .vc-max-height{max-height:250px}#__vconsole .vc-max-height-line{max-height:44px}#__vconsole .vc-min-height{min-height:40px}#__vconsole .vc-switch{display:block;position:fixed;right:10px;bottom:10px;color:#fff;background-color:#04be02;line-height:1;font-size:14px;padding:8px 16px;z-index:10000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.4)}#__vconsole .vc-mask{top:0;background:transparent;z-index:10001;transition:background .3s;-webkit-tap-highlight-color:transparent;overflow-y:scroll}#__vconsole .vc-mask,#__vconsole .vc-panel{display:none;position:fixed;left:0;right:0;bottom:0}#__vconsole .vc-panel{min-height:85%;z-index:10002;background-color:#efeff4;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;-webkit-transform:translateY(100%);transform:translateY(100%)}#__vconsole .vc-tabbar{border-bottom:1px solid #d9d9d9;overflow-x:auto;height:39px;width:auto;white-space:nowrap}#__vconsole .vc-tabbar .vc-tab{display:inline-block;line-height:39px;padding:0 15px;border-right:1px solid #d9d9d9;text-decoration:none;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-tabbar .vc-tab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-tabbar .vc-tab.vc-actived{background-color:#fff}#__vconsole .vc-content{background-color:#fff;overflow-x:hidden;overflow-y:auto;position:absolute;top:40px;left:0;right:0;bottom:40px;-webkit-overflow-scrolling:touch}#__vconsole .vc-content.vc-has-topbar{top:71px}#__vconsole .vc-topbar{background-color:#fbf9fe;display:flex;flex-direction:row;flex-wrap:wrap;width:100%}#__vconsole .vc-topbar .vc-toptab{display:none;flex:1;line-height:30px;padding:0 15px;border-bottom:1px solid #d9d9d9;text-decoration:none;text-align:center;color:#000;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}#__vconsole .vc-topbar .vc-toptab.vc-toggle{display:block}#__vconsole .vc-topbar .vc-toptab:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-topbar .vc-toptab.vc-actived{border-bottom:1px solid #3e82f7}#__vconsole .vc-logbox{display:none;position:relative;min-height:100%}#__vconsole .vc-logbox i{font-style:normal}#__vconsole .vc-logbox .vc-log{-webkit-tap-highlight-color:transparent}#__vconsole .vc-logbox .vc-log:empty:before{content:"Empty";color:#999;position:absolute;top:45%;left:0;right:0;bottom:0;font-size:15px;text-align:center}#__vconsole .vc-logbox .vc-item{margin:0;padding:6px 8px;overflow:hidden;line-height:1.3;border-bottom:1px solid #eee;word-break:break-word}#__vconsole .vc-logbox .vc-item-info{color:#6a5acd}#__vconsole .vc-logbox .vc-item-debug{color:#daa520}#__vconsole .vc-logbox .vc-item-warn{color:orange;border-color:#ffb930;background-color:#fffacd}#__vconsole .vc-logbox .vc-item-error{color:#dc143c;border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-log.vc-log-partly .vc-item{display:none}#__vconsole .vc-logbox .vc-log.vc-log-partly-error .vc-item-error,#__vconsole .vc-logbox .vc-log.vc-log-partly-info .vc-item-info,#__vconsole .vc-logbox .vc-log.vc-log-partly-log .vc-item-log,#__vconsole .vc-logbox .vc-log.vc-log-partly-warn .vc-item-warn{display:block}#__vconsole .vc-logbox .vc-item .vc-item-content{margin-right:60px;display:block}#__vconsole .vc-logbox .vc-item .vc-item-meta{color:#888;float:right;width:60px;text-align:right}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-content{margin-right:0}#__vconsole .vc-logbox .vc-item.vc-item-nometa .vc-item-meta{display:none}#__vconsole .vc-logbox .vc-item .vc-item-code{display:block;white-space:pre-wrap;overflow:auto;position:relative}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output{padding-left:12px}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-input:before,#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\203A";position:absolute;top:-3px;left:0;font-size:16px;color:#6a5acd}#__vconsole .vc-logbox .vc-item .vc-item-code.vc-item-code-output:before{content:"\\2039"}#__vconsole .vc-logbox .vc-item .vc-fold{display:block;overflow:auto;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer{display:block;font-style:italic;padding-left:10px;position:relative}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer:before{content:"";position:absolute;top:4px;left:2px;width:0;height:0;border:4px solid transparent;border-left-color:#000}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer.vc-toggle:before{top:6px;left:0;border-top-color:#000;border-left-color:transparent}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner{display:none;margin-left:10px}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner.vc-toggle{display:block}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-inner .vc-code-key{margin-left:10px}#__vconsole .vc-logbox .vc-item .vc-fold .vc-fold-outer .vc-code-key{margin-left:0}#__vconsole .vc-logbox .vc-code-key{color:#905}#__vconsole .vc-logbox .vc-code-private-key{color:#d391b5}#__vconsole .vc-logbox .vc-code-function{color:#905;font-style:italic}#__vconsole .vc-logbox .vc-code-boolean,#__vconsole .vc-logbox .vc-code-number{color:#0086b3}#__vconsole .vc-logbox .vc-code-string{color:#183691}#__vconsole .vc-logbox .vc-code-null,#__vconsole .vc-logbox .vc-code-undefined{color:#666}#__vconsole .vc-logbox .vc-cmd{position:absolute;height:40px;left:0;right:0;bottom:0;border-top:1px solid #d9d9d9;display:block!important}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input-wrap{display:block;height:28px;margin-right:40px;padding:6px 8px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input{width:100%;border:none;resize:none;outline:none;padding:0;font-size:12px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-input::-webkit-input-placeholder{line-height:28px}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn{position:absolute;top:0;right:0;bottom:0;width:40px;border:none;background-color:#efeff4;outline:none;-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-cmd .vc-cmd-btn:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-logbox .vc-group .vc-group-preview{-webkit-touch-callout:none}#__vconsole .vc-logbox .vc-group .vc-group-preview:active{background-color:#e6e6e6}#__vconsole .vc-logbox .vc-group .vc-group-detail{display:none;padding:0 0 10px 20px;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-group.vc-actived .vc-group-detail{display:block}#__vconsole .vc-logbox .vc-table .vc-table-row{display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-bottom:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-row.vc-left-border{border-left:1px solid #eee}#__vconsole .vc-logbox .vc-table .vc-table-col{flex:1;padding:3px 4px;border-left:1px solid #eee;overflow:auto;white-space:pre-wrap;word-break:break-word;-webkit-overflow-scrolling:touch}#__vconsole .vc-logbox .vc-table .vc-table-col:first-child{border:none}#__vconsole .vc-logbox .vc-table .vc-small .vc-table-col{padding:0 4px;font-size:12px}#__vconsole .vc-logbox .vc-table .vc-table-col-2{flex:2}#__vconsole .vc-logbox .vc-table .vc-table-col-3{flex:3}#__vconsole .vc-logbox .vc-table .vc-table-col-4{flex:4}#__vconsole .vc-logbox .vc-table .vc-table-col-5{flex:5}#__vconsole .vc-logbox .vc-table .vc-table-col-6{flex:6}#__vconsole .vc-logbox .vc-table .vc-table-row-error{border-color:#f4a0ab;background-color:#ffe4e1}#__vconsole .vc-logbox .vc-table .vc-table-row-error .vc-table-col{color:#dc143c;border-color:#f4a0ab}#__vconsole .vc-logbox .vc-table .vc-table-col-title{font-weight:700}#__vconsole .vc-logbox.vc-actived{display:block}#__vconsole .vc-toolbar{border-top:1px solid #d9d9d9;line-height:39px;position:absolute;left:0;right:0;bottom:0;display:flex;display:-webkit-box;flex-direction:row}#__vconsole .vc-toolbar .vc-tool{display:none;text-decoration:none;color:#000;width:50%;flex:1;-webkit-box-flex:1;text-align:center;position:relative;-webkit-touch-callout:none}#__vconsole .vc-toolbar .vc-tool.vc-global-tool,#__vconsole .vc-toolbar .vc-tool.vc-toggle{display:block}#__vconsole .vc-toolbar .vc-tool:active{background-color:rgba(0,0,0,.15)}#__vconsole .vc-toolbar .vc-tool:after{content:" ";position:absolute;top:7px;bottom:7px;right:0;border-left:1px solid #d9d9d9}#__vconsole .vc-toolbar .vc-tool-last:after{border:none}#__vconsole.vc-toggle .vc-switch{display:none}#__vconsole.vc-toggle .vc-mask{background:rgba(0,0,0,.6);display:block}#__vconsole.vc-toggle .vc-panel{-webkit-transform:translate(0);transform:translate(0)}',""])},function(e,t){"use strict";e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var o=this[t];o[2]?e.push("@media "+o[2]+"{"+o[1]+"}"):e.push(o[1])}return e.join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},l=0;l<this.length;l++){var i=this[l][0];"number"==typeof i&&(n[i]=!0)}for(l=0;l<t.length;l++){var r=t[l];"number"==typeof r[0]&&n[r[0]]||(o&&!r[2]?r[2]=o:o&&(r[2]="("+r[2]+") and ("+o+")"),e.push(r))}},e}},function(e,t,o){function n(e,t){for(var o=0;o<e.length;o++){var n=e[o],l=f[n.id];if(l){l.refs++;for(var i=0;i<l.parts.length;i++)l.parts[i](n.parts[i]);for(;i<n.parts.length;i++)l.parts.push(s(n.parts[i],t))}else{for(var r=[],i=0;i<n.parts.length;i++)r.push(s(n.parts[i],t));f[n.id]={id:n.id,refs:1,parts:r}}}}function l(e){for(var t=[],o={},n=0;n<e.length;n++){var l=e[n],i=l[0],r=l[1],a=l[2],c=l[3],s={css:r,media:a,sourceMap:c};o[i]?o[i].parts.push(s):t.push(o[i]={id:i,parts:[s]})}return t}function i(e,t){var o=b(),n=y[y.length-1];if("top"===e.insertAt)n?n.nextSibling?o.insertBefore(t,n.nextSibling):o.appendChild(t):o.insertBefore(t,o.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");o.appendChild(t)}}function r(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function s(e,t){var o,n,l;if(t.singleton){var i=m++;o=h||(h=a(t)),n=d.bind(null,o,i,!1),l=d.bind(null,o,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=c(t),n=v.bind(null,o),l=function(){r(o),o.href&&URL.revokeObjectURL(o.href)}):(o=a(t),n=u.bind(null,o),l=function(){r(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else l()}}function d(e,t,o,n){var l=o?"":n.css;if(e.styleSheet)e.styleSheet.cssText=_(t,l);else{var i=document.createTextNode(l),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(i,r[t]):e.appendChild(i)}}function u(e,t){var o=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}function v(e,t){var o=t.css,n=t.sourceMap;n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var l=new Blob([o],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(l),i&&URL.revokeObjectURL(i)}var f={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),b=p(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,m=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=l(e);return n(o,t),function(e){for(var i=[],r=0;r<o.length;r++){var a=o[r],c=f[a.id];c.refs--,i.push(c)}if(e){var s=l(e);n(s,t)}for(var r=0;r<i.length;r++){var c=i[r];if(0===c.refs){for(var d=0;d<c.parts.length;d++)c.parts[d]();delete f[c.id]}}}};var _=function(){var e=[];return function(t,o){return e[t]=o,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports='<div id=__vconsole class=""> <div class=vc-switch>vConsole</div> <div class=vc-mask> </div> <div class=vc-panel> <div class=vc-tabbar> </div> <div class=vc-topbar> </div> <div class=vc-content> </div> <div class=vc-toolbar> <a class="vc-tool vc-global-tool vc-tool-last vc-hide">Hide</a> </div> </div> </div>'},function(e,t){e.exports="<a class=vc-tab data-tab={{id}} id=__vc_tab_{{id}}>{{name}}</a>"},function(e,t){e.exports="<div class=vc-logbox id=__vc_log_{{id}}> </div>"},function(e,t){e.exports='<a href=javascript:; class="vc-toptab vc-topbar-{{pluginID}}{{if (className)}} {{className}}{{/if}}">{{name}}</a>'},function(e,t){e.exports='<a class="vc-tool vc-tool-{{pluginID}}">{{name}}</a>'},function(e,t){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),l=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?"newPlugin":arguments[1];o(this,e),this.id=t,this.name=n,this.eventList={}}return n(e,[{key:"on",value:function(e,t){return this.eventList[e]=t,this}},{key:"trigger",value:function(e,t){if("function"==typeof this.eventList[e])this.eventList[e].call(this,t);else{var o="on"+e.charAt(0).toUpperCase()+e.slice(1);"function"==typeof this[o]&&this[o].call(this,t)}return this}},{key:"id",get:function(){return this._id},set:function(e){if(!e)throw"Plugin ID cannot be empty";this._id=e.toLowerCase()}},{key:"name",get:function(){return this._name},set:function(e){if(!e)throw"Plugin name cannot be empty";this._name=e}}]),e}();t["default"]=l,e.exports=t["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{
value:!0});var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),_get=function e(t,o,n){null===t&&(t=Function.prototype);var l=Object.getOwnPropertyDescriptor(t,o);if(void 0===l){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,o,n)}if("value"in l)return l.value;var r=l.get;if(void 0!==r)return r.call(n)},_query=__webpack_require__(4),_query2=_interopRequireDefault(_query),_tool=__webpack_require__(3),tool=_interopRequireWildcard(_tool),_log=__webpack_require__(17),_log2=_interopRequireDefault(_log),_tabbox_default=__webpack_require__(21),_tabbox_default2=_interopRequireDefault(_tabbox_default),_item_code=__webpack_require__(22),_item_code2=_interopRequireDefault(_item_code),VConsoleDefaultTab=function(_VConsoleLogTab){function VConsoleDefaultTab(){var e;_classCallCheck(this,VConsoleDefaultTab);for(var t=arguments.length,o=Array(t),n=0;t>n;n++)o[n]=arguments[n];var l=_possibleConstructorReturn(this,(e=Object.getPrototypeOf(VConsoleDefaultTab)).call.apply(e,[this].concat(o)));return l.tplTabbox=_tabbox_default2["default"],l.windowOnError=null,l}return _inherits(VConsoleDefaultTab,_VConsoleLogTab),_createClass(VConsoleDefaultTab,[{key:"onReady",value:function(){var e=this;_get(Object.getPrototypeOf(VConsoleDefaultTab.prototype),"onReady",this).call(this),_query2["default"].bind(_query2["default"].one(".vc-cmd",this.$tabbox),"submit",function(t){t.preventDefault();var o=_query2["default"].one(".vc-cmd-input",t.target),n=o.value;o.value="",""!==n&&e.evalCommand(n)})}},{key:"mockConsole",value:function(){_get(Object.getPrototypeOf(VConsoleDefaultTab.prototype),"mockConsole",this).call(this);var e=this;tool.isFunction(window.onerror)&&(this.windowOnError=window.onerror),window.onerror=function(t,o,n,l,i){var r=t;o&&(r+="\n"+o.replace(location.origin,"")),(n||l)&&(r+=":"+n+":"+l),e.printLog({logType:"error",logs:[r],noOrigin:!0}),tool.isFunction(e.windowOnError)&&e.windowOnError.call(window,t,o,n,l,i)}}},{key:"evalCommand",value:function evalCommand(cmd){this.printLog({logType:"log",content:_query2["default"].render(_item_code2["default"],{content:cmd,type:"input"}),noMeta:!0,style:""});var result=eval(cmd),$content=void 0;tool.isArray(result)||tool.isObject(result)?$content=this.getFoldedLine(result):(tool.isNull(result)?result="null":tool.isUndefined(result)?result="undefined":tool.isFunction(result)?result="function()":tool.isString(result)&&(result='"'+result+'"'),$content=_query2["default"].render(_item_code2["default"],{content:result,type:"output"})),this.printLog({logType:"log",content:$content,noMeta:!0,style:""})}}]),VConsoleDefaultTab}(_log2["default"]);exports["default"]=VConsoleDefaultTab,module.exports=exports["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),d=o(3),u=l(d),v=o(4),f=n(v),p=o(15),g=n(p),b=o(18),h=n(b),m=o(19),y=n(m),_=o(20),w=n(_),x=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),l=0;o>l;l++)n[l]=arguments[l];var a=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.tplTabbox="",a.allowUnformattedLog=!0,a.isReady=!1,a.isShow=!1,a.$tabbox=null,a.console={},a.logList=[],a.isInBottom=!0,a.mockConsole(),a}return a(t,e),s(t,[{key:"onInit",value:function(){this.isReady=!0,this.$tabbox=f["default"].render(this.tplTabbox,{});for(var e=0;e<this.logList.length;e++)this.printLog(this.logList[e]);this.logList=[]}},{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTopBar",value:function(e){for(var t=this,o=["All","Log","Info","Warn","Error"],n=[],l=0;l<o.length;l++)n.push({name:o[l],data:{type:o[l].toLowerCase()},className:"",onClick:function(){return f["default"].hasClass(this,"vc-actived")?!1:void t.showLogType(this.dataset.type||"all")}});n[0].className="vc-actived",e(n)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Clear",global:!1,onClick:function(){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){var e=this,t=f["default"].all(".vc-subtab",e.$tabbox);f["default"].bind(t,"click",function(o){if(o.preventDefault(),f["default"].hasClass(this,"vc-actived"))return!1;f["default"].removeClass(t,"vc-actived"),f["default"].addClass(this,"vc-actived");var n=this.dataset.type,l=f["default"].one(".vc-log",e.$tabbox);f["default"].removeClass(l,"vc-log-partly-log"),f["default"].removeClass(l,"vc-log-partly-info"),f["default"].removeClass(l,"vc-log-partly-warn"),f["default"].removeClass(l,"vc-log-partly-error"),"all"==n?f["default"].removeClass(l,"vc-log-partly"):(f["default"].addClass(l,"vc-log-partly"),f["default"].addClass(l,"vc-log-partly-"+n))});var o=f["default"].one(".vc-content");f["default"].bind(o,"scroll",function(t){e.isShow&&(o.scrollTop+o.offsetHeight>=o.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)})}},{key:"onRemove",value:function(){window.console.log=this.console.log,window.console.info=this.console.info,window.console.warn=this.console.warn,window.console.debug=this.console.debug,window.console.error=this.console.error,this.console={}}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.scrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.scrollToBottom()}},{key:"showLogType",value:function(e){var t=f["default"].one(".vc-log",this.$tabbox);f["default"].removeClass(t,"vc-log-partly-log"),f["default"].removeClass(t,"vc-log-partly-info"),f["default"].removeClass(t,"vc-log-partly-warn"),f["default"].removeClass(t,"vc-log-partly-error"),"all"==e?f["default"].removeClass(t,"vc-log-partly"):(f["default"].addClass(t,"vc-log-partly"),f["default"].addClass(t,"vc-log-partly-"+e))}},{key:"scrollToBottom",value:function(){var e=f["default"].one(".vc-content");e.scrollTop=e.scrollHeight-e.offsetHeight}},{key:"mockConsole",value:function(){var e=this;window.console?(this.console.log=window.console.log,this.console.info=window.console.info,this.console.warn=window.console.warn,this.console.debug=window.console.debug,this.console.error=window.console.error):window.console={},window.console.log=function(){e.printLog({logType:"log",logs:arguments})},window.console.info=function(){e.printLog({logType:"info",logs:arguments})},window.console.warn=function(){e.printLog({logType:"warn",logs:arguments})},window.console.debug=function(){e.printLog({logType:"debug",logs:arguments})},window.console.error=function(){e.printLog({logType:"error",logs:arguments})}}},{key:"clearLog",value:function(){f["default"].one(".vc-log",this.$tabbox).innerHTML=""}},{key:"printOriginLog",value:function(e){"function"==typeof this.console[e.logType]&&this.console[e.logType].apply(window.console,e.logs)}},{key:"printLog",value:function(e){var t=e.logs||[];if(t.length||e.content){t=[].slice.call(t||[]);var o=!0,n=/^\[(\w+)\] ?/i,l="";if(u.isString(t[0])){var i=t[0].match(n);null!==i&&i.length>0&&(l=i[1].toLowerCase())}if(l?o=l==this.id:0==this.allowUnformattedLog&&(o=!1),!o)return void(e.noOrigin||this.printOriginLog(e));if(e.date||(e.date=+new Date),!this.isReady)return void this.logList.push(e);if(u.isString(t[0])&&(t[0]=t[0].replace(n,""),""===t[0]&&t.shift()),!e.meta){var r=u.getDate(e.date);e.meta=r.hour+":"+r.minute+":"+r.second}for(var a=f["default"].render(h["default"],{logType:e.logType,noMeta:!!e.noMeta,meta:e.meta,style:e.style||""}),s=f["default"].one(".vc-item-content",a),d=0;d<t.length;d++){var v=document.createElement("SPAN");try{if(""===t[d])continue;u.isFunction(t[d])?v.innerHTML=" "+t[d].toString():u.isObject(t[d])||u.isArray(t[d])?v=this.getFoldedLine(t[d]):v.innerHTML=" "+u.htmlEncode(t[d]).replace(/\n/g,"<br/>")}catch(p){v.innerHTML=" ["+c(t[d])+"]"}v&&s.appendChild(v)}u.isObject(e.content)&&s.appendChild(e.content),f["default"].one(".vc-log",this.$tabbox).appendChild(a),this.isInBottom&&this.scrollToBottom(),e.noOrigin||this.printOriginLog(e)}}},{key:"getFoldedLine",value:function(e,t){var o=this;if(!t){var n=u.JSONStringify(e),l=n.substr(0,26);t=u.getObjName(e),n.length>26&&(l+="..."),t+=" "+l}var i=f["default"].render(y["default"],{outer:t,lineType:"obj"});return f["default"].bind(f["default"].one(".vc-fold-outer",i),"click",function(t){t.preventDefault(),t.stopPropagation(),f["default"].hasClass(i,"vc-toggle")?(f["default"].removeClass(i,"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-inner",i),"vc-toggle"),f["default"].removeClass(f["default"].one(".vc-fold-outer",i),"vc-toggle")):(f["default"].addClass(i,"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-inner",i),"vc-toggle"),f["default"].addClass(f["default"].one(".vc-fold-outer",i),"vc-toggle"));var n=f["default"].one(".vc-fold-inner",i);if(0==n.children.length&&e){for(var l=u.getObjAllKeys(e),r=0;r<l.length;r++){var a=e[l[r]],c="undefined",s="";u.isString(a)?(c="string",a='"'+a+'"'):u.isNumber(a)?c="number":u.isBoolean(a)?c="boolean":u.isNull(a)?(c="null",a="null"):u.isUndefined(a)?(c="undefined",a="undefined"):u.isFunction(a)?(c="function",a="function()"):u.isSymbol(a)&&(c="symbol");var d=void 0;if(u.isArray(a)){var v=u.getObjName(a)+"["+a.length+"]";d=o.getFoldedLine(a,f["default"].render(w["default"],{key:l[r],keyType:s,value:v,valueType:"array"},!0))}else if(u.isObject(a)){var p=u.getObjName(a);d=o.getFoldedLine(a,f["default"].render(w["default"],{key:u.htmlEncode(l[r]),keyType:s,value:p,valueType:"object"},!0))}else{e.hasOwnProperty&&!e.hasOwnProperty(l[r])&&(s="private");var g={lineType:"kv",key:u.htmlEncode(l[r]),keyType:s,value:u.htmlEncode(a),valueType:c};d=f["default"].render(y["default"],g)}n.appendChild(d)}if(u.isObject(e)){var b=e.__proto__,h=void 0;h=u.isObject(b)?o.getFoldedLine(b,f["default"].render(w["default"],{key:"__proto__",keyType:"private",value:u.getObjName(b),valueType:"object"},!0)):f["default"].render(w["default"],{key:"__proto__",keyType:"private",value:"null",valueType:"null"}),n.appendChild(h)}}return!1}),i}}]),t}(g["default"]);t["default"]=x,e.exports=t["default"]},function(e,t){e.exports='<div class="vc-item vc-item-{{logType}} {{if (!noMeta)}}vc-item-nometa{{/if}} {{style}}"> <span class=vc-item-meta>{{if (!noMeta)}}{{meta}}{{/if}}</span> <div class=vc-item-content></div> </div>'},function(e,t){e.exports="<div class=vc-fold> {{if (lineType == 'obj')}} <i class=vc-fold-outer>{{outer}}</i> <div class=vc-fold-inner></div> {{else if (lineType == 'value')}} <i class=vc-code-{{valueType}}>{{value}}</i> {{else if (lineType == 'kv')}} <i class=\"vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}\">{{key}}</i>: <i class=vc-code-{{valueType}}>{{value}}</i> {{/if}} </div>"},function(e,t){e.exports='<span> <i class="vc-code-key{{if (keyType)}} vc-code-{{keyType}}-key{{/if}}">{{key}}</i>: <i class=vc-code-{{valueType}}>{{value}}</i> </span>'},function(e,t){e.exports="<div> <div class=vc-log style=padding-bottom:40px></div> <form class=vc-cmd> <button class=vc-cmd-btn type=submit>OK</button> <div class=vc-cmd-input-wrap> <textarea class=vc-cmd-input placeholder=command...></textarea> </div> </form> </div>"},function(e,t){e.exports='<pre class="vc-item-code vc-item-code-{{type}}">{{content}}</pre>'},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=function b(e,t,o){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var l=Object.getPrototypeOf(e);return null===l?void 0:b(l,t,o)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(o)},d=o(3),u=(l(d),o(17)),v=n(u),f=o(24),p=n(f),g=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),l=0;o>l;l++)n[l]=arguments[l];var a=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.tplTabbox=p["default"],a.allowUnformattedLog=!1,a}return a(t,e),c(t,[{key:"onInit",value:function(){s(Object.getPrototypeOf(t.prototype),"onInit",this).call(this),this.printSystemInfo()}},{key:"printSystemInfo",value:function(){var e=navigator.userAgent,t="",o=e.match(/(ipod).*\s([\d_]+)/i),n=e.match(/(ipad).*\s([\d_]+)/i),l=e.match(/(iphone)\sos\s([\d_]+)/i),i=e.match(/(android)\s([\d\.]+)/i);t="Unknown",i?t="Android "+i[2]:l?t="iPhone, iOS "+l[2].replace(/_/g,"."):n?t="iPad, iOS "+n[2].replace(/_/g,"."):o&&(t="iPod, iOS "+o[2].replace(/_/g,"."));var r=t,a=e.match(/MicroMessenger\/([\d\.]+)/i);t="Unknown",a&&a[1]?(t=a[1],r+=", WeChat "+t,console.info("[system]","System:",r)):console.info("[system]","System:",r),t="Unknown",t="https:"==location.protocol?"HTTPS":"http:"==location.protocol?"HTTP":location.protocol.replace(":",""),r=t;var c=e.toLowerCase().match(/ nettype\/([^ ]+)/g);t="Unknown",c&&c[0]?(c=c[0].split("/"),t=c[1],r+=", "+t,console.info("[system]","Network:",r)):console.info("[system]","Protocol:",r),console.info("[system]","UA:",e),setTimeout(function(){var e=window.performance||window.msPerformance||window.webkitPerformance;if(e&&e.timing){var t=e.timing;t.navigationStart&&console.info("[system]","navigationStart:",t.navigationStart),t.navigationStart&&t.domainLookupStart&&console.info("[system]","navigation:",t.domainLookupStart-t.navigationStart+"ms"),t.domainLookupEnd&&t.domainLookupStart&&console.info("[system]","dns:",t.domainLookupEnd-t.domainLookupStart+"ms"),t.connectEnd&&t.connectStart&&(t.connectEnd&&t.secureConnectionStart?console.info("[system]","tcp (ssl):",t.connectEnd-t.connectStart+"ms ("+(t.connectEnd-t.secureConnectionStart)+"ms)"):console.info("[system]","tcp:",t.connectEnd-t.connectStart+"ms")),t.responseStart&&t.requestStart&&console.info("[system]","request:",t.responseStart-t.requestStart+"ms"),t.responseEnd&&t.responseStart&&console.info("[system]","response:",t.responseEnd-t.responseStart+"ms"),t.domComplete&&t.domLoading&&(t.domContentLoadedEventStart&&t.domLoading?console.info("[system]","domComplete (domLoaded):",t.domComplete-t.domLoading+"ms ("+(t.domContentLoadedEventStart-t.domLoading)+"ms)"):console.info("[system]","domComplete:",t.domComplete-t.domLoading+"ms")),t.loadEventEnd&&t.loadEventStart&&console.info("[system]","loadEvent:",t.loadEventEnd-t.loadEventStart+"ms"),t.navigationStart&&t.loadEventEnd&&console.info("[system]","total (DOM):",t.loadEventEnd-t.navigationStart+"ms ("+(t.domComplete-t.navigationStart)+"ms)")}},0)}}]),t}(v["default"]);t["default"]=g,e.exports=t["default"]},function(e,t){e.exports="<div> <div class=vc-log></div> </div>"},function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t["default"]=e,t}function l(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(4),d=l(s),u=o(3),v=n(u),f=o(15),p=l(f),g=o(26),b=l(g),h=o(27),m=l(h),y=o(28),_=l(y),w=function(e){function t(){var e;i(this,t);for(var o=arguments.length,n=Array(o),l=0;o>l;l++)n[l]=arguments[l];var a=r(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(n)));return a.$tabbox=d["default"].render(b["default"],{}),a.$header=null,a.reqList={},a.domList={},a.isShow=!1,a.isInBottom=!0,a._open=void 0,a._send=void 0,a.mockAjax(),a}return a(t,e),c(t,[{key:"onRenderTab",value:function(e){e(this.$tabbox)}},{key:"onAddTool",value:function(e){var t=this,o=[{name:"Clear",global:!1,onClick:function(e){t.clearLog()}}];e(o)}},{key:"onReady",value:function(){var e=this;this.renderHeader(),d["default"].delegate(d["default"].one(".vc-log",this.$tabbox),"click",".vc-group-preview",function(e){var t=this.parentNode;d["default"].hasClass(t,"vc-actived")?d["default"].removeClass(t,"vc-actived"):d["default"].addClass(t,"vc-actived"),e.preventDefault()});var t=d["default"].one(".vc-content");d["default"].bind(t,"scroll",function(o){e.isShow&&(t.scrollTop+t.offsetHeight>=t.scrollHeight?e.isInBottom=!0:e.isInBottom=!1)})}},{key:"onRemove",value:function(){window.XMLHttpRequest&&(window.XMLHttpRequest.prototype.open=this._open,window.XMLHttpRequest.prototype.send=this._send,this._open=void 0,this._send=void 0)}},{key:"onShow",value:function(){this.isShow=!0,1==this.isInBottom&&this.scrollToBottom()}},{key:"onHide",value:function(){this.isShow=!1}},{key:"onShowConsole",value:function(){1==this.isInBottom&&this.scrollToBottom()}},{key:"scrollToBottom",value:function(){var e=d["default"].one(".vc-content");e.scrollTop=e.scrollHeight-e.offsetHeight}},{key:"clearLog",value:function(){this.reqList={};for(var e in this.domList)this.domList[e].remove(),this.domList[e]=void 0;this.domList={},this.renderHeader()}},{key:"renderHeader",value:function(){var e=Object.keys(this.reqList).length,t=d["default"].render(m["default"],{count:e}),o=d["default"].one(".vc-log",this.$tabbox);this.$header?this.$header.parentNode.replaceChild(t,this.$header):o.parentNode.insertBefore(t,o),this.$header=t}},{key:"updateRequest",value:function(e,t){var o=Object.keys(this.reqList).length,n=this.reqList[e]||{};for(var l in t)n[l]=t[l];this.reqList[e]=n;var i={url:n.url,status:n.status||"-",type:"-",costTime:n.costTime>0?n.costTime+"ms":"-",header:n.header,response:v.htmlEncode(n.response)};n.readyState<=1?i.status="Pending":n.readyState<4&&(i.status="Loading");var r=d["default"].render(_["default"],i),a=this.domList[e];n.status>=400&&d["default"].addClass(d["default"].one(".vc-group-preview",r),"vc-table-row-error"),a?a.parentNode.replaceChild(r,a):d["default"].one(".vc-log",this.$tabbox).appendChild(r),this.domList[e]=r;var c=Object.keys(this.reqList).length;c!=o&&this.renderHeader(),this.isInBottom&&this.scrollToBottom()}},{key:"mockAjax",value:function(){var e=window.XMLHttpRequest;if(e){var t=this,o=window.XMLHttpRequest.prototype.open,n=window.XMLHttpRequest.prototype.send;t._open=o,t._send=n,window.XMLHttpRequest.prototype.open=function(){var e=this,n=[].slice.call(arguments),l=n[1],i=t.getUniqueID();e._requestID=i;var r=e.onreadystatechange||function(){};return e.onreadystatechange=function(){var o=t.reqList[i]||{};if(o.url=l,o.readyState=e.readyState,0==e.readyState)o.startTime=+new Date;else if(1==e.readyState)o.startTime=+new Date;else if(2==e.readyState){o.header={};for(var n=e.getAllResponseHeaders()||"",a=n.split("\n"),c=0;c<a.length;c++){var s=a[c];if(s){var d=s.split(": "),u=d[0],v=d.slice(1).join(": ");o.header[u]=v}}}else 3==e.readyState||4==e.readyState&&(o.status=e.status,o.endTime=+new Date,o.costTime=o.endTime-(o.startTime||o.endTime),o.response=e.response);return e._noVConsole||t.updateRequest(i,o),r.apply(e,arguments)},o.apply(e,n)}}}},{key:"getUniqueID",value:function(){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,o="x"==e?t:3&t|8;return o.toString(16)});return e}}]),t}(p["default"]);t["default"]=w,e.exports=t["default"]},function(e,t){e.exports="<div class=vc-table> <div class=vc-log></div> </div>"},function(e,t){e.exports='<dl class=vc-table-row> <dd class="vc-table-col vc-table-col-4">Name {{if (count > 0)}}({{count}}){{/if}}</dd> <dd class=vc-table-col>Status</dd> <dd class=vc-table-col>Time</dd> </dl>'},function(e,t){e.exports='<div class=vc-group> <dl class="vc-table-row vc-group-preview"> <dd class="vc-table-col vc-table-col-4">{{url}}</dd> <dd class=vc-table-col>{{status}}</dd> <dd class=vc-table-col>{{costTime}}</dd> </dl> <div class=vc-group-detail> <div> <dl class="vc-table-row vc-left-border"> <dt class="vc-table-col vc-table-col-title">Headers</dt> </dl> {{for (var key in header)}} <div class="vc-table-row vc-left-border vc-small"> <div class="vc-table-col vc-table-col-2">{{key}}</div> <div class="vc-table-col vc-table-col-4 vc-max-height-line">{{header[key]}}</div> </div> {{/for}} </div> <div> <dl class="vc-table-row vc-left-border"> <dt class="vc-table-col vc-table-col-title">Response</dt> </dl> <div class="vc-table-row vc-left-border vc-small"> <pre class="vc-table-col vc-max-height vc-min-height">{{response}}</pre> </div> </div> </div> </div>'}])});
\ No newline at end of file
// Zepto 1.1.4 (generated with Zepto Builder) - zepto event ajax form ie selector - zeptojs.com/license
var Zepto=function(){function t(t){return null==t?t+"":U[J.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function s(t){return"number"==typeof t.length}function a(t){return P.call(t,function(t){return null!=t})}function u(t){return t.length>0?j.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in $?$[t]:$[t]=RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||L[c(t)]?e:e+"px"}function h(t){var e,n;return Z[t]||(e=A.createElement(t),A.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),Z[t]=n),Z[t]}function p(t){return"children"in t?O.call(t.children):j.map(t.childNodes,function(t){return 1==t.nodeType?t:w})}function d(t,e,n){for(E in e)n&&(o(e[E])||G(e[E]))?(o(e[E])&&!o(t[E])&&(t[E]={}),G(e[E])&&!G(t[E])&&(t[E]=[]),d(t[E],e[E],n)):e[E]!==w&&(t[E]=e[E])}function m(t,e){return null==e?j(t):j(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function g(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function y(t,e){var n=t.className||"",r=n&&n.baseVal!==w;return e===w?r?n.baseVal:n:(r?n.baseVal=e:t.className=e,w)}function x(t){var e;try{return t?"true"==t||("false"==t?!1:"null"==t?null:/^0/.test(t)||isNaN(e=Number(t))?/^[\[\{]/.test(t)?j.parseJSON(t):t:e):t}catch(n){return t}}function b(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)b(t.childNodes[n],e)}var w,E,j,N,C,T,S=[],O=S.slice,P=S.filter,A=window.document,Z={},$={},L={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},_=/^\s*<(\w+|!)[^>]*>/,D=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,k=/^(?:body|html)$/i,q=/([A-Z])/g,M=["val","css","html","text","data","width","height","offset"],z=["after","prepend","before","append"],F=A.createElement("table"),H=A.createElement("tr"),I={tr:A.createElement("tbody"),tbody:F,thead:F,tfoot:F,td:H,th:H,"*":A.createElement("div")},V=/complete|loaded|interactive/,B=/^[\w-]*$/,U={},J=U.toString,X={},W=A.createElement("div"),Y={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},G=Array.isArray||function(t){return t instanceof Array};return X.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=W).appendChild(t),r=~X.qsa(i,e).indexOf(t),o&&W.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},T=function(t){return P.call(t,function(e,n){return t.indexOf(e)==n})},X.fragment=function(t,e,n){var r,i,s;return D.test(t)&&(r=j(A.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(R,"<$1></$2>")),e===w&&(e=_.test(t)&&RegExp.$1),e in I||(e="*"),s=I[e],s.innerHTML=""+t,r=j.each(O.call(s.childNodes),function(){s.removeChild(this)})),o(n)&&(i=j(r),j.each(n,function(t,e){M.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},X.Z=function(t,e){return t=t||[],t.__proto__=j.fn,t.selector=e||"",t},X.isZ=function(t){return t instanceof X.Z},X.init=function(t,n){var r;if(!t)return X.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&_.test(t))r=X.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return j(n).find(t);r=X.qsa(A,t)}else{if(e(t))return j(A).ready(t);if(X.isZ(t))return t;if(G(t))r=a(t);else if(i(t))r=[t],t=null;else if(_.test(t))r=X.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return j(n).find(t);r=X.qsa(A,t)}}return X.Z(r,t)},j=function(t,e){return X.init(t,e)},j.extend=function(t){var e,n=O.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},X.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=B.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:O.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},j.contains=A.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},j.type=t,j.isFunction=e,j.isWindow=n,j.isArray=G,j.isPlainObject=o,j.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},j.inArray=function(t,e,n){return S.indexOf.call(e,t,n)},j.camelCase=C,j.trim=function(t){return null==t?"":String.prototype.trim.call(t)},j.uuid=0,j.support={},j.expr={},j.map=function(t,e){var n,r,i,o=[];if(s(t))for(r=0;t.length>r;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return u(o)},j.each=function(t,e){var n,r;if(s(t)){for(n=0;t.length>n;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},j.grep=function(t,e){return P.call(t,e)},window.JSON&&(j.parseJSON=JSON.parse),j.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){U["[object "+e+"]"]=e.toLowerCase()}),j.fn={forEach:S.forEach,reduce:S.reduce,push:S.push,sort:S.sort,indexOf:S.indexOf,concat:S.concat,map:function(t){return j(j.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return j(O.apply(this,arguments))},ready:function(t){return V.test(A.readyState)&&A.body?t(j):A.addEventListener("DOMContentLoaded",function(){t(j)},!1),this},get:function(t){return t===w?O.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return S.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):j(P.call(this,function(e){return X.matches(e,t)}))},add:function(t,e){return j(T(this.concat(j(t,e))))},is:function(t){return this.length>0&&X.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):s(t)&&e(t.item)?O.call(t):j(t);this.forEach(function(t){0>r.indexOf(t)&&n.push(t)})}return j(n)},has:function(t){return this.filter(function(){return i(t)?j.contains(this,t):j(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:j(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:j(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?j(t).filter(function(){var t=this;return S.some.call(n,function(e){return j.contains(e,t)})}):1==this.length?j(X.qsa(this[0],t)):this.map(function(){return X.qsa(this,t)}):[]},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=j(t));n&&!(i?i.indexOf(n)>=0:X.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return j(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=j.map(n,function(t){return(t=t.parentNode)&&!r(t)&&0>e.indexOf(t)?(e.push(t),t):w});return m(e,t)},parent:function(t){return m(T(this.pluck("parentNode")),t)},children:function(t){return m(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return O.call(this.childNodes)})},siblings:function(t){return m(this.map(function(t,e){return P.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return j.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=j(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){j(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){j(this[0]).before(t=j(t));for(var e;(e=t.children()).length;)t=e.first();j(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=j(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){j(this).replaceWith(j(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=j(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return j(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return j(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;j(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(E in t)g(this,E,t[E]);else g(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&g(this,t)})},prop:function(t,e){return t=Y[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?x(r):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?j(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=j(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(2>arguments.length){var r=this[0],i=getComputedStyle(r,"");if(!r)return;if("string"==typeof e)return r.style[C(e)]||i.getPropertyValue(e);if(G(e)){var o={};return j.each(e,function(t,e){o[e]=r.style[C(e)]||i.getPropertyValue(e)}),o}}var s="";if("string"==t(e))n||0===n?s=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(E in e)e[E]||0===e[E]?s+=c(E)+":"+f(E,e[E])+";":this.each(function(){this.style.removeProperty(c(E))});return this.each(function(){this.style.cssText+=";"+s})},index:function(t){return t?this.indexOf(j(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?S.some.call(this,function(t){return this.test(y(t))},l(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){N=[];var n=y(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){j(this).hasClass(t)||N.push(t)},this),N.length&&y(this,n+(n?" ":"")+N.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return y(this,"");N=y(this),v(this,t,e,N).split(/\s+/g).forEach(function(t){N=N.replace(l(t)," ")}),y(this,N.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=j(this),i=v(this,t,n,y(this));i.split(/\s+/g).forEach(function(t){(e===w?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=k.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(j(t).css("margin-top"))||0,n.left-=parseFloat(j(t).css("margin-left"))||0,r.top+=parseFloat(j(e[0]).css("border-top-width"))||0,r.left+=parseFloat(j(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||A.body;t&&!k.test(t.nodeName)&&"static"==j(t).css("position");)t=t.offsetParent;return t})}},j.fn.detach=j.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});j.fn[t]=function(i){var o,s=this[0];return i===w?n(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=j(this),s.css(t,v(this,i,e,s[t]()))})}}),z.forEach(function(e,n){var r=n%2;j.fn[e]=function(){var e,i,o=j.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:X.fragment(n)}),s=this.length>1;return 1>o.length?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=j.contains(A.documentElement,i);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!i)return j(t).remove();i.insertBefore(t,e),a&&b(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},j.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return j(t)[e](this),this}}),X.Z.prototype=j.fn,X.uniq=T,X.deserializeValue=x,j.zepto=X,j}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){return t.global?e(n||y,r,i):void 0}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)===!1||n(e,r,"ajaxBeforeSend",[t,e])===!1?!1:(n(e,r,"ajaxSend",[t,e]),void 0)}function s(t,e,r,i){var o=r.context,s="success";r.success.call(o,t,s,e),i&&i.resolveWith(o,[t,s,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(s,e,r)}function a(t,e,r,i,o){var s=i.context;i.error.call(s,r,e,t),o&&o.rejectWith(s,[r,e,t]),n(i,s,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==j?"html":t==E?"json":b.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data),e.data=void 0)}function p(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function d(e,n,r,i){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?e.add(u.name,u.value):"array"==o||!r&&"object"==o?d(e,u,r,n):e.add(n,u)})}var m,v,g=0,y=window.document,x=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,b=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,E="application/json",j="text/html",N=/^\s*$/;t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"jsonp"+ ++g,l=y.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?s(r[0],p,e,n):a(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),y.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:E,xml:"application/xml, text/xml",html:j,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n=t.extend({},e||{}),i=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===n[m]&&(n[m]=t.ajaxSettings[m]);r(n),n.crossDomain||(n.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(n.url)&&RegExp.$2!=window.location.host),n.url||(n.url=""+window.location),h(n);var u=n.dataType,p=/\?.+=\?/.test(n.url);if(p&&(u="jsonp"),n.cache!==!1&&(e&&e.cache===!0||"script"!=u&&"jsonp"!=u)||(n.url=f(n.url,"_="+Date.now())),"jsonp"==u)return p||(n.url=f(n.url,n.jsonp?n.jsonp+"=?":n.jsonp===!1?"":"callback=?")),t.ajaxJSONP(n,i);var d,g=n.accepts[u],y={},x=function(t,e){y[t.toLowerCase()]=[t,e]},b=/^([\w-]+:)\/\//.test(n.url)?RegExp.$1:window.location.protocol,w=n.xhr(),E=w.setRequestHeader;if(i&&i.promise(w),n.crossDomain||x("X-Requested-With","XMLHttpRequest"),x("Accept",g||"*/*"),(g=n.mimeType||g)&&(g.indexOf(",")>-1&&(g=g.split(",",2)[0]),w.overrideMimeType&&w.overrideMimeType(g)),(n.contentType||n.contentType!==!1&&n.data&&"GET"!=n.type.toUpperCase())&&x("Content-Type",n.contentType||"application/x-www-form-urlencoded"),n.headers)for(v in n.headers)x(v,n.headers[v]);if(w.setRequestHeader=x,w.onreadystatechange=function(){if(4==w.readyState){w.onreadystatechange=c,clearTimeout(d);var e,r=!1;if(w.status>=200&&300>w.status||304==w.status||0==w.status&&"file:"==b){u=u||l(n.mimeType||w.getResponseHeader("content-type")),e=w.responseText;try{"script"==u?(1,eval)(e):"xml"==u?e=w.responseXML:"json"==u&&(e=N.test(e)?null:t.parseJSON(e))}catch(o){r=o}r?a(r,"parsererror",w,n,i):s(e,w,n,i)}else a(w.statusText||null,w.status?"error":"abort",w,n,i)}},o(w,n)===!1)return w.abort(),a(null,"abort",w,n,i),w;if(n.xhrFields)for(v in n.xhrFields)w[v]=n.xhrFields[v];var j="async"in n?n.async:!0;w.open(n.type,n.url,j,n.username,n.password);for(v in y)E.apply(w,y[v]);return n.timeout>0&&(d=setTimeout(function(){w.onreadystatechange=c,w.abort(),a(null,"timeout",w,n,i)},n.timeout)),w.send(n.data?n.data:null),w},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,s=e.split(/\s/),a=p(e,n,r),u=a.success;return s.length>1&&(a.url=s[0],i=s[1]),a.success=function(e){o.html(i?t("<div>").html(e.replace(x,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(a),this};var C=encodeURIComponent;t.param=function(t,e){var n=[];return n.add=function(t,e){this.push(C(t)+"="+C(e))},d(n,t,e),n.join("&").replace(/%20/g,"+")}}(Zepto),function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,s){if(n=r(n),n.ns)var a=i(n.ns);return(v[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!a.test(t.ns)||o&&e(t.fn)!==e(o)||s&&t.sel!=s)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function s(t){return b[t]||y&&x[t]||t}function a(n,i,a,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var i=r(e);i.fn=a,i.sel=l,i.e in b&&(a=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?i.fn.apply(this,arguments):f}),i.del=h;var d=h||a;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(s(i.e),i.proxy,o(i,p))})}function u(t,r,i,a,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,a).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,u))})})}function c(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each(N,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$)/,N={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var s,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),(d(r)||r===!1)&&(i=r,r=f),i===!1&&(i=E),h.each(function(h,d){o&&(s=function(t){return u(d,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,d).get(0);return o&&o!==d?(r=t.extend(l(e),{currentTarget:o,liveFired:d}),(s||i).apply(o,[r].concat(p.call(arguments,1)))):f}),a(d,e,i,r,n,c||s)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(s,a){i=l(m(e)?t.Event(e):e),i._args=r,i.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(i),i.isImmediatePropagationStopped()?!1:f})}),o},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return t?this.bind(e,t):this.trigger(e)}}),["focus","blur"].forEach(function(e){t.fn[e]=function(t){return t?this.bind(e,t):this.each(function(){try{this[e]()}catch(t){}}),this}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(Zepto),function(t){t.fn.serializeArray=function(){var e,n,r=[];return t([].slice.call(this.get(0).elements)).each(function(){e=t(this),n=e.attr("type"),"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&("radio"!=n&&"checkbox"!=n||this.checked)&&r.push({name:e.attr("name"),value:e.val()})}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(e)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(Zepto),function(t){function e(e){return e=t(e),!(!e.width()&&!e.height())&&"none"!==e.css("display")}function n(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=a.exec(t);if(i&&i[2]in s&&(n=s[i[2]],r=i[3],t=i[1],r)){var o=Number(r);r=isNaN(o)?r.replace(/^["']|["']$/g,""):o}return e(t,n,r)}var r=t.zepto,i=r.qsa,o=r.matches,s=t.expr[":"]={visible:function(){return e(this)?this:void 0},hidden:function(){return e(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,r){return t(this).text().indexOf(r)>-1?this:void 0},has:function(t,e,n){return r.qsa(this,n).length?this:void 0}},a=RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),u=/^\s*>/,c="Zepto"+ +new Date;r.qsa=function(e,o){return n(o,function(n,s,a){try{var l;!n&&s?n="*":u.test(n)&&(l=t(e).addClass(c),n="."+c+" "+n);var f=i(e,n)}catch(h){throw console.error("error performing selector: %o",o),h}finally{l&&l.removeClass(c)}return s?r.uniq(t.map(f,function(t,e){return s.call(t,e,f,a)})):f})},r.matches=function(t,e){return n(e,function(e,n,r){return!(e&&!o(t,e)||n&&n.call(t,null,r)!==t)})}}(Zepto);
\ No newline at end of file
const path = require('path');
const config = {
'/activityCommon/getRole': {
data: './json/getRole.json'
},
'/ngapi/getUserTotalScore': {
data: './json/getUserTotalScore.json'
},
'/ctool/getCredits': {
data: './json/getCredits.json'
},
'/ngame/new/getInfo': {
data: './json/getInfo.json'
},
'/ngapi/dostart': {
data: './json/dostart.json'
},
'/ngapi/getStartStatus': {
data: './json/getStartStatus.json'
},
'/ngame/new/submit': {
data: './json/gameSubmit.json'
},
'/ngame/new/getSubmitResult': {
data: './json/getGameSubmitResult.json'
},
'/ngapi/winranks': {
data: './json/winranks.json'
},
'/ngapi/getOptions': {
data: './json/getOptions.json'
},
'/ngapi/getRule': {
data: './json/getRule.json'
},
'/activityVist/addTimesForActivity': {
data: './json/addTimesForActivity.json'
},
'/collectGoods/getCollectGoodsInfo': {
data: './json/getCollectGoodsInfo.json'
},
'/ngapi/realtimerank/0': {
data: './json/realtimerank.json'
},
'/ngapi/realtimerank/1': {
data: './json/realtimerank2.json'
},
'/activityPlugDrawInfo/doJoinPlugdraw': {
data: './json/doJoinPlugdraw.json'
},
'/collectRule/getOrderStatus': {
data: './json/getPlugOrderStatus.json'
},
'/activityCommon/setRole': {
data: './json/setRole.json'
},
'/hdtool/ajaxElement': {
data: './json/ajaxElement.json'
},
'/hdtool/ajaxThroughInfo': {
data: './json/ajaxThroughInfo.json'
},
'/hdtool/doJoin': {
data: './json/doJoin.json'
},
'/hdtool/getOrderStatus': {
data: './json/getCustomOrderStatus.json'
},
'/hdtool/getOrderInfo': {
data: './json/getOrderInfo.json'
},
'/hdtool/submit': {
data: './json/customSubmit.json'
},
'/ngapi/guessPoker': {
data: './json/guessPoker.json'
},
'/activityPlugin/optionInfo': {
data: './json/optionInfo.json'
},
'/activityPlugin/unblocking': {
data: './json/unblocking.json'
},
'/ngame/new/datapash': {
data: './json/datapash.json'
}
}
for (let item in config) {
if (config.hasOwnProperty(item))
config[item].path = path.resolve(__dirname, config[item].data);
}
module.exports = config;
\ No newline at end of file
{
"success": true,
"code": null,
"desc": null,
"data": {
"orderId": 1915551,
"rsp": {
"totalScore": 122,
"maxScore": 122,
"maxScoreTime": "2018-04-17 11:02:47",
"rank": 1,
"percentage": 100.00,
"token": "/*de1p57gzlWHPB0oxj33*/var/*pnNUF3DoYb6UMSp*/__076KsOqa/*jStvZLjEnH6r*/=\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\n/*iGQdoj9XO*/./*kxZHMxtNo8sW*/\\u0066r\\u006fm\\u0043ha\\u0072C\\u006fde/*B5lirw9zGMC*/;\nvar/*iMApn8H9LUexXgbq*/_x_2Bd = [/*epZtAGJKfksd3iwfxiE*/1054,3876,579,3959,2426,/*MJaFDXV3qltvP2Hr8*/];//5EytlwVm1NmyByt\nvar/*IZSeCiQS00d8GgDzJU4*/_$FoT6/*XJPkgG6t6m50Lg884*/=/*VCuLfpxk0GhGj4ZI*/function(/*ydNqBRjn2zqwQaaH*/){\n/*Jd7gaLF*/return/*9bVQp56BlvY6Is*/arguments[/*DYU0QuRhm7O*/0]^/*vPlAmDixThZl5sdS0*/\n/*SUX4jR7Lr*/_x_2Bd[/*cFsu01*/0];/*sMsujZbxAJGEZBNaR*/}/*SeL3fXntthVJ1*/;\nvar/*UvC6bSrbN3q1kTX*/_$yI02/*ED2tBjL*/=/*kZfLU2GU0*/function(/*kVI9fRD*/){\n/*IIKDIdasg*/return/*1akA7xnetiDFXSCxW*/arguments[/*8q3UIK1ImBWXDZ*/0]^/*Ln4pcuWYo*/\n/*IFOh800sJKIrE*/_x_2Bd[/*jWGzQ60W*/1];/*TDeh2yiXeU*/}/*STSgKSxup5mJN*/;\nvar/*LeZ5io7XL*/_$GVG/*CtKFl79h*/=/*2wn0o*/function(/*TamhA*/){\n/*wYRLLfV*/return/*WajQjGl*/arguments[/*j7abTeE163AWK25tc*/0]^/*0FTVKrQ6hyjAu0G*/\n/*U2OCtGr3zVObvGOR*/_x_2Bd[/*jhbqR5luLc*/2];/*ZU5wcoaUR8to79*/}/*UHPyh8x9z*/;\nvar/*8VE8Y*/_$JbA/*cZuGYBOVDXRTRLNPx*/=/*WuSIVm*/function(/*WNtlYFZpPjT5fjem*/){\n/*SM97WURugN1*/return/*saMik5gAlMoHLN*/arguments[/*XhuNwkhNNsy4utIt*/0]^/*VRqr79EYun0t0quipIX*/\n/*uJQ7rEffyge4W4DXC*/_x_2Bd[/*qOmLavolgEHN6fA*/3];/*EX3UIquaRiOqQqsG9K*/}/*8zpCJAHGLeNPF7tv9Gp*/;\nvar/*l0HkqSs*/_$nRJ/*prCzB3y*/=/*j5OlWzh*/function(/*LLVPz0AitK28rLGLZ*/){\n/*Q7c6PQ1JSsAMib*/return/*bDpOMHAYScvJK*/arguments[/*A6vDwo*/0]^/*lUjmizrojuv1*/\n/*bnY8NxTbZwnEAqe*/_x_2Bd[/*xjRkXZD6Uk4WCyGAeb*/4];/*SKUacoLVZpka*/}/*tdKZZW5Cx3UtId*/;\n/*f4EasWboA3cfq*/\\u0065\\u0076\\u0061\\u006c/*E1Xnnbc*/(__076KsOqa(32)\n+/*uoLZy03O3nwxjEAnD1*/__076KsOqa(956/0xA,116,~(0x6f^/*0Mm*/-1),Math.abs(107)&-1,_$GVG(-1-~/*4jBm*/(0x226^0)),110,0x20,0x3d64>>/*g3bES7ay8Kdp*/4>>4,-1-~/*DZb*/(0x20^0),34,\n113,1090/0xA,0x6441>>/*FiUizY7o3*/4>>4,115&(-1^0x00),110,_$yI02(0xf4922/0400),0x6b,34/*NiH838QMhyVPMs*/));/*miSpZLDi8rhs6*/\n",
"consumerId": 1539361,
"status": {
"code": 0,
"btnText": "开始游戏",
"btnDisable": false,
"text": "今日剩余110次免费机会",
"btnEventType": null,
"btnEvent": null
}
}
}
}
\ No newline at end of file
{
"name": "{projectName}",
"version": "1.0.0",
"description": "",
"main": "index.html",
"scripts": {
"build": "webpack --config webpack.prod.js",
"watch": "webpack --watch",
"start": "webpack-dev-server --open --config webpack.dev.js",
"test": "echo \"Error: no test specified\" && exit 1",
"publish": "webpack --config webpack.prod.js && gulp && gulp packToOne",
"installDepot": "cnpm uninstall git+ssh://git@gitlab2.dui88.com:clq/wx.git#1.0"
},
"keywords": [],
"author": "anlun214 qq:58529016",
"license": "ISC",
"devDependencies": {
"base64-min": "^1.2.0",
"del": "^2.2.1",
"fs": "0.0.2",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-pngquant": "^1.0.10",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-sequence": "^0.4.5",
"gulp-uglify": "^1.5.4",
"merge-stream": "^1.0.0",
"mock-webpack-plugin": "^2.0.0",
"path": "^0.12.7",
"ali-oss": "^4.11.4",
"chalk": "^2.3.0",
"co": "^4.6.0",
"progress": "^2.0.0",
"@types/jquery": "^3.3.1",
"ts-loader": "^4.0.0",
"tslint": "^5.9.1",
"typescript": "^2.7.2",
"webpack": "^4.1.0",
"webpack-cli": "^2.0.9",
"webpack-dev-server": "^3.1.0",
"webpack-merge": "^4.1.2"
},
"dependencies": {
"duiba_tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0",
"duiba_tw": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"duiba_tl": "git+ssh://git@gitlab2.dui88.com:clq/tl.git#1.0",
"duiba_wx": "git+ssh://git@gitlab2.dui88.com:clq/wx.git#1.0"
}
}
{
"type":"activity",
"name":"photo51-201804261030"
}
\ No newline at end of file
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": true,
"removeComments": true,
"noEmitOnError":true,
"outDir":"dist"
},
"exclude": [
"node_modules"
]
}
\ No newline at end of file
window.addEventListener("load", function () {
new Main();
});
export class Main {
/**
* 舞台
*/
private stage: annie.Stage;
constructor() {
annie.debug = false;
window['F2xExtend'] = eval('__extends');
/**
* 最上层div的id,可以在一个页面同时放多个stage.
* 设计尺寸的宽
* 设计尺寸的高
* FPS刷新率
* 缩放模式
* 渲染模式
*/
this.stage = new annie.Stage("annieEngine", 640, 1030, 60, annie.StageScaleMode.FIXED_WIDTH, 0);
//默认关闭自动旋转和自动resize
//stage.autoResize=true;
//stage.autoSteering=true;
this.stage.addEventListener(annie.Event.INIT_TO_STAGE, this.onAddToStage.bind(this));
}
private onAddToStage(e: annie.Event): void {
}
}
\ No newline at end of file
const path = require('path');
module.exports = {
entry: './tsSrc/Main.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
output: {
filename: 'output.js',
path: __dirname
}
};
\ No newline at end of file
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const webpack = require('webpack');
const MockWebpackPlugin = require('mock-webpack-plugin');
const mockConfig = require('./mock/config.js');
module.exports = merge(common, {
devtool: 'eval-source-map',
devServer: {
contentBase: '.',
proxy: {
'/ngapi/*': 'http://localhost:3000',
'/ngame/*': 'http://localhost:3000',
'/activityCommon/*': 'http://localhost:3000',
'/ctool/*': 'http://localhost:3000',
'/activityVist/*': 'http://localhost:3000',
'/collectGoods/*': 'http://localhost:3000',
'/activityPlugDrawInfo/*': 'http://localhost:3000',
'/collectRule/*': 'http://localhost:3000',
'/hdtool/*': 'http://localhost:3000',
'/activityPlugin/*': 'http://localhost:3000'
}
},
plugins: [
new MockWebpackPlugin({
config: mockConfig,
port: 3000
})
]
});
\ No newline at end of file
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const webpack = require('webpack');
module.exports = merge(common, {
devtool: 'source-map',
plugins: [
new UglifyJSPlugin(
{ sourceMap: true }
), new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
]
});
\ No newline at end of file
/**
* Created by rockyl on 2018/7/30.
*/
import { IModuleData, LayoutType, ResPriority, GConsole, ModuleType, GLang, ABNetManager } from "duiba-tc";
import { StageManager, ModuleManager, ResManager, WaitingModule, TlModuleName, Animation, MsgModule } from "duiba-tl";
import { ModuleName, RuleModule, GameStartModule, GameEndRankModule, GameWinnerModule, GameEndModule } from "duiba-wx";
import { DataManager, IGameCfgData, NetManager, Buried } from "duiba-tw";
window.addEventListener("load", function () {
window['_error_storage_'] = [];
window['ERROR_CONFIG'] = {
client: "duiba-game",
pageId: window['CFG'].oaId || window['CFG'].gameInfo.oaId,
imgUrl: "http://retcode.tuipink.com/report?"
};
function r() {
window['_error_storage_'] && window['_error_storage_'].push([].slice.call(arguments))
}
window.addEventListener && window.addEventListener("error", r, true);
var t = 3,
n = function e() {
var r = document.createElement("script");
r.async = !0, r.src = "//yun.tuia.cn/tuia/skyeye/skyeye.js", r.crossOrigin = "anonymous", r.onerror =
function () {
t--, t > 0 && setTimeout(e, 1500)
}, document.head && document.head.appendChild(r)
};
setTimeout(n, 1500);
// const str = GFun.replace('1{0}2',['haha']);
// alert(str);
new Main();
});
class Main {
/**
* 舞台
*/
private stage: annie.Stage;
constructor() {
annie.debug = false;
window['A2xExtend'] = window['__extends'];
/**
* 最上层div的id,可以在一个页面同时放多个stage.
* 设计尺寸的宽
* 设计尺寸的高
* FPS刷新率
* 缩放模式
* 渲染模式
*/
this.stage = new annie.Stage("annieEngine", 750, 1206, 60, annie.StageScaleMode.FIXED_WIDTH, 0);
//默认关闭自动旋转和自动resize
//stage.autoResize=true;
//stage.autoSteering=true;
this.stage.addEventListener(annie.Event.ON_INIT_STAGE, this.onAddToStage.bind(this));
}
private onAddToStage(e: annie.Event): void {
if(!annie._isReleased){
ABNetManager.baseUrl = 'http://172.31.49.77:3000';
}
DataManager.ins.gameCfgData = window['CFG'];
DataManager.ins.gameCfgData.gameInfo.gameId = window['gameId'] || '0';
NetManager.ins.getInfo(() => {
var modules: IModuleData[] = [];
if (DataManager.ins.getInfoData.status.code == 4) {
//this.commonModules = this.commonModules.concat(this.endModules2);
} else if (DataManager.ins.getInfoData.status.code == 5) {
//this.commonModules = this.commonModules.concat(this.endModules1);
} else {
modules = modules.concat(this.openModules);
}
StageManager.ins.init(this.stage, LayoutType.TOP, 1386, 1030);
initStage();
Buried.init();
ModuleManager.ins.init(modules, this.waitingModule, this.msgModule, this.loadingModule);
let resPath = window['resPath'] || '';
console.log(resPath);
ResManager.ins.loadRes(resPath, this.onResProgress.bind(this));
});
}
private onResProgress(step: ResPriority): void {
if (step == ResPriority.PRE) {
GConsole.log(GLang.lang_001);
} else if (step == ResPriority.NOMARL) {
let avatars = [];
for(let i = 0; i < sexConfig.length; i++){
avatars.push({url: `idol-avatars-2/${i}.png`, name: 'avatar_' + i});
}
setAssetsPath(window['commonResPath'] || '');
loadResItems(avatars, function(p){
//console.log('load avatars:', p)
});
GConsole.log(GLang.lang_002);
var code: number = DataManager.ins.getInfoData.status.code;
if (code == 5) {
NetManager.ins.winRanks(() => {
ModuleManager.ins.openModule(ModuleName.GAME_WINNER_SCENE);
});
} else {
if (code == 4) {
ModuleManager.ins.openModule(ModuleName.GAME_END_SCENE);
} else {
ModuleManager.ins.openModule(ModuleName.GAME_START_SCENE);
}
}
} else if (step == ResPriority.DELAY) {
GConsole.log(GLang.lang_003);
}
}
private loadingModule: IModuleData;
private waitingModule: IModuleData = {
moduleName: TlModuleName.WAITING_PANEL,
moduleClass: WaitingModule,
viewClass: 'waitingSkin.WaitingSkin',
res: 'waitingSkin',
resPriority: ResPriority.PRE,
type: ModuleType.PANEL,
layerIndex: 2,
showBg: true,
eventPenetrate: false,
showAnimation: Animation.showPanel,
hideAnimation: null
};
private msgModule: IModuleData = {
moduleName: TlModuleName.MSG_PANEL,
moduleClass: MsgModule,
viewClass: 'msgSkin.MsgSkin',
res: 'msgSkin',
resPriority: ResPriority.DELAY,
type: ModuleType.PANEL,
layerIndex: 3,
showBg: true,
eventPenetrate: false,
showAnimation: Animation.showPanel,
hideAnimation: null
}
/**
* 活动开启模块
*/
private openModules: IModuleData[] = [
{
moduleName: ModuleName.GAME_START_SCENE,
moduleClass: ExGameStartModule,
viewClass: 'gameStartSkin.GameStartSkin',
res: 'gameStartSkin',
resPriority: ResPriority.NOMARL,
type: ModuleType.SCENE,
layerIndex: 1,
showBg: false,
eventPenetrate: false,
showAnimation: null,
hideAnimation: Animation.hideScene
},
{
moduleName: ModuleName.GAME_GUIDE_SCENE,
moduleClass: GameGuideModule,
viewClass: 'gameGuideSkin.GameGuideSkin',
res: 'gameGuideSkin',
resPriority: ResPriority.DELAY,
type: ModuleType.SCENE,
layerIndex: 1,
showBg: false,
eventPenetrate: false,
showAnimation: null,
hideAnimation: Animation.hideScene
},
{
moduleName: ModuleName.GAME_PLAY_SCENE,
moduleClass: ExGamePlayModule,
viewClass: 'gamePlaySkin.GamePlaySkin',
res: 'gamePlaySkin',
resPriority: ResPriority.DELAY,
type: ModuleType.SCENE,
layerIndex: 1,
showBg: false,
eventPenetrate: false,
showAnimation: null,
hideAnimation: Animation.hideScene
},
{
moduleName: GROUP_PHOTO_SCENE,
moduleClass: GroupPhotoModule,
viewClass: 'groupPhotoSkin.GroupPhotoSkin',
res: 'groupPhotoSkin',
resPriority: ResPriority.DELAY,
type: ModuleType.SCENE,
layerIndex: 1,
showBg: false,
eventPenetrate: false,
showAnimation: null,
hideAnimation: Animation.hideScene
},
{
moduleName: SHARE_SCENE,
moduleClass: ShareModule,
viewClass: 'shareSkin.ShareSkin',
res: 'shareSkin',
resPriority: ResPriority.DELAY,
type: ModuleType.SCENE,
layerIndex: 1,
showBg: false,
eventPenetrate: false,
showAnimation: null,
hideAnimation: Animation.hideScene
},
];
}
/**
* Created by rockyl on 2018/8/1.
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment