draught/10.bootstrap.js

2 lines
18 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkdraught=self.webpackChunkdraught||[]).push([[10],{171:(t,e,r)=>{r.a(t,(async(n,_)=>{try{r.d(e,{C4:()=>V,Ck:()=>q,DA:()=>G,EF:()=>Tt,HS:()=>Q,Ih:()=>W,In:()=>ot,Ip:()=>xt,KK:()=>pt,KQ:()=>yt,M9:()=>it,OF:()=>wt,Oo:()=>It,Or:()=>Nt,Os:()=>P,SZ:()=>S,T8:()=>_t,TL:()=>ft,Tt:()=>N,U5:()=>$,U7:()=>at,Ws:()=>nt,XP:()=>Y,YN:()=>Ot,_3:()=>ht,ae:()=>z,bx:()=>bt,cb:()=>kt,fO:()=>X,fY:()=>jt,fi:()=>gt,gk:()=>K,h4:()=>H,hx:()=>ut,i0:()=>j,iY:()=>F,k4:()=>dt,kq:()=>et,lA:()=>A,mS:()=>L,m_:()=>St,nf:()=>rt,oH:()=>Bt,pt:()=>tt,pv:()=>ct,r2:()=>J,rC:()=>Et,rh:()=>U,u6:()=>st,ug:()=>M,vm:()=>vt,wc:()=>E,xB:()=>mt,yX:()=>Z,yq:()=>D,z2:()=>lt});var a=r(657);t=r.hmd(t);var c=n([a]);a=(c.then?(await c)():c)[0];const o=new Array(32).fill(void 0);function i(t){return o[t]}o.push(void 0,null,!0,!1);let s=o.length;function u(t){t<36||(o[t]=s,s=t)}function l(t){const e=i(t);return u(t),e}let p=new("undefined"==typeof TextDecoder?(0,t.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();let d=null;function b(){return null!==d&&d.buffer===a.memory.buffer||(d=new Uint8Array(a.memory.buffer)),d}function g(t,e){return p.decode(b().subarray(t,t+e))}function f(t){s===o.length&&o.push(o.length+1);const e=s;return s=o[e],o[e]=t,e}function h(t){const e=typeof t;if("number"==e||"boolean"==e||null==t)return`${t}`;if("string"==e)return`"${t}"`;if("symbol"==e){const e=t.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=t.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(t)){const e=t.length;let r="[";e>0&&(r+=h(t[0]));for(let n=1;n<e;n++)r+=", "+h(t[n]);return r+="]",r}const r=/\[object ([^\]]+)\]/.exec(toString.call(t));let n;if(!(r.length>1))return toString.call(t);if(n=r[1],"Object"==n)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?`${t.name}: ${t.message}\n${t.stack}`:n}let w=0,m=new("undefined"==typeof TextEncoder?(0,t.require)("util").TextEncoder:TextEncoder)("utf-8");const y="function"==typeof m.encodeInto?function(t,e){return m.encodeInto(t,e)}:function(t,e){const r=m.encode(t);return e.set(r),{read:t.length,written:r.length}};function v(t,e,r){if(void 0===r){const r=m.encode(t),n=e(r.length);return b().subarray(n,n+r.length).set(r),w=r.length,n}let n=t.length,_=e(n);const a=b();let c=0;for(;c<n;c++){const e=t.charCodeAt(c);if(e>127)break;a[_+c]=e}if(c!==n){0!==c&&(t=t.slice(c)),_=r(_,n,n=c+3*t.length);const e=b().subarray(_+c,_+n);c+=y(t,e).written}return w=c,_}let T=null;function k(){return null!==T&&T.buffer===a.memory.buffer||(T=new Int32Array(a.memory.buffer)),T}function x(t){return null==t}function I(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`);return t.ptr}function E(){a.init_wasm()}function O(t,e){try{return t.apply(this,e)}catch(t){a.__wbindgen_exn_store(f(t))}}Object.freeze({Move:0,0:"Move",Jump:1,1:"Jump"});const S=Object.freeze({Black:0,0:"Black",White:1,1:"White"}),j=(Object.freeze({Man:0,0:"Man",King:1,1:"King"}),Object.freeze({Empty:0,0:"Empty",Occupied:1,1:"Occupied",Unplayable:2,2:"Unplayable"})),N=Object.freeze({Allowed:0,0:"Allowed",UnoccupiedSrc:1,1:"UnoccupiedSrc",OccupiedDest:2,2:"OccupiedDest",OutOfBounds:3,3:"OutOfBounds",Unplayable:4,4:"Unplayable",WrongTeamSrc:5,5:"WrongTeamSrc",IllegalTrajectory:6,6:"IllegalTrajectory",NoJumpablePiece:7,7:"NoJumpablePiece",JumpingSameTeam:8,8:"JumpingSameTeam"});class B{static __wrap(t){const e=Object.create(B.prototype);return e.ptr=t,e}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();a.__wbg_board_free(t)}get width(){return a.__wbg_get_board_width(this.ptr)>>>0}set width(t){a.__wbg_set_board_width(this.ptr,t)}get height(){return a.__wbg_get_board_height(this.ptr)>>>0}set height(t){a.__wbg_set_board_height(this.ptr,t)}get current_turn(){return a.__wbg_get_board_current_turn(this.ptr)>>>0}set current_turn(t){a.__wbg_set_board_current_turn(this.ptr,t)}cell(t){const e=a.board_cell(this.ptr,t);return R.__wrap(e)}set_cell(t,e){I(e,R);var r=e.ptr;e
//# sourceMappingURL=10.bootstrap.js.map