New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

img-model

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-model - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

2

game.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.game=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(t){!function(e){var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag",u=e.regeneratorRuntime;if(u)t.exports=u;else{(u=e.regeneratorRuntime=t.exports).wrap=b;var f="suspendedStart",l="suspendedYield",h="executing",p="completed",v={},y={};y[a]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(L([])));m&&m!==r&&i.call(m,a)&&(y=m);var g=S.prototype=_.prototype=Object.create(y);w.prototype=g.constructor=S,S.constructor=w,S[c]=w.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},u.awrap=function(t){return{__await:t}},I(O.prototype),O.prototype[s]=function(){return this},u.AsyncIterator=O,u.async=function(t,e,n,r){var i=new O(b(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},I(g),g[c]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?p:l,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function w(){}function S(){}function I(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},a)}a(s.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())}),r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;r.regeneratorRuntime=void 0;var a=n;if(i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}var s=a,c=Math.ceil,u=Math.floor,f=function(t){return isNaN(t=+t)?0:(t>0?u:c)(t)},l=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},h=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),p=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),v=(p.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),y=function(t,e,n){if(v(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},d=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t){if(!d(t))throw TypeError(t+" is not an object!");return t},g=function(t){try{return!!t()}catch(t){return!0}},b=!g(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),x=h.document,_=d(x)&&d(x.createElement),w=function(t){return _?x.createElement(t):{}},S=!b&&!g(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),I=Object.defineProperty,O={f:b?Object.defineProperty:function(t,e,n){if(m(t),e=function(t,e){if(!d(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!d(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(e,!0),m(n),S)try{return I(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=b?function(t,e,n){return O.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},P={}.hasOwnProperty,j=function(t,e){return P.call(t,e)},L=function(t,e,n){var r,i,o,a=t&L.F,s=t&L.G,c=t&L.S,u=t&L.P,f=t&L.B,l=t&L.W,v=s?p:p[e]||(p[e]={}),d=v.prototype,m=s?h:c?h[e]:(h[e]||{}).prototype;for(r in s&&(n=e),n)(i=!a&&m&&void 0!==m[r])&&j(v,r)||(o=i?m[r]:n[r],v[r]=s&&"function"!=typeof m[r]?n[r]:f&&i?y(o,h):l&&m[r]==o?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):u&&"function"==typeof o?y(Function.call,o):o,u&&((v.virtual||(v.virtual={}))[r]=o,t&L.R&&d&&!d[r]&&T(d,r,o)))};L.F=1,L.G=2,L.S=4,L.P=8,L.B=16,L.W=32,L.U=64,L.R=128;var E,A=L,C=T,M={},F={}.toString,X=function(t){return F.call(t).slice(8,-1)},R=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==X(t)?t.split(""):Object(t)},D=function(t){return R(l(t))},G=Math.min,N=function(t){return t>0?G(f(t),9007199254740991):0},B=Math.max,U=Math.min,V=e(function(t){var e=h["__core-js_shared__"]||(h["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:p.version,mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),W=0,H=Math.random(),q=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++W+H).toString(36))},z=V("keys"),K=function(t){return z[t]||(z[t]=q(t))},Y=(E=!1,function(t,e,n){var r,i=D(t),o=N(i.length),a=function(t,e){return(t=f(t))<0?B(t+e,0):U(t,e)}(n,o);if(E&&e!=e){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((E||a in i)&&i[a]===e)return E||a||0;return!E&&-1}),J=K("IE_PROTO"),Q="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Z=Object.keys||function(t){return function(t,e){var n,r=D(t),i=0,o=[];for(n in r)n!=J&&j(r,n)&&o.push(n);for(;e.length>i;)j(r,n=e[i++])&&(~Y(o,n)||o.push(n));return o}(t,Q)},$=b?Object.defineProperties:function(t,e){m(t);for(var n,r=Z(e),i=r.length,o=0;i>o;)O.f(t,n=r[o++],e[n]);return t},tt=h.document,et=tt&&tt.documentElement,nt=K("IE_PROTO"),rt=function(){},it=function(){var t,e=w("iframe"),n=Q.length;for(e.style.display="none",et.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),it=t.F;n--;)delete it.prototype[Q[n]];return it()},ot=Object.create||function(t,e){var n;return null!==t?(rt.prototype=m(t),n=new rt,rt.prototype=null,n[nt]=t):n=it(),void 0===e?n:$(n,e)},at=e(function(t){var e=V("wks"),n=h.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:q)("Symbol."+t))}).store=e}),st=O.f,ct=at("toStringTag"),ut=function(t,e,n){t&&!j(t=n?t:t.prototype,ct)&&st(t,ct,{configurable:!0,value:e})},ft={};T(ft,at("iterator"),function(){return this});var lt,ht=function(t,e,n){t.prototype=ot(ft,{next:k(1,n)}),ut(t,e+" Iterator")},pt=function(t){return Object(l(t))},vt=K("IE_PROTO"),yt=Object.prototype,dt=Object.getPrototypeOf||function(t){return t=pt(t),j(t,vt)?t[vt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?yt:null},mt=at("iterator"),gt=!([].keys&&"next"in[].keys()),bt=function(){return this},xt=function(t,e,n,r,i,o,a){ht(n,e,r);var s,c,u,f=function(t){if(!gt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==i,p=!1,v=t.prototype,y=v[mt]||v["@@iterator"]||i&&v[i],d=y||f(i),m=i?h?f("entries"):d:void 0,g="Array"==e&&v.entries||y;if(g&&(u=dt(g.call(new t)))!==Object.prototype&&u.next&&ut(u,l,!0),h&&y&&"values"!==y.name&&(p=!0,d=function(){return y.call(this)}),a&&(gt||p||!v[mt])&&T(v,mt,d),M[e]=d,M[l]=bt,i)if(s={values:h?d:f("values"),keys:o?d:f("keys"),entries:m},a)for(c in s)c in v||C(v,c,s[c]);else A(A.P+A.F*(gt||p),e,s);return s},_t=(lt=!0,function(t,e){var n,r,i=String(l(t)),o=f(e),a=i.length;return o<0||o>=a?lt?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?lt?i.charAt(o):n:lt?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});xt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=_t(e,n),this._i+=t.length,{value:t,done:!1})});var wt=function(t,e){return{value:e,done:!!t}};xt(Array,"Array",function(t,e){this._t=D(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,wt(1)):wt(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");M.Arguments=M.Array;for(var St=at("toStringTag"),It="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Ot=0;Ot<It.length;Ot++){var kt=It[Ot],Tt=h[kt],Pt=Tt&&Tt.prototype;Pt&&!Pt[St]&&T(Pt,St,kt),M[kt]=M.Array}var jt,Lt,Et,At=at("toStringTag"),Ct="Arguments"==X(function(){return arguments}()),Mt=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),At))?n:Ct?X(e):"Object"==(r=X(e))&&"function"==typeof e.callee?"Arguments":r},Ft=function(t,e,n,r){try{return r?e(m(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&m(i.call(t)),e}},Xt=at("iterator"),Rt=Array.prototype,Dt=at("iterator"),Gt=p.getIteratorMethod=function(t){if(void 0!=t)return t[Dt]||t["@@iterator"]||M[Mt(t)]},Nt=e(function(t){var e={},n={},r=t.exports=function(t,r,i,o,a){var s,c,u,f,l,h=a?function(){return t}:Gt(t),p=y(i,o,r?2:1),v=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(void 0===(l=h)||M.Array!==l&&Rt[Xt]!==l){for(u=h.call(t);!(c=u.next()).done;)if((f=Ft(u,p,c.value,r))===e||f===n)return f}else for(s=N(t.length);s>v;v++)if((f=r?p(m(c=t[v])[0],c[1]):p(t[v]))===e||f===n)return f};r.BREAK=e,r.RETURN=n}),Bt=at("species"),Ut=function(t,e){var n,r=m(t).constructor;return void 0===r||void 0==(n=m(r)[Bt])?e:v(n)},Vt=h.process,Wt=h.setImmediate,Ht=h.clearImmediate,qt=h.MessageChannel,zt=h.Dispatch,Kt=0,Yt={},Jt=function(){var t=+this;if(Yt.hasOwnProperty(t)){var e=Yt[t];delete Yt[t],e()}},Qt=function(t){Jt.call(t.data)};Wt&&Ht||(Wt=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yt[++Kt]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},jt(Kt),Kt},Ht=function(t){delete Yt[t]},"process"==X(Vt)?jt=function(t){Vt.nextTick(y(Jt,t,1))}:zt&&zt.now?jt=function(t){zt.now(y(Jt,t,1))}:qt?(Et=(Lt=new qt).port2,Lt.port1.onmessage=Qt,jt=y(Et.postMessage,Et,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(jt=function(t){h.postMessage(t+"","*")},h.addEventListener("message",Qt,!1)):jt="onreadystatechange"in w("script")?function(t){et.appendChild(w("script")).onreadystatechange=function(){et.removeChild(this),Jt.call(t)}}:function(t){setTimeout(y(Jt,t,1),0)});var Zt={set:Wt,clear:Ht},$t=Zt.set,te=h.MutationObserver||h.WebKitMutationObserver,ee=h.process,ne=h.Promise,re="process"==X(ee);var ie={f:function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=v(e),this.reject=v(n)}(t)}},oe=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},ae=h.navigator,se=ae&&ae.userAgent||"",ce=function(t,e){if(m(t),d(e)&&e.constructor===t)return e;var n=ie.f(t);return(0,n.resolve)(e),n.promise},ue=at("species"),fe=at("iterator"),le=!1;try{[7][fe]().return=function(){le=!0}}catch(t){}var he,pe,ve,ye,de,me,ge=Zt.set,be=function(){var t,e,n,r=function(){var r,i;for(re&&(r=ee.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(re)n=function(){ee.nextTick(r)};else if(!te||h.navigator&&h.navigator.standalone)if(ne&&ne.resolve){var i=ne.resolve(void 0);n=function(){i.then(r)}}else n=function(){$t.call(h,r)};else{var o=!0,a=document.createTextNode("");new te(r).observe(a,{characterData:!0}),n=function(){a.data=o=!o}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}(),xe=h.TypeError,_e=h.process,we=_e&&_e.versions,Se=we&&we.v8||"",Ie=h.Promise,Oe="process"==Mt(_e),ke=function(){},Te=pe=ie.f,Pe=!!function(){try{var t=Ie.resolve(1),e=(t.constructor={})[at("species")]=function(t){t(ke,ke)};return(Oe||"function"==typeof PromiseRejectionEvent)&&t.then(ke)instanceof e&&0!==Se.indexOf("6.6")&&-1===se.indexOf("Chrome/66")}catch(t){}}(),je=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},Le=function(t,e){if(!t._n){t._n=!0;var n=t._c;be(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(i||(2==t._h&&Ce(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(xe("Promise-chain cycle")):(o=je(n))?o.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&Ee(t)})}},Ee=function(t){ge.call(h,function(){var e,n,r,i=t._v,o=Ae(t);if(o&&(e=oe(function(){Oe?_e.emit("unhandledRejection",i,t):(n=h.onunhandledrejection)?n({promise:t,reason:i}):(r=h.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=Oe||Ae(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},Ae=function(t){return 1!==t._h&&0===(t._a||t._c).length},Ce=function(t){ge.call(h,function(){var e;Oe?_e.emit("rejectionHandled",t):(e=h.onrejectionhandled)&&e({promise:t,reason:t._v})})},Me=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Le(e,!0))},Fe=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw xe("Promise can't be resolved itself");(e=je(t))?be(function(){var r={_w:n,_d:!1};try{e.call(t,y(Fe,r,1),y(Me,r,1))}catch(t){Me.call(r,t)}}):(n._v=t,n._s=1,Le(n,!1))}catch(t){Me.call({_w:n,_d:!1},t)}}};Pe||(Ie=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,Ie,"Promise","_h"),v(t),he.call(this);try{t(y(Fe,this,1),y(Me,this,1))}catch(t){Me.call(this,t)}},(he=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:T(t,r,e[r]);return t}(Ie.prototype,{then:function(t,e){var n=Te(Ut(this,Ie));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Oe?_e.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Le(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),ve=function(){var t=new he;this.promise=t,this.resolve=y(Fe,t,1),this.reject=y(Me,t,1)},ie.f=Te=function(t){return t===Ie||t===ye?new ve(t):pe(t)}),A(A.G+A.W+A.F*!Pe,{Promise:Ie}),ut(Ie,"Promise"),me="function"==typeof p[de="Promise"]?p[de]:h[de],b&&me&&!me[ue]&&O.f(me,ue,{configurable:!0,get:function(){return this}}),ye=p.Promise,A(A.S+A.F*!Pe,"Promise",{reject:function(t){var e=Te(this);return(0,e.reject)(t),e.promise}}),A(A.S+!0*A.F,"Promise",{resolve:function(t){return ce(this===ye?Ie:this,t)}}),A(A.S+A.F*!(Pe&&function(t,e){if(!e&&!le)return!1;var n=!1;try{var r=[7],i=r[fe]();i.next=function(){return{done:n=!0}},r[fe]=function(){return i},t(r)}catch(t){}return n}(function(t){Ie.all(t).catch(ke)})),"Promise",{all:function(t){var e=this,n=Te(e),r=n.resolve,i=n.reject,o=oe(function(){var n=[],o=0,a=1;Nt(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=Te(e),r=n.reject,i=oe(function(){Nt(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),A(A.P+A.R,"Promise",{finally:function(t){var e=Ut(this,p.Promise||h.Promise),n="function"==typeof t;return this.then(n?function(n){return ce(e,t()).then(function(){return n})}:t,n?function(n){return ce(e,t()).then(function(){throw n})}:t)}}),A(A.S,"Promise",{try:function(t){var e=ie.f(this),n=oe(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});var Xe=p.Promise,Re=e(function(t){t.exports={default:Xe,__esModule:!0}}),De=t(Re),Ge=t(e(function(t,e){e.__esModule=!0;var n,r=(n=Re)&&n.__esModule?n:{default:n};e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function i(o,a){try{var s=e[o](a),c=s.value}catch(t){return void n(t)}if(!s.done)return r.default.resolve(c).then(function(t){i("next",t)},function(t){i("throw",t)});t(c)}("next")})}}})),Ne={f:Object.getOwnPropertySymbols},Be={f:{}.propertyIsEnumerable},Ue=Object.assign,Ve=!Ue||g(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Ue({},t)[n]||Object.keys(Ue({},e)).join("")!=r})?function(t,e){for(var n=pt(t),r=arguments.length,i=1,o=Ne.f,a=Be.f;r>i;)for(var s,c=R(arguments[i++]),u=o?Z(c).concat(o(c)):Z(c),f=u.length,l=0;f>l;)s=u[l++],b&&!a.call(c,s)||(n[s]=c[s]);return n}:Ue;A(A.S+A.F,"Object",{assign:Ve});var We=p.Object.assign,He=t(e(function(t){t.exports={default:We,__esModule:!0}})),qe=t(e(function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}}));A(A.S+A.F*!b,"Object",{defineProperty:O.f});var ze=p.Object,Ke=function(t,e,n){return ze.defineProperty(t,e,n)},Ye=e(function(t){t.exports={default:Ke,__esModule:!0}});t(Ye);var Je=t(e(function(t,e){e.__esModule=!0;var n,r=(n=Ye)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()}));return function(){function t(e){qe(this,t),this.version="0.0.1"}return Je(t,[{key:"update",value:function(){if("start"==this.gameStatus&&this.autoDirection&&(this.speedTempCount++,this.speedTempCount%(this.GameData.speed||1)==0)){var t=this.curIndex+this.autoDirection;0<=t&&t<=this.curOptions.imgs.length-1?this.showPointFun(t):(this.autoDirection=0,this.speedTempCount=0,this.resetCallbackFun&&this.resetCallbackFun(),this.Utils.event(this,"onResetCallback"))}}},{key:"init",value:function(){var t=this;this.autoDirection=0,this.speedTempCount=0,this.imgLoadingStatus=!1,this.PIXIInstance.destroyContainer("block"),this.PIXIInstance.getContainer("block"),this.PIXIInstance.destroyContainer("item"),this.PIXIInstance.getContainer("item"),this.aniTypeObj={},this.aniType="aniType1",this.GameData.imgs&&this.GameData.imgs.length>0&&this.renderImgs(this.GameData),this.animationsSpriteArr=[],(this.GameData.animations||[]).forEach(function(e,n){for(var r=He({type:"animate",loop:!1,callback:function(){if(r.nextAni){if(t.Utils.event(t,"onAniCallback",{hasNextAni:!0,curStep:1,rootSprite:t[""+(e.name||"s"+n)]}),!t[""+(e.name||"s"+n)].nextSprite){var i=He({type:"animate",loop:!1,callback:function(){t[""+(e.name||"s"+n)].nextSprite.alpha=0,t[""+(e.name||"s"+n)].playStatus=!1,t[""+(e.name||"s"+n)].playCallbackFun&&t[""+(e.name||"s"+n)].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!0,curStep:2,rootSprite:t[""+(e.name||"s"+n)],curSprite:t[""+(e.name||"s"+n)].nextSprite})}},r.nextAni),o=t.PIXIInstance.renderSprite(i);t[""+(e.name||"s"+n)].addChild(o),t[""+(e.name||"s"+n)].nextSprite=o}t[""+(e.name||"s"+n)].nextSprite.alpha=1,t[""+(e.name||"s"+n)].nextSprite.gotoAndPlay(0)}else t[""+(e.name||"s"+n)].playStatus=!1,t[""+(e.name||"s"+n)].playCallbackFun&&t[""+(e.name||"s"+n)].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!1,curStep:1,rootSprite:t[""+(e.name||"s"+n)],curSprite:t[""+(e.name||"s"+n)]})}},e),i=He({type:"animate",loop:!1,callback:function(){t[(e.name||"s"+n)+"1ff"].playStatus=!1,t[(e.name||"s"+n)+"1ff"].playCallbackFun&&t[(e.name||"s"+n)+"1ff"].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!1,sort:"desc",curStep:1,rootSprite:t[(e.name||"s"+n)+"1ff"],curSprite:t[(e.name||"s"+n)+"1ff"]})}},e),o=[],a=r.srcArr.length-1;a>=0;a--)o.push(r.srcArr[a]);i.srcArr=o,t[""+(e.name||"s"+n)]=t.PIXIInstance.renderSprite(r,"item"),r.aniType&&(t.aniTypeObj[r.aniType]=t.aniTypeObj[r.aniType]||[],t.aniTypeObj[r.aniType].push(t[""+(e.name||"s"+n)])),t[""+(e.name||"s"+n)].stop(),t[(e.name||"s"+n)+"1ff"]=t.PIXIInstance.renderSprite(i,"item"),i.aniType&&(t.aniTypeObj[i.aniType]=t.aniTypeObj[i.aniType]||[],t.aniTypeObj[i.aniType].push(t[(e.name||"s"+n)+"1ff"])),t[(e.name||"s"+n)+"1ff"].stop(),t.animationsSpriteArr.push({sprite:t[""+(e.name||"s"+n)],spriteBack:t[(e.name||"s"+n)+"1ff"]})}),my.t=this}},{key:"playFun",value:function(t){var e=this;if("start"!==this.gameStatus)return!1;this.PIXIInstance.getContainer("block").alpha=0;var n=He({name:""},t),r=void 0,i=void 0;(this.GameData.animations||[]).forEach(function(t,o){var a=e[""+(t.name||"s"+o)],s=e[(t.name||"s"+o)+"1ff"];0==a.alpha&&0==s.alpha&&(a.alpha=1),n.name==t.name&&(r=a,i=s)});var o=function(){};if(r.playStatus||i.playStatus)return!1;0==i.alpha?(r.gotoAndPlay(0),r.playStatus=!0,o=function(){r.alpha=0,i.alpha=1,r.gotoAndStop(0)}):(this.Utils.event(this,"onCloseBeforeFun",i.imgObj),i.gotoAndPlay(0),i.playStatus=!0,o=function(){r.alpha=1,i.alpha=0,i.gotoAndStop(0)}),r.playCallbackFun=i.playCallbackFun=function(){o(),n.callback&&n.callback({status:0==r.alpha?"open":"close"})}}},{key:"getLoadIdxArr",value:function(){for(var t=[],e=this.curIndex-this.curOptions.renderVal,n=this.curIndex+this.curOptions.renderVal,r=this.curOptions.imgs.length-1,i=e;i<=n;i++)i<0?t.push(r+i+1):i>r?t.push(i-r-1):t.push(i);return t}},{key:"renderImgs",value:function(t){var e=this;this.curOptions=He({openScale:!1,scaleLmd:1e3,scaleRange:{min:.1,max:1},movelmd:12,sensitivity:1,showWidth:this.width,showHeight:this.height,renderVal:5,imgs:[]},t),this.curIndex=this.GameData.startIdx||0,this.curIndex>=this.curOptions.imgs.length&&(this.curIndex=0),this._sprite&&this._sprite.destroy(!0);var n=this.curOptions.imgs[this.curIndex];this.PIXIInstance.loadImg(n,function(r){var i=He({anchor:{x:.5,y:.5},x:e.width/2,y:e.height/2},n),o=e.PIXIInstance.renderSprite(i,"block");i.aniType&&(e.aniTypeObj[i.aniType]=e.aniTypeObj[i.aniType]||[],e.aniTypeObj[i.aniType].push(o)),o.width=e.curOptions.showWidth,o.height=e.curOptions.showHeight,o.x=e.curOptions.x||0,o.y=e.curOptions.y||0,e._sprite=o,e.posInfo={scale:{x:o.scale.x,y:o.scale.y}},e.curOptions.imgBaseWidth&&(e.posInfo.scale.x=e.curOptions.showWidth/e.curOptions.imgBaseWidth,e.posInfo.scale.y=e.curOptions.showWidth/e.curOptions.imgBaseWidth,e._sprite.scale.set(e.posInfo.scale.x,e.posInfo.scale.y)),e.Utils.event(e,"onImgLoadDone",t)})}},{key:"start",value:function(){this.gameStatus="start"}},{key:"stop",value:function(){this.gameStatus="stop"}},{key:"checkAniFun",value:function(){var t=this,e=!1;return this.animationsSpriteArr.forEach(function(t){var n=t.sprite,r=t.spriteBack;(n.playStatus||r.playStatus)&&(e=!0)}),e||this.animationsSpriteArr.forEach(function(n){var r=n.sprite;1==n.spriteBack.alpha&&(e=!0,t.playFun({name:r.imgObj.name}))}),e}},{key:"fullClick",value:function(t,e){if(this.imgLoadingStatus)return!1;if("start"!==this.gameStatus)return!1;if(this.checkAniFun())return!1;this.animationsSpriteArr.forEach(function(t){var e=t.sprite,n=t.spriteBack;e.alpha=0,n.alpha=0}),0==this.PIXIInstance.getContainer("block").alpha&&(this.PIXIInstance.getContainer("block").alpha=1);var n=e.data.global.x;e.data.global.y;if("start"==t&&(this.startInfo=null,this.startX=n,this.Utils.event(this,"onClickStart")),"move"==t&&this.startX){var r=n-this.startX,i=e.data.originalEvent.touches;if(i.length>=2&&this.curOptions.openScale){this.startInfo||(this.startInfo={centerPos:{x:(i[0].x+i[1].x)/2,y:(i[0].y+i[1].y)/2},startV:Math.sqrt(Math.pow(i[0].x-i[1].x,2)+Math.pow(i[0].y-i[1].y,2)),base:He({},this.posInfo)});var o=(Math.sqrt(Math.pow(i[0].x-i[1].x,2)+Math.pow(i[0].y-i[1].y,2))-this.startInfo.startV)/(this.curOptions.scaleLmd||1e3)+this.startInfo.base.scale.x,a=He({min:.1,max:1},this.curOptions.scaleRange);return o=Math.max(a.min,Math.min(o,a.max)),this.posInfo.scale.x=o,this.posInfo.scale.y=o,this._sprite.scale.set(this.posInfo.scale.x,this.posInfo.scale.y),!1}if(this.startInfo=null,Math.abs(r)>(this.curOptions.movelmd||12)){this.startX=n;var s=this.curIndex;r*(this.GameData.direction||1)>0?s+=this.curOptions.sensitivity||1:s-=this.curOptions.sensitivity||1,s>=this.curOptions.imgs.length&&(s=0),s<0&&(s=this.curOptions.imgs.length-1-1),this.showPointFun(s)}}"end"==t&&this.startX&&(this.startInfo=null,this.Utils.event(this,"onClickEnd"),this.startX=0)}},{key:"reset1",value:function(){this.animationsSpriteArr.forEach(function(t){var e=t.sprite,n=t.spriteBack;e.gotoAndStop(0),n.gotoAndStop(0),e.alpha=0,n.alpha=0,e.playStatus=!1,n.playStatus=!1}),this.PIXIInstance.getContainer("block").alpha=1,this.showPointFun(0)}},{key:"checkAniSync",value:function(){var t=Ge(s.mark(function t(){var e=this;return s.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new De(function(t,n){var r=e.checkAniFun();r?e.t=setInterval(function(){(r=e.checkAniFun())||(clearInterval(e.t),t())},10):(clearInterval(e.t),t())}));case 1:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"showAniType",value:function(){var t=Ge(s.mark(function t(e){var n;return s.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.aniType==e.aniType){t.next=3;break}return t.next=3,this.checkAniSync();case 3:for(n in this.aniType=e.aniType,this.aniTypeObj)e.aniType==n?this.aniTypeObj[n].forEach(function(t){void 0===t._baseX&&(t._baseX=t.x),t.x=t._baseX}):this.aniTypeObj[n].forEach(function(t){void 0===t._baseX&&(t._baseX=t.x),t.x=1e3});e.callback&&e.callback();case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"resetBase",value:function(t){var e=He({callback:function(){}},t);if("start"!==this.gameStatus)return!1;var n=this.curIndex,r=this.curOptions.imgs.length-1;Math.abs(0-n)<Math.abs(r-n)?this.autoDirection=-1:this.autoDirection=1,this.resetCallbackFun=e.callback}},{key:"showPointFun",value:function(t){this.curIndex=t,this.showOrDestroyTexture()}},{key:"showOrDestroyTexture",value:function(){var t=this;this.imgLoadingStatus=!0;var e=void 0;this.curOptions.imgs.forEach(function(n,r){r==t.curIndex&&(e=He({},n))}),this.PIXIInstance.loadImg(e,function(n){t.disposeTexture(t._sprite.texture.textureCacheIds),t.PIXIInstance.replaceTexture(t._sprite,e),t._sprite.scale.set(t.posInfo.scale.x,t.posInfo.scale.y),t.imgLoadingStatus=!1})}},{key:"disposeTexture",value:function(t){var e=this;t.forEach(function(t,n){var r=e.PIXIInstance.PIXI.utils.TextureCache[t];r&&(r.baseTexture.dispose(),r.baseTexture.destroy(),r.destroy())})}}]),t}()});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.game=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(t){!function(e){var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag",u=e.regeneratorRuntime;if(u)t.exports=u;else{(u=e.regeneratorRuntime=t.exports).wrap=b;var f="suspendedStart",l="suspendedYield",h="executing",p="completed",v={},y={};y[a]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(L([])));m&&m!==r&&i.call(m,a)&&(y=m);var g=S.prototype=_.prototype=Object.create(y);w.prototype=g.constructor=S,S.constructor=w,S[c]=w.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(g),t},u.awrap=function(t){return{__await:t}},I(O.prototype),O.prototype[s]=function(){return this},u.AsyncIterator=O,u.async=function(t,e,n,r){var i=new O(b(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},I(g),g[c]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=L,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?p:l,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function w(){}function S(){}function I(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},a)}a(s.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())}),r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;r.regeneratorRuntime=void 0;var a=n;if(i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}var s=a,c=Math.ceil,u=Math.floor,f=function(t){return isNaN(t=+t)?0:(t>0?u:c)(t)},l=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},h=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),p=e(function(t){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)}),v=(p.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),y=function(t,e,n){if(v(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},d=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t){if(!d(t))throw TypeError(t+" is not an object!");return t},g=function(t){try{return!!t()}catch(t){return!0}},b=!g(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),x=h.document,_=d(x)&&d(x.createElement),w=function(t){return _?x.createElement(t):{}},S=!b&&!g(function(){return 7!=Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a}),I=Object.defineProperty,O={f:b?Object.defineProperty:function(t,e,n){if(m(t),e=function(t,e){if(!d(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!d(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!d(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(e,!0),m(n),S)try{return I(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=b?function(t,e,n){return O.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},P={}.hasOwnProperty,j=function(t,e){return P.call(t,e)},L=function(t,e,n){var r,i,o,a=t&L.F,s=t&L.G,c=t&L.S,u=t&L.P,f=t&L.B,l=t&L.W,v=s?p:p[e]||(p[e]={}),d=v.prototype,m=s?h:c?h[e]:(h[e]||{}).prototype;for(r in s&&(n=e),n)(i=!a&&m&&void 0!==m[r])&&j(v,r)||(o=i?m[r]:n[r],v[r]=s&&"function"!=typeof m[r]?n[r]:f&&i?y(o,h):l&&m[r]==o?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):u&&"function"==typeof o?y(Function.call,o):o,u&&((v.virtual||(v.virtual={}))[r]=o,t&L.R&&d&&!d[r]&&T(d,r,o)))};L.F=1,L.G=2,L.S=4,L.P=8,L.B=16,L.W=32,L.U=64,L.R=128;var E,A=L,C=T,M={},F={}.toString,X=function(t){return F.call(t).slice(8,-1)},R=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==X(t)?t.split(""):Object(t)},D=function(t){return R(l(t))},G=Math.min,N=function(t){return t>0?G(f(t),9007199254740991):0},B=Math.max,U=Math.min,V=e(function(t){var e=h["__core-js_shared__"]||(h["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:p.version,mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),W=0,H=Math.random(),q=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++W+H).toString(36))},z=V("keys"),K=function(t){return z[t]||(z[t]=q(t))},Y=(E=!1,function(t,e,n){var r,i=D(t),o=N(i.length),a=function(t,e){return(t=f(t))<0?B(t+e,0):U(t,e)}(n,o);if(E&&e!=e){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((E||a in i)&&i[a]===e)return E||a||0;return!E&&-1}),J=K("IE_PROTO"),Q="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Z=Object.keys||function(t){return function(t,e){var n,r=D(t),i=0,o=[];for(n in r)n!=J&&j(r,n)&&o.push(n);for(;e.length>i;)j(r,n=e[i++])&&(~Y(o,n)||o.push(n));return o}(t,Q)},$=b?Object.defineProperties:function(t,e){m(t);for(var n,r=Z(e),i=r.length,o=0;i>o;)O.f(t,n=r[o++],e[n]);return t},tt=h.document,et=tt&&tt.documentElement,nt=K("IE_PROTO"),rt=function(){},it=function(){var t,e=w("iframe"),n=Q.length;for(e.style.display="none",et.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),it=t.F;n--;)delete it.prototype[Q[n]];return it()},ot=Object.create||function(t,e){var n;return null!==t?(rt.prototype=m(t),n=new rt,rt.prototype=null,n[nt]=t):n=it(),void 0===e?n:$(n,e)},at=e(function(t){var e=V("wks"),n=h.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:q)("Symbol."+t))}).store=e}),st=O.f,ct=at("toStringTag"),ut=function(t,e,n){t&&!j(t=n?t:t.prototype,ct)&&st(t,ct,{configurable:!0,value:e})},ft={};T(ft,at("iterator"),function(){return this});var lt,ht=function(t,e,n){t.prototype=ot(ft,{next:k(1,n)}),ut(t,e+" Iterator")},pt=function(t){return Object(l(t))},vt=K("IE_PROTO"),yt=Object.prototype,dt=Object.getPrototypeOf||function(t){return t=pt(t),j(t,vt)?t[vt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?yt:null},mt=at("iterator"),gt=!([].keys&&"next"in[].keys()),bt=function(){return this},xt=function(t,e,n,r,i,o,a){ht(n,e,r);var s,c,u,f=function(t){if(!gt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==i,p=!1,v=t.prototype,y=v[mt]||v["@@iterator"]||i&&v[i],d=y||f(i),m=i?h?f("entries"):d:void 0,g="Array"==e&&v.entries||y;if(g&&(u=dt(g.call(new t)))!==Object.prototype&&u.next&&ut(u,l,!0),h&&y&&"values"!==y.name&&(p=!0,d=function(){return y.call(this)}),a&&(gt||p||!v[mt])&&T(v,mt,d),M[e]=d,M[l]=bt,i)if(s={values:h?d:f("values"),keys:o?d:f("keys"),entries:m},a)for(c in s)c in v||C(v,c,s[c]);else A(A.P+A.F*(gt||p),e,s);return s},_t=(lt=!0,function(t,e){var n,r,i=String(l(t)),o=f(e),a=i.length;return o<0||o>=a?lt?"":void 0:(n=i.charCodeAt(o))<55296||n>56319||o+1===a||(r=i.charCodeAt(o+1))<56320||r>57343?lt?i.charAt(o):n:lt?i.slice(o,o+2):r-56320+(n-55296<<10)+65536});xt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=_t(e,n),this._i+=t.length,{value:t,done:!1})});var wt=function(t,e){return{value:e,done:!!t}};xt(Array,"Array",function(t,e){this._t=D(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,wt(1)):wt(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");M.Arguments=M.Array;for(var St=at("toStringTag"),It="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Ot=0;Ot<It.length;Ot++){var kt=It[Ot],Tt=h[kt],Pt=Tt&&Tt.prototype;Pt&&!Pt[St]&&T(Pt,St,kt),M[kt]=M.Array}var jt,Lt,Et,At=at("toStringTag"),Ct="Arguments"==X(function(){return arguments}()),Mt=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),At))?n:Ct?X(e):"Object"==(r=X(e))&&"function"==typeof e.callee?"Arguments":r},Ft=function(t,e,n,r){try{return r?e(m(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&m(i.call(t)),e}},Xt=at("iterator"),Rt=Array.prototype,Dt=at("iterator"),Gt=p.getIteratorMethod=function(t){if(void 0!=t)return t[Dt]||t["@@iterator"]||M[Mt(t)]},Nt=e(function(t){var e={},n={},r=t.exports=function(t,r,i,o,a){var s,c,u,f,l,h=a?function(){return t}:Gt(t),p=y(i,o,r?2:1),v=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(void 0===(l=h)||M.Array!==l&&Rt[Xt]!==l){for(u=h.call(t);!(c=u.next()).done;)if((f=Ft(u,p,c.value,r))===e||f===n)return f}else for(s=N(t.length);s>v;v++)if((f=r?p(m(c=t[v])[0],c[1]):p(t[v]))===e||f===n)return f};r.BREAK=e,r.RETURN=n}),Bt=at("species"),Ut=function(t,e){var n,r=m(t).constructor;return void 0===r||void 0==(n=m(r)[Bt])?e:v(n)},Vt=h.process,Wt=h.setImmediate,Ht=h.clearImmediate,qt=h.MessageChannel,zt=h.Dispatch,Kt=0,Yt={},Jt=function(){var t=+this;if(Yt.hasOwnProperty(t)){var e=Yt[t];delete Yt[t],e()}},Qt=function(t){Jt.call(t.data)};Wt&&Ht||(Wt=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Yt[++Kt]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},jt(Kt),Kt},Ht=function(t){delete Yt[t]},"process"==X(Vt)?jt=function(t){Vt.nextTick(y(Jt,t,1))}:zt&&zt.now?jt=function(t){zt.now(y(Jt,t,1))}:qt?(Et=(Lt=new qt).port2,Lt.port1.onmessage=Qt,jt=y(Et.postMessage,Et,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(jt=function(t){h.postMessage(t+"","*")},h.addEventListener("message",Qt,!1)):jt="onreadystatechange"in w("script")?function(t){et.appendChild(w("script")).onreadystatechange=function(){et.removeChild(this),Jt.call(t)}}:function(t){setTimeout(y(Jt,t,1),0)});var Zt={set:Wt,clear:Ht},$t=Zt.set,te=h.MutationObserver||h.WebKitMutationObserver,ee=h.process,ne=h.Promise,re="process"==X(ee);var ie={f:function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=v(e),this.reject=v(n)}(t)}},oe=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},ae=h.navigator,se=ae&&ae.userAgent||"",ce=function(t,e){if(m(t),d(e)&&e.constructor===t)return e;var n=ie.f(t);return(0,n.resolve)(e),n.promise},ue=at("species"),fe=at("iterator"),le=!1;try{[7][fe]().return=function(){le=!0}}catch(t){}var he,pe,ve,ye,de,me,ge=Zt.set,be=function(){var t,e,n,r=function(){var r,i;for(re&&(r=ee.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(re)n=function(){ee.nextTick(r)};else if(!te||h.navigator&&h.navigator.standalone)if(ne&&ne.resolve){var i=ne.resolve(void 0);n=function(){i.then(r)}}else n=function(){$t.call(h,r)};else{var o=!0,a=document.createTextNode("");new te(r).observe(a,{characterData:!0}),n=function(){a.data=o=!o}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}(),xe=h.TypeError,_e=h.process,we=_e&&_e.versions,Se=we&&we.v8||"",Ie=h.Promise,Oe="process"==Mt(_e),ke=function(){},Te=pe=ie.f,Pe=!!function(){try{var t=Ie.resolve(1),e=(t.constructor={})[at("species")]=function(t){t(ke,ke)};return(Oe||"function"==typeof PromiseRejectionEvent)&&t.then(ke)instanceof e&&0!==Se.indexOf("6.6")&&-1===se.indexOf("Chrome/66")}catch(t){}}(),je=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},Le=function(t,e){if(!t._n){t._n=!0;var n=t._c;be(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(i||(2==t._h&&Ce(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(xe("Promise-chain cycle")):(o=je(n))?o.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&Ee(t)})}},Ee=function(t){ge.call(h,function(){var e,n,r,i=t._v,o=Ae(t);if(o&&(e=oe(function(){Oe?_e.emit("unhandledRejection",i,t):(n=h.onunhandledrejection)?n({promise:t,reason:i}):(r=h.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=Oe||Ae(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},Ae=function(t){return 1!==t._h&&0===(t._a||t._c).length},Ce=function(t){ge.call(h,function(){var e;Oe?_e.emit("rejectionHandled",t):(e=h.onrejectionhandled)&&e({promise:t,reason:t._v})})},Me=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Le(e,!0))},Fe=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw xe("Promise can't be resolved itself");(e=je(t))?be(function(){var r={_w:n,_d:!1};try{e.call(t,y(Fe,r,1),y(Me,r,1))}catch(t){Me.call(r,t)}}):(n._v=t,n._s=1,Le(n,!1))}catch(t){Me.call({_w:n,_d:!1},t)}}};Pe||(Ie=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,Ie,"Promise","_h"),v(t),he.call(this);try{t(y(Fe,this,1),y(Me,this,1))}catch(t){Me.call(this,t)}},(he=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:T(t,r,e[r]);return t}(Ie.prototype,{then:function(t,e){var n=Te(Ut(this,Ie));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Oe?_e.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Le(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),ve=function(){var t=new he;this.promise=t,this.resolve=y(Fe,t,1),this.reject=y(Me,t,1)},ie.f=Te=function(t){return t===Ie||t===ye?new ve(t):pe(t)}),A(A.G+A.W+A.F*!Pe,{Promise:Ie}),ut(Ie,"Promise"),me="function"==typeof p[de="Promise"]?p[de]:h[de],b&&me&&!me[ue]&&O.f(me,ue,{configurable:!0,get:function(){return this}}),ye=p.Promise,A(A.S+A.F*!Pe,"Promise",{reject:function(t){var e=Te(this);return(0,e.reject)(t),e.promise}}),A(A.S+!0*A.F,"Promise",{resolve:function(t){return ce(this===ye?Ie:this,t)}}),A(A.S+A.F*!(Pe&&function(t,e){if(!e&&!le)return!1;var n=!1;try{var r=[7],i=r[fe]();i.next=function(){return{done:n=!0}},r[fe]=function(){return i},t(r)}catch(t){}return n}(function(t){Ie.all(t).catch(ke)})),"Promise",{all:function(t){var e=this,n=Te(e),r=n.resolve,i=n.reject,o=oe(function(){var n=[],o=0,a=1;Nt(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=Te(e),r=n.reject,i=oe(function(){Nt(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}}),A(A.P+A.R,"Promise",{finally:function(t){var e=Ut(this,p.Promise||h.Promise),n="function"==typeof t;return this.then(n?function(n){return ce(e,t()).then(function(){return n})}:t,n?function(n){return ce(e,t()).then(function(){throw n})}:t)}}),A(A.S,"Promise",{try:function(t){var e=ie.f(this),n=oe(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});var Xe=p.Promise,Re=e(function(t){t.exports={default:Xe,__esModule:!0}}),De=t(Re),Ge=t(e(function(t,e){e.__esModule=!0;var n,r=(n=Re)&&n.__esModule?n:{default:n};e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function i(o,a){try{var s=e[o](a),c=s.value}catch(t){return void n(t)}if(!s.done)return r.default.resolve(c).then(function(t){i("next",t)},function(t){i("throw",t)});t(c)}("next")})}}})),Ne={f:Object.getOwnPropertySymbols},Be={f:{}.propertyIsEnumerable},Ue=Object.assign,Ve=!Ue||g(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Ue({},t)[n]||Object.keys(Ue({},e)).join("")!=r})?function(t,e){for(var n=pt(t),r=arguments.length,i=1,o=Ne.f,a=Be.f;r>i;)for(var s,c=R(arguments[i++]),u=o?Z(c).concat(o(c)):Z(c),f=u.length,l=0;f>l;)s=u[l++],b&&!a.call(c,s)||(n[s]=c[s]);return n}:Ue;A(A.S+A.F,"Object",{assign:Ve});var We=p.Object.assign,He=t(e(function(t){t.exports={default:We,__esModule:!0}})),qe=t(e(function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}}));A(A.S+A.F*!b,"Object",{defineProperty:O.f});var ze=p.Object,Ke=function(t,e,n){return ze.defineProperty(t,e,n)},Ye=e(function(t){t.exports={default:Ke,__esModule:!0}});t(Ye);var Je=t(e(function(t,e){e.__esModule=!0;var n,r=(n=Ye)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()}));return function(){function t(e){qe(this,t),this.version="0.0.1"}return Je(t,[{key:"update",value:function(){if("start"==this.gameStatus&&this.autoDirection&&(this.speedTempCount++,this.speedTempCount%(this.GameData.speed||1)==0)){var t=this.curIndex+this.autoDirection;0<=t&&t<=this.curOptions.imgs.length-1?this.showPointFun(t):(this.autoDirection=0,this.speedTempCount=0,this.resetCallbackFun&&this.resetCallbackFun(),this.Utils.event(this,"onResetCallback"))}}},{key:"init",value:function(){var t=this;this.autoDirection=0,this.speedTempCount=0,this.imgLoadingStatus=!1,this.PIXIInstance.destroyContainer("block"),this.PIXIInstance.getContainer("block"),this.PIXIInstance.destroyContainer("item"),this.PIXIInstance.getContainer("item"),this.aniTypeObj={},this.aniType="aniType1",this.GameData.imgs&&this.GameData.imgs.length>0&&this.renderImgs(this.GameData),this.animationsSpriteArr=[],(this.GameData.animations||[]).forEach(function(e,n){for(var r=He({type:"animate",loop:!1,callback:function(){if(r.nextAni){if(t.Utils.event(t,"onAniCallback",{hasNextAni:!0,curStep:1,rootSprite:t[""+(e.name||"s"+n)]}),!t[""+(e.name||"s"+n)].nextSprite){var i=He({type:"animate",loop:!1,callback:function(){t[""+(e.name||"s"+n)].nextSprite.alpha=0,t[""+(e.name||"s"+n)].playStatus=!1,t[""+(e.name||"s"+n)].playCallbackFun&&t[""+(e.name||"s"+n)].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!0,curStep:2,rootSprite:t[""+(e.name||"s"+n)],curSprite:t[""+(e.name||"s"+n)].nextSprite})}},r.nextAni),o=t.PIXIInstance.renderSprite(i);t[""+(e.name||"s"+n)].addChild(o),t[""+(e.name||"s"+n)].nextSprite=o}t[""+(e.name||"s"+n)].nextSprite.alpha=1,t[""+(e.name||"s"+n)].nextSprite.gotoAndPlay(0)}else t[""+(e.name||"s"+n)].playStatus=!1,t[""+(e.name||"s"+n)].playCallbackFun&&t[""+(e.name||"s"+n)].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!1,curStep:1,rootSprite:t[""+(e.name||"s"+n)],curSprite:t[""+(e.name||"s"+n)]})}},e),i=He({type:"animate",loop:!1,callback:function(){t[(e.name||"s"+n)+"1ff"].playStatus=!1,t[(e.name||"s"+n)+"1ff"].playCallbackFun&&t[(e.name||"s"+n)+"1ff"].playCallbackFun(),t.Utils.event(t,"onAniCallback",{hasNextAni:!1,sort:"desc",curStep:1,rootSprite:t[(e.name||"s"+n)+"1ff"],curSprite:t[(e.name||"s"+n)+"1ff"]})}},e),o=[],a=r.srcArr.length-1;a>=0;a--)o.push(r.srcArr[a]);i.srcArr=o,t[""+(e.name||"s"+n)]=t.PIXIInstance.renderSprite(r,"item"),r.aniType&&(t.aniTypeObj[r.aniType]=t.aniTypeObj[r.aniType]||[],t.aniTypeObj[r.aniType].push(t[""+(e.name||"s"+n)])),t[""+(e.name||"s"+n)].stop(),t[(e.name||"s"+n)+"1ff"]=t.PIXIInstance.renderSprite(i,"item"),i.aniType&&(t.aniTypeObj[i.aniType]=t.aniTypeObj[i.aniType]||[],t.aniTypeObj[i.aniType].push(t[(e.name||"s"+n)+"1ff"])),t[(e.name||"s"+n)+"1ff"].stop(),t.animationsSpriteArr.push({sprite:t[""+(e.name||"s"+n)],spriteBack:t[(e.name||"s"+n)+"1ff"]})}),my.t=this}},{key:"playFun",value:function(t){var e=this;if("start"!==this.gameStatus)return!1;this.PIXIInstance.getContainer("block").alpha=0;var n=He({name:""},t),r=void 0,i=void 0;(this.GameData.animations||[]).forEach(function(t,o){var a=e[""+(t.name||"s"+o)],s=e[(t.name||"s"+o)+"1ff"];0==a.alpha&&0==s.alpha&&(a.alpha=1),n.name==t.name&&(r=a,i=s)});var o=function(){};if(r.playStatus||i.playStatus)return!1;0==i.alpha?(r.gotoAndPlay(0),r.playStatus=!0,o=function(){r.alpha=0,i.alpha=1,r.gotoAndStop(0)}):(this.Utils.event(this,"onCloseBeforeFun",i.imgObj),i.gotoAndPlay(0),i.playStatus=!0,o=function(){r.alpha=1,i.alpha=0,i.gotoAndStop(0)}),r.playCallbackFun=i.playCallbackFun=function(){o(),n.callback&&n.callback({status:0==r.alpha?"open":"close"})}}},{key:"getLoadIdxArr",value:function(){for(var t=[],e=this.curIndex-this.curOptions.renderVal,n=this.curIndex+this.curOptions.renderVal,r=this.curOptions.imgs.length-1,i=e;i<=n;i++)i<0?t.push(r+i+1):i>r?t.push(i-r-1):t.push(i);return t}},{key:"renderImgs",value:function(t){var e=this;this.curOptions=He({openScale:!1,scaleLmd:1e3,scaleRange:{min:.1,max:1},movelmd:12,sensitivity:1,showWidth:this.width,showHeight:this.height,renderVal:5,imgs:[]},t),this.curIndex=this.GameData.startIdx||0,this.curIndex>=this.curOptions.imgs.length&&(this.curIndex=0),this._sprite&&this._sprite.destroy(!0);var n=this.curOptions.imgs[this.curIndex];this.PIXIInstance.loadImg(n,function(r){var i=He({anchor:{x:.5,y:.5},x:e.width/2,y:e.height/2},n),o=e.PIXIInstance.renderSprite(i,"block");i.aniType&&(e.aniTypeObj[i.aniType]=e.aniTypeObj[i.aniType]||[],e.aniTypeObj[i.aniType].push(o)),o.width=e.curOptions.showWidth,o.height=e.curOptions.showHeight,o.x=e.curOptions.x||0,o.y=e.curOptions.y||0,e._sprite=o,e.posInfo={scale:{x:o.scale.x,y:o.scale.y}},e.curOptions.imgBaseWidth&&(e.posInfo.scale.x=e.curOptions.showWidth/e.curOptions.imgBaseWidth,e.posInfo.scale.y=e.curOptions.showWidth/e.curOptions.imgBaseWidth,e._sprite.scale.set(e.posInfo.scale.x,e.posInfo.scale.y)),e.Utils.event(e,"onImgLoadDone",t)})}},{key:"start",value:function(){this.gameStatus="start"}},{key:"stop",value:function(){this.gameStatus="stop"}},{key:"checkAniFun",value:function(){var t=this,e=!1;return this.animationsSpriteArr.forEach(function(t){var n=t.sprite,r=t.spriteBack;(n.playStatus||r.playStatus)&&(e=!0)}),e||this.animationsSpriteArr.forEach(function(n){var r=n.sprite;1==n.spriteBack.alpha&&(e=!0,t.playFun({name:r.imgObj.name}))}),e}},{key:"fullClick",value:function(t,e){if("end"==t&&this.startX&&(this.startInfo=null,this.Utils.event(this,"onClickEnd"),this.startX=0),this.imgLoadingStatus)return!1;if("start"!==this.gameStatus)return!1;if(this.checkAniFun())return!1;this.animationsSpriteArr.forEach(function(t){var e=t.sprite,n=t.spriteBack;e.alpha=0,n.alpha=0}),0==this.PIXIInstance.getContainer("block").alpha&&(this.PIXIInstance.getContainer("block").alpha=1);var n=e.data.global.x;e.data.global.y;if("start"==t&&(this.startInfo=null,this.startX=n,this.Utils.event(this,"onClickStart")),"move"==t&&this.startX){var r=n-this.startX,i=e.data.originalEvent.touches;if(i.length>=2&&this.curOptions.openScale){this.startInfo||(this.startInfo={centerPos:{x:(i[0].x+i[1].x)/2,y:(i[0].y+i[1].y)/2},startV:Math.sqrt(Math.pow(i[0].x-i[1].x,2)+Math.pow(i[0].y-i[1].y,2)),base:He({},this.posInfo)});var o=(Math.sqrt(Math.pow(i[0].x-i[1].x,2)+Math.pow(i[0].y-i[1].y,2))-this.startInfo.startV)/(this.curOptions.scaleLmd||1e3)+this.startInfo.base.scale.x,a=He({min:.1,max:1},this.curOptions.scaleRange);return o=Math.max(a.min,Math.min(o,a.max)),this.posInfo.scale.x=o,this.posInfo.scale.y=o,this._sprite.scale.set(this.posInfo.scale.x,this.posInfo.scale.y),!1}if(this.startInfo=null,Math.abs(r)>(this.curOptions.movelmd||12)){this.startX=n;var s=this.curIndex;r*(this.GameData.direction||1)>0?s+=this.curOptions.sensitivity||1:s-=this.curOptions.sensitivity||1,s>=this.curOptions.imgs.length&&(s=0),s<0&&(s=this.curOptions.imgs.length-1-1),this.showPointFun(s)}}}},{key:"reset1",value:function(){this.animationsSpriteArr.forEach(function(t){var e=t.sprite,n=t.spriteBack;e.gotoAndStop(0),n.gotoAndStop(0),e.alpha=0,n.alpha=0,e.playStatus=!1,n.playStatus=!1}),this.PIXIInstance.getContainer("block").alpha=1,this.showPointFun(0)}},{key:"checkAniSync",value:function(){var t=Ge(s.mark(function t(){var e=this;return s.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new De(function(t,n){var r=e.checkAniFun();r?e.t=setInterval(function(){(r=e.checkAniFun())||(clearInterval(e.t),t())},10):(clearInterval(e.t),t())}));case 1:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"showAniType",value:function(){var t=Ge(s.mark(function t(e){var n;return s.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.aniType==e.aniType){t.next=3;break}return t.next=3,this.checkAniSync();case 3:for(n in this.aniType=e.aniType,this.aniTypeObj)e.aniType==n?this.aniTypeObj[n].forEach(function(t){void 0===t._baseX&&(t._baseX=t.x),t.x=t._baseX}):this.aniTypeObj[n].forEach(function(t){void 0===t._baseX&&(t._baseX=t.x),t.x=1e3});e.callback&&e.callback();case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"resetBase",value:function(t){var e=He({callback:function(){}},t);if("start"!==this.gameStatus)return!1;var n=this.curIndex,r=this.curOptions.imgs.length-1;Math.abs(0-n)<Math.abs(r-n)?this.autoDirection=-1:this.autoDirection=1,this.resetCallbackFun=e.callback}},{key:"showPointFun",value:function(t){this.curIndex=t,this.showOrDestroyTexture()}},{key:"showOrDestroyTexture",value:function(){var t=this;this.imgLoadingStatus=!0;var e=void 0;this.curOptions.imgs.forEach(function(n,r){r==t.curIndex&&(e=He({},n))}),this.PIXIInstance.loadImg(e,function(n){t.disposeTexture(t._sprite.texture.textureCacheIds),t.PIXIInstance.replaceTexture(t._sprite,e),t._sprite.scale.set(t.posInfo.scale.x,t.posInfo.scale.y),t.imgLoadingStatus=!1})}},{key:"disposeTexture",value:function(t){var e=this;t.forEach(function(t,n){var r=e.PIXIInstance.PIXI.utils.TextureCache[t];r&&(r.baseTexture.dispose(),r.baseTexture.destroy(),r.destroy())})}}]),t}()});
{
"name": "img-model",
"version": "0.0.24",
"version": "0.0.25",
"description": "",

@@ -5,0 +5,0 @@ "main": "imgModel.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc