!function(t,e){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";functiont(t){return"function"==typeoft||"object"==typeoft&&null!==t}functione(t){return"function"==typeoft}functionn(t){I=t}functionr(t){J=t}functiono(){returnfunction(){returnprocess.nextTick(a)}}functioni(){return"undefined"!=typeofH?function(){H(a)}:c()}functions(){vart=0,e=newV(a),n=document.createTextNode("");returne.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}functionu(){vart=newMessageChannel;returnt.port1.onmessage=a,function(){returnt.port2.postMessage(0)}}functionc(){vart=setTimeout;returnfunction(){returnt(a,1)}}functiona(){for(vart=0;t<G;t+=2){vare=$[t],n=$[t+1];e(n),$[t]=void0,$[t+1]=void0}G=0}functionf(){try{vart=require,e=t("vertx");returnH=e.runOnLoop||e.runOnContext,i()}catch(n){returnc()}}functionl(t,e){varn=arguments,r=this,o=newthis.constructor(p);void0===o[et]&&k(o);vari=r._state;returni?!function(){vart=n[i-1];J(function(){returnx(i,o,t,r._result)})}():E(r,o,t,e),o}functionh(t){vare=this;if(t&&"object"==typeoft&&t.constructor===e)returnt;varn=newe(p);returng(n,t),n}functionp(){}functionv(){returnnewTypeError("You cannot resolve a promise with itself")}functiond(){returnnewTypeError("A promises callback cannot return that same promise.")}function_(t){try{returnt.then}catch(e){returnit.error=e,it}}functiony(t,e,n,r){try{t.call(e,n,r)}catch(o){returno}}functionm(t,e,n){J(function(t){varr=!1,o=y(n,e,function(n){r||(r=!0,e!==n?g(t,n):S(t,n))},function(e){r||(r=!0,j(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,j(t,o))},t)}functionb(t,e){e._state===rt?S(t,e._result):e._state===ot?j(t,e._result):E(e,void0,function(e){returng(t,e)},function(e){returnj(t,e)})}functionw(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?b(t,n):r===it?j(t,it.error):void0===r?S(t,n):e(r)?m(t,n,r):S(t,n)}functiong(e,n){e===n?j(e,v()):t(n)?w(e,n,_(n)):S(e,n)}functionA(t){t._onerror&&t._onerror(t._result),P(t)}functionS(t,e){t._state===nt&&(t._result=e,t._state=rt,0!==t._subscribers.length&&J(P,t))}functionj(t,e){t._state===nt&&(t._state=ot,t._result=e,J(A,t))}functionE(t,e,n,r){varo=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+rt]=n,o[i+ot]=r,0===i&&t._state&&J(P,t)}functionP(t){vare=t._subscribers,n=t._state;if(0!==e.length){for(varr=void0,o=void0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?x(n,r,o,i):o(i);t._subscribers.length=0}}functionT(){this.error=null}functionM(t,e){try{returnt(e)}catch(n){returnst.error=n,st}}functionx(t,n,r,o){vari=e(r),s=void0,u=void0,c=void0,a=void0;if(i){if(s=M(r,o),s===st?(a=!0,u=s.error,s=null):c=!0,n===s)returnvoidj(n,d())}elses=o,c=!0;n._state!==nt||(i&&c?g(n,s):a?j(n,u):t===rt?S(n,s):t===ot&&j(n,s))}functionC(t,e){try{e(function(e){g(t,e)},function(e){j(t,e)})}catch(n){j(t,n)}}functionO(){returnut++}functionk(t){t[et]=ut++,t._state=void0,t._result=void0,t._subscribers=[]}functionY(t,e){this._instanceConstructor=t,this.promise=newt(p),this.promise[et]||k(this.promise),B(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=newArray(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):j(this.promise,q())}functionq(){returnnewError("Array Methods must be provided an Array")}functionF(t){returnnewY(this,t).promise}functionD(t){vare=this;returnnewe(B(t)?function(n,r){for(varo=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){returne(newTypeError("You must pass an array to race."))})}functionK(t){vare=this,n=newe(p);returnj(n,t),n}functionL(){thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor")}functionN(){thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function
if("document"inself){if(!("classList"indocument.createElement("_"))||document.createElementNS&&!("classList"indocument.createElementNS("http://www.w3.org/2000/svg","g"))){(function(t){"use strict";if(!("Element"int))return;vare="classList",i="prototype",n=t.Element[i],s=Object,r=String[i].trim||function(){returnthis.replace(/^\s+|\s+$/g,"")},a=Array[i].indexOf||function(t){vare=0,i=this.length;for(;e<i;e++){if(einthis&&this[e]===t){returne}}return-1},o=function(t,e){this.name=t;this.code=DOMException[t];this.message=e},l=function(t,e){if(e===""){thrownewo("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(e)){thrownewo("INVALID_CHARACTER_ERR","String contains an invalid character")}returna.call(t,e)},c=function(t){vare=r.call(t.getAttribute("class")||""),i=e?e.split(/\s+/):[],n=0,s=i.length;for(;n<s;n++){this.push(i[n])}this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=c[i]=[],f=function(){returnnewc(this)};o[i]=Error[i];u.item=function(t){returnthis[t]||null};u.contains=function(t){t+="";returnl(this,t)!==-1};u.add=function(){vart=arguments,e=0,i=t.length,n,s=false;do{n=t[e]+"";if(l(this,n)===-1){this.push(n);s=true}}while(++e<i);if(s){this._updateClassName()}};u.remove=function(){vart=arguments,e=0,i=t.length,n,s=false,r;do{n=t[e]+"";r=l(this,n);while(r!==-1){this.splice(r,1);s=true;r=l(this,n)}}while(++e<i);if(s){this._updateClassName()}};u.toggle=function(t,e){t+="";vari=this.contains(t),n=i?e!==true&&"remove":e!==false&&"add";if(n){this[n](t)}if(e===true||e===false){returne}else{return!i}};u.toString=function(){returnthis.join(" ")};if(s.defineProperty){varh={get:f,enumerable:true,configurable:true};try{s.defineProperty(n,e,h)}catch(d){if(d.number===-2146823252){h.enumerable=false;s.defineProperty(n,e,h)}}}elseif(s[i].__defineGetter__){n.__defineGetter__(e,f)}})(self)}else{(function(){"use strict";vart=document.createElement("_");t.classList.add("c1","c2");if(!t.classList.contains("c2")){vare=function(t){vare=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){vari,n=arguments.length;for(i=0;i<n;i++){t=arguments[i];e.call(this,t)}}};e("add");e("remove")}t.classList.toggle("c3",false);if(t.classList.contains("c3")){vari=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){if(1inarguments&&!this.contains(t)===!e){returne}else{returni.call(this,t)}}}t=null})()}}