-
Notifications
You must be signed in to change notification settings - Fork 0
/
ai.bundle.js
1 lines (1 loc) · 42.2 KB
/
ai.bundle.js
1
(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)})({"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},0:function(e,t,n){e.exports=n("451i")},"0/R4":function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},"2OiF":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"3Lyj":function(e,t,n){var r=n("KroJ");e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},"451i":function(e,t,n){"use strict";n.r(t);n("VRzm"),n("f3/d");function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}n("Vd3H"),n("a1Th");var u=n("XaMy"),a=n("WFtS"),c=1.15,s=function(e,t){return t=t||.01,t>=0?e>=t/c&&e<=t*c:e>=t*c&&e<=t/c},f=function(e,t){return t>=0?e>=(t+.1)*c:e>=(t+.1)/c},h=function(e,t){return s(e,t)||f(e,t)},l=function(e,t){return t>=0?e<=(t-.1)/c:e<=(t-.1)*c},p=function(e,t){return s(e,t)||l(e,t)},v=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r[0]===t[0]&&r[1]===t[1])return!0}return!1},g=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y=function(e){var t=e<0?-1:1,n=Math.abs(e);return n<=a["a"].ONE/2?0:n<=a["a"].TWO/2&&n>a["a"].ONE/2?t*a["a"].ONE:n<=a["a"].THREE/2&&n>a["a"].TWO/2?t*a["a"].TWO:n<=1.5*a["a"].THREE&&n>a["a"].THREE/2?t*a["a"].THREE:n<=a["a"].FOUR/2&&n>1.5*a["a"].THREE?t*a["a"].THREE*2:n<=a["a"].FIVE/2&&n>a["a"].FOUR/2?t*a["a"].FOUR:t*a["a"].FIVE},m={equal:s,greatThan:f,greatOrEqualThan:h,littleThan:l,littleOrEqualThan:p,containPoint:v,pointEqual:g,round:y},d={opening:!0,searchDeep:8,countLimit:20,timeLimit:100,vcxDeep:5,random:!1,log:!1,spreadLimit:1,star:!0,cache:!0,window:!1,debug:!1},E=function(e,t,n,r,i){var o=e.board,a=0,c=0,s=0,f=0,h=0,l=o.length;function p(){s=1,f=0,c=-1,h=0}if(void 0===i||0===i){p();for(var v=n+1;1;v++){if(v>=l){f++;break}var g=o[t][v];if(g===u["a"].empty){if(-1==c&&v<l-1&&o[t][v+1]==r){c=s;continue}break}if(g!==r){f++;break}s++}for(v=n-1;1;v--){if(v<0){f++;break}g=o[t][v];if(g===u["a"].empty){if(-1==c&&v>0&&o[t][v-1]==r){c=0;continue}break}if(g!==r){f++;break}h++,-1!==c&&c++}s+=h,e.scoreCache[r][0][t][n]=b(s,f,c)}if(a+=e.scoreCache[r][0][t][n],void 0===i||1===i){p();for(v=t+1;1;v++){if(v>=l){f++;break}g=o[v][n];if(g===u["a"].empty){if(-1==c&&v<l-1&&o[v+1][n]==r){c=s;continue}break}if(g!==r){f++;break}s++}for(v=t-1;1;v--){if(v<0){f++;break}g=o[v][n];if(g===u["a"].empty){if(-1==c&&v>0&&o[v-1][n]==r){c=0;continue}break}if(g!==r){f++;break}h++,-1!==c&&c++}s+=h,e.scoreCache[r][1][t][n]=b(s,f,c)}if(a+=e.scoreCache[r][1][t][n],void 0===i||2===i){p();for(v=1;1;v++){var y=t+v,m=n+v;if(y>=l||m>=l){f++;break}g=o[y][m];if(g===u["a"].empty){if(-1==c&&y<l-1&&m<l-1&&o[y+1][m+1]==r){c=s;continue}break}if(g!==r){f++;break}s++}for(v=1;1;v++){y=t-v,m=n-v;if(y<0||m<0){f++;break}g=o[y][m];if(g===u["a"].empty){if(-1==c&&y>0&&m>0&&o[y-1][m-1]==r){c=0;continue}break}if(g!==r){f++;break}h++,-1!==c&&c++}s+=h,e.scoreCache[r][2][t][n]=b(s,f,c)}if(a+=e.scoreCache[r][2][t][n],void 0===i||3===i){p();for(v=1;1;v++){y=t+v,m=n-v;if(y<0||m<0||y>=l||m>=l){f++;break}g=o[y][m];if(g===u["a"].empty){if(-1==c&&y<l-1&&m<l-1&&o[y+1][m-1]==r){c=s;continue}break}if(g!==r){f++;break}s++}for(v=1;1;v++){y=t-v,m=n+v;if(y<0||m<0||y>=l||m>=l){f++;break}g=o[y][m];if(g===u["a"].empty){if(-1==c&&y>0&&m>0&&o[y-1][m+1]==r){c=0;continue}break}if(g!==r){f++;break}h++,-1!==c&&c++}s+=h,e.scoreCache[r][3][t][n]=b(s,f,c)}return a+=e.scoreCache[r][3][t][n],a},b=function(e,t,n){if(void 0===n&&(n=0),n<=0){if(e>=5)return a["a"].FIVE;if(0===t)switch(e){case 1:return a["a"].ONE;case 2:return a["a"].TWO;case 3:return a["a"].THREE;case 4:return a["a"].FOUR}if(1===t)switch(e){case 1:return a["a"].BLOCKED_ONE;case 2:return a["a"].BLOCKED_TWO;case 3:return a["a"].BLOCKED_THREE;case 4:return a["a"].BLOCKED_FOUR}}else if(1===n||n==e-1){if(e>=6)return a["a"].FIVE;if(0===t)switch(e){case 2:return a["a"].TWO/2;case 3:return a["a"].THREE;case 4:return a["a"].BLOCKED_FOUR;case 5:return a["a"].FOUR}if(1===t)switch(e){case 2:return a["a"].BLOCKED_TWO;case 3:return a["a"].BLOCKED_THREE;case 4:return a["a"].BLOCKED_FOUR;case 5:return a["a"].BLOCKED_FOUR}}else if(2===n||n==e-2){if(e>=7)return a["a"].FIVE;if(0===t)switch(e){case 3:return a["a"].THREE;case 4:case 5:return a["a"].BLOCKED_FOUR;case 6:return a["a"].FOUR}if(1===t)switch(e){case 3:return a["a"].BLOCKED_THREE;case 4:return a["a"].BLOCKED_FOUR;case 5:return a["a"].BLOCKED_FOUR;case 6:return a["a"].FOUR}if(2===t)switch(e){case 4:case 5:case 6:return a["a"].BLOCKED_FOUR}}else if(3===n||n==e-3){if(e>=8)return a["a"].FIVE;if(0===t)switch(e){case 4:case 5:return a["a"].THREE;case 6:return a["a"].BLOCKED_FOUR;case 7:return a["a"].FOUR}if(1===t)switch(e){case 4:case 5:case 6:return a["a"].BLOCKED_FOUR;case 7:return a["a"].FOUR}if(2===t)switch(e){case 4:case 5:case 6:case 7:return a["a"].BLOCKED_FOUR}}else if(4===n||n==e-4){if(e>=9)return a["a"].FIVE;if(0===t)switch(e){case 5:case 6:case 7:case 8:return a["a"].FOUR}if(1===t)switch(e){case 4:case 5:case 6:case 7:return a["a"].BLOCKED_FOUR;case 8:return a["a"].FOUR}if(2===t)switch(e){case 5:case 6:case 7:case 8:return a["a"].BLOCKED_FOUR}}else if(5===n||n==e-5)return a["a"].FIVE;return 0},x=E,O=n("fni7"),w=n.n(O),F=function(e){this.size=e||15};F.prototype.init=function(){this.com=[],this.hum=[];for(var e=0;e<this.size*this.size;e++)this.com.push(this._rand()),this.hum.push(this._rand());this.code=this._rand()};var _=w.a.engines.mt19937().autoSeed();F.prototype._rand=function(){return w.a.integer(1,1e9)(_)},F.prototype.go=function(e,t,n){var r=this.size*e+t;return this.code^=n===u["a"].com?this.com[r]:this.hum[r],this.code};var R=new F;R.init();var S,T,M,k=R,C={create:function(e,t){for(var n=[],r=0;r<e;r++){for(var i=new Array,o=0;o<t;o++)i.push(0);n.push(i)}return n}},U=function(){function e(){r(this,e)}return o(e,[{key:"init",value:function(e){this.table=C.create(e,e)}},{key:"print",value:function(e){console.log(this.table.map(function(e){return e.map(function(e){return parseInt(Math.sqrt(e/1e4))}).join(",")}));for(var t,n=0,r=0;r<e.length;r++){var i=e[r],o=this.table[i[0]][i[1]];o>n&&(n=o,t=[i[0],i[1]])}console.log("历史表推荐走法:",t)}}]),e}(),L=new U,D=0,j=0,K=function(e){return e<a["a"].FOUR&&e>=a["a"].BLOCKED_FOUR?e>=a["a"].BLOCKED_FOUR&&e<a["a"].BLOCKED_FOUR+a["a"].THREE?a["a"].THREE:e>=a["a"].BLOCKED_FOUR+a["a"].THREE&&e<2*a["a"].BLOCKED_FOUR?a["a"].FOUR:2*a["a"].FOUR:e},I=function(e,t){if(!t||!t.length)return!1;for(var n=e,r=0;r<t.length;r++){var i=t[r];if(Math.abs(n[0]-i[0])>4||Math.abs(n[1]-i[1])>4)return!1;if(n[0]!==i[0]&&n[1]!==i[1]&&Math.abs(n[0]-i[0])!==Math.abs(n[1]-i[1]))return!1}return!0},H=function(){function e(){r(this,e)}return o(e,[{key:"init",value:function(e){var t;if(this.evaluateCache={},this.currentSteps=[],this.allSteps=[],this.stepsTail=[],this.zobrist=k,k.init(),this._last=[!1,!1],this.count=0,e.length){this.board=e,t=this.board.length;for(var n=0;n<this.board.length;n++)this.count+=this.board[n].filter(function(e){return e>0}).length}else{t=e,this.board=[];for(n=0;n<t;n++){for(var r=[],i=0;i<t;i++)r.push(0);this.board.push(r)}}L.init(t),this.comScore=C.create(t,t),this.humScore=C.create(t,t),this.scoreCache=[[],[C.create(t,t),C.create(t,t),C.create(t,t),C.create(t,t)],[C.create(t,t),C.create(t,t),C.create(t,t),C.create(t,t)]],this.initScore()}},{key:"initScore",value:function(){for(var e=this.board,t=0;t<e.length;t++)for(var n=0;n<e[t].length;n++)if(e[t][n]==u["a"].empty){if(this.hasNeighbor(t,n,2,2)){var r=x(this,t,n,u["a"].com),i=x(this,t,n,u["a"].hum);this.comScore[t][n]=r,this.humScore[t][n]=i}}else e[t][n]==u["a"].com?(this.comScore[t][n]=x(this,t,n,u["a"].com),this.humScore[t][n]=0):e[t][n]==u["a"].hum&&(this.humScore[t][n]=x(this,t,n,u["a"].hum),this.comScore[t][n]=0)}},{key:"updateScore",value:function(e){var t=4,n=(this.board,this),r=this.board.length;function i(e,t,r){var i=n.board[e][t];if(i!==u["a"].reverse(u["a"].com)){var o=x(n,e,t,u["a"].com,r);n.comScore[e][t]=o,L.table[e][t]+=o}else n.comScore[e][t]=0;if(i!==u["a"].reverse(u["a"].hum)){var a=x(n,e,t,u["a"].hum,r);n.humScore[e][t]=a,L.table[e][t]+=a}else n.humScore[e][t]=0}for(var o=-t;o<=t;o++){var a=e[0],c=e[1]+o;if(!(c<0)){if(c>=r)break;i(a,c,0)}}for(o=-t;o<=t;o++){a=e[0]+o,c=e[1];if(!(a<0)){if(a>=r)break;i(a,c,1)}}for(o=-t;o<=t;o++){a=e[0]+o,c=e[1]+o;if(!(a<0||c<0)){if(a>=r||c>=r)break;i(a,c,2)}}for(o=-t;o<=t;o++){a=e[0]+o,c=e[1]-o;a<0||c<0||(a>=r||c>=r||i(a,c,3))}}},{key:"put",value:function(e,t){e.role=t,d.debug&&console.log("put ["+e+"] "+t),this.board[e[0]][e[1]]=t,this.zobrist.go(e[0],e[1],t),this.updateScore(e),this.allSteps.push(e),this.currentSteps.push(e),this.stepsTail=[],this.count++}},{key:"remove",value:function(e){var t=this.board[e[0]][e[1]];d.debug&&console.log("remove ["+e+"] "+t),this.zobrist.go(e[0],e[1],t),this.board[e[0]][e[1]]=u["a"].empty,this.updateScore(e),this.allSteps.pop(),this.currentSteps.pop(),this.count--}},{key:"logSteps",value:function(){console.log("steps:"+this.allSteps.map(function(e){return"["+e[0]+","+e[1]+"]"}).join(","))}},{key:"evaluate",value:function(e){this.comMaxScore=0,this.humMaxScore=0;for(var t=this.board,n=0;n<t.length;n++)for(var r=0;r<t[n].length;r++)t[n][r]==u["a"].com?this.comMaxScore+=K(this.comScore[n][r]):t[n][r]==u["a"].hum&&(this.humMaxScore+=K(this.humScore[n][r]));var i=(e==u["a"].com?1:-1)*(this.comMaxScore-this.humMaxScore);return i}},{key:"log",value:function(){d.log&&console.log("star: "+(D/j*100).toFixed(2)+"%, "+D+"/"+j)}},{key:"gen",value:function(e,t,n){if(this.count<=0)return[7,7];var r=[],i=[],o=[],c=[],s=[],f=[],h=[],l=[],p=[],v=[],g=[],y=[],m=this.board,E=u["a"].reverse(e),b=[],x=[];if(n&&d.star){var O=this.currentSteps.length-1;while(O>=0){var w=this.currentSteps[O];if(E===u["a"].com&&w.scoreCom>=a["a"].THREE||E===u["a"].hum&&w.scoreHum>=a["a"].THREE){x.push(w);break}O-=2}O=this.currentSteps.length-2;while(O>=0){w=this.currentSteps[O];if(e===u["a"].com&&w.scoreCom>=a["a"].THREE||e===u["a"].hum&&w.scoreHum>=a["a"].THREE){b.push(w);break}O-=2}b.length||b.push(this.currentSteps[0].role===e?this.currentSteps[0]:this.currentSteps[1]),x.length||x.push(this.currentSteps[0].role===E?this.currentSteps[0]:this.currentSteps[1])}for(O=0;O<m.length;O++)for(var F=0;F<m.length;F++)if(m[O][F]==u["a"].empty){if(this.allSteps.length<6){if(!this.hasNeighbor(O,F,1,1))continue}else if(!this.hasNeighbor(O,F,2,2))continue;var _=this.humScore[O][F],R=this.comScore[O][F],S=Math.max(R,_);if(t&&S<a["a"].THREE)continue;w=[O,F];if(w.scoreHum=_,w.scoreCom=R,w.score=S,w.role=e,j++,n&&d.star){e===u["a"].com?w.scoreCom:w.scoreHum,e===u["a"].com?w.scoreHum:w.scoreCom;if(S>=a["a"].FOUR);else if(S>=a["a"].BLOCKED_FOUR&&I(this.currentSteps[this.currentSteps.length-1]));else if(!I(w,b)&&!I(w,x)){D++;continue}}R>=a["a"].FIVE?r.push(w):_>=a["a"].FIVE?r.push(w):R>=a["a"].FOUR?i.push(w):_>=a["a"].FOUR?o.push(w):R>=a["a"].BLOCKED_FOUR?c.push(w):_>=a["a"].BLOCKED_FOUR?s.push(w):R>=2*a["a"].THREE?f.push(w):_>=2*a["a"].THREE?h.push(w):R>=a["a"].THREE?l.push(w):_>=a["a"].THREE?p.push(w):R>=a["a"].TWO?v.unshift(w):_>=a["a"].TWO?g.unshift(w):y.push(w)}if(r.length)return r;if(e===u["a"].com&&i.length)return i;if(e===u["a"].hum&&o.length)return o;if(e===u["a"].com&&o.length&&!c.length)return o;if(e===u["a"].hum&&i.length&&!s.length)return i;var T=e===u["a"].com?i.concat(o):o.concat(i),M=e===u["a"].com?c.concat(s):s.concat(c);if(T.length)return T.concat(M);var k,C=[];return e===u["a"].com&&(C=f.concat(h).concat(c).concat(s).concat(l).concat(p)),e===u["a"].hum&&(C=h.concat(f).concat(s).concat(c).concat(p).concat(l)),f.length||h.length?C:t?C:(k=e===u["a"].com?v.concat(g):g.concat(v),k.sort(function(e,t){return t.score-e.score}),C=C.concat(k.length?k:y),C.length>d.countLimit?C.slice(0,d.countLimit):C)}},{key:"hasNeighbor",value:function(e,t,n,r){for(var i=this.board,o=i.length,a=e-n,c=e+n,s=t-n,f=t+n,h=a;h<=c;h++)if(!(h<0||h>=o))for(var l=s;l<=f;l++)if(!(l<0||l>=o)&&(h!=e||l!=t)&&i[h][l]!=u["a"].empty&&(r--,r<=0))return!0;return!1}},{key:"toString",value:function(){return this.board.map(function(e){return e.join(",")}).join("\n")}}]),e}(),B=new H,q=B,P=a["a"],V=10*P.FIVE,Z=-1*V,A=0,N=0,W=0,X={},z=function(e,t,n,r,i){A=0,T=0,S=0,q.currentSteps=[];for(var o=0;o<e.length;o++){var a=e[o];q.put(a,t);var c=[a],s=Q(n-1,-i,-r,u["a"].reverse(t),1,c.slice(0),0);if(s.score*=-1,r=Math.max(r,s.score),q.remove(a),a.v=s,+new Date-M>1e3*d.timeLimit){console.log("timeout...");break}}return d.log&&console.log("迭代完成,deep="+n),d.log&&console.log(e.map(function(e){return"["+e[0]+","+e[1]+"],score:"+e.v.score+",step:"+e.v.step+",steps:"+e.v.steps.join(";")+(e.v.c?",c:"+[e.v.c.score.steps||[]].join(";"):"")+(e.v.vct?",vct:"+e.v.vct.join(";"):"")+(e.v.vcf?",vcf:"+e.v.vcf.join(";"):"")})),r},Q=function e(t,n,r,i,o,c,s){if(d.debug&&q.logSteps(),d.cache){var f=X[q.zobrist.code];if(f){if(f.deep>=t)return W++,{score:f.score.score,steps:c,step:o+f.score.step,c:f};if(m.greatOrEqualThan(f.score,P.FOUR)||m.littleOrEqualThan(f.score,-P.FOUR))return W++,f.score}}var h=q.evaluate(i),l={score:h,step:o,steps:c};if(A++,t<=0||m.greatOrEqualThan(h,a["a"].FIVE)||m.littleOrEqualThan(h,-a["a"].FIVE))return l;var p={score:Z,step:o,steps:c},v=q.gen(i,q.count>10?o>1:o>3,o>1);if(!v.length)return l;d.debug&&console.log("points:"+v.map(function(e){return"["+e[0]+","+e[1]+"]"}).join(",")),d.debug&&console.log("A~B: "+n+"~"+r);for(var g=0;g<v.length;g++){var y=v[g];q.put(y,i);var E=t-1,b=s;b<d.spreadLimit&&(i==u["a"].com&&y.scoreHum>=P.FIVE||i==u["a"].hum&&y.scoreCom>=P.FIVE)&&(E+=2,b++);var x=c.slice(0);x.push(y);var O=e(E,-r,-n,u["a"].reverse(i),o+1,x,b);if(O.score*=-1,q.remove(y),O.score>p.score&&(p=O),n=Math.max(p.score,n),m.greatOrEqualThan(O.score,r))return d.debug&&console.log("AB Cut ["+y[0]+","+y[1]+"]"+O.score+" >= "+r),T++,O.score=V-1,O.abcut=1,O}return G(t,p),p},G=function(e,t){if(!d.cache)return!1;if(t.abcut)return!1;var n={deep:e,score:{score:t.score,steps:t.steps,step:t.step},board:q.toString()};X[q.zobrist.code]=n,N++},J=function(e,t,n){var r;M=+new Date,X={};for(var i=2;i<=n;i+=2)if(r=z(e,t,i,Z,V),m.greatOrEqualThan(r,P.FIVE))break;e=e.map(function(e){var t=[e[0],e[1]];return t.score=e.v.score,t.step=e.v.step,t.steps=e.v.steps,e.v.vct&&(t.vct=e.v.vct),e.v.vcf&&(t.vcf=e.v.vcf),t}),e.sort(function(e,t){return m.equal(e.score,t.score)?e.score>=0?e.step!==t.step?e.step-t.step:t.score-e.score:e.step!==t.step?t.step-e.step:t.score-e.score:t.score-e.score});var o=e[0];o.min=Math.min.apply(Math,o.steps.map(function(e){return e.score})),d.log&&console.log("选择节点:"+e[0]+", 分数:"+o.score.toFixed(3)+", 步数:"+o.step+", 最小值:"+o.min);var u=(new Date-M)/1e3;return d.log&&console.log("搜索节点数:"+A+",AB剪枝次数:"+T+", PV剪枝次数:"+S),d.log&&console.log("搜索缓存:总数 "+N+", 命中率 "+(W/N*100).toFixed(3)+"%, "+W+"/"+N),d.log&&console.log("当前统计:"+A+"个节点, 耗时:"+u.toFixed(2)+"s, NPS:"+Math.floor(A/u)+"N/S"),q.log(),d.log&&console.log("===============统计表==============="),d.debug&&L.print(e),o},Y=function(e,t){e=e||u["a"].com,t=void 0===t?d.searchDeep:t;var n=q.gen(e);return J(n,e,t)},$=Y,ee=function(e){console.log("使用花月开局");var t=e.steps;return m.pointEqual(t[1],[6,7])&&2===t.length?[6,8]:m.pointEqual(t[1],[7,6])&&2===t.length?[6,6]:m.pointEqual(t[1],[8,7])&&2===t.length?[8,6]:m.pointEqual(t[1],[7,8])&&2===t.length?[8,8]:void 0},te=function(e){console.log("使用浦月开局");var t=e.steps;return m.pointEqual(t[1],[6,6])&&2===t.length?[6,8]:m.pointEqual(t[1],[8,6])&&2===t.length?[6,6]:m.pointEqual(t[1],[8,8])&&2===t.length?[8,6]:m.pointEqual(t[1],[6,8])&&2===t.length?[8,8]:void 0},ne=function(e){var t=e.allSteps;return 1===e.board[t[0][0]][t[0][1]]&&(!(t.length>2)&&(m.containPoint([[6,7],[7,6],[8,7],[7,8]],t[1])?ee(e):!!m.containPoint([[6,6],[8,8],[8,6],[6,8]],t[1])&&te(e)))},re=ne,ie=n("TEka"),oe=n.n(ie),ue=function(){function e(){r(this,e)}return o(e,[{key:"start",value:function(e){if(e){var t=[];for(var n in oe.a)t.push(n);var r=t[parseInt(26*Math.random())],i=oe.a[r];return q.init(oe.a[r]),{board:i,name:i.name}}return q.init(15),{board:void 0}}},{key:"begin",value:function(){var e;return q.allSteps.length>1&&(e=re(q)),e=e||$(void 0,d.searchDeep),q.put(e,u["a"].com,!0),e}},{key:"turn",value:function(e,t){return this.set(e,t,u["a"].hum),this.begin()}},{key:"set",value:function(e,t,n){q.put([e,t],n,!0)}}]),e}(),ae=ue,ce=new ae;self.onmessage=function(e){var t=e.data;if(console.log("get message: "),console.log(t),"START"==t.type){var n=ce.start(t.random);postMessage({type:"board",data:n})}else if("BEGIN"==t.type){var r=ce.begin();postMessage({type:"put",data:r})}else if("GO"==t.type){r=ce.turn(e.data.x,e.data.y);postMessage({type:"put",data:r})}else if("CONFIG"==t.type){t=e.data.config;t.searchDeep&&(d.searchDeep=t.searchDeep),t.countLimit&&(d.countLimit=t.countLimit),t.vcxDeep&&(d.vcxDeep=t.vcxDeep),t.timeLimit&&(d.timeLimit=t.timeLimit),void 0!==t.spread&&(d.spreadLimit=t.spread)}}},"69bn":function(e,t,n){var r=n("y3w9"),i=n("2OiF"),o=n("K0xU")("species");e.exports=function(e,t){var n,u=r(e).constructor;return void 0===u||void 0==(n=r(u)[o])?t:i(n)}},"9gX7":function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},"C/va":function(e,t,n){"use strict";var r=n("y3w9");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},GZEu:function(e,t,n){var r,i,o,u=n("m0Pp"),a=n("MfQN"),c=n("+rLv"),s=n("Iw71"),f=n("dyZX"),h=f.process,l=f.setImmediate,p=f.clearImmediate,v=f.MessageChannel,g=f.Dispatch,y=0,m={},d="onreadystatechange",E=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){E.call(e.data)};l&&p||(l=function(e){var t=[],n=1;while(arguments.length>n)t.push(arguments[n++]);return m[++y]=function(){a("function"==typeof e?e:Function(e),t)},r(y),y},p=function(e){delete m[e]},"process"==n("LZWt")(h)?r=function(e){h.nextTick(u(E,e,1))}:g&&g.now?r=function(e){g.now(u(E,e,1))}:v?(i=new v,o=i.port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):r=d in s("script")?function(e){c.appendChild(s("script"))[d]=function(){c.removeChild(this),E.call(e)}}:function(e){setTimeout(u(E,e,1),0)}),e.exports={set:l,clear:p}},H6hf:function(e,t,n){var r=n("y3w9");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e["return"];throw void 0!==o&&r(o.call(e)),t}}},"I8a+":function(e,t,n){var r=n("LZWt"),i=n("K0xU")("toStringTag"),o="Arguments"==r(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},Iw71:function(e,t,n){var r=n("0/R4"),i=n("dyZX").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"J+6e":function(e,t,n){var r=n("I8a+"),i=n("K0xU")("iterator"),o=n("hPIQ");e.exports=n("g3g5").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},K0xU:function(e,t,n){var r=n("VTer")("wks"),i=n("ylqs"),o=n("dyZX").Symbol,u="function"==typeof o,a=e.exports=function(e){return r[e]||(r[e]=u&&o[e]||(u?o:i)("Symbol."+e))};a.store=r},KroJ:function(e,t,n){var r=n("dyZX"),i=n("Mukb"),o=n("aagx"),u=n("ylqs")("src"),a="toString",c=Function[a],s=(""+c).split(a);n("g3g5").inspectSource=function(e){return c.call(e)},(e.exports=function(e,t,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,u)||i(n,u,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[u]||c.call(this)})},LQAc:function(e,t){e.exports=!1},LZWt:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},LyE8:function(e,t,n){"use strict";var r=n("eeVq");e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},M6Qj:function(e,t,n){var r=n("hPIQ"),i=n("K0xU")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},MfQN:function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},Mukb:function(e,t,n){var r=n("hswa"),i=n("RjD/");e.exports=n("nh4g")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},OEbY:function(e,t,n){n("nh4g")&&"g"!=/./g.flags&&n("hswa").f(RegExp.prototype,"flags",{configurable:!0,get:n("C/va")})},RYi7:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"RjD/":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"S/j/":function(e,t,n){var r=n("vhPU");e.exports=function(e){return Object(r(e))}},SlkY:function(e,t,n){var r=n("m0Pp"),i=n("H6hf"),o=n("M6Qj"),u=n("y3w9"),a=n("ne8i"),c=n("J+6e"),s={},f={};t=e.exports=function(e,t,n,h,l){var p,v,g,y,m=l?function(){return e}:c(e),d=r(n,h,t?2:1),E=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(o(m)){for(p=a(e.length);p>E;E++)if(y=t?d(u(v=e[E])[0],v[1]):d(e[E]),y===s||y===f)return y}else for(g=m.call(e);!(v=g.next()).done;)if(y=i(g,d,v.value,t),y===s||y===f)return y};t.BREAK=s,t.RETURN=f},TEka:function(e,t){var n=function(){return[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]},r={};r.shuyue=n(),r.shuyue[5][5]=1,r.shuyue.name="疏月",r.xiyue=n(),r.xiyue[5][6]=1,r.xiyue.name="溪月",r.hanyue=n(),r.hanyue[5][7]=1,r.hanyue.name="寒月",r.canyue=n(),r.canyue[6][5]=1,r.canyue.name="残月",r.huayue=n(),r.huayue[6][6]=1,r.huayue.name="花月",r.jinyue=n(),r.jinyue[7][5]=1,r.jinyue.name="金月",r.yuyue=n(),r.yuyue[7][6]=1,r.yuyue.name="雨月",r.xinyue=n(),r.xinyue[8][5]=1,r.xinyue.name="新月",r.qiuyue=n(),r.qiuyue[8][6]=1,r.qiuyue.name="丘月",r.songyue=n(),r.songyue[8][7]=1,r.songyue.name="松月",r.youyue=n(),r.youyue[9][5]=1,r.youyue.name="游月",r.shanyue=n(),r.shanyue[9][6]=1,r.shanyue.name="山月",r.ruiyue=n(),r.ruiyue[9][7]=1,r.ruiyue.name="瑞月",n=function(){return[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]},r.liuyue=n(),r.liuyue[5][5]=1,r.liuyue.name="流月",r.shuiyue=n(),r.shuiyue[5][6]=1,r.shuiyue.name="水月",r.hengyue=n(),r.hengyue[5][7]=1,r.hengyue.name="恒月",r.xiayue=n(),r.xiayue[5][8]=1,r.xiayue.name="峡月",r.changyue=n(),r.changyue[5][9]=1,r.changyue.name="长月",r.lanyue=n(),r.lanyue[6][5]=1,r.lanyue.name="岚月",r.puyue=n(),r.puyue[6][6]=1,r.puyue.name="浦月",r.yunyue=n(),r.yunyue[6][7]=1,r.yunyue.name="云月",r.mingyue=n(),r.mingyue[7][5]=1,r.mingyue.name="明月",r.yinyue=n(),r.yinyue[7][6]=1,r.yinyue.name="银月",r.ming2yue=n(),r.ming2yue[8][5]=1,r.ming2yue.name="名月",r.xieyue=n(),r.xieyue[8][6]=1,r.xieyue.name="斜月",r.huiyue=n(),r.huiyue[9][5]=1,r.huiyue.name="慧月",e.exports=r},VRzm:function(e,t,n){"use strict";var r,i,o,u,a=n("LQAc"),c=n("dyZX"),s=n("m0Pp"),f=n("I8a+"),h=n("XKFU"),l=n("0/R4"),p=n("2OiF"),v=n("9gX7"),g=n("SlkY"),y=n("69bn"),m=n("GZEu").set,d=n("gHnn")(),E=n("pbhE"),b=n("nICZ"),x=n("ol8x"),O=n("vKrd"),w="Promise",F=c.TypeError,_=c.process,R=_&&_.versions,S=R&&R.v8||"",T=c[w],M="process"==f(_),k=function(){},C=i=E.f,U=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n("K0xU")("species")]=function(e){e(k,k)};return(M||"function"==typeof PromiseRejectionEvent)&&e.then(k)instanceof t&&0!==S.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),L=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},D=function(e,t){if(!e._n){e._n=!0;var n=e._c;d(function(){var r=e._v,i=1==e._s,o=0,u=function(t){var n,o,u,a=i?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{a?(i||(2==e._h&&I(e),e._h=1),!0===a?n=r:(f&&f.enter(),n=a(r),f&&(f.exit(),u=!0)),n===t.promise?s(F("Promise-chain cycle")):(o=L(n))?o.call(n,c,s):c(n)):s(r)}catch(e){f&&!u&&f.exit(),s(e)}};while(n.length>o)u(n[o++]);e._c=[],e._n=!1,t&&!e._h&&j(e)})}},j=function(e){m.call(c,function(){var t,n,r,i=e._v,o=K(e);if(o&&(t=b(function(){M?_.emit("unhandledRejection",i,e):(n=c.onunhandledrejection)?n({promise:e,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=M||K(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},K=function(e){return 1!==e._h&&0===(e._a||e._c).length},I=function(e){m.call(c,function(){var t;M?_.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})})},H=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw F("Promise can't be resolved itself");(t=L(e))?d(function(){var r={_w:n,_d:!1};try{t.call(e,s(B,r,1),s(H,r,1))}catch(e){H.call(r,e)}}):(n._v=e,n._s=1,D(n,!1))}catch(e){H.call({_w:n,_d:!1},e)}}};U||(T=function(e){v(this,T,w,"_h"),p(e),r.call(this);try{e(s(B,this,1),s(H,this,1))}catch(e){H.call(this,e)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("3Lyj")(T.prototype,{then:function(e,t){var n=C(y(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=M?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(B,e,1),this.reject=s(H,e,1)},E.f=C=function(e){return e===T||e===u?new o(e):i(e)}),h(h.G+h.W+h.F*!U,{Promise:T}),n("fyDq")(T,w),n("elZq")(w),u=n("g3g5")[w],h(h.S+h.F*!U,w,{reject:function(e){var t=C(this),n=t.reject;return n(e),t.promise}}),h(h.S+h.F*(a||!U),w,{resolve:function(e){return O(a&&this===u?T:this,e)}}),h(h.S+h.F*!(U&&n("XMVh")(function(e){T.all(e)["catch"](k)})),w,{all:function(e){var t=this,n=C(t),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,u=1;g(e,!1,function(e){var a=o++,c=!1;n.push(void 0),u++,t.resolve(e).then(function(e){c||(c=!0,n[a]=e,--u||r(n))},i)}),--u||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=C(t),r=n.reject,i=b(function(){g(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},VTer:function(e,t,n){var r=n("g3g5"),i=n("dyZX"),o="__core-js_shared__",u=i[o]||(i[o]={});(e.exports=function(e,t){return u[e]||(u[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},Vd3H:function(e,t,n){"use strict";var r=n("XKFU"),i=n("2OiF"),o=n("S/j/"),u=n("eeVq"),a=[].sort,c=[1,2,3];r(r.P+r.F*(u(function(){c.sort(void 0)})||!u(function(){c.sort(null)})||!n("LyE8")(a)),"Array",{sort:function(e){return void 0===e?a.call(o(this)):a.call(o(this),i(e))}})},WFtS:function(e,t,n){"use strict";t["a"]={ONE:10,TWO:100,THREE:1e3,FOUR:1e5,FIVE:1e7,BLOCKED_ONE:1,BLOCKED_TWO:10,BLOCKED_THREE:100,BLOCKED_FOUR:1e4}},XKFU:function(e,t,n){var r=n("dyZX"),i=n("g3g5"),o=n("Mukb"),u=n("KroJ"),a=n("m0Pp"),c="prototype",s=function(e,t,n){var f,h,l,p,v=e&s.F,g=e&s.G,y=e&s.S,m=e&s.P,d=e&s.B,E=g?r:y?r[t]||(r[t]={}):(r[t]||{})[c],b=g?i:i[t]||(i[t]={}),x=b[c]||(b[c]={});for(f in g&&(n=t),n)h=!v&&E&&void 0!==E[f],l=(h?E:n)[f],p=d&&h?a(l,r):m&&"function"==typeof l?a(Function.call,l):l,E&&u(E,f,l,e&s.U),b[f]!=l&&o(b,f,p),m&&x[f]!=l&&(x[f]=l)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},XMVh:function(e,t,n){var r=n("K0xU")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:n=!0}},o[r]=function(){return u},e(o)}catch(e){}return n}},XaMy:function(e,t,n){"use strict";t["a"]={com:1,hum:2,empty:0,reverse:function(e){return 1==e?2:1}}},a1Th:function(e,t,n){"use strict";n("OEbY");var r=n("y3w9"),i=n("C/va"),o=n("nh4g"),u="toString",a=/./[u],c=function(e){n("KroJ")(RegExp.prototype,u,e,!0)};n("eeVq")(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?c(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):a.name!=u&&c(function(){return a.call(this)})},aagx:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},apmT:function(e,t,n){var r=n("0/R4");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},dyZX:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},eeVq:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},elZq:function(e,t,n){"use strict";var r=n("dyZX"),i=n("hswa"),o=n("nh4g"),u=n("K0xU")("species");e.exports=function(e){var t=r[e];o&&t&&!t[u]&&i.f(t,u,{configurable:!0,get:function(){return this}})}},"f3/d":function(e,t,n){var r=n("hswa").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,u="name";u in i||n("nh4g")&&r(i,u,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},fni7:function(e,t,n){var r;(function(i){"use strict";var o="function"!==typeof Math.imul||-5!==Math.imul(4294967295,5)?function(e,t){var n=e>>>16&65535,r=65535&e,i=t>>>16&65535,o=65535&t;return r*o+(n*o+r*i<<16>>>0)|0}:Math.imul,u="function"===typeof String.prototype.repeat&&"xxx"==="x".repeat(3)?function(e,t){return e.repeat(t)}:function(e,t){var n="";while(t>0)1&t&&(n+=e),t>>=1,e+=e;return n};function a(e){if(!(this instanceof a))return new a(e);if(null==e)e=a.engines.nativeMath;else if("function"!==typeof e)throw new TypeError("Expected engine to be a function, got "+typeof e);this.engine=e}var c=a.prototype;function s(e){return function(){return e}}function f(e,t){return 0===t?e:function(n){return e(n)+t}}function h(e){var t=+e;return t<0?Math.ceil(t):Math.floor(t)}function l(e,t){return e<0?Math.max(e+t,0):Math.min(e,t)}function p(){}a.engines={nativeMath:function(){return 4294967296*Math.random()|0},mt19937:function(e){function t(e){for(var t=0,n=0;(0|t)<227;t=t+1|0)n=2147483648&e[t]|2147483647&e[t+1|0],e[t]=e[t+397|0]^n>>>1^(1&n?2567483615:0);for(;(0|t)<623;t=t+1|0)n=2147483648&e[t]|2147483647&e[t+1|0],e[t]=e[t-227|0]^n>>>1^(1&n?2567483615:0);n=2147483648&e[623]|2147483647&e[0],e[623]=e[396]^n>>>1^(1&n?2567483615:0)}function n(e){return e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^e>>>18}function r(e,t){for(var n=1,r=0,i=t.length,u=0|Math.max(i,624),a=0|e[0];(0|u)>0;--u)e[n]=a=(e[n]^o(a^a>>>30,1664525))+(0|t[r])+(0|r)|0,n=n+1|0,++r,(0|n)>623&&(e[0]=e[623],n=1),r>=i&&(r=0);for(u=623;(0|u)>0;--u)e[n]=a=(e[n]^o(a^a>>>30,1566083941))-n|0,n=n+1|0,(0|n)>623&&(e[0]=e[623],n=1);e[0]=2147483648}function i(){var i=new e(624),u=0,c=0;function s(){(0|u)>=624&&(t(i),u=0);var e=i[u];return u=u+1|0,c+=1,0|n(e)}return s.getUseCount=function(){return c},s.discard=function(e){c+=e,(0|u)>=624&&(t(i),u=0);while(e-u>624)e-=624-u,t(i),u=0;return u=u+e|0,s},s.seed=function(e){var t=0;i[0]=t=0|e;for(var n=1;n<624;n=n+1|0)i[n]=t=o(t^t>>>30,1812433253)+n|0;return u=624,c=0,s},s.seedWithArray=function(e){return s.seed(19650218),r(i,e),s},s.autoSeed=function(){return s.seedWithArray(a.generateEntropyArray())},s}return i}("function"===typeof Int32Array?Int32Array:Array),browserCrypto:"undefined"!==typeof crypto&&"function"===typeof crypto.getRandomValues&&"function"===typeof Int32Array?function(){var e=null,t=128;return function(){return t>=128&&(null===e&&(e=new Int32Array(128)),crypto.getRandomValues(e),t=0),0|e[t++]}}():null},a.generateEntropyArray=function(){for(var e=[],t=a.engines.nativeMath,n=0;n<16;++n)e[n]=0|t();return e.push(0|(new Date).getTime()),e},a.int32=function(e){return 0|e()},c.int32=function(){return a.int32(this.engine)},a.uint32=function(e){return e()>>>0},c.uint32=function(){return a.uint32(this.engine)},a.uint53=function(e){var t=2097151&e(),n=e()>>>0;return 4294967296*t+n},c.uint53=function(){return a.uint53(this.engine)},a.uint53Full=function(e){while(1){var t=0|e();if(!(2097152&t)){var n=e()>>>0;return 4294967296*(2097151&t)+n}if(2097152===(4194303&t)&&0===(0|e()))return 9007199254740992}},c.uint53Full=function(){return a.uint53Full(this.engine)},a.int53=function(e){var t=0|e(),n=e()>>>0;return 4294967296*(2097151&t)+n+(2097152&t?-9007199254740992:0)},c.int53=function(){return a.int53(this.engine)},a.int53Full=function(e){while(1){var t=0|e();if(!(4194304&t)){var n=e()>>>0;return 4294967296*(2097151&t)+n+(2097152&t?-9007199254740992:0)}if(4194304===(8388607&t)&&0===(0|e()))return 9007199254740992}},c.int53Full=function(){return a.int53Full(this.engine)},a.integer=function(){function e(e){return 0===(e+1&e)}function t(e){return function(t){return t()&e}}function n(e){var t=e+1,n=t*Math.floor(4294967296/t);return function(e){var r=0;do{r=e()>>>0}while(r>=n);return r%t}}function r(r){return e(r)?t(r):n(r)}function i(e){return 0===(0|e)}function o(e){return function(t){var n=t()&e,r=t()>>>0;return 4294967296*n+r}}function u(e){var t=e*Math.floor(9007199254740992/e);return function(n){var r=0;do{var i=2097151&n(),o=n()>>>0;r=4294967296*i+o}while(r>=t);return r%e}}function c(t){var n=t+1;if(i(n)){var r=(n/4294967296|0)-1;if(e(r))return o(r)}return u(n)}function h(e,t){return function(n){var r=0;do{var i=0|n(),o=n()>>>0;r=4294967296*(2097151&i)+o+(2097152&i?-9007199254740992:0)}while(r<e||r>t);return r}}return function(e,t){if(e=Math.floor(e),t=Math.floor(t),e<-9007199254740992||!isFinite(e))throw new RangeError("Expected min to be at least -9007199254740992");if(t>9007199254740992||!isFinite(t))throw new RangeError("Expected max to be at most 9007199254740992");var n=t-e;return n<=0||!isFinite(n)?s(e):4294967295===n?0===e?a.uint32:f(a.int32,e+2147483648):n<4294967295?f(r(n),e):9007199254740991===n?f(a.uint53,e):n<9007199254740991?f(c(n),e):t-1-e===9007199254740991?f(a.uint53Full,e):-9007199254740992===e&&9007199254740992===t?a.int53Full:-9007199254740992===e&&9007199254740991===t?a.int53:-9007199254740991===e&&9007199254740992===t?f(a.int53,1):9007199254740992===t?f(h(e-1,t-1),1):h(e,t)}}(),c.integer=function(e,t){return a.integer(e,t)(this.engine)},a.realZeroToOneInclusive=function(e){return a.uint53Full(e)/9007199254740992},c.realZeroToOneInclusive=function(){return a.realZeroToOneInclusive(this.engine)},a.realZeroToOneExclusive=function(e){return a.uint53(e)/9007199254740992},c.realZeroToOneExclusive=function(){return a.realZeroToOneExclusive(this.engine)},a.real=function(){function e(e,t){return 1===t?e:0===t?function(){return 0}:function(n){return e(n)*t}}return function(t,n,r){if(!isFinite(t))throw new RangeError("Expected left to be a finite number");if(!isFinite(n))throw new RangeError("Expected right to be a finite number");return f(e(r?a.realZeroToOneInclusive:a.realZeroToOneExclusive,n-t),t)}}(),c.real=function(e,t,n){return a.real(e,t,n)(this.engine)},a.bool=function(){function e(e){return 1===(1&e())}function t(e,t){return function(n){return e(n)<t}}function n(e){if(e<=0)return s(!1);if(e>=1)return s(!0);var n=4294967296*e;return n%1===0?t(a.int32,n-2147483648|0):t(a.uint53,Math.round(9007199254740992*e))}return function(r,i){return null==i?null==r?e:n(r):r<=0?s(!1):r>=i?s(!0):t(a.integer(0,i-1),r)}}(),c.bool=function(e,t){return a.bool(e,t)(this.engine)},a.pick=function(e,t,n,r){var i=t.length,o=null==n?0:l(h(n),i),u=void 0===r?i:l(h(r),i);if(!(o>=u)){var c=a.integer(o,u-1);return t[c(e)]}},c.pick=function(e,t,n){return a.pick(this.engine,e,t,n)};var v=Array.prototype.slice;a.picker=function(e,t,n){var r=v.call(e,t,n);if(!r.length)return p;var i=a.integer(0,r.length-1);return function(e){return r[i(e)]}},a.shuffle=function(e,t,n){var r=t.length;if(r){null==n&&(n=0);for(var i=r-1>>>0;i>n;--i){var o=a.integer(0,i),u=o(e);if(i!==u){var c=t[i];t[i]=t[u],t[u]=c}}}return t},c.shuffle=function(e){return a.shuffle(this.engine,e)},a.sample=function(e,t,n){if(n<0||n>t.length||!isFinite(n))throw new RangeError("Expected sampleSize to be within 0 and the length of the population");if(0===n)return[];var r=v.call(t),i=r.length;if(i===n)return a.shuffle(e,r,0);var o=i-n;return a.shuffle(e,r,o-1).slice(o)},c.sample=function(e,t){return a.sample(this.engine,e,t)},a.die=function(e){return a.integer(1,e)},c.die=function(e){return a.die(e)(this.engine)},a.dice=function(e,t){var n=a.die(e);return function(e){var r=[];r.length=t;for(var i=0;i<t;++i)r[i]=n(e);return r}},c.dice=function(e,t){return a.dice(e,t)(this.engine)},a.uuid4=function(){function e(e,t){return u("0",t-e.length)+e}return function(t){var n=t()>>>0,r=0|t(),i=0|t(),o=t()>>>0;return e(n.toString(16),8)+"-"+e((65535&r).toString(16),4)+"-"+e((r>>4&4095|16384).toString(16),4)+"-"+e((16383&i|32768).toString(16),4)+"-"+e((i>>4&65535).toString(16),4)+e(o.toString(16),8)}}(),c.uuid4=function(){return a.uuid4(this.engine)},a.string=function(){var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-";return function(t){null==t&&(t=e);var n=t.length;if(!n)throw new Error("Expected pool not to be an empty string");var r=a.integer(0,n-1);return function(e,n){for(var i="",o=0;o<n;++o){var u=r(e);i+=t.charAt(u)}return i}}}(),c.string=function(e,t){return a.string(t)(this.engine,e)},a.hex=function(){var e="0123456789abcdef",t=a.string(e),n=a.string(e.toUpperCase());return function(e){return e?n:t}}(),c.hex=function(e,t){return a.hex(t)(this.engine,e)},a.date=function(e,t){if(!(e instanceof Date))throw new TypeError("Expected start to be a Date, got "+typeof e);if(!(t instanceof Date))throw new TypeError("Expected end to be a Date, got "+typeof t);var n=a.integer(e.getTime(),t.getTime());return function(e){return new Date(n(e))}},c.date=function(e,t){return a.date(e,t)(this.engine)},r=function(){return a}.call(t,n,t,e),void 0===r||(e.exports=r)})()},fyDq:function(e,t,n){var r=n("hswa").f,i=n("aagx"),o=n("K0xU")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},g3g5:function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},gHnn:function(e,t,n){var r=n("dyZX"),i=n("GZEu").set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,a=r.Promise,c="process"==n("LZWt")(u);e.exports=function(){var e,t,n,s=function(){var r,i;c&&(r=u.domain)&&r.exit();while(e){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){u.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);n=function(){f.then(s)}}else n=function(){i.call(r,s)};else{var h=!0,l=document.createTextNode("");new o(s).observe(l,{characterData:!0}),n=function(){l.data=h=!h}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},hPIQ:function(e,t){e.exports={}},hswa:function(e,t,n){var r=n("y3w9"),i=n("xpql"),o=n("apmT"),u=Object.defineProperty;t.f=n("nh4g")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},m0Pp:function(e,t,n){var r=n("2OiF");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},nICZ:function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},ne8i:function(e,t,n){var r=n("RYi7"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},nh4g:function(e,t,n){e.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},ol8x:function(e,t,n){var r=n("dyZX"),i=r.navigator;e.exports=i&&i.userAgent||""},pbhE:function(e,t,n){"use strict";var r=n("2OiF");function i(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},vKrd:function(e,t,n){var r=n("y3w9"),i=n("0/R4"),o=n("pbhE");e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e),u=n.resolve;return u(t),n.promise}},vhPU:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},xpql:function(e,t,n){e.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(e,t,n){var r=n("0/R4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ylqs:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}}});