/
min.js
9 lines (9 loc) 路 2.36 KB
/
min.js
1
2
3
4
5
6
7
8
9
/**
* Copyright (c) 2013, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
!function(t){function e(t,e){return new n(t,e||null)}function n(t,e){function n(){f=h;do var n=t.call(e,u);while(n===s);return f=u.done?c:a,{value:n,done:u.done}}function i(){if(f===h)throw new Error("Generator is already running");if(f===c)throw new Error("Generator has already finished")}var l=this,u=new r,f=o;l.next=function(t){if(i(),u.delegate){var e=u.delegate.next(t);if(!e.done)return e;u.delegate=null}for(f===a&&(u.sent=t);;)try{return n()}catch(r){u.dispatchException(r)}},l["throw"]=function(t){if(i(),u.delegate){var e=u.delegate["throw"](t);if(!e.done)return e;u.delegate=null}if(f===o)throw f=c,t;for(;;)try{return u.dispatchException(t),n()}catch(r){t=r}}}function r(){this.reset()}var i=Object.prototype.hasOwnProperty;if(!t.wrapGenerator){t.wrapGenerator=e,"undefined"!=typeof exports&&(exports.wrapGenerator=e);var o="suspendedStart",a="suspendedYield",h="executing",c="completed",s={};r.prototype={constructor:r,reset:function(){this.next=0,this.sent=void 0,this.tryStack=[],this.done=!1,this.delegate=null;for(var t,e=0;i.call(this,t="t"+e)||20>e;++e)this[t]=null},stop:function(){if(i.call(this,"thrown")){var t=this.thrown;throw delete this.thrown,t}return this.done=!0,this.rval},keys:function(t){return Object.keys(t).reverse()},pushTry:function(t,e,n){e&&this.tryStack.push({finallyLoc:e,finallyTempVar:n}),t&&this.tryStack.push({catchLoc:t})},popCatch:function(t){var e=this.tryStack.length-1,n=this.tryStack[e];n&&n.catchLoc===t&&(this.tryStack.length=e)},popFinally:function(t){var e=this.tryStack.length-1,n=this.tryStack[e];n&&i.call(n,"finallyLoc")||(n=this.tryStack[--e]),n&&n.finallyLoc===t&&(this.tryStack.length=e)},dispatchException:function(t){var e,n=[],r=!1;if(this.done)throw t;for(var i=this.tryStack.length-1;i>=0;--i){if(e=this.tryStack[i],e.catchLoc){this.thrown=t,this.next=e.catchLoc,r=!0;break}e.finallyLoc&&(n.push(e),r=!0)}if(!r)throw t;for(;e=n.pop();)this[e.finallyTempVar]=this.next,this.next=e.finallyLoc},delegateYield:function(t,e){this.next=e;var n=t.next(this.sent);return n.done?(this.delegate=null,s):(this.delegate=t,n.value)}}}}(Function("return this")());