mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-29 04:58:08 +00:00
23 lines
204 KiB
JavaScript
23 lines
204 KiB
JavaScript
"use strict";
|
|
(function() {
|
|
|
|
var $goVersion = "go1.18.6";
|
|
Error.stackTraceLimit=1/0;var $global,$module,$NaN=NaN;if("undefined"!=typeof window?$global=window:"undefined"!=typeof self?$global=self:"undefined"!=typeof global?($global=global).require=require:$global=this,void 0===$global||void 0===$global.Array)throw new Error("no global object found");if("undefined"!=typeof module&&($module=module),!$global.fs&&$global.require)try{var fs=$global.require("fs");"object"==typeof fs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){var outputBuf="",decoder=new TextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){var r=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var $throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){return e?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){return e.apply(n,r)},$makeFunc=function(e){return function(){return $externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void 0!==$global.process&&$global.require)try{var util=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var $println=console.log,$initAllLinknames=function(){for(var e=$keys($packages),n=0;n<e.length;n++){var r=$packages[e[n]].$initLinknames;"function"==typeof r&&r()}},$mapArray=function(e,n){for(var r=new e.constructor(e.length),t=0;t<e.length;t++)r[t]=n(e[t]);return r},$methodVal=function(e,n){var r=e.$methodVals||{};e.$methodVals=r;var t=r[n];return void 0!==t?t:(t=e[n].bind(e),r[n]=t,t)},$methodExpr=function(e,n){var r=e.prototype[n];return void 0===r.$expr&&(r.$expr=function(){$stackDepthOffset--;try{return e.wrapped&&(arguments[0]=new e(arguments[0])),Function.call.apply(r,arguments)}finally{$stackDepthOffset++}}),r.$expr},$ifaceMethodExprs={},$ifaceMethodExpr=function(e){var n=$ifaceMethodExprs["$"+e];return void 0===n&&(n=$ifaceMethodExprs["$"+e]=function(){$stackDepthOffset--;try{return Function.call.apply(arguments[0][e],arguments)}finally{$stackDepthOffset++}}),n},$subslice=function(e,n,r,t){if(void 0===r&&(r=e.$length),void 0===t&&(t=e.$capacity),(n<0||r<n||t<r||r>e.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)return e;var i=new e.constructor(e.$array);return i.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||r<n||r>e.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){return e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){var r=n.elem;return void 0!==r&&e.$length<r.len&&$throwRuntimeError("cannot convert slice with length "+e.$length+" to pointer to array with length "+r.len),e==e.constructor.nil?n.nil:e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+r.len):0==e.$offset&&e.$length==e.$capacity&&e.$length==r.len?e.$array:0==r.len?new r([]):void $throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices")},$convertSliceType=function(e,n){return e==e.constructor.nil?n.nil:$subslice(new n(e.$array),e.$offset,e.$offset+e.$length)},$decodeRune=function(e,n){var r=e.charCodeAt(n);if(r<128)return[r,1];if(r!=r||r<192)return[65533,1];var t=e.charCodeAt(n+1);if(t!=t||t<128||192<=t)return[65533,1];if(r<224)return(a=(31&r)<<6|63&t)<=127?[65533,1]:[a,2];var i=e.charCodeAt(n+2);if(i!=i||i<128||192<=i)return[65533,1];if(r<240)return(a=(15&r)<<12|(63&t)<<6|63&i)<=2047?[65533,1]:55296<=a&&a<=57343?[65533,1]:[a,3];var a,o=e.charCodeAt(n+3);return o!=o||o<128||192<=o?[65533,1]:r<248?(a=(7&r)<<18|(63&t)<<12|(63&i)<<6|63&o)<=65535||1114111<a?[65533,1]:[a,4]:[65533,1]},$encodeRune=function(e){return(e<0||e>1114111||55296<=e&&e<=57343)&&(e=65533),e<=127?String.fromCharCode(e):e<=2047?String.fromCharCode(192|e>>6,128|63&e):e<=65535?String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e):String.fromCharCode(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)},$stringToBytes=function(e){for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},$bytesToString=function(e){if(0===e.$length)return"";for(var n="",r=0;r<e.$length;r+=1e4)n+=String.fromCharCode.apply(void 0,e.$array.subarray(e.$offset+r,e.$offset+Math.min(e.$length,r+1e4)));return n},$stringToRunes=function(e){for(var n,r=new Int32Array(e.length),t=0,i=0;i<e.length;i+=n[1],t++)n=$decodeRune(e,i),r[t]=n[0];return r.subarray(0,t)},$runesToString=function(e){if(0===e.$length)return"";for(var n="",r=0;r<e.$length;r++)n+=$encodeRune(e.$array[e.$offset+r]);return n},$copyString=function(e,n){for(var r=Math.min(n.length,e.$length),t=0;t<r;t++)e.$array[e.$offset+t]=n.charCodeAt(t);return r},$copySlice=function(e,n){var r=Math.min(n.$length,e.$length);return $copyArray(e.$array,n.$array,e.$offset,n.$offset,r,e.constructor.elem),r},$copyArray=function(e,n,r,t,i,a){if(0!==i&&(e!==n||r!==t))if(n.subarray)e.set(n.subarray(t,t+i),r);else{switch(a.kind){case $kindArray:case $kindStruct:if(e===n&&r>t){for(var o=i-1;o>=0;o--)a.copy(e[r+o],n[t+o]);return}for(o=0;o<i;o++)a.copy(e[r+o],n[t+o]);return}if(e===n&&r>t)for(o=i-1;o>=0;o--)e[r+o]=n[t+o];else for(o=0;o<i;o++)e[r+o]=n[t+o]}},$clone=function(e,n){var r=n.zero();return n.copy(r,e),r},$pointerOfStructConversion=function(e,n){void 0===e.$proxies&&(e.$proxies={},e.$proxies[e.constructor.string]=e);var r=e.$proxies[n.string];if(void 0===r){for(var t={},i=0;i<n.elem.fields.length;i++)!function(n){t[n]={get:function(){return e[n]},set:function(r){e[n]=r}}}(n.elem.fields[i].prop);(r=Object.create(n.prototype,t)).$val=r,e.$proxies[n.string]=r,r.$proxies=e.$proxies}return r},$append=function(e){return $internalAppend(e,arguments,1,arguments.length-1)},$appendSlice=function(e,n){if(n.constructor===String){var r=$stringToBytes(n);return $internalAppend(e,r,0,r.length)}return $internalAppend(e,n.$array,n.$offset,n.$length)},$internalAppend=function(e,n,r,t){if(0===t)return e;var i=e.$array,a=e.$offset,o=e.$length+t,c=e.$capacity;if(o>c)if(a=0,c=Math.max(o,e.$capacity<1024?2*e.$capacity:Math.floor(5*e.$capacity/4)),e.$array.constructor===Array){(i=e.$array.slice(e.$offset,e.$offset+e.$length)).length=c;for(var $=e.constructor.elem.zero,u=e.$length;u<c;u++)i[u]=$()}else(i=new e.$array.constructor(c)).set(e.$array.subarray(e.$offset,e.$offset+e.$length));$copyArray(i,n,a+e.$length,r,t,e.constructor.elem);var l=new e.constructor(i);return l.$offset=a,l.$length=o,l.$capacity=c,l},$equal=function(e,n,r){if(r===$jsObjectPtr)return e===n;switch(r.kind){case $kindComplex64:case $kindComplex128:return e.$real===n.$real&&e.$imag===n.$imag;case $kindInt64:case $kindUint64:return e.$high===n.$high&&e.$low===n.$low;case $kindArray:if(e.length!==n.length)return!1;for(var t=0;t<e.length;t++)if(!$equal(e[t],n[t],r.elem))return!1;return!0;case $kindStruct:for(t=0;t<r.fields.length;t++){var i=r.fields[t];if(!$equal(e[i.prop],n[i.prop],i.typ))return!1}return!0;case $kindInterface:return $interfaceIsEqual(e,n);default:return e===n}},$interfaceIsEqual=function(e,n){return e===$ifaceNil||n===$ifaceNil?e===n:e.constructor===n.constructor&&(e.constructor===$jsObjectPtr?e.object===n.object:(e.constructor.comparable||$throwRuntimeError("comparing uncomparable type "+e.constructor.string),$equal(e.$val,n.$val,e.constructor)))},$min=Math.min,$mod=function(e,n){return e%n},$parseInt=parseInt,$parseFloat=function(e){return void 0!==e&&null!==e&&e.constructor===Number?e:parseFloat(e)},$froundBuf=new Float32Array(1),$fround=Math.fround||function(e){return $froundBuf[0]=e,$froundBuf[0]},$imul=Math.imul||function(e,n){var r=65535&e,t=65535&n;return r*t+((e>>>16&65535)*t+r*(n>>>16&65535)<<16>>>0)>>0},$floatKey=function(e){return e!=e?"NaN$"+ ++$idCounter:String(e)},$flatten64=function(e){return 4294967296*e.$high+e.$low},$shiftLeft64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high<<n|e.$low>>>32-n,e.$low<<n>>>0):n<64?new e.constructor(e.$low<<n-32,0):new e.constructor(0,0)},$shiftRightInt64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(e.$high>>31,e.$high>>n-32>>>0):e.$high<0?new e.constructor(-1,4294967295):new e.constructor(0,0)},$shiftRightUint64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(0,e.$high>>>n-32):new e.constructor(0,0)},$mul64=function(e,n){var r=e.$high>>>16,t=65535&e.$high,i=e.$low>>>16,a=65535&e.$low,o=n.$high>>>16,c=65535&n.$high,$=n.$low>>>16,u=65535&n.$low,l=0,s=0,f=0,d=0;f+=(d+=a*u)>>>16,s+=(f+=i*u)>>>16,f&=65535,s+=(f+=a*$)>>>16,l+=(s+=t*u)>>>16,s&=65535,l+=(s+=i*$)>>>16,s&=65535,l+=(s+=a*c)>>>16,l+=r*u+t*$+i*c+a*o;var p=((l&=65535)<<16|(s&=65535))>>>0,h=((f&=65535)<<16|(d&=65535))>>>0;return new e.constructor(p,h)},$div64=function(e,n,r){0===n.$high&&0===n.$low&&$throwRuntimeError("integer divide by zero");var t=1,i=1,a=e.$high,o=e.$low;a<0&&(t=-1,i=-1,a=-a,0!==o&&(a--,o=4294967296-o));var c=n.$high,$=n.$low;n.$high<0&&(t*=-1,c=-c,0!==$&&(c--,$=4294967296-$));for(var u=0,l=0,s=0;c<2147483648&&(a>c||a===c&&o>$);)c=(c<<1|$>>>31)>>>0,$=$<<1>>>0,s++;for(var f=0;f<=s;f++)u=u<<1|l>>>31,l=l<<1>>>0,(a>c||a===c&&o>=$)&&(a-=c,(o-=$)<0&&(a--,o+=4294967296),4294967296===++l&&(u++,l=0)),$=($>>>1|c<<31)>>>0,c>>>=1;return r?new e.constructor(a*i,o*i):new e.constructor(u*t,l*t)},$divComplex=function(e,n){var r=e.$real===1/0||e.$real===-1/0||e.$imag===1/0||e.$imag===-1/0,t=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0,i=!r&&(e.$real!=e.$real||e.$imag!=e.$imag),a=!t&&(n.$real!=n.$real||n.$imag!=n.$imag);if(i||a)return new e.constructor(NaN,NaN);if(r&&!t)return new e.constructor(1/0,1/0);if(!r&&t)return new e.constructor(0,0);if(0===n.$real&&0===n.$imag)return 0===e.$real&&0===e.$imag?new e.constructor(NaN,NaN):new e.constructor(1/0,1/0);if(Math.abs(n.$real)<=Math.abs(n.$imag)){var o=n.$real/n.$imag,c=n.$real*o+n.$imag;return new e.constructor((e.$real*o+e.$imag)/c,(e.$imag*o-e.$real)/c)}o=n.$imag/n.$real,c=n.$imag*o+n.$real;return new e.constructor((e.$imag*o+e.$real)/c,(e.$imag-e.$real*o)/c)},$kindBool=1,$kindInt=2,$kindInt8=3,$kindInt16=4,$kindInt32=5,$kindInt64=6,$kindUint=7,$kindUint8=8,$kindUint16=9,$kindUint32=10,$kindUint64=11,$kindUintptr=12,$kindFloat32=13,$kindFloat64=14,$kindComplex64=15,$kindComplex128=16,$kindArray=17,$kindChan=18,$kindFunc=19,$kindInterface=20,$kindMap=21,$kindPtr=22,$kindSlice=23,$kindString=24,$kindStruct=25,$kindUnsafePointer=26,$methodSynthesizers=[],$addMethodSynthesizer=function(e){null!==$methodSynthesizers?$methodSynthesizers.push(e):e()},$synthesizeMethods=function(){$methodSynthesizers.forEach(function(e){e()}),$methodSynthesizers=null},$ifaceKeyFor=function(e){if(e===$ifaceNil)return"nil";var n=e.constructor;return n.string+"$"+n.keyFor(e.$val)},$identity=function(e){return e},$typeIDCounter=0,$idKey=function(e){return void 0===e.$id&&($idCounter++,e.$id=$idCounter),String(e.$id)},$arrayPtrCtor=function(){return function(e){this.$get=function(){return e},this.$set=function(e){typ.copy(this,e)},this.$val=e}},$newType=function(e,n,r,t,i,a,o){var c;switch(n){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$identity;break;case $kindString:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return"$"+e};break;case $kindFloat32:case $kindFloat64:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return $floatKey(e)};break;case $kindInt64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindUint64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindComplex64:(c=function(e,n){this.$real=$fround(e),this.$imag=$fround(n),this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindComplex128:(c=function(e,n){this.$real=e,this.$imag=n,this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindArray:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,"",!1,$arrayPtrCtor()),c.init=function(e,n){c.elem=e,c.len=n,c.comparable=e.comparable,c.keyFor=function(n){return Array.prototype.join.call($mapArray(n,function(n){return String(e.keyFor(n)).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}),"$")},c.copy=function(n,r){$copyArray(n,r,0,0,r.length,e)},c.ptr.init(c),Object.defineProperty(c.ptr.nil,"nilCheck",{get:$throwNilPointerError})};break;case $kindChan:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$idKey,c.init=function(e,n,r){c.elem=e,c.sendOnly=n,c.recvOnly=r};break;case $kindFunc:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n,r){c.params=e,c.results=n,c.variadic=r,c.comparable=!1};break;case $kindInterface:(c={implementedBy:{},missingMethodFor:{}}).keyFor=$ifaceKeyFor,c.init=function(e){c.methods=e,e.forEach(function(e){$ifaceNil[e.prop]=$throwNilPointerError})};break;case $kindMap:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n){c.key=e,c.elem=n,c.comparable=!1};break;case $kindPtr:(c=o||function(e,n,r){this.$get=e,this.$set=n,this.$target=r,this.$val=this}).keyFor=$idKey,c.init=function(e){c.elem=e,c.wrapped=e.kind===$kindArray,c.nil=new c($throwNilPointerError,$throwNilPointerError)};break;case $kindSlice:(c=function(e){e.constructor!==c.nativeArray&&(e=new c.nativeArray(e)),this.$array=e,this.$offset=0,this.$length=e.length,this.$capacity=e.length,this.$val=this}).init=function(e){c.elem=e,c.comparable=!1,c.nativeArray=$nativeArray(e.kind),c.nil=new c([])};break;case $kindStruct:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,i,a,o),c.ptr.elem=c,c.ptr.prototype.$get=function(){return this},c.ptr.prototype.$set=function(e){c.copy(this,e)},c.init=function(e,n){c.pkgPath=e,c.fields=n,n.forEach(function(e){e.typ.comparable||(c.comparable=!1)}),c.keyFor=function(e){var r=e.$val;return $mapArray(n,function(e){return String(e.typ.keyFor(r[e.prop])).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}).join("$")},c.copy=function(e,r){for(var t=0;t<n.length;t++){var i=n[t];switch(i.typ.kind){case $kindArray:case $kindStruct:i.typ.copy(e[i.prop],r[i.prop]);continue;default:e[i.prop]=r[i.prop];continue}}};var r={};n.forEach(function(e){r[e.prop]={get:$throwNilPointerError,set:$throwNilPointerError}}),c.ptr.nil=Object.create(o.prototype,r),c.ptr.nil.$val=c.ptr.nil,$addMethodSynthesizer(function(){var e=function(e,n,r){void 0===e.prototype[n.prop]&&(e.prototype[n.prop]=function(){var e=this.$val[r.prop];return r.typ===$jsObjectPtr&&(e=new $jsObjectPtr(e)),void 0===e.$val&&(e=new r.typ(e)),e[n.prop].apply(e,arguments)})};n.forEach(function(n){n.embedded&&($methodSet(n.typ).forEach(function(r){e(c,r,n),e(c.ptr,r,n)}),$methodSet($ptrType(n.typ)).forEach(function(r){e(c.ptr,r,n)}))})})};break;default:$panic(new $String("invalid kind: "+n))}switch(n){case $kindBool:case $kindMap:c.zero=function(){return!1};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:c.zero=function(){return 0};break;case $kindString:c.zero=function(){return""};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var $=new c(0,0);c.zero=function(){return $};break;case $kindPtr:case $kindSlice:c.zero=function(){return c.nil};break;case $kindChan:c.zero=function(){return $chanNil};break;case $kindFunc:c.zero=function(){return $throwNilPointerError};break;case $kindInterface:c.zero=function(){return $ifaceNil};break;case $kindArray:c.zero=function(){var e=$nativeArray(c.elem.kind);if(e!==Array)return new e(c.len);for(var n=new Array(c.len),r=0;r<c.len;r++)n[r]=c.elem.zero();return n};break;case $kindStruct:c.zero=function(){return new c.ptr};break;default:$panic(new $String("invalid kind: "+n))}return c.id=$typeIDCounter,$typeIDCounter++,c.size=e,c.kind=n,c.string=r,c.named=t,c.pkg=i,c.exported=a,c.methods=[],c.methodSetCache=null,c.comparable=!0,c},$methodSet=function(e){if(null!==e.methodSetCache)return e.methodSetCache;var n={},r=e.kind===$kindPtr;if(r&&e.elem.kind===$kindInterface)return e.methodSetCache=[],[];for(var t=[{typ:r?e.elem:e,indirect:r}],i={};t.length>0;){var a=[],o=[];t.forEach(function(e){if(!i[e.typ.string])switch(i[e.typ.string]=!0,e.typ.named&&(o=o.concat(e.typ.methods),e.indirect&&(o=o.concat($ptrType(e.typ).methods))),e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(n){if(n.embedded){var r=n.typ,t=r.kind===$kindPtr;a.push({typ:t?r.elem:r,indirect:e.indirect||t})}});break;case $kindInterface:o=o.concat(e.typ.methods)}}),o.forEach(function(e){void 0===n[e.name]&&(n[e.name]=e)}),t=a}return e.methodSetCache=[],Object.keys(n).sort().forEach(function(r){e.methodSetCache.push(n[r])}),e.methodSetCache},$Bool=$newType(1,$kindBool,"bool",!0,"",!1,null),$Int=$newType(4,$kindInt,"int",!0,"",!1,null),$Int8=$newType(1,$kindInt8,"int8",!0,"",!1,null),$Int16=$newType(2,$kindInt16,"int16",!0,"",!1,null),$Int32=$newType(4,$kindInt32,"int32",!0,"",!1,null),$Int64=$newType(8,$kindInt64,"int64",!0,"",!1,null),$Uint=$newType(4,$kindUint,"uint",!0,"",!1,null),$Uint8=$newType(1,$kindUint8,"uint8",!0,"",!1,null),$Uint16=$newType(2,$kindUint16,"uint16",!0,"",!1,null),$Uint32=$newType(4,$kindUint32,"uint32",!0,"",!1,null),$Uint64=$newType(8,$kindUint64,"uint64",!0,"",!1,null),$Uintptr=$newType(4,$kindUintptr,"uintptr",!0,"",!1,null),$Float32=$newType(4,$kindFloat32,"float32",!0,"",!1,null),$Float64=$newType(8,$kindFloat64,"float64",!0,"",!1,null),$Complex64=$newType(8,$kindComplex64,"complex64",!0,"",!1,null),$Complex128=$newType(16,$kindComplex128,"complex128",!0,"",!1,null),$String=$newType(8,$kindString,"string",!0,"",!1,null),$UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer",!0,"unsafe",!1,null),$nativeArray=function(e){switch(e){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array}},$toNativeArray=function(e,n){var r=$nativeArray(e);return r===Array?n:new r(n)},$arrayTypes={},$arrayType=function(e,n){var r=e.id+"$"+n,t=$arrayTypes[r];return void 0===t&&(t=$newType(12,$kindArray,"["+n+"]"+e.string,!1,"",!1,null),$arrayTypes[r]=t,t.init(e,n)),t},$chanType=function(e,n,r){var t=(r?"<-":"")+"chan"+(n?"<- ":" ");n||r||"<"!=e.string[0]?t+=e.string:t+="("+e.string+")";var i=n?"SendChan":r?"RecvChan":"Chan",a=e[i];return void 0===a&&(a=$newType(4,$kindChan,t,!1,"",!1,null),e[i]=a,a.init(e,n,r)),a},$Chan=function(e,n){(n<0||n>2147483647)&&$throwRuntimeError("makechan: size out of range"),this.$elem=e,this.$capacity=n,this.$buffer=[],this.$sendQueue=[],this.$recvQueue=[],this.$closed=!1},$chanNil=new $Chan(null,0);$chanNil.$sendQueue=$chanNil.$recvQueue={length:0,push:function(){},shift:function(){},indexOf:function(){return-1}};var $funcTypes={},$funcType=function(e,n,r){var t=$mapArray(e,function(e){return e.id}).join(",")+"$"+$mapArray(n,function(e){return e.id}).join(",")+"$"+r,i=$funcTypes[t];if(void 0===i){var a=$mapArray(e,function(e){return e.string});r&&(a[a.length-1]="..."+a[a.length-1].substr(2));var o="func("+a.join(", ")+")";1===n.length?o+=" "+n[0].string:n.length>1&&(o+=" ("+$mapArray(n,function(e){return e.string}).join(", ")+")"),i=$newType(4,$kindFunc,o,!1,"",!1,null),$funcTypes[t]=i,i.init(e,n,r)}return i},$interfaceTypes={},$interfaceType=function(e){var n=$mapArray(e,function(e){return e.pkg+","+e.name+","+e.typ.id}).join("$"),r=$interfaceTypes[n];if(void 0===r){var t="interface {}";0!==e.length&&(t="interface { "+$mapArray(e,function(e){return(""!==e.pkg?e.pkg+".":"")+e.name+e.typ.string.substr(4)}).join("; ")+" }"),r=$newType(8,$kindInterface,t,!1,"",!1,null),$interfaceTypes[n]=r,r.init(e)}return r},$emptyInterface=$interfaceType([]),$ifaceNil={},$error=$newType(8,$kindInterface,"error",!0,"",!1,null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],!1)}]);var $panicValue,$jsObjectPtr,$jsErrorPtr,$mapTypes={},$mapType=function(e,n){var r=e.id+"$"+n.id,t=$mapTypes[r];return void 0===t&&(t=$newType(4,$kindMap,"map["+e.string+"]"+n.string,!1,"",!1,null),$mapTypes[r]=t,t.init(e,n)),t},$makeMap=function(e,n){for(var r={},t=0;t<n.length;t++){var i=n[t];r[e(i.k)]=i}return r},$ptrType=function(e){var n=e.ptr;return void 0===n&&(n=$newType(4,$kindPtr,"*"+e.string,!1,"",e.exported,null),e.ptr=n,n.init(e)),n},$newDataPointer=function(e,n){return n.elem.kind===$kindStruct?e:new n(function(){return e},function(n){e=n})},$indexPtr=function(e,n,r){if(e.buffer){var t=e.buffer.$ptr=e.buffer.$ptr||{},i=t[e.name]=t[e.name]||{},a=e.BYTES_PER_ELEMENT*n+e.byteOffset;return i[a]||(i[a]=new r(function(){return e[n]},function(r){e[n]=r}))}return e.$ptr=e.$ptr||{},e.$ptr[n]||(e.$ptr[n]=new r(function(){return e[n]},function(r){e[n]=r}))},$sliceType=function(e){var n=e.slice;return void 0===n&&(n=$newType(12,$kindSlice,"[]"+e.string,!1,"",!1,null),e.slice=n,n.init(e)),n},$makeSlice=function(e,n,r){r=r||n,(n<0||n>2147483647)&&$throwRuntimeError("makeslice: len out of range"),(r<0||r<n||r>2147483647)&&$throwRuntimeError("makeslice: cap out of range");var t=new e.nativeArray(r);if(e.nativeArray===Array)for(var i=0;i<r;i++)t[i]=e.elem.zero();var a=new e(t);return a.$length=n,a},$structTypes={},$structType=function(e,n){var r=$mapArray(n,function(e){return e.name+","+e.typ.id+","+e.tag}).join("$"),t=$structTypes[r];if(void 0===t){var i="struct { "+$mapArray(n,function(e){var n=e.typ.string+(""!==e.tag?' "'+e.tag.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"':"");return e.embedded?n:e.name+" "+n}).join("; ")+" }";0===n.length&&(i="struct {}"),t=$newType(0,$kindStruct,i,!1,"",!1,function(){this.$val=this;for(var e=0;e<n.length;e++){var r=n[e];if("_"!=r.name){var t=arguments[e];this[r.prop]=void 0!==t?t:r.typ.zero()}}}),$structTypes[r]=t,t.init(e,n)}return t},$assertType=function(e,n,r){var t,i=n.kind===$kindInterface,a="";if(e===$ifaceNil)t=!1;else if(i){var o=e.constructor.string;if(void 0===(t=n.implementedBy[o])){t=!0;for(var c=$methodSet(e.constructor),$=n.methods,u=0;u<$.length;u++){for(var l=$[u],s=!1,f=0;f<c.length;f++){var d=c[f];if(d.name===l.name&&d.pkg===l.pkg&&d.typ===l.typ){s=!0;break}}if(!s){t=!1,n.missingMethodFor[o]=l.name;break}}n.implementedBy[o]=t}t||(a=n.missingMethodFor[o])}else t=e.constructor===n;if(!t){if(r)return[n.zero(),!1];$panic(new $packages.runtime.TypeAssertionError.ptr($packages.runtime._type.ptr.nil,e===$ifaceNil?$packages.runtime._type.ptr.nil:new $packages.runtime._type.ptr(e.constructor.string),new $packages.runtime._type.ptr(n.string),a))}return i||(e=e.$val),n===$jsObjectPtr&&(e=e.object),r?[e,!0]:e},$stackDepthOffset=0,$getStackDepth=function(){var e=new Error;if(void 0!==e.stack)return $stackDepthOffset+e.stack.split("\n").length},$panicStackDepth=null,$callDeferred=function(e,n,r){if(!r&&null!==e&&-1==$curGoroutine.deferStack.indexOf(e))throw n;if(null===n){if(!$curGoroutine.asleep){$stackDepthOffset--;var t=$panicStackDepth,i=$panicValue,a=$curGoroutine.panicStack.pop();void 0!==a&&($panicStackDepth=$getStackDepth(),$panicValue=a);try{for(;;){if(null===e&&void 0===(e=$curGoroutine.deferStack[$curGoroutine.deferStack.length-1])){if($panicStackDepth=null,a.Object instanceof Error)throw a.Object;var o;throw o=a.constructor===$String?a.$val:void 0!==a.Error?a.Error():void 0!==a.String?a.String():a,new Error(o)}var c=e.pop();if(void 0===c){if($curGoroutine.deferStack.pop(),void 0!==a){e=null;continue}return}var $=c[0].apply(c[2],c[1]);if($&&void 0!==$.$blk){if(e.push([$.$blk,[],$]),r)throw null;return}if(void 0!==a&&null===$panicStackDepth){if(r)throw null;return}}}catch(n){if(r)throw n;$callDeferred(e,n,r)}finally{void 0!==a&&(null!==$panicStackDepth&&$curGoroutine.panicStack.push(a),$panicStackDepth=t,$panicValue=i),$stackDepthOffset++}}}else{var u=null;try{$panic(new $jsErrorPtr(n))}catch(e){u=e}$callDeferred(e,u)}},$panic=function(e){$curGoroutine.panicStack.push(e),$callDeferred(null,null,!0)},$recover=function(){return null===$panicStackDepth||void 0!==$panicStackDepth&&$panicStackDepth!==$getStackDepth()-2?$ifaceNil:($panicStackDepth=null,$panicValue)},$throw=function(e){throw e},$noGoroutine={asleep:!1,exit:!1,deferStack:[],panicStack:[]},$curGoroutine=$noGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=!0,$exportedFunctions=0,$mainFinished=!1,$go=function(e,n){$totalGoroutines++,$awakeGoroutines++;var $goroutine=function(){try{$curGoroutine=$goroutine;var r=e.apply(void 0,n);if(r&&void 0!==r.$blk)return e=function(){return r.$blk()},void(n=[]);$goroutine.exit=!0}catch(e){if(!$goroutine.exit)throw e}finally{$curGoroutine=$noGoroutine,$goroutine.exit&&($totalGoroutines--,$goroutine.asleep=!0),$goroutine.asleep&&($awakeGoroutines--,!$mainFinished&&0===$awakeGoroutines&&$checkForDeadlock&&0===$exportedFunctions&&(console.error("fatal error: all goroutines are asleep - deadlock!"),void 0!==$global.process&&$global.process.exit(2)))}};$goroutine.asleep=!1,$goroutine.exit=!1,$goroutine.deferStack=[],$goroutine.panicStack=[],$schedule($goroutine)},$scheduled=[],$runScheduled=function(){var e=setTimeout($runScheduled);try{for(var n,r=Date.now();void 0!==(n=$scheduled.shift());){n();var t=Date.now()-r;if(t>4||t<0)break}}finally{0==$scheduled.length&&clearTimeout(e)}},$schedule=function(e){e.asleep&&(e.asleep=!1,$awakeGoroutines++),$scheduled.push(e),$curGoroutine===$noGoroutine&&$runScheduled()},$setTimeout=function(e,n){return $awakeGoroutines++,setTimeout(function(){$awakeGoroutines--,e()},n)},$block=function(){$curGoroutine===$noGoroutine&&$throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"),$curGoroutine.asleep=!0},$restore=function(e,n){return void 0!==e&&void 0!==e.$blk?e:n},$send=function(e,n){e.$closed&&$throwRuntimeError("send on closed channel");var r=e.$recvQueue.shift();if(void 0===r){if(!(e.$buffer.length<e.$capacity)){var t,i=$curGoroutine;return e.$sendQueue.push(function(e){return t=e,$schedule(i),n}),$block(),{$blk:function(){t&&$throwRuntimeError("send on closed channel")}}}e.$buffer.push(n)}else r([n,!0])},$recv=function(e){var n=e.$sendQueue.shift();void 0!==n&&e.$buffer.push(n(!1));var r=e.$buffer.shift();if(void 0!==r)return[r,!0];if(e.$closed)return[e.$elem.zero(),!1];var t=$curGoroutine,i={$blk:function(){return this.value}};return e.$recvQueue.push(function(e){i.value=e,$schedule(t)}),$block(),i},$close=function(e){for(e.$closed&&$throwRuntimeError("close of closed channel"),e.$closed=!0;;){var n=e.$sendQueue.shift();if(void 0===n)break;n(!0)}for(;;){var r=e.$recvQueue.shift();if(void 0===r)break;r([e.$elem.zero(),!1])}},$select=function(e){for(var n=[],r=-1,t=0;t<e.length;t++){var i,a=(i=e[t])[0];switch(i.length){case 0:r=t;break;case 1:(0!==a.$sendQueue.length||0!==a.$buffer.length||a.$closed)&&n.push(t);break;case 2:a.$closed&&$throwRuntimeError("send on closed channel"),(0!==a.$recvQueue.length||a.$buffer.length<a.$capacity)&&n.push(t)}}if(0!==n.length&&(r=n[Math.floor(Math.random()*n.length)]),-1!==r)switch((i=e[r]).length){case 0:return[r];case 1:return[r,$recv(i[0])];case 2:return $send(i[0],i[1]),[r]}var o=[],c=$curGoroutine,$={$blk:function(){return this.selection}},u=function(){for(var e=0;e<o.length;e++){var n=o[e],r=n[0],t=r.indexOf(n[1]);-1!==t&&r.splice(t,1)}};for(t=0;t<e.length;t++)!function(n){var r=e[n];switch(r.length){case 1:var t=function(e){$.selection=[n,e],u(),$schedule(c)};o.push([r[0].$recvQueue,t]),r[0].$recvQueue.push(t);break;case 2:t=function(){return r[0].$closed&&$throwRuntimeError("send on closed channel"),$.selection=[n],u(),$schedule(c),r[1]};o.push([r[0].$sendQueue,t]),r[0].$sendQueue.push(t)}}(t);return $block(),$},$needsExternalization=function(e){switch(e.kind){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindFloat32:case $kindFloat64:return!1;default:return e!==$jsObjectPtr}},$externalize=function(e,n,r){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindFloat32:case $kindFloat64:return e;case $kindInt64:case $kindUint64:return $flatten64(e);case $kindArray:return $needsExternalization(n.elem)?$mapArray(e,function(e){return $externalize(e,n.elem,r)}):e;case $kindFunc:return $externalizeFunction(e,n,!1,r);case $kindInterface:return e===$ifaceNil?null:e.constructor===$jsObjectPtr?e.$val.object:$externalize(e.$val,e.constructor,r);case $kindMap:for(var t={},i=$keys(e),a=0;a<i.length;a++){var o=e[i[a]];t[$externalize(o.k,n.key,r)]=$externalize(o.v,n.elem,r)}return t;case $kindPtr:return e===n.nil?null:$externalize(e.$get(),n.elem,r);case $kindSlice:return $needsExternalization(n.elem)?$mapArray($sliceToNativeArray(e),function(e){return $externalize(e,n.elem,r)}):$sliceToNativeArray(e);case $kindString:if($isASCII(e))return e;var c,$="";for(a=0;a<e.length;a+=c[1]){var u=(c=$decodeRune(e,a))[0];if(u>65535){var l=Math.floor((u-65536)/1024)+55296,s=(u-65536)%1024+56320;$+=String.fromCharCode(l,s)}else $+=String.fromCharCode(u)}return $;case $kindStruct:var f=$packages.time;if(void 0!==f&&e.constructor===f.Time.ptr){var d=$div64(e.UnixNano(),new $Int64(0,1e6));return new Date($flatten64(d))}var p={},h=function(e,n){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindPtr:return e===n.nil?p:h(e.$get(),n.elem);case $kindStruct:var r=n.fields[0];return h(e[r.prop],r.typ);case $kindInterface:return h(e.$val,e.constructor);default:return p}},k=h(e,n);if(k!==p)return k;if(void 0!==r)return r(e);k={};for(a=0;a<n.fields.length;a++){var y=n.fields[a];y.exported&&(k[y.name]=$externalize(e[y.prop],y.typ,r))}return k}$throwRuntimeError("cannot externalize "+n.string)},$externalizeFunction=function(e,n,r,t){return e===$throwNilPointerError?null:(void 0===e.$externalizeWrapper&&($checkForDeadlock=!1,e.$externalizeWrapper=function(){for(var i=[],a=0;a<n.params.length;a++){if(n.variadic&&a===n.params.length-1){for(var o=n.params[a].elem,c=[],$=a;$<arguments.length;$++)c.push($internalize(arguments[$],o,t));i.push(new n.params[a](c));break}i.push($internalize(arguments[a],n.params[a],t))}var u=e.apply(r?this:void 0,i);switch(n.results.length){case 0:return;case 1:return $externalize($copyIfRequired(u,n.results[0]),n.results[0],t);default:for(a=0;a<n.results.length;a++)u[a]=$externalize($copyIfRequired(u[a],n.results[a]),n.results[a],t);return u}}),e.$externalizeWrapper)},$internalize=function(e,n,r,t,i){if(n===$jsObjectPtr)return e;if(n===$jsObjectPtr.elem&&$throwRuntimeError("cannot internalize js.Object, use *js.Object instead"),e&&void 0!==e.__internal_object__)return $assertType(e.__internal_object__,n,!1);var a=$packages.time;if(void 0!==a&&n===a.Time)return null!==e&&void 0!==e&&e.constructor===Date||$throwRuntimeError("cannot internalize time.Time from "+typeof e+", must be Date"),a.Unix(new $Int64(0,0),new $Int64(0,1e6*e.getTime()));if(void 0===t&&(t=new Map),t.has(n)||t.set(n,new Map),t.get(n).has(e))return t.get(n).get(e);switch(n.kind){case $kindBool:return!!e;case $kindInt:return parseInt(e);case $kindInt8:return parseInt(e)<<24>>24;case $kindInt16:return parseInt(e)<<16>>16;case $kindInt32:return parseInt(e)>>0;case $kindUint:return parseInt(e);case $kindUint8:return parseInt(e)<<24>>>24;case $kindUint16:return parseInt(e)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(e)>>>0;case $kindInt64:case $kindUint64:return new n(0,e);case $kindFloat32:case $kindFloat64:return parseFloat(e);case $kindArray:return e.length!==n.len&&$throwRuntimeError("got array with wrong size from JavaScript native"),$mapArray(e,function(e){return $internalize(e,n.elem,i)});case $kindFunc:return function(){for(var t=[],a=0;a<n.params.length;a++){if(n.variadic&&a===n.params.length-1){for(var o=n.params[a].elem,c=arguments[a],$=0;$<c.$length;$++)t.push($externalize(c.$array[c.$offset+$],o,i));break}t.push($externalize(arguments[a],n.params[a],i))}var u=e.apply(r,t);switch(n.results.length){case 0:return;case 1:return $internalize(u,n.results[0],i);default:for(a=0;a<n.results.length;a++)u[a]=$internalize(u[a],n.results[a],i);return u}};case $kindInterface:if(0!==n.methods.length&&$throwRuntimeError("cannot internalize "+n.string),null===e)return $ifaceNil;if(void 0===e)return new $jsObjectPtr(void 0);switch(e.constructor){case Int8Array:return new($sliceType($Int8))(e);case Int16Array:return new($sliceType($Int16))(e);case Int32Array:return new($sliceType($Int))(e);case Uint8Array:return new($sliceType($Uint8))(e);case Uint16Array:return new($sliceType($Uint16))(e);case Uint32Array:return new($sliceType($Uint))(e);case Float32Array:return new($sliceType($Float32))(e);case Float64Array:return new($sliceType($Float64))(e);case Array:return $internalize(e,$sliceType($emptyInterface),i);case Boolean:return new $Bool(!!e);case Date:return void 0===a?new $jsObjectPtr(e):new a.Time($internalize(e,a.Time,i));case function(){}.constructor:var o=$funcType([$sliceType($emptyInterface)],[$jsObjectPtr],!0);return new o($internalize(e,o,i));case Number:return new $Float64(parseFloat(e));case String:return new $String($internalize(e,$String,i));default:if($global.Node&&e instanceof $global.Node)return new $jsObjectPtr(e);var c=$mapType($String,$emptyInterface);return new c($internalize(e,c,r,t,i))}case $kindMap:var $={};t.get(n).set(e,$);for(var u=$keys(e),l=0;l<u.length;l++){var s=$internalize(u[l],n.key,r,t,i);$[n.key.keyFor(s)]={k:s,v:$internalize(e[u[l]],n.elem,r,t,i)}}return $;case $kindPtr:if(n.elem.kind===$kindStruct)return $internalize(e,n.elem,i);case $kindSlice:return new n($mapArray(e,function(e){return $internalize(e,n.elem,i)}));case $kindString:if(e=String(e),$isASCII(e))return e;var f="";for(l=0;l<e.length;){var d=e.charCodeAt(l);if(55296<=d&&d<=56319){var p=e.charCodeAt(l+1);f+=$encodeRune(1024*(d-55296)+p-56320+65536),l+=2}else f+=$encodeRune(d),l++}return f;case $kindStruct:var h={},k=function(n){if(n===$jsObjectPtr)return e;switch(n===$jsObjectPtr.elem&&$throwRuntimeError("cannot internalize js.Object, use *js.Object instead"),n.kind){case $kindPtr:return k(n.elem);case $kindStruct:var r=n.fields[0],t=k(r.typ);if(t!==h){var i=new n.ptr;return i[r.prop]=t,i}return h;default:return h}},y=k(n);if(y!==h)return y}$throwRuntimeError("cannot internalize "+n.string)},$copyIfRequired=function(e,n){if(e&&e.constructor&&e.constructor.copy)return new e.constructor($clone(e.$val,e.constructor));if(n.copy){var r=n.zero();return n.copy(r,e),r}return e},$isASCII=function(e){for(var n=0;n<e.length;n++)if(e.charCodeAt(n)>=128)return!1;return!0};
|
|
|
|
$packages["github.com/gopherjs/gopherjs/js"]=(function(){var $pkg={},$init,A,B,J,K,M,O,P,Q,R,S,T,G,H,L;A=$pkg.Object=$newType(0,$kindStruct,"js.Object",true,"github.com/gopherjs/gopherjs/js",true,function(object_){this.$val=this;if(arguments.length===0){this.object=null;return;}this.object=object_;});B=$pkg.Error=$newType(0,$kindStruct,"js.Error",true,"github.com/gopherjs/gopherjs/js",true,function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});J=$pkg.M=$newType(4,$kindMap,"js.M",true,"github.com/gopherjs/gopherjs/js",true,null);K=$pkg.S=$newType(12,$kindSlice,"js.S",true,"github.com/gopherjs/gopherjs/js",true,null);M=$sliceType($emptyInterface);O=$ptrType(A);P=$sliceType(O);Q=$funcType([P],[O],true);R=$funcType([],[O],false);S=$funcType([O],[],false);T=$ptrType(B);A.ptr.prototype.Get=function(a){var a,b;b=this;return b.object[$externalize(a,$String)];};A.prototype.Get=function(a){return this.$val.Get(a);};A.ptr.prototype.Set=function(a,b){var a,b,c;c=this;c.object[$externalize(a,$String)]=$externalize(b,$emptyInterface);};A.prototype.Set=function(a,b){return this.$val.Set(a,b);};A.ptr.prototype.Delete=function(a){var a,b;b=this;delete b.object[$externalize(a,$String)];};A.prototype.Delete=function(a){return this.$val.Delete(a);};A.ptr.prototype.Length=function(){var a;a=this;return $parseInt(a.object.length);};A.prototype.Length=function(){return this.$val.Length();};A.ptr.prototype.Index=function(a){var a,b;b=this;return b.object[a];};A.prototype.Index=function(a){return this.$val.Index(a);};A.ptr.prototype.SetIndex=function(a,b){var a,b,c;c=this;c.object[a]=$externalize(b,$emptyInterface);};A.prototype.SetIndex=function(a,b){return this.$val.SetIndex(a,b);};A.ptr.prototype.Call=function(a,b){var a,b,c,d;c=this;return(d=c.object,d[$externalize(a,$String)].apply(d,$externalize(b,M)));};A.prototype.Call=function(a,b){return this.$val.Call(a,b);};A.ptr.prototype.Invoke=function(a){var a,b;b=this;return b.object.apply(undefined,$externalize(a,M));};A.prototype.Invoke=function(a){return this.$val.Invoke(a);};A.ptr.prototype.New=function(a){var a,b;b=this;return new($global.Function.prototype.bind.apply(b.object,[undefined].concat($externalize(a,M))));};A.prototype.New=function(a){return this.$val.New(a);};A.ptr.prototype.Bool=function(){var a;a=this;return!!(a.object);};A.prototype.Bool=function(){return this.$val.Bool();};A.ptr.prototype.String=function(){var a;a=this;return $internalize(a.object,$String);};A.prototype.String=function(){return this.$val.String();};A.ptr.prototype.Int=function(){var a;a=this;return $parseInt(a.object)>>0;};A.prototype.Int=function(){return this.$val.Int();};A.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.object,$Int64);};A.prototype.Int64=function(){return this.$val.Int64();};A.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.object,$Uint64);};A.prototype.Uint64=function(){return this.$val.Uint64();};A.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.object);};A.prototype.Float=function(){return this.$val.Float();};A.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.object,$emptyInterface);};A.prototype.Interface=function(){return this.$val.Interface();};A.ptr.prototype.Unsafe=function(){var a;a=this;return a.object;};A.prototype.Unsafe=function(){return this.$val.Unsafe();};B.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};G=function(a){var a,b,c,d,e,f;b=a;c=new($global.Object)();c.__internal_object__=b;d=b.constructor.methods;e=0;while(true){if(!(e<$parseInt(d.length))){break;}f=[f];f[0]=d[e];if(!($internalize(f[0].pkg,$String)==="")){e=e+(1)>>0;continue;}c[$externalize($internalize(f[0].name,$String),$String)]=$externalize((function(f){return function(g){var g;return $externalizeFunction(b[$externalize($internalize(f[0].prop,$String),$String)],f[0].typ,$externalize(true,$Bool)).apply(b,$externalize(g,P));};})(f),Q);e=e+(1)>>0;}return c;};$pkg.MakeWrapper=G;H=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];b[0]=a;d=b[0].constructor;c[0]=new($global.Object)();e=(function(b,c){return function(e,f){var e,f;$global.Object.defineProperty(c[0],$externalize(e,$String),$externalize(f,J));};})(b,c);$r=e("__internal_object__",$makeMap($String.keyFor,[{k:"value",v:new $jsObjectPtr(b[0])}]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$internalize(d.string,$String);g=$internalize(d.pkg,$String);h="";if(f.charCodeAt(0)===42){h="*";}i=0;while(true){if(!(i<f.length)){break;}if(f.charCodeAt(i)===46){f=$substring(f,(i+1>>0));break;}i=i+(1)>>0;}j=g+"."+h+f;$r=e("$type",$makeMap($String.keyFor,[{k:"value",v:new $String(j)}]));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=null;l=new($global.Array)();m=d.methods;if(!(m===undefined)){l=l.concat(m);}n=d.elem;if(!(n===undefined)){k=n.fields;l=l.concat(n.methods);}else{k=d.fields;}o=0;case 3:if(!(o<$parseInt(l.length))){$s=4;continue;}p=[p];p[0]=l[o];if(!($internalize(p[0].pkg,$String)==="")){o=o+(1)>>0;$s=3;continue;}$r=e($internalize(p[0].prop,$String),$makeMap($String.keyFor,[{k:"value",v:new Q((function(b,c,p){return function(q){var q;return $externalizeFunction(b[0][$externalize($internalize(p[0].prop,$String),$String)],p[0].typ,$externalize(true,$Bool),H).apply(b[0],$externalize(q,P));};})(b,c,p))}]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}o=o+(1)>>0;$s=3;continue;case 4:if(!(k===undefined)){$s=6;continue;}$s=7;continue;case 6:q=0;case 8:if(!(q<$parseInt(k.length))){$s=9;continue;}r=[r];r[0]=k[q];if(!!!(r[0].exported)){q=q+(1)>>0;$s=8;continue;}$r=e($internalize(r[0].prop,$String),$makeMap($String.keyFor,[{k:"get",v:new R((function(b,c,r){return function(){var s;s=$copyIfRequired(b[0].$val[$externalize($internalize(r[0].prop,$String),$String)],r[0].typ);return $externalize(s,r[0].typ,H);};})(b,c,r))},{k:"set",v:new S((function(b,c,r){return function(s){var s,t;t=$internalize(s,r[0].typ,H);b[0].$val[$externalize($internalize(r[0].prop,$String),$String)]=t;};})(b,c,r))}]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q+(1)>>0;$s=8;continue;case 9:case 7:$s=-1;return c[0];}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};$pkg.MakeFullWrapper=H;L=function(){var a;a=new B.ptr(null);$unused(a);};O.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[O],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[O],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[O],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[O],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];T.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init("github.com/gopherjs/gopherjs/js",[{prop:"object",name:"object",embedded:false,exported:false,typ:O,tag:""}]);B.init("",[{prop:"Object",name:"Object",embedded:true,exported:true,typ:O,tag:""}]);J.init($String,$emptyInterface);K.init($emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:L();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["runtime"]=(function(){var $pkg={},$init,A,C,D,AT,AZ,BD,AM,E,AU;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AZ=$ptrType(C);BD=$ptrType(D);C.ptr.prototype.string=function(){var a;a=this;return a.str;};C.prototype.string=function(){return this.$val.string();};C.ptr.prototype.pkgpath=function(){var a;a=this;return"";};C.prototype.pkgpath=function(){return this.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){return this.$val.RuntimeError();};D.ptr.prototype.Error=function(){var a,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}return e;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){return this.$val.Error();};E=function(){var a,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=new D.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};AT.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){return new AT(this.$get()).RuntimeError();};AT.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){return new AT(this.$get()).Error();};AU=function(a){var a;$panic(new AT((a)));};AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AM="";E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["math/bits"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["math"]=(function(){var $pkg={},$init,B,A,IT,IU,IV,IW,FL,FM,FN,FO,FP,HH,EI,EX,EY,FK,GA,GH,GK,GL,GM,GS,GT,GW,GZ,HA,HD,HI,HL,HM;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["math/bits"];IT=$arrayType($Uint32,2);IU=$arrayType($Float32,2);IV=$arrayType($Float64,1);IW=$structType("math",[{prop:"uint32array",name:"uint32array",embedded:false,exported:false,typ:IT,tag:""},{prop:"float32array",name:"float32array",embedded:false,exported:false,typ:IU,tag:""},{prop:"float64array",name:"float64array",embedded:false,exported:false,typ:IV,tag:""}]);EI=function(av){var av,aw,ax,ay,az,ba,bb;aw=HL(av);ax=((($shiftRightUint64(aw,52).$low>>>0))&2047)>>>0;if(ax<1023){aw=(ay=new $Uint64(2147483648,0),new $Uint64(aw.$high&ay.$high,(aw.$low&ay.$low)>>>0));if(ax===1022){aw=(az=new $Uint64(1072693248,0),new $Uint64(aw.$high|az.$high,(aw.$low|az.$low)>>>0));}}else if(ax<1075){ax=ax-(1023)>>>0;aw=(ba=$shiftRightUint64(new $Uint64(524288,0),ax),new $Uint64(aw.$high+ba.$high,aw.$low+ba.$low));aw=(bb=$shiftRightUint64(new $Uint64(1048575,4294967295),ax),new $Uint64(aw.$high&~bb.$high,(aw.$low&~bb.$low)>>>0));}return HM(aw);};$pkg.Round=EI;EX=function(av,aw){var av,aw;if(GL(av,1)||GL(aw,1)){return GK(1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return aw;}return av;}if(av>aw){return av;}return aw;};EY=function(av,aw){var av,aw;if(GL(av,-1)||GL(aw,-1)){return GK(-1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return av;}return aw;}if(av<aw){return av;}return aw;};FK=function(av){var av,aw;return HM((aw=HL(av),new $Uint64(aw.$high&~2147483648,(aw.$low&~0)>>>0)));};$pkg.Abs=FK;GA=function(av){var av;return $parseFloat(FL.cos(av));};$pkg.Cos=GA;GH=function(av){var av;return $parseFloat(FL.floor(av));};$pkg.Floor=GH;GK=function(av){var av;if(av>=0){return FN;}else{return FO;}};$pkg.Inf=GK;GL=function(av,aw){var av,aw;if(av===FN){return aw>=0;}if(av===FO){return aw<=0;}return false;};$pkg.IsInf=GL;GM=function(av){var av,aw;aw=false;aw=!((av===av));return aw;};$pkg.IsNaN=GM;GS=function(av,aw){var av,aw;return EX(av,aw);};$pkg.Max=GS;GT=function(av,aw){var av,aw;return EY(av,aw);};$pkg.Min=GT;GW=function(){return FP;};$pkg.NaN=GW;GZ=function(av){var av;return av<0||(1/av===FO);};$pkg.Signbit=GZ;HA=function(av){var av;return $parseFloat(FL.sin(av));};$pkg.Sin=HA;HD=function(av){var av;return $parseFloat(FL.sqrt(av));};$pkg.Sqrt=HD;HI=function(){var av;av=new($global.ArrayBuffer)(8);HH.uint32array=new($global.Uint32Array)(av);HH.float32array=new($global.Float32Array)(av);HH.float64array=new($global.Float64Array)(av);};HL=function(av){var av,aw,ax;HH.float64array[0]=av;return(aw=$shiftLeft64((new $Uint64(0,HH.uint32array[1])),32),ax=(new $Uint64(0,HH.uint32array[0])),new $Uint64(aw.$high+ax.$high,aw.$low+ax.$low));};$pkg.Float64bits=HL;HM=function(av){var av;HH.uint32array[0]=((av.$low>>>0));HH.uint32array[1]=(($shiftRightUint64(av,32).$low>>>0));return HH.float64array[0];};$pkg.Float64frombits=HM;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}HH=new IW.ptr(IT.zero(),IU.zero(),IV.zero());FL=$global.Math;FM=0;FN=1/FM;FO=-1/FM;FP=$parseFloat($NaN);HI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["resolv"]=(function(){var $pkg={},$init,A,B,C,K,M,N,P,R,U,V,X,AC,AE,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,H,L,O,Q,S,T,W,Y,Z,AD,AF;A=$packages["math"];B=$pkg.Vector=$newType(12,$kindSlice,"resolv.Vector",true,"resolv",true,null);C=$pkg.Axis=$newType(4,$kindInt,"resolv.Axis",true,"resolv",true,null);K=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=AJ.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});M=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"resolv",true,null);N=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=B.nil;this.End=B.nil;return;}this.Start=Start_;this.End=End_;});P=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AN.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});R=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AQ.nil;this.MTV=B.nil;this.Center=B.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});U=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});V=$pkg.RingBuffer=$newType(0,$kindStruct,"resolv.RingBuffer",true,"resolv",true,function(Ed_,St_,EdFrameId_,StFrameId_,N_,Cnt_,Eles_){this.$val=this;if(arguments.length===0){this.Ed=0;this.St=0;this.EdFrameId=0;this.StFrameId=0;this.N=0;this.Cnt=0;this.Eles=AT.nil;return;}this.Ed=Ed_;this.St=St_;this.EdFrameId=EdFrameId_;this.StFrameId=StFrameId_;this.N=N_;this.Cnt=Cnt_;this.Eles=Eles_;});X=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=AK.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=AN.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AU.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});AC=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AL.nil;this.dx=0;this.dy=0;this.Objects=AN.nil;this.Cells=AN.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});AE=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AN.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});AG=$sliceType($Float64);AH=$ptrType(AE);AI=$sliceType(AH);AJ=$sliceType(AI);AK=$ptrType(K);AL=$ptrType(X);AM=$sliceType(AL);AN=$ptrType(V);AO=$ptrType(N);AP=$sliceType(AO);AQ=$sliceType(B);AR=$ptrType(P);AS=$ptrType(R);AT=$sliceType($emptyInterface);AU=$sliceType($String);AV=$ptrType(M);AW=$sliceType(C);AX=$ptrType(AC);AY=$mapType(AL,$Bool);B.prototype.Clone=function(){var a,b;a=this;b=$makeSlice(B,a.$length);$copySlice(b,a);return b;};$ptrType(B).prototype.Clone=function(){return this.$get().Clone();};B.prototype.Equal=function(a){var a,b,c,d,e;b=this;if(!((b.$length===a.$length))){return false;}c=b;d=0;while(true){if(!(d<c.$length)){break;}e=d;if(A.Abs(((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])-((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]))>1e-08){return false;}d++;}return true;};$ptrType(B).prototype.Equal=function(a){return this.$get().Equal(a);};B.prototype.Magnitude=function(){var a;a=this;return A.Sqrt(a.Magnitude2());};$ptrType(B).prototype.Magnitude=function(){return this.$get().Magnitude();};B.prototype.Magnitude2=function(){var a,b,c,d,e;a=this;b=0;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=b+(e*e);d++;}return b;};$ptrType(B).prototype.Magnitude2=function(){return this.$get().Magnitude2();};B.prototype.Unit=function(){var a,b,c,d,e;a=this;b=a.Magnitude();if(b<1e-08){return a;}c=a;d=0;while(true){if(!(d<c.$length)){break;}e=d;((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])/b);d++;}return a;};$ptrType(B).prototype.Unit=function(){return this.$get().Unit();};H=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=0;d=a.$length;e=b.$length;f=c;g=d;h=e;if(g>h){b=$appendSlice(b,$convertSliceType($makeSlice(B,(g-h>>0)),AG));}if(g<h){a=$appendSlice(a,$convertSliceType($makeSlice(B,(h-g>>0)),AG));}i=a;j=0;while(true){if(!(j<i.$length)){break;}k=j;f=f+(((k<0||k>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k])*((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]));j++;}return f;};$pkg.Dot=H;B.prototype.Dot=function(a){var a,b;b=this;return H(b,a);};$ptrType(B).prototype.Dot=function(a){return this.$get().Dot(a);};B.prototype.Cross=function(a){var a,b;b=this;if(!((b.$length===3))||!((a.$length===3))){return B.nil;}return new B([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]),(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])]);};$ptrType(B).prototype.Cross=function(a){return this.$get().Cross(a);};B.prototype.Rotate=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=this;d=2;e=c.$length;f=d;g=e;if(g===0){return c;}if(b.$length>0){f=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);}if((g===1)&&!((f===2))){c=$append(c,0,0);}if((g<2&&(f===2))||((g===2)&&!((f===2)))){c=$append(c,0);}h=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);j=h;k=i;l=A.Cos(a);m=A.Sin(a);n=l;o=m;p=f;if(p===(0)){q=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=k*n-q*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=k*o+q*n);}else if(p===(1)){r=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n+r*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=-j*o+r*n);}else if(p===(2)){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n-k*o);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=j*o+k*n);}if(g>3){return $subslice(c,0,3);}return c;};$ptrType(B).prototype.Rotate=function(a,b){return this.$get().Rotate(a,b);};B.prototype.X=function(){var a;a=this;if(a.$length<1){return 0;}return(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);};$ptrType(B).prototype.X=function(){return this.$get().X();};B.prototype.Y=function(){var a;a=this;if(a.$length<2){return 0;}return(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);};$ptrType(B).prototype.Y=function(){return this.$get().Y();};B.prototype.Z=function(){var a;a=this;if(a.$length<3){return 0;}return(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);};$ptrType(B).prototype.Z=function(){return this.$get().Z();};L=function(a,b,c,d){var a,b,c,d,e,f,g;e=new K.ptr(AJ.nil,c,d);e.Resize((f=a/c,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")),(g=b/d,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return e;};$pkg.NewSpace=L;K.ptr.prototype.AddSingle=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(b===AK.nil){$panic(new $String("ERROR: space is nil"));}a.Space=b;$r=a.Update();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:K.ptr.prototype.AddSingle,$c:true,$r,a,b,$s};return $f;};K.prototype.AddSingle=function(a){return this.$val.AddSingle(a);};K.ptr.prototype.Add=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(b===AK.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;case 1:if(!(d<c.$length)){$s=2;continue;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);e.Space=b;$r=e.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:K.ptr.prototype.Add,$c:true,$r,a,b,c,d,e,$s};return $f;};K.prototype.Add=function(a){return this.$val.Add(a);};K.ptr.prototype.RemoveSingle=function(a){var a,b,c;b=this;if(b===AK.nil){$panic(new $String("ERROR: space is nil"));}while(true){if(!(0<a.TouchingCells.Cnt)){break;}c=$assertType(a.TouchingCells.Pop(),AH);c.unregister(a);}a.Space=AK.nil;};K.prototype.RemoveSingle=function(a){return this.$val.RemoveSingle(a);};K.ptr.prototype.Remove=function(a){var a,b,c,d,e,f;b=this;if(b===AK.nil){$panic(new $String("ERROR: space is nil"));}c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);while(true){if(!(0<e.TouchingCells.Cnt)){break;}f=$assertType(e.TouchingCells.Pop(),AH);f.unregister(e);}e.Space=AK.nil;d++;}};K.prototype.Remove=function(a){return this.$val.Remove(a);};K.ptr.prototype.Objects=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;b=$makeMap(AL.keyFor,[]);c=new AM([]);d=a.Cells;e=0;while(true){if(!(e<d.$length)){break;}f=e;g=(h=a.Cells,((f<0||f>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]));i=0;while(true){if(!(i<g.$length)){break;}j=i;m=(k=(l=a.Cells,((f<0||f>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+f])),((j<0||j>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+j])).Objects;n=m.StFrameId;while(true){if(!(n<m.EdFrameId)){break;}o=$assertType(m.GetByFrameId(n),AL);p=(q=b[AL.keyFor(o)],q!==undefined?[q.v,true]:[false,false]);r=p[1];if(!r){c=$append(c,o);s=o;(b||$throwRuntimeError("assignment to entry in nil map"))[AL.keyFor(s)]={k:s,v:true};}n=n+(1)>>0;}i++;}e++;}return c;};K.prototype.Objects=function(){return this.$val.Objects();};K.ptr.prototype.Resize=function(a,b){var a,b,c,d,e,f,g,h;c=this;c.Cells=$makeSlice(AJ,b);d=0;while(true){if(!(d<b)){break;}(e=c.Cells,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d]=$makeSlice(AI,a)));f=0;while(true){if(!(f<a)){break;}(g=(h=c.Cells,((d<0||d>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+d])),((f<0||f>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+f]=AF(f,d)));f=f+(1)>>0;}d=d+(1)>>0;}};K.prototype.Resize=function(a,b){return this.$val.Resize(a,b);};K.ptr.prototype.Cell=function(a,b){var a,b,c,d,e,f;c=this;if(b>=0&&b<c.Cells.$length&&a>=0&&a<(d=c.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length){return(e=(f=c.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((a<0||a>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+a]));}return AH.nil;};K.prototype.Cell=function(a,b){return this.$val.Cell(a,b);};K.ptr.prototype.CheckCells=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=this;g=a;while(true){if(!(g<(a+c>>0))){break;}h=b;while(true){if(!(h<(b+d>>0))){break;}i=f.Cell(g,h);if(!(i===AH.nil)){j=i.Objects;if(e.$length>0){if(i.ContainsTags(e)){k=j.StFrameId;while(true){if(!(k<j.EdFrameId)){break;}l=$assertType(j.GetByFrameId(k),AL);if(l.HasTags(e)){return l;}k=k+(1)>>0;}}}else if(i.Occupied()){return $assertType(j.GetByFrameId(j.StFrameId),AL);}}h=h+(1)>>0;}g=g+(1)>>0;}return AL.nil;};K.prototype.CheckCells=function(a,b,c,d,e){return this.$val.CheckCells(a,b,c,d,e);};K.ptr.prototype.CheckCellsWorld=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=this;g=f.WorldToSpace(a,b);h=g[0];i=g[1];j=f.WorldToSpace(c,d);k=j[0];l=j[1];return f.CheckCells(h,i,k,l,e);};K.prototype.CheckCellsWorld=function(a,b,c,d,e){return this.$val.CheckCellsWorld(a,b,c,d,e);};K.ptr.prototype.UnregisterAllObjects=function(){var a,b,c,d,e,f,g,h,i,j;a=this;b=0;while(true){if(!(b<a.Cells.$length)){break;}c=0;while(true){if(!(c<(d=a.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length)){break;}g=(e=(f=a.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c]));h=g.Objects;i=h.StFrameId;while(true){if(!(i<h.EdFrameId)){break;}j=$assertType(h.GetByFrameId(i),AL);a.RemoveSingle(j);i=i+(1)>>0;}c=c+(1)>>0;}b=b+(1)>>0;}};K.prototype.UnregisterAllObjects=function(){return this.$val.UnregisterAllObjects();};K.ptr.prototype.WorldToSpace=function(a,b){var a,b,c,d,e;c=this;d=((A.Floor(a/(c.CellWidth))>>0));e=((A.Floor(b/(c.CellHeight))>>0));return[d,e];};K.prototype.WorldToSpace=function(a,b){return this.$val.WorldToSpace(a,b);};K.ptr.prototype.SpaceToWorld=function(a,b){var a,b,c,d,e;c=this;d=(($imul(a,c.CellWidth)));e=(($imul(b,c.CellHeight)));return[d,e];};K.prototype.SpaceToWorld=function(a,b){return this.$val.SpaceToWorld(a,b);};K.ptr.prototype.Height=function(){var a;a=this;return a.Cells.$length;};K.prototype.Height=function(){return this.$val.Height();};K.ptr.prototype.Width=function(){var a,b;a=this;if(a.Cells.$length>0){return(b=a.Cells,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])).$length;}return 0;};K.prototype.Width=function(){return this.$val.Width();};K.ptr.prototype.CellsInLine=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=this;f=new AI([]);g=e.Cell(a,b);h=e.Cell(c,d);if(!(g===AH.nil)&&!(h===AH.nil)){i=new B([((c-a>>0)),((d-b>>0))]).Unit();(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])*(((j=e.CellWidth/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")))));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])*(((k=e.CellHeight/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))));l=e.SpaceToWorld(a,b);m=l[0];n=l[1];q=new B([m+((o=e.CellWidth/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))),n+((p=e.CellHeight/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")))]);r=false;while(true){if(!(!(g===AH.nil))){break;}if(g===h){f=$append(f,g);break;}f=$append(f,g);if(r){(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]=(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+((1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])));}else{(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+((0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])));}s=e.WorldToSpace((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]),(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]));t=s[0];u=s[1];v=e.Cell(t,u);if(!(v===g)){g=v;}r=!r;}}return f;};K.prototype.CellsInLine=function(a,b,c,d){return this.$val.CellsInLine(a,b,c,d);};O=function(a,b,c,d){var a,b,c,d;return new N.ptr(new B([a,b]),new B([c,d]));};$pkg.NewLine=O;N.ptr.prototype.Normal=function(){var a,b,c,d,e,f,g;a=this;d=(b=a.End,(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]))-(c=a.Start,(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]));g=(e=a.End,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))-(f=a.Start,(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]));return new B([d,-g]).Unit();};N.prototype.Normal=function(){return this.$val.Normal();};N.ptr.prototype.IntersectionPointsLine=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;k=((c=b.End,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))-(d=b.Start,(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))*((e=a.End,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(f=a.Start,(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])))-((g=a.End,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))-(h=a.Start,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])))*((i=b.End,(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]))-(j=b.Start,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1])));if(!((k===0))){t=((((l=b.Start,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))-(m=a.Start,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1])))*((n=a.End,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))-(o=a.Start,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))))-(((p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))-(q=a.Start,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])))*((r=a.End,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))-(s=a.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))))+1)/k;ac=((((u=b.Start,(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]))-(v=a.Start,(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])))*((w=b.End,(0>=w.$length?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+0]))-(x=b.Start,(0>=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0]))))-(((y=b.Start,(0>=y.$length?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+0]))-(z=a.Start,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))*((aa=b.End,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))-(ab=b.Start,(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1]))))+1)/k;if((0<t&&t<1)&&(0<ac&&ac<1)){af=(ad=b.End,(0>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+0]))-(ae=b.Start,(0>=ae.$length?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+0]));ai=(ag=b.End,(1>=ag.$length?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+1]))-(ah=b.Start,(1>=ah.$length?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+1]));return new B([(aj=b.Start,(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0]))+(t*af),(ak=b.Start,(1>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+1]))+(t*ai)]);}}return B.nil;};N.prototype.IntersectionPointsLine=function(a){return this.$val.IntersectionPointsLine(a);};Q=function(a){var a,b;b=new P.ptr(W(6),0,0,true);b.AddPoints(a);return b;};$pkg.NewConvexPolygon=Q;P.ptr.prototype.GetPointByOffset=function(a){var a,b;b=this;if(b.Points.Cnt<=a){return B.nil;}return $assertType(b.Points.GetByFrameId(b.Points.StFrameId+a>>0),B);};P.prototype.GetPointByOffset=function(a){return this.$val.GetPointByOffset(a);};P.ptr.prototype.Clone=function(){var a,b,c;a=this;b=Q(AG.nil);b.X=a.X;b.Y=a.Y;c=0;while(true){if(!(c<a.Points.Cnt)){break;}b.Points.Put(a.GetPointByOffset(c));c=c+(1)>>0;}b.Closed=a.Closed;return b;};P.prototype.Clone=function(){return this.$val.Clone();};P.ptr.prototype.AddPoints=function(a){var a,b,c,d;b=this;c=0;while(true){if(!(c<a.$length)){break;}b.Points.Put(new B([((c<0||c>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]),(d=c+1>>0,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]))]));c=c+(2)>>0;}};P.prototype.AddPoints=function(a){return this.$val.AddPoints(a);};P.ptr.prototype.UpdateAsRectangle=function(a,b,c,d){var a,b,c,d,e,f,g,h;e=this;if(!((4===e.Points.Cnt))){$panic(new $String("ConvexPolygon not having exactly 4 vertices to form a rectangle#1!"));}f=0;while(true){if(!(f<e.Points.Cnt)){break;}g=e.GetPointByOffset(f);if(B.nil===g){$panic(new $String("ConvexPolygon not having exactly 4 vertices to form a rectangle#2!"));}h=f;if(h===(0)){(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]=a);(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]=b);}else if(h===(1)){(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]=a+c);(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]=b);}else if(h===(2)){(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]=a+c);(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]=b+d);}else if(h===(3)){(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]=a);(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]=b+d);}f=f+(1)>>0;}return true;};P.prototype.UpdateAsRectangle=function(a,b,c,d){return this.$val.UpdateAsRectangle(a,b,c,d);};P.ptr.prototype.Lines=function(){var a,b,c,d,e,f,g,h,i,j,k;a=this;b=a.Transformed();c=b.$length;if(!a.Closed){c=c-(1)>>0;}d=$makeSlice(AP,c);e=0;while(true){if(!(e<c)){break;}f=((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e]);g=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);h=f;i=g;if(e<(b.$length-1>>0)){i=(j=e+1>>0,((j<0||j>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+j]));}k=O((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]),(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]));((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]=k);e=e+(1)>>0;}return d;};P.prototype.Lines=function(){return this.$val.Lines();};P.ptr.prototype.Transformed=function(){var a,b,c,d;a=this;b=$makeSlice(AQ,a.Points.Cnt);c=0;while(true){if(!(c<a.Points.Cnt)){break;}d=a.GetPointByOffset(c);((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]=new B([(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])+a.X,(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1])+a.Y]));c=c+(1)>>0;}return b;};P.prototype.Transformed=function(){return this.$val.Transformed();};P.ptr.prototype.Bounds=function(){var a,b,c,d,e,f,g,h;a=this;b=a.Transformed();e=new B([(c=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])),(d=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]))]);f=e.Clone();g=0;while(true){if(!(g<b.$length)){break;}h=((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])<(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}else if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])>(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])<(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])){(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}else if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])>(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])){(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}g=g+(1)>>0;}return[e,f];};P.prototype.Bounds=function(){return this.$val.Bounds();};P.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};P.prototype.Position=function(){return this.$val.Position();};P.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};P.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};P.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};P.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};P.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};P.prototype.Move=function(a,b){return this.$val.Move(a,b);};P.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};P.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};P.ptr.prototype.Project=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=this;a=a.Unit();c=b.Transformed();f=a.Dot(new B([(d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])),(e=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))]));g=f;h=1;while(true){if(!(h<c.$length)){break;}k=a.Dot(new B([(i=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(j=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]))]));if(k<f){f=k;}else if(k>g){g=k;}h=h+(1)>>0;}return new U.ptr(f,g);};P.prototype.Project=function(a){return this.$val.Project(a);};P.ptr.prototype.SATAxes=function(){var a,b,c,d,e,f,g;a=this;b=a.Lines();c=$makeSlice(AQ,b.$length);d=b;e=0;while(true){if(!(e<d.$length)){break;}f=e;g=((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=g.Normal());e++;}return c;};P.prototype.SATAxes=function(){return this.$val.SATAxes();};P.ptr.prototype.PointInside=function(a){var a,b,c,d,e,f,g;b=this;c=O((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]),(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])+9.99999999999e+11,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));d=0;e=b.Lines();f=0;while(true){if(!(f<e.$length)){break;}g=((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(g.IntersectionPointsLine(c)===B.nil)){d=d+(1)>>0;}f++;}return d===1;};P.prototype.PointInside=function(a){return this.$val.PointInside(a);};S=function(){return new R.ptr(new AQ([]),new B([0,0]),new B([0,0]));};$pkg.NewContactSet=S;R.ptr.prototype.LeftmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])<(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};R.prototype.LeftmostPoint=function(){return this.$val.LeftmostPoint();};R.ptr.prototype.RightmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])>(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};R.prototype.RightmostPoint=function(){return this.$val.RightmostPoint();};R.ptr.prototype.TopmostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])<(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};R.prototype.TopmostPoint=function(){return this.$val.TopmostPoint();};R.ptr.prototype.BottommostPoint=function(){var a,b,c,d,e;a=this;b=B.nil;c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])>(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};R.prototype.BottommostPoint=function(){return this.$val.BottommostPoint();};P.ptr.prototype.Intersection=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;d=this;e=S();f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=$assertType(c,AR,true);i=h[0];j=h[1];if(j){k=d.Lines();l=0;while(true){if(!(l<k.$length)){break;}m=((l<0||l>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);n=i.Lines();o=0;while(true){if(!(o<n.$length)){break;}p=((o<0||o>=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+o]);q=m.IntersectionPointsLine(p);if(!(q===B.nil)){e.Points=$append(e.Points,q);}o++;}l++;}}if(e.Points.$length>0){}else{e=AS.nil;}d.X=f;d.Y=g;return e;};P.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};T=function(a,b,c,d){var a,b,c,d;return Q(new AG([a,b,a+c,b,a+c,b+d,a,b+d]));};$pkg.NewRectangle=T;U.ptr.prototype.Overlapping=function(a){var a,b;b=this;return $clone(b,U).Overlap($clone(a,U))>0;};U.prototype.Overlapping=function(a){return this.$val.Overlapping(a);};U.ptr.prototype.Overlap=function(a){var a,b;b=this;return A.Min(b.Max,a.Max)-A.Max(b.Min,a.Min);};U.prototype.Overlap=function(a){return this.$val.Overlap(a);};U.ptr.prototype.IsInside=function(a){var a,b;b=this;return b.Min>=a.Min&&b.Max<=a.Max;};U.prototype.IsInside=function(a){return this.$val.IsInside(a);};W=function(a){var a;return new V.ptr(0,0,0,0,a,0,$makeSlice(AT,a));};$pkg.NewRingBuffer=W;V.ptr.prototype.DryPut=function(){var a;a=this;while(true){if(!(0<a.Cnt&&a.Cnt>=a.N)){break;}a.Pop();}a.EdFrameId=a.EdFrameId+(1)>>0;a.Cnt=a.Cnt+(1)>>0;a.Ed=a.Ed+(1)>>0;if(a.Ed>=a.N){a.Ed=a.Ed-(a.N)>>0;}};V.prototype.DryPut=function(){return this.$val.DryPut();};V.ptr.prototype.Put=function(a){var a,b,c,d;b=this;while(true){if(!(0<b.Cnt&&b.Cnt>=b.N)){break;}b.Pop();}(c=b.Eles,d=b.Ed,((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]=a));b.EdFrameId=b.EdFrameId+(1)>>0;b.Cnt=b.Cnt+(1)>>0;b.Ed=b.Ed+(1)>>0;if(b.Ed>=b.N){b.Ed=b.Ed-(b.N)>>0;}};V.prototype.Put=function(a){return this.$val.Put(a);};V.ptr.prototype.Pop=function(){var a,b,c,d;a=this;if(0===a.Cnt){return $ifaceNil;}d=(b=a.Eles,c=a.St,((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]));a.StFrameId=a.StFrameId+(1)>>0;a.Cnt=a.Cnt-(1)>>0;a.St=a.St+(1)>>0;if(a.St>=a.N){a.St=a.St-(a.N)>>0;}return d;};V.prototype.Pop=function(){return this.$val.Pop();};V.ptr.prototype.GetArrIdxByOffset=function(a){var a,b,c;b=this;if((0===b.Cnt)||0>a){return-1;}c=b.St+a>>0;if(b.St<b.Ed){if(b.St<=c&&c<b.Ed){return c;}}else{if(c>=b.N){c=c-(b.N)>>0;}if(c>=b.St||c<b.Ed){return c;}}return-1;};V.prototype.GetArrIdxByOffset=function(a){return this.$val.GetArrIdxByOffset(a);};V.ptr.prototype.GetByOffset=function(a){var a,b,c,d;b=this;c=b.GetArrIdxByOffset(a);if(-1===c){return $ifaceNil;}return(d=b.Eles,((c<0||c>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+c]));};V.prototype.GetByOffset=function(a){return this.$val.GetByOffset(a);};V.ptr.prototype.GetByFrameId=function(a){var a,b;b=this;if(a>=b.EdFrameId||a<b.StFrameId){return $ifaceNil;}return b.GetByOffset(a-b.StFrameId>>0);};V.prototype.GetByFrameId=function(a){return this.$val.GetByFrameId(a);};V.ptr.prototype.SetByFrameId=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=this;d=c.StFrameId;e=c.EdFrameId;f=d;g=e;if(b<f){return[2,f,g];}if(g>b){h=c.GetArrIdxByOffset(b-c.StFrameId>>0);if(!((-1===h))){(i=c.Eles,((h<0||h>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+h]=a));return[0,f,g];}}j=0;if(g<b){k=0;l=0;c.St=k;c.Ed=l;m=b;n=b;c.StFrameId=m;c.EdFrameId=n;c.Cnt=0;j=1;}c.Put(a);return[j,f,g];};V.prototype.SetByFrameId=function(a,b){return this.$val.SetByFrameId(a,b);};V.ptr.prototype.Clear=function(){var a;a=this;while(true){if(!(0<a.Cnt)){break;}a.Pop();}a.St=0;a.Ed=0;a.StFrameId=0;a.EdFrameId=0;};V.prototype.Clear=function(){return this.$val.Clear();};V.ptr.prototype.GetStFrameId=function(){var a;a=this;return a.StFrameId;};V.prototype.GetStFrameId=function(){return this.$val.GetStFrameId();};V.ptr.prototype.GetEdFrameId=function(){var a;a=this;return a.EdFrameId;};V.prototype.GetEdFrameId=function(){return this.$val.GetEdFrameId();};V.ptr.prototype.GetCnt=function(){var a;a=this;return a.Cnt;};V.prototype.GetCnt=function(){return this.$val.GetCnt();};Y=function(a,b,c,d,e){var a,b,c,d,e,f;f=new X.ptr($ifaceNil,AK.nil,a,b,c,d,W(512),$ifaceNil,$makeMap(AL.keyFor,[]),new AU([e]));return f;};$pkg.NewObjectSingleTag=Y;Z=function(a,b,c,d,e){var a,b,c,d,e,f;f=new X.ptr($ifaceNil,AK.nil,a,b,c,d,W(512),$ifaceNil,$makeMap(AL.keyFor,[]),new AU([]));if(e.$length>0){f.AddTags(e);}return f;};$pkg.NewObject=Z;X.ptr.prototype.GetData=function(){var a;a=this;return a.Data;};X.prototype.GetData=function(){return this.$val.GetData();};X.ptr.prototype.GetShape=function(){var a;a=this;return(a.$ptr_Shape||(a.$ptr_Shape=new AV(function(){return this.$target.Shape;},function($v){this.$target.Shape=$v;},a)));};X.prototype.GetShape=function(){return this.$val.GetShape();};X.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};X.prototype.Position=function(){return this.$val.Position();};X.ptr.prototype.Clone=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=Z(a.X,a.Y,a.W,a.H,a.Tags());b.Data=a.Data;if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:c=a.Shape.Clone();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=b.SetShape(c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:d=a.ignoreList;e=0;f=$keys(d);while(true){if(!(e<f.length)){break;}g=d[f[e]];if(g===undefined){e++;continue;}h=g.k;b.AddToIgnoreList(h);e++;}$s=-1;return b;}return;}var $f={$blk:X.ptr.prototype.Clone,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};X.prototype.Clone=function(){return this.$val.Clone();};X.ptr.prototype.Update=function(){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;if(!(a.Space===AK.nil)){b=a.Space;a.Space.RemoveSingle(a);a.Space=b;c=a.BoundsToSpace(0,0);d=c[0];e=c[1];f=c[2];g=c[3];h=e;while(true){if(!(h<=g)){break;}i=d;while(true){if(!(i<=f)){break;}j=a.Space.Cell(i,h);if(!(j===AH.nil)){j.register(a);a.TouchingCells.Put(j);}i=i+(1)>>0;}h=h+(1)>>0;}}if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=a.Shape.SetPosition(a.X,a.Y);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:X.ptr.prototype.Update,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};X.prototype.Update=function(){return this.$val.Update();};X.ptr.prototype.AddTags=function(a){var a,b;b=this;b.tags=$appendSlice(b.tags,a);};X.prototype.AddTags=function(a){return this.$val.AddTags(a);};X.ptr.prototype.RemoveTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g<f.$length)){break;}h=g;i=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(i===e){b.tags=$appendSlice($subslice(b.tags,0,h),$subslice(b.tags,(h+1>>0)));break;}g++;}d++;}};X.prototype.RemoveTags=function(a){return this.$val.RemoveTags(a);};X.ptr.prototype.HasTags=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g<f.$length)){break;}h=((g<0||g>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return true;}g++;}d++;}return false;};X.prototype.HasTags=function(a){return this.$val.HasTags(a);};X.ptr.prototype.Tags=function(){var a;a=this;return $appendSlice(new AU([]),a.tags);};X.prototype.Tags=function(){return this.$val.Tags();};X.ptr.prototype.SetShape=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!($interfaceIsEqual(b.Shape,a))){$s=1;continue;}$s=2;continue;case 1:b.Shape=a;$r=b.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:X.ptr.prototype.SetShape,$c:true,$r,a,b,$s};return $f;};X.prototype.SetShape=function(a){return this.$val.SetShape(a);};X.ptr.prototype.BoundsToSpace=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=c.Space.WorldToSpace(c.X+a,c.Y+b);e=d[0];f=d[1];g=c.Space.WorldToSpace(c.X+c.W+a-1,c.Y+c.H+b-1);h=g[0];i=g[1];return[e,f,h,i];};X.prototype.BoundsToSpace=function(a,b){return this.$val.BoundsToSpace(a,b);};X.ptr.prototype.SharesCells=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AH);if(e.Contains(a)){return true;}d=d+(1)>>0;}return false;};X.prototype.SharesCells=function(a){return this.$val.SharesCells(a);};X.ptr.prototype.SharesCellsTags=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AH);if(e.ContainsTags(a)){return true;}d=d+(1)>>0;}return false;};X.prototype.SharesCellsTags=function(a){return this.$val.SharesCellsTags(a);};X.ptr.prototype.Center=function(){var a;a=this;return[a.X+(a.W/2),a.Y+(a.H/2)];};X.prototype.Center=function(){return this.$val.Center();};X.ptr.prototype.SetCenter=function(a,b){var a,b,c;c=this;c.X=a-(c.W/2);c.Y=b-(c.H/2);};X.prototype.SetCenter=function(a,b){return this.$val.SetCenter(a,b);};X.ptr.prototype.CellPosition=function(){var a,b;a=this;b=a.Center();return a.Space.WorldToSpace(b[0],b[1]);};X.prototype.CellPosition=function(){return this.$val.CellPosition();};X.ptr.prototype.SetRight=function(a){var a,b;b=this;b.X=a-b.W;};X.prototype.SetRight=function(a){return this.$val.SetRight(a);};X.ptr.prototype.SetBottom=function(a){var a,b;b=this;b.Y=a-b.H;};X.prototype.SetBottom=function(a){return this.$val.SetBottom(a);};X.ptr.prototype.Bottom=function(){var a;a=this;return a.Y+a.H;};X.prototype.Bottom=function(){return this.$val.Bottom();};X.ptr.prototype.Right=function(){var a;a=this;return a.X+a.W;};X.prototype.Right=function(){return this.$val.Right();};X.ptr.prototype.SetBounds=function(a,b){var a,b,c;c=this;c.X=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);c.Y=(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);c.W=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])-c.X;c.H=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])-c.Y;};X.prototype.SetBounds=function(a,b){return this.$val.SetBounds(a,b);};X.ptr.prototype.CheckAllWithHolder=function(a,b,c){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if(d.Space===AK.nil){return false;}c.Clear();c.checkingObject=d;if(a<0){a=A.Min(a,-1);}else if(a>0){a=A.Max(a,1);}if(b<0){b=A.Min(b,-1);}else if(b>0){b=A.Max(b,1);}c.dx=a;c.dy=b;e=d.BoundsToSpace(a,b);f=e[0];g=e[1];h=e[2];i=e[3];j=$makeMap(AL.keyFor,[]);k=$makeMap(AH.keyFor,[]);l=g;while(true){if(!(l<=i)){break;}m=f;while(true){if(!(m<=h)){break;}n=d.Space.Cell(m,l);if(!(n===AH.nil)){o=n.Objects;p=o.StFrameId;while(true){if(!(p<o.EdFrameId)){break;}q=$assertType(o.GetByFrameId(p),AL);s=(r=d.ignoreList[AL.keyFor(q)],r!==undefined?r.v:false);if(q===d||s){p=p+(1)>>0;continue;}t=(u=j[AL.keyFor(q)],u!==undefined?[u.v,true]:[false,false]);v=t[1];if(!v){c.Objects.Put(q);w=q;(j||$throwRuntimeError("assignment to entry in nil map"))[AL.keyFor(w)]={k:w,v:true};x=(y=k[AH.keyFor(n)],y!==undefined?[y.v,true]:[false,false]);z=x[1];if(!z){c.Cells.Put(n);aa=n;(k||$throwRuntimeError("assignment to entry in nil map"))[AH.keyFor(aa)]={k:aa,v:true};}p=p+(1)>>0;continue;}p=p+(1)>>0;}}m=m+(1)>>0;}l=l+(1)>>0;}if(0>=c.Objects.Cnt){return false;}return true;};X.prototype.CheckAllWithHolder=function(a,b,c){return this.$val.CheckAllWithHolder(a,b,c);};X.ptr.prototype.Overlaps=function(a){var a,b;b=this;return a.X<=b.X+b.W&&a.X+a.W>=b.X&&a.Y<=b.Y+b.H&&a.Y+a.H>=b.Y;};X.prototype.Overlaps=function(a){return this.$val.Overlaps(a);};X.ptr.prototype.AddToIgnoreList=function(a){var a,b,c;b=this;c=a;(b.ignoreList||$throwRuntimeError("assignment to entry in nil map"))[AL.keyFor(c)]={k:c,v:true};};X.prototype.AddToIgnoreList=function(a){return this.$val.AddToIgnoreList(a);};X.ptr.prototype.RemoveFromIgnoreList=function(a){var a,b;b=this;delete b.ignoreList[AL.keyFor(a)];};X.prototype.RemoveFromIgnoreList=function(a){return this.$val.RemoveFromIgnoreList(a);};AD=function(){return new AC.ptr(AL.nil,0,0,W(16),W(16));};$pkg.NewCollision=AD;AC.ptr.prototype.Clear=function(){var a;a=this;a.checkingObject=AL.nil;a.dx=0;a.dy=0;a.Objects.Clear();a.Cells.Clear();};AC.prototype.Clear=function(){return this.$val.Clear();};AC.ptr.prototype.PopFirstCollidedObject=function(){var a;a=this;if(0>=a.Objects.Cnt){return AL.nil;}return $assertType(a.Objects.Pop(),AL);};AC.prototype.PopFirstCollidedObject=function(){return this.$val.PopFirstCollidedObject();};AC.ptr.prototype.HasTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AL);if(e===b.checkingObject){d=d+(1)>>0;continue;}if(e.HasTags(a)){return true;}d=d+(1)>>0;}return false;};AC.prototype.HasTags=function(a){return this.$val.HasTags(a);};AC.ptr.prototype.ObjectsByTags=function(a){var a,b,c,d,e,f;b=this;c=new AM([]);d=b.Objects;e=d.StFrameId;while(true){if(!(e<d.EdFrameId)){break;}f=$assertType(d.GetByFrameId(e),AL);if(f===b.checkingObject){e=e+(1)>>0;continue;}if(f.HasTags(a)){c=$append(c,f);}e=e+(1)>>0;}return c;};AC.prototype.ObjectsByTags=function(a){return this.$val.ObjectsByTags(a);};AC.ptr.prototype.ContactWithObject=function(a){var a,b,c;b=this;c=new B([0,0]);if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X+a.W-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y+a.H-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y-b.checkingObject.H-b.checkingObject.Y);}return c;};AC.prototype.ContactWithObject=function(a){return this.$val.ContactWithObject(a);};AC.ptr.prototype.ContactWithCell=function(a){var a,b,c,d,e;b=this;c=new B([0,0]);d=(($imul(a.X,b.checkingObject.Space.CellWidth)));e=(($imul(a.Y,b.checkingObject.Space.CellHeight)));if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d+(b.checkingObject.Space.CellWidth)-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e+(b.checkingObject.Space.CellHeight)-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e-b.checkingObject.H-b.checkingObject.Y);}return c;};AC.prototype.ContactWithCell=function(a){return this.$val.ContactWithCell(a);};AC.ptr.prototype.SlideAgainstCell=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=this;d=c.checkingObject.Space;e=$assertType(c.Cells.GetByFrameId(c.Cells.StFrameId),AH);f=d.SpaceToWorld(e.X,e.Y);g=f[0];h=f[1];i=(d.CellWidth)/2;j=(d.CellHeight)/2;g=g+(i);h=h+(j);k=c.checkingObject.Center();l=k[0];m=k[1];n=l-g;o=m-h;p=d.Cell(e.X-1>>0,e.Y);q=d.Cell(e.X+1>>0,e.Y);r=d.Cell(e.X,e.Y-1>>0);s=d.Cell(e.X,e.Y+1>>0);t=new B([0,0]);if(!((c.dy===0))){if(n>0&&(q===AH.nil||!q.ContainsTags(b))){(0>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+0]=g+i-c.checkingObject.X);}else if(n<0&&(p===AH.nil||!p.ContainsTags(b))){(0>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+0]=g-i-(c.checkingObject.X+c.checkingObject.W));}else{return B.nil;}}if(!((c.dx===0))){if(o>0&&(s===AH.nil||!s.ContainsTags(b))){(1>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+1]=h+j-c.checkingObject.Y);}else if(o<0&&(r===AH.nil||!r.ContainsTags(b))){(1>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+1]=h-j-(c.checkingObject.Y+c.checkingObject.H));}else{return B.nil;}}return t;};AC.prototype.SlideAgainstCell=function(a,b){return this.$val.SlideAgainstCell(a,b);};AF=function(a,b){var a,b;return new AE.ptr(a,b,W(16));};AE.ptr.prototype.register=function(a){var a,b;b=this;if(!b.Contains(a)){b.Objects.Put(a);}};AE.prototype.register=function(a){return this.$val.register(a);};AE.ptr.prototype.unregister=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AL);if(e===a){c.SetByFrameId(c.GetByFrameId(c.StFrameId),d);c.Pop();break;}d=d+(1)>>0;}};AE.prototype.unregister=function(a){return this.$val.unregister(a);};AE.ptr.prototype.Contains=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AL);if(e===a){return true;}d=d+(1)>>0;}return false;};AE.prototype.Contains=function(a){return this.$val.Contains(a);};AE.ptr.prototype.ContainsTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=c.StFrameId;while(true){if(!(d<c.EdFrameId)){break;}e=$assertType(c.GetByFrameId(d),AL);if(e.HasTags(a)){return true;}d=d+(1)>>0;}return false;};AE.prototype.ContainsTags=function(a){return this.$val.ContainsTags(a);};AE.ptr.prototype.Occupied=function(){var a;a=this;return 0<a.Objects.Cnt;};AE.prototype.Occupied=function(){return this.$val.Occupied();};B.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[B],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Magnitude",name:"Magnitude",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Magnitude2",name:"Magnitude2",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Unit",name:"Unit",pkg:"",typ:$funcType([],[B],false)},{prop:"Dot",name:"Dot",pkg:"",typ:$funcType([B],[$Float64],false)},{prop:"Cross",name:"Cross",pkg:"",typ:$funcType([B],[B],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Float64,AW],[B],true)},{prop:"X",name:"X",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Y",name:"Y",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Z",name:"Z",pkg:"",typ:$funcType([],[$Float64],false)}];AK.methods=[{prop:"AddSingle",name:"AddSingle",pkg:"",typ:$funcType([AL],[],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([AM],[],true)},{prop:"RemoveSingle",name:"RemoveSingle",pkg:"",typ:$funcType([AL],[],false)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([AM],[],true)},{prop:"Objects",name:"Objects",pkg:"",typ:$funcType([],[AM],false)},{prop:"Resize",name:"Resize",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Cell",name:"Cell",pkg:"",typ:$funcType([$Int,$Int],[AH],false)},{prop:"CheckCells",name:"CheckCells",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,AU],[AL],true)},{prop:"CheckCellsWorld",name:"CheckCellsWorld",pkg:"",typ:$funcType([$Float64,$Float64,$Float64,$Float64,AU],[AL],true)},{prop:"UnregisterAllObjects",name:"UnregisterAllObjects",pkg:"",typ:$funcType([],[],false)},{prop:"WorldToSpace",name:"WorldToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int],false)},{prop:"SpaceToWorld",name:"SpaceToWorld",pkg:"",typ:$funcType([$Int,$Int],[$Float64,$Float64],false)},{prop:"Height",name:"Height",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CellsInLine",name:"CellsInLine",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[AI],false)}];AO.methods=[{prop:"Normal",name:"Normal",pkg:"",typ:$funcType([],[B],false)},{prop:"IntersectionPointsLine",name:"IntersectionPointsLine",pkg:"",typ:$funcType([AO],[B],false)}];AR.methods=[{prop:"GetPointByOffset",name:"GetPointByOffset",pkg:"",typ:$funcType([$Int32],[B],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[M],false)},{prop:"AddPoints",name:"AddPoints",pkg:"",typ:$funcType([AG],[],true)},{prop:"UpdateAsRectangle",name:"UpdateAsRectangle",pkg:"",typ:$funcType([$Float64,$Float64,$Float64,$Float64],[$Bool],false)},{prop:"Lines",name:"Lines",pkg:"",typ:$funcType([],[AP],false)},{prop:"Transformed",name:"Transformed",pkg:"",typ:$funcType([],[AQ],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B],[],false)},{prop:"Project",name:"Project",pkg:"",typ:$funcType([B],[U],false)},{prop:"SATAxes",name:"SATAxes",pkg:"",typ:$funcType([],[AQ],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B],[$Bool],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,M],[AS],false)}];AS.methods=[{prop:"LeftmostPoint",name:"LeftmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"RightmostPoint",name:"RightmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"TopmostPoint",name:"TopmostPoint",pkg:"",typ:$funcType([],[B],false)},{prop:"BottommostPoint",name:"BottommostPoint",pkg:"",typ:$funcType([],[B],false)}];U.methods=[{prop:"Overlapping",name:"Overlapping",pkg:"",typ:$funcType([U],[$Bool],false)},{prop:"Overlap",name:"Overlap",pkg:"",typ:$funcType([U],[$Float64],false)},{prop:"IsInside",name:"IsInside",pkg:"",typ:$funcType([U],[$Bool],false)}];AN.methods=[{prop:"DryPut",name:"DryPut",pkg:"",typ:$funcType([],[],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"Pop",name:"Pop",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"GetArrIdxByOffset",name:"GetArrIdxByOffset",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"GetByOffset",name:"GetByOffset",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"GetByFrameId",name:"GetByFrameId",pkg:"",typ:$funcType([$Int32],[$emptyInterface],false)},{prop:"SetByFrameId",name:"SetByFrameId",pkg:"",typ:$funcType([$emptyInterface,$Int32],[$Int32,$Int32,$Int32],false)},{prop:"Clear",name:"Clear",pkg:"",typ:$funcType([],[],false)},{prop:"GetStFrameId",name:"GetStFrameId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetEdFrameId",name:"GetEdFrameId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetCnt",name:"GetCnt",pkg:"",typ:$funcType([],[$Int32],false)}];AL.methods=[{prop:"GetData",name:"GetData",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"GetShape",name:"GetShape",pkg:"",typ:$funcType([],[AV],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[AL],false)},{prop:"Update",name:"Update",pkg:"",typ:$funcType([],[],false)},{prop:"AddTags",name:"AddTags",pkg:"",typ:$funcType([AU],[],true)},{prop:"RemoveTags",name:"RemoveTags",pkg:"",typ:$funcType([AU],[],true)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AU],[$Bool],true)},{prop:"Tags",name:"Tags",pkg:"",typ:$funcType([],[AU],false)},{prop:"SetShape",name:"SetShape",pkg:"",typ:$funcType([M],[],false)},{prop:"BoundsToSpace",name:"BoundsToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int,$Int,$Int],false)},{prop:"SharesCells",name:"SharesCells",pkg:"",typ:$funcType([AL],[$Bool],false)},{prop:"SharesCellsTags",name:"SharesCellsTags",pkg:"",typ:$funcType([AU],[$Bool],true)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetCenter",name:"SetCenter",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"CellPosition",name:"CellPosition",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"SetRight",name:"SetRight",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetBottom",name:"SetBottom",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"Bottom",name:"Bottom",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Right",name:"Right",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"SetBounds",name:"SetBounds",pkg:"",typ:$funcType([B,B],[],false)},{prop:"CheckAllWithHolder",name:"CheckAllWithHolder",pkg:"",typ:$funcType([$Float64,$Float64,AX],[$Bool],false)},{prop:"Overlaps",name:"Overlaps",pkg:"",typ:$funcType([AL],[$Bool],false)},{prop:"AddToIgnoreList",name:"AddToIgnoreList",pkg:"",typ:$funcType([AL],[],false)},{prop:"RemoveFromIgnoreList",name:"RemoveFromIgnoreList",pkg:"",typ:$funcType([AL],[],false)}];AX.methods=[{prop:"Clear",name:"Clear",pkg:"",typ:$funcType([],[],false)},{prop:"PopFirstCollidedObject",name:"PopFirstCollidedObject",pkg:"",typ:$funcType([],[AL],false)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AU],[$Bool],true)},{prop:"ObjectsByTags",name:"ObjectsByTags",pkg:"",typ:$funcType([AU],[AM],true)},{prop:"ContactWithObject",name:"ContactWithObject",pkg:"",typ:$funcType([AL],[B],false)},{prop:"ContactWithCell",name:"ContactWithCell",pkg:"",typ:$funcType([AH],[B],false)},{prop:"SlideAgainstCell",name:"SlideAgainstCell",pkg:"",typ:$funcType([AH,AU],[B],true)}];AH.methods=[{prop:"register",name:"register",pkg:"resolv",typ:$funcType([AL],[],false)},{prop:"unregister",name:"unregister",pkg:"resolv",typ:$funcType([AL],[],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([AL],[$Bool],false)},{prop:"ContainsTags",name:"ContainsTags",pkg:"",typ:$funcType([AU],[$Bool],true)},{prop:"Occupied",name:"Occupied",pkg:"",typ:$funcType([],[$Bool],false)}];B.init($Float64);K.init("",[{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AJ,tag:""},{prop:"CellWidth",name:"CellWidth",embedded:false,exported:true,typ:$Int,tag:""},{prop:"CellHeight",name:"CellHeight",embedded:false,exported:true,typ:$Int,tag:""}]);M.init([{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B,B],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[M],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,M],[AS],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)}]);N.init("",[{prop:"Start",name:"Start",embedded:false,exported:true,typ:B,tag:""},{prop:"End",name:"End",embedded:false,exported:true,typ:B,tag:""}]);P.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AN,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Closed",name:"Closed",embedded:false,exported:true,typ:$Bool,tag:""}]);R.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AQ,tag:""},{prop:"MTV",name:"MTV",embedded:false,exported:true,typ:B,tag:""},{prop:"Center",name:"Center",embedded:false,exported:true,typ:B,tag:""}]);U.init("",[{prop:"Min",name:"Min",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Max",name:"Max",embedded:false,exported:true,typ:$Float64,tag:""}]);V.init("",[{prop:"Ed",name:"Ed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"St",name:"St",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"EdFrameId",name:"EdFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StFrameId",name:"StFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"N",name:"N",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Cnt",name:"Cnt",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Eles",name:"Eles",embedded:false,exported:true,typ:AT,tag:""}]);X.init("resolv",[{prop:"Shape",name:"Shape",embedded:false,exported:true,typ:M,tag:""},{prop:"Space",name:"Space",embedded:false,exported:true,typ:AK,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"W",name:"W",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"H",name:"H",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"TouchingCells",name:"TouchingCells",embedded:false,exported:true,typ:AN,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$emptyInterface,tag:""},{prop:"ignoreList",name:"ignoreList",embedded:false,exported:false,typ:AY,tag:""},{prop:"tags",name:"tags",embedded:false,exported:false,typ:AU,tag:""}]);AC.init("resolv",[{prop:"checkingObject",name:"checkingObject",embedded:false,exported:false,typ:AL,tag:""},{prop:"dx",name:"dx",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"dy",name:"dy",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AN,tag:""},{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:AN,tag:""}]);AE.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AN,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,H,I,J,K,L,M,N,O,P,Q,R,AF,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,S,T,U,V,W,X,Z,AA,AB,AC,AD,AE,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK;A=$packages["math"];B=$packages["resolv"];C=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});D=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=CC.nil;this.Points=CD.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});E=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,FramesInChState_,Hp_,MaxHp_,CharacterState_,InAir_,OnWall_,OnWallNormX_,OnWallNormY_,CapturedByInertia_,ActiveSkillId_,ActiveSkillHit_,FramesInvinsible_,BulletTeamId_,ChCollisionTeamId_,RevivalVirtualGridX_,RevivalVirtualGridY_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.FramesInChState=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;this.OnWall=false;this.OnWallNormX=0;this.OnWallNormY=0;this.CapturedByInertia=false;this.ActiveSkillId=0;this.ActiveSkillHit=0;this.FramesInvinsible=0;this.BulletTeamId=0;this.ChCollisionTeamId=0;this.RevivalVirtualGridX=0;this.RevivalVirtualGridY=0;return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.FramesInChState=FramesInChState_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;this.OnWall=OnWall_;this.OnWallNormX=OnWallNormX_;this.OnWallNormY=OnWallNormY_;this.CapturedByInertia=CapturedByInertia_;this.ActiveSkillId=ActiveSkillId_;this.ActiveSkillHit=ActiveSkillHit_;this.FramesInvinsible=FramesInvinsible_;this.BulletTeamId=BulletTeamId_;this.ChCollisionTeamId=ChCollisionTeamId_;this.RevivalVirtualGridX=RevivalVirtualGridX_;this.RevivalVirtualGridY=RevivalVirtualGridY_;});F=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});H=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=CH.nil;return;}this.Boundary=Boundary_;});I=$pkg.BulletConfig=$newType(0,$kindStruct,"battle.BulletConfig",true,"jsexport/battle",true,function(StartupFrames_,CancellableStFrame_,CancellableEdFrame_,ActiveFrames_,HitStunFrames_,BlockStunFrames_,PushbackVelX_,PushbackVelY_,Damage_,SelfLockVelX_,SelfLockVelY_,HitboxOffsetX_,HitboxOffsetY_,HitboxSizeX_,HitboxSizeY_,BlowUp_,ExplosionFrames_,SpeciesId_,CancelTransit_){this.$val=this;if(arguments.length===0){this.StartupFrames=0;this.CancellableStFrame=0;this.CancellableEdFrame=0;this.ActiveFrames=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.PushbackVelX=0;this.PushbackVelY=0;this.Damage=0;this.SelfLockVelX=0;this.SelfLockVelY=0;this.HitboxOffsetX=0;this.HitboxOffsetY=0;this.HitboxSizeX=0;this.HitboxSizeY=0;this.BlowUp=false;this.ExplosionFrames=0;this.SpeciesId=0;this.CancelTransit=false;return;}this.StartupFrames=StartupFrames_;this.CancellableStFrame=CancellableStFrame_;this.CancellableEdFrame=CancellableEdFrame_;this.ActiveFrames=ActiveFrames_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.PushbackVelX=PushbackVelX_;this.PushbackVelY=PushbackVelY_;this.Damage=Damage_;this.SelfLockVelX=SelfLockVelX_;this.SelfLockVelY=SelfLockVelY_;this.HitboxOffsetX=HitboxOffsetX_;this.HitboxOffsetY=HitboxOffsetY_;this.HitboxSizeX=HitboxSizeX_;this.HitboxSizeY=HitboxSizeY_;this.BlowUp=BlowUp_;this.ExplosionFrames=ExplosionFrames_;this.SpeciesId=SpeciesId_;this.CancelTransit=CancelTransit_;});J=$pkg.BulletBattleAttr=$newType(0,$kindStruct,"battle.BulletBattleAttr",true,"jsexport/battle",true,function(BulletLocalId_,OriginatedRenderFrameId_,OffenderJoinIndex_,TeamId_){this.$val=this;if(arguments.length===0){this.BulletLocalId=0;this.OriginatedRenderFrameId=0;this.OffenderJoinIndex=0;this.TeamId=0;return;}this.BulletLocalId=BulletLocalId_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.OffenderJoinIndex=OffenderJoinIndex_;this.TeamId=TeamId_;});K=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(BlState_,FramesInBlState_,BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.BlState=0;this.FramesInBlState=0;this.BattleAttr=BO.nil;this.Bullet=BP.nil;return;}this.BlState=BlState_;this.FramesInBlState=FramesInBlState_;this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});L=$pkg.FireballBullet=$newType(0,$kindStruct,"battle.FireballBullet",true,"jsexport/battle",true,function(VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BlState_,FramesInBlState_,BattleAttr_,Bullet_){this.$val=this;if(arguments.length===0){this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BlState=0;this.FramesInBlState=0;this.BattleAttr=BO.nil;this.Bullet=BP.nil;return;}this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BlState=BlState_;this.FramesInBlState=FramesInBlState_;this.BattleAttr=BattleAttr_;this.Bullet=Bullet_;});M=$pkg.Skill=$newType(0,$kindStruct,"battle.Skill",true,"jsexport/battle",true,function(BattleLocalId_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,ReleaseTriggerType_,BoundChState_,Hits_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.ReleaseTriggerType=0;this.BoundChState=0;this.Hits=BN.nil;return;}this.BattleLocalId=BattleLocalId_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.ReleaseTriggerType=ReleaseTriggerType_;this.BoundChState=BoundChState_;this.Hits=Hits_;});N=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,FireballBullets_,BackendUnconfirmedMask_,ShouldForceResync_,BulletLocalIdCounter_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=CE.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=CF.nil;this.FireballBullets=CG.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;this.BulletLocalIdCounter=0;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.FireballBullets=FireballBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;this.BulletLocalIdCounter=BulletLocalIdCounter_;});O=$pkg.InputFrameDownsync=$newType(0,$kindStruct,"battle.InputFrameDownsync",true,"jsexport/battle",true,function(InputFrameId_,InputList_,ConfirmedList_){this.$val=this;if(arguments.length===0){this.InputFrameId=0;this.InputList=BY.nil;this.ConfirmedList=new $Uint64(0,0);return;}this.InputFrameId=InputFrameId_;this.InputList=InputList_;this.ConfirmedList=ConfirmedList_;});P=$pkg.NpcPatrolCue=$newType(0,$kindStruct,"battle.NpcPatrolCue",true,"jsexport/battle",true,function(FlAct_,FrAct_,X_,Y_){this.$val=this;if(arguments.length===0){this.FlAct=new $Uint64(0,0);this.FrAct=new $Uint64(0,0);this.X=0;this.Y=0;return;}this.FlAct=FlAct_;this.FrAct=FrAct_;this.X=X_;this.Y=Y_;});Q=$pkg.SkillMapperType=$newType(4,$kindFunc,"battle.SkillMapperType",true,"jsexport/battle",true,null);R=$pkg.CharacterConfig=$newType(0,$kindStruct,"battle.CharacterConfig",true,"jsexport/battle",true,function(SpeciesId_,SpeciesName_,InAirIdleFrameIdxTurningPoint_,InAirIdleFrameIdxTurnedCycle_,LayDownFrames_,LayDownFramesToRecover_,GetUpInvinsibleFrames_,GetUpFramesToRecover_,Speed_,JumpingInitVelY_,JumpingFramesToRecover_,DashingEnabled_,OnWallEnabled_,WallJumpingFramesToRecover_,WallJumpingInitVelX_,WallJumpingInitVelY_,WallSlidingVelY_,InertiaFramesToRecover_,SkillMapper_){this.$val=this;if(arguments.length===0){this.SpeciesId=0;this.SpeciesName="";this.InAirIdleFrameIdxTurningPoint=0;this.InAirIdleFrameIdxTurnedCycle=0;this.LayDownFrames=0;this.LayDownFramesToRecover=0;this.GetUpInvinsibleFrames=0;this.GetUpFramesToRecover=0;this.Speed=0;this.JumpingInitVelY=0;this.JumpingFramesToRecover=0;this.DashingEnabled=false;this.OnWallEnabled=false;this.WallJumpingFramesToRecover=0;this.WallJumpingInitVelX=0;this.WallJumpingInitVelY=0;this.WallSlidingVelY=0;this.InertiaFramesToRecover=0;this.SkillMapper=$throwNilPointerError;return;}this.SpeciesId=SpeciesId_;this.SpeciesName=SpeciesName_;this.InAirIdleFrameIdxTurningPoint=InAirIdleFrameIdxTurningPoint_;this.InAirIdleFrameIdxTurnedCycle=InAirIdleFrameIdxTurnedCycle_;this.LayDownFrames=LayDownFrames_;this.LayDownFramesToRecover=LayDownFramesToRecover_;this.GetUpInvinsibleFrames=GetUpInvinsibleFrames_;this.GetUpFramesToRecover=GetUpFramesToRecover_;this.Speed=Speed_;this.JumpingInitVelY=JumpingInitVelY_;this.JumpingFramesToRecover=JumpingFramesToRecover_;this.DashingEnabled=DashingEnabled_;this.OnWallEnabled=OnWallEnabled_;this.WallJumpingFramesToRecover=WallJumpingFramesToRecover_;this.WallJumpingInitVelX=WallJumpingInitVelX_;this.WallJumpingInitVelY=WallJumpingInitVelY_;this.WallSlidingVelY=WallSlidingVelY_;this.InertiaFramesToRecover=InertiaFramesToRecover_;this.SkillMapper=SkillMapper_;});AF=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=B.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});BL=$sliceType($Int32);BM=$sliceType(BL);BN=$sliceType($emptyInterface);BO=$ptrType(J);BP=$ptrType(I);BQ=$ptrType(M);BR=$ptrType(K);BS=$ptrType(AF);BT=$ptrType(B.Object);BU=$ptrType(E);BV=$ptrType(L);BW=$ptrType(B.ConvexPolygon);BX=$ptrType(O);BY=$sliceType($Uint64);BZ=$ptrType(N);CA=$sliceType($Float64);CB=$sliceType($String);CC=$ptrType(C);CD=$sliceType(CC);CE=$sliceType(BU);CF=$sliceType(BR);CG=$sliceType(BV);CH=$ptrType(D);CI=$mapType($Int,$Int);CJ=$ptrType(R);R.ptr.prototype.GetSpeed=function(){var a;a=this;return a.Speed;};R.prototype.GetSpeed=function(){return this.$val.GetSpeed();};R.ptr.prototype.GetSpeciesId=function(){var a;a=this;return a.SpeciesId;};R.prototype.GetSpeciesId=function(){return this.$val.GetSpeciesId();};R.ptr.prototype.GetSpeciesName=function(){var a;a=this;return a.SpeciesName;};R.prototype.GetSpeciesName=function(){return this.$val.GetSpeciesName();};O.ptr.prototype.GetInputFrameId=function(){var a;a=this;return a.InputFrameId;};O.prototype.GetInputFrameId=function(){return this.$val.GetInputFrameId();};O.ptr.prototype.GetInputList=function(){var a;a=this;return a.InputList;};O.prototype.GetInputList=function(){return this.$val.GetInputList();};O.ptr.prototype.GetConfirmedList=function(){var a;a=this;return a.ConfirmedList;};O.prototype.GetConfirmedList=function(){return this.$val.GetConfirmedList();};E.ptr.prototype.GetId=function(){var a;a=this;return a.Id;};E.prototype.GetId=function(){return this.$val.GetId();};E.ptr.prototype.GetJoinIndex=function(){var a;a=this;return a.JoinIndex;};E.prototype.GetJoinIndex=function(){return this.$val.GetJoinIndex();};E.ptr.prototype.GetVirtualGridX=function(){var a;a=this;return a.VirtualGridX;};E.prototype.GetVirtualGridX=function(){return this.$val.GetVirtualGridX();};E.ptr.prototype.GetVirtualGridY=function(){var a;a=this;return a.VirtualGridY;};E.prototype.GetVirtualGridY=function(){return this.$val.GetVirtualGridY();};E.ptr.prototype.GetDirX=function(){var a;a=this;return a.DirX;};E.prototype.GetDirX=function(){return this.$val.GetDirX();};E.ptr.prototype.GetDirY=function(){var a;a=this;return a.DirY;};E.prototype.GetDirY=function(){return this.$val.GetDirY();};E.ptr.prototype.GetVelX=function(){var a;a=this;return a.VelX;};E.prototype.GetVelX=function(){return this.$val.GetVelX();};E.ptr.prototype.GetVelY=function(){var a;a=this;return a.VelY;};E.prototype.GetVelY=function(){return this.$val.GetVelY();};E.ptr.prototype.GetSpeed=function(){var a;a=this;return a.Speed;};E.prototype.GetSpeed=function(){return this.$val.GetSpeed();};E.ptr.prototype.GetHp=function(){var a;a=this;return a.Hp;};E.prototype.GetHp=function(){return this.$val.GetHp();};E.ptr.prototype.GetMaxHp=function(){var a;a=this;return a.MaxHp;};E.prototype.GetMaxHp=function(){return this.$val.GetMaxHp();};E.ptr.prototype.GetCharacterState=function(){var a;a=this;return a.CharacterState;};E.prototype.GetCharacterState=function(){return this.$val.GetCharacterState();};E.ptr.prototype.GetFramesToRecover=function(){var a;a=this;return a.FramesToRecover;};E.prototype.GetFramesToRecover=function(){return this.$val.GetFramesToRecover();};E.ptr.prototype.GetFramesInChState=function(){var a;a=this;return a.FramesInChState;};E.prototype.GetFramesInChState=function(){return this.$val.GetFramesInChState();};E.ptr.prototype.GetInAir=function(){var a;a=this;return a.InAir;};E.prototype.GetInAir=function(){return this.$val.GetInAir();};E.ptr.prototype.GetOnWall=function(){var a;a=this;return a.OnWall;};E.prototype.GetOnWall=function(){return this.$val.GetOnWall();};E.ptr.prototype.GetOnWallNormX=function(){var a;a=this;return a.OnWallNormX;};E.prototype.GetOnWallNormX=function(){return this.$val.GetOnWallNormX();};E.ptr.prototype.GetColliderRadius=function(){var a;a=this;return a.ColliderRadius;};E.prototype.GetColliderRadius=function(){return this.$val.GetColliderRadius();};K.ptr.prototype.GetBlState=function(){var a;a=this;return a.BlState;};K.prototype.GetBlState=function(){return this.$val.GetBlState();};K.ptr.prototype.GetFramesInBlState=function(){var a;a=this;return a.FramesInBlState;};K.prototype.GetFramesInBlState=function(){return this.$val.GetFramesInBlState();};K.ptr.prototype.GetBulletLocalId=function(){var a;a=this;return a.BattleAttr.BulletLocalId;};K.prototype.GetBulletLocalId=function(){return this.$val.GetBulletLocalId();};K.ptr.prototype.GetOffenderJoinIndex=function(){var a;a=this;return a.BattleAttr.OffenderJoinIndex;};K.prototype.GetOffenderJoinIndex=function(){return this.$val.GetOffenderJoinIndex();};K.ptr.prototype.GetOriginatedRenderFrameId=function(){var a;a=this;return a.BattleAttr.OriginatedRenderFrameId;};K.prototype.GetOriginatedRenderFrameId=function(){return this.$val.GetOriginatedRenderFrameId();};K.ptr.prototype.GetStartupFrames=function(){var a;a=this;return a.Bullet.StartupFrames;};K.prototype.GetStartupFrames=function(){return this.$val.GetStartupFrames();};K.ptr.prototype.GetActiveFrames=function(){var a;a=this;return a.Bullet.ActiveFrames;};K.prototype.GetActiveFrames=function(){return this.$val.GetActiveFrames();};K.ptr.prototype.GetHitboxSizeX=function(){var a;a=this;return a.Bullet.HitboxSizeX;};K.prototype.GetHitboxSizeX=function(){return this.$val.GetHitboxSizeX();};K.ptr.prototype.GetHitboxSizeY=function(){var a;a=this;return a.Bullet.HitboxSizeY;};K.prototype.GetHitboxSizeY=function(){return this.$val.GetHitboxSizeY();};K.ptr.prototype.GetHitboxOffsetX=function(){var a;a=this;return a.Bullet.HitboxOffsetX;};K.prototype.GetHitboxOffsetX=function(){return this.$val.GetHitboxOffsetX();};K.ptr.prototype.GetHitboxOffsetY=function(){var a;a=this;return a.Bullet.HitboxOffsetY;};K.prototype.GetHitboxOffsetY=function(){return this.$val.GetHitboxOffsetY();};K.ptr.prototype.GetExplosionFrames=function(){var a;a=this;return a.Bullet.ExplosionFrames;};K.prototype.GetExplosionFrames=function(){return this.$val.GetExplosionFrames();};K.ptr.prototype.GetSpeciesId=function(){var a;a=this;return a.Bullet.SpeciesId;};K.prototype.GetSpeciesId=function(){return this.$val.GetSpeciesId();};L.ptr.prototype.GetVirtualGridX=function(){var a;a=this;return a.VirtualGridX;};L.prototype.GetVirtualGridX=function(){return this.$val.GetVirtualGridX();};L.ptr.prototype.GetVirtualGridY=function(){var a;a=this;return a.VirtualGridY;};L.prototype.GetVirtualGridY=function(){return this.$val.GetVirtualGridY();};L.ptr.prototype.GetDirX=function(){var a;a=this;return a.DirX;};L.prototype.GetDirX=function(){return this.$val.GetDirX();};L.ptr.prototype.GetDirY=function(){var a;a=this;return a.DirY;};L.prototype.GetDirY=function(){return this.$val.GetDirY();};L.ptr.prototype.GetVelX=function(){var a;a=this;return a.VelX;};L.prototype.GetVelX=function(){return this.$val.GetVelX();};L.ptr.prototype.GetVelY=function(){var a;a=this;return a.VelY;};L.prototype.GetVelY=function(){return this.$val.GetVelY();};L.ptr.prototype.GetSpeed=function(){var a;a=this;return a.Speed;};L.prototype.GetSpeed=function(){return this.$val.GetSpeed();};L.ptr.prototype.GetBlState=function(){var a;a=this;return a.BlState;};L.prototype.GetBlState=function(){return this.$val.GetBlState();};L.ptr.prototype.GetFramesInBlState=function(){var a;a=this;return a.FramesInBlState;};L.prototype.GetFramesInBlState=function(){return this.$val.GetFramesInBlState();};L.ptr.prototype.GetBulletLocalId=function(){var a;a=this;return a.BattleAttr.BulletLocalId;};L.prototype.GetBulletLocalId=function(){return this.$val.GetBulletLocalId();};L.ptr.prototype.GetOffenderJoinIndex=function(){var a;a=this;return a.BattleAttr.OffenderJoinIndex;};L.prototype.GetOffenderJoinIndex=function(){return this.$val.GetOffenderJoinIndex();};L.ptr.prototype.GetOriginatedRenderFrameId=function(){var a;a=this;return a.BattleAttr.OriginatedRenderFrameId;};L.prototype.GetOriginatedRenderFrameId=function(){return this.$val.GetOriginatedRenderFrameId();};L.ptr.prototype.GetStartupFrames=function(){var a;a=this;return a.Bullet.StartupFrames;};L.prototype.GetStartupFrames=function(){return this.$val.GetStartupFrames();};L.ptr.prototype.GetActiveFrames=function(){var a;a=this;return a.Bullet.ActiveFrames;};L.prototype.GetActiveFrames=function(){return this.$val.GetActiveFrames();};L.ptr.prototype.GetHitboxSizeX=function(){var a;a=this;return a.Bullet.HitboxSizeX;};L.prototype.GetHitboxSizeX=function(){return this.$val.GetHitboxSizeX();};L.ptr.prototype.GetHitboxSizeY=function(){var a;a=this;return a.Bullet.HitboxSizeY;};L.prototype.GetHitboxSizeY=function(){return this.$val.GetHitboxSizeY();};L.ptr.prototype.GetHitboxOffsetX=function(){var a;a=this;return a.Bullet.HitboxOffsetX;};L.prototype.GetHitboxOffsetX=function(){return this.$val.GetHitboxOffsetX();};L.ptr.prototype.GetHitboxOffsetY=function(){var a;a=this;return a.Bullet.HitboxOffsetY;};L.prototype.GetHitboxOffsetY=function(){return this.$val.GetHitboxOffsetY();};L.ptr.prototype.GetExplosionFrames=function(){var a;a=this;return a.Bullet.ExplosionFrames;};L.prototype.GetExplosionFrames=function(){return this.$val.GetExplosionFrames();};L.ptr.prototype.GetSpeciesId=function(){var a;a=this;return a.Bullet.SpeciesId;};L.prototype.GetSpeciesId=function(){return this.$val.GetSpeciesId();};N.ptr.prototype.GetId=function(){var a;a=this;return a.Id;};N.prototype.GetId=function(){return this.$val.GetId();};N.ptr.prototype.GetCountdownNanos=function(){var a;a=this;return a.CountdownNanos;};N.prototype.GetCountdownNanos=function(){return this.$val.GetCountdownNanos();};N.ptr.prototype.GetBackendUnconfirmedMask=function(){var a;a=this;return a.BackendUnconfirmedMask;};N.prototype.GetBackendUnconfirmedMask=function(){return this.$val.GetBackendUnconfirmedMask();};N.ptr.prototype.GetBulletLocalIdCounter=function(){var a;a=this;return a.BulletLocalIdCounter;};N.prototype.GetBulletLocalIdCounter=function(){return this.$val.GetBulletLocalIdCounter();};N.ptr.prototype.GetShouldForceResync=function(){var a;a=this;return a.ShouldForceResync;};N.prototype.GetShouldForceResync=function(){return this.$val.GetShouldForceResync();};N.ptr.prototype.GetPlayersArr=function(){var a;a=this;return a.PlayersArr;};N.prototype.GetPlayersArr=function(){return this.$val.GetPlayersArr();};N.ptr.prototype.GetMeleeBullets=function(){var a;a=this;return a.MeleeBullets;};N.prototype.GetMeleeBullets=function(){return this.$val.GetMeleeBullets();};N.ptr.prototype.GetFireballBullets=function(){var a;a=this;return a.FireballBullets;};N.prototype.GetFireballBullets=function(){return this.$val.GetFireballBullets();};X=function(a){var a;if(a<0){return-a;}return a;};Z=function(a){var a;return(((a&3))===0);};$pkg.ShouldGenerateInputFrameUpsync=Z;AA=function(a){var a;if(a<4){return 0;}return(((a-4>>0))>>2>>0);};$pkg.ConvertToDelayedInputFrameId=AA;AB=function(a){var a;return(a>>2>>0);};$pkg.ConvertToNoDelayInputFrameId=AB;AC=function(a){var a;return(((a<<2>>0))+4>>0);};$pkg.ConvertToFirstUsedRenderFrameId=AC;AD=function(a){var a;return(((((a<<2>>0))+4>>0)+4>>0)-1>>0);};$pkg.ConvertToLastUsedRenderFrameId=AD;AE=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new F.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};AG=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new AF.ptr(0,0,0,true,true,new B.Vector([0,0]));i=AH(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,BS.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,BS.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:AG,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};AH=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;d=a.Points.Cnt;e=b.Points.Cnt;f=d;g=e;if((1===f)&&(1===g)){if(!(BS.nil===c)){c.Overlap=0;}h=a.GetPointByOffset(0);i=b.GetPointByOffset(0);return((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])===(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]))&&((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])===(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]));}if(1<f){j=0;while(true){if(!(j<a.Points.Cnt)){break;}k=a.GetPointByOffset(j);l=a.GetPointByOffset(0);m=k;n=l;if(!((j===(a.Points.Cnt-1>>0)))){n=a.GetPointByOffset(j+1>>0);}o=(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])-(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1]);p=(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0])-(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]);q=new B.Vector([o,-p]).Unit();if(AN(a,b,q,c)){return false;}j=j+(1)>>0;}}if(1<g){r=0;while(true){if(!(r<b.Points.Cnt)){break;}s=b.GetPointByOffset(r);t=b.GetPointByOffset(0);u=s;v=t;if(!((r===(b.Points.Cnt-1>>0)))){v=b.GetPointByOffset(r+1>>0);}w=(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])-(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]);x=(0>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+0])-(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]);y=new B.Vector([w,-x]).Unit();if(AN(a,b,y,c)){return false;}r=r+(1)>>0;}}return true;};AI=function(a,b,c,d,e){var a,b,c,d,e;if(2===a){return false;}return((b+c>>0)<e)&&(((b+c>>0)+d>>0)>e);};$pkg.IsGeneralBulletActive=AI;AJ=function(a,b){var a,b;return AI(a.BlState,a.BattleAttr.OriginatedRenderFrameId,a.Bullet.StartupFrames,a.Bullet.ActiveFrames,b.Id);};$pkg.IsMeleeBulletActive=AJ;AK=function(a,b){var a,b;if(2===a.BlState){return a.FramesInBlState<a.Bullet.ExplosionFrames;}return((a.BattleAttr.OriginatedRenderFrameId+a.Bullet.StartupFrames>>0)+a.Bullet.ActiveFrames>>0)>b.Id;};$pkg.IsMeleeBulletAlive=AK;AL=function(a,b){var a,b;return AI(a.BlState,a.BattleAttr.OriginatedRenderFrameId,a.Bullet.StartupFrames,a.Bullet.ActiveFrames,b.Id);};$pkg.IsFireballBulletActive=AL;AM=function(a,b){var a,b;if(2===a.BlState){return a.FramesInBlState<a.Bullet.ExplosionFrames;}return((a.BattleAttr.OriginatedRenderFrameId+a.Bullet.StartupFrames>>0)+a.Bullet.ActiveFrames>>0)>b.Id;};$pkg.IsFireballBulletAlive=AM;AN=function(a,b,c,d){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=0;while(true){if(!(m<a.Points.Cnt)){break;}n=a.GetPointByOffset(m);o=((0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>o){i=o;}if(j<o){j=o;}m=m+(1)>>0;}p=0;while(true){if(!(p<b.Points.Cnt)){break;}q=b.GetPointByOffset(p);r=((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>r){k=r;}if(l<r){l=r;}p=p+(1)>>0;}if(i>l||j<k){return true;}if(!(BS.nil===d)){s=0;if(i<k){d.AContainedInB=false;if(j<l){s=j-k;d.BContainedInA=false;}else{t=j-k;u=l-i;if(t<u){s=t;}else{s=-u;}}}else{d.BContainedInA=false;if(j>l){s=i-l;d.AContainedInB=false;}else{v=j-k;w=l-i;if(v<w){s=v;}else{s=-w;}}}x=d.Overlap;y=s;if(s<0){y=-s;}if(((0===(z=d.Axis,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))&&(0===(aa=d.Axis,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))))||x>y){ab=1;if(s<0){ab=-1;}d.Overlap=y;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ab;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ab;}d.Axis=c;}return false;};AO=function(a,b){var a,b,c,d;c=((A.Round(a*10)>>0));d=((A.Round(b*10)>>0));return[c,d];};$pkg.WorldToVirtualGridPos=AO;AP=function(a,b){var a,b,c,d;c=(a)*0.1;d=(b)*0.1;return[c,d];};$pkg.VirtualGridToWorldPos=AP;AQ=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=AQ;AR=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=AR;AS=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j,k,l,m;k=AR(a,b,c,d,e,f,g,h,i,j);l=k[0];m=k[1];return AO(l,m);};$pkg.PolygonColliderBLToVirtualGridPos=AS;AU=function(a,b,c,d,e,f,g,h,i){var{a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;if((16===b.CharacterState)&&(0===c.VelX)&&(b.DirX===c.DirX)){k=1;if(0>c.DirX){k=-k;}j=k*(b.Speed)*0.1;}l=0;m=d.CheckAllWithHolder(j,0,i);if(!m){$s=-1;return l;}case 1:n=i.PopFirstCollidedObject();if(BT.nil===n){$s=2;continue;}o=false;p=n.Data;if($assertType(p,BU,true)[1]||$assertType(p,BR,true)[1]||$assertType(p,BV,true)[1]){}else{o=true;}if(!o){$s=1;continue;}q=$assertType(n.Shape,BW);s=AG(0,0,e,q);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=r[0];u=r[1];v=r[2];w=r[3];if(!t){$s=1;continue;}x=(w.Overlap-f)*w.OverlapX;y=(w.Overlap-f)*w.OverlapY;u=x;v=y;z=w.OverlapX;aa=w.OverlapY;((l<0||l>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+l]).X=z;((l<0||l>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+l]).Y=aa;g.X=g.X+(u);g.Y=g.Y+(v);l=l+(1)>>0;$s=1;continue;case 2:$s=-1;return l;}return;}var $f={$blk:AU,$c:true,$r,a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AV=function(a,b,c,d,e,f,g){var a,b,c,d,e,f,g,h,i,j,k;h=0;while(true){if(!(h<b)){break;}if((((h+1>>0)>>0))===g){h=h+(1)>>0;continue;}if((i=(j=$shiftLeft64(new $Uint64(0,1),((h>>>0))),new $Uint64(c.$high&j.$high,(c.$low&j.$low)>>>0)),(0<i.$high||(0===i.$high&&0<i.$low)))){h=h+(1)>>0;continue;}if(((h<0||h>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+h])>=a){h=h+(1)>>0;continue;}((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]=((k=((h<0||h>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+h]),new $Uint64(k.$high&0,(k.$low&15)>>>0))));h=h+(1)>>0;}};$pkg.UpdateInputFrameInPlaceUponDynamics=AV;AW=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=AA(c.Id);g=AA(c.Id-1>>0);if(0>=f){return[-2,false,0,0];}h=(i=U[$Int32.keyFor(a.CharacterState)],i!==undefined?[i.v,true]:[false,false]);j=h[1];if(j){return[-2,false,0,0];}k=$assertType(e.GetByFrameId(f),BX);l=k.InputList;m=BY.nil;if(0<g){n=$assertType(e.GetByFrameId(g),BX);m=n.InputList;}o=false;p=a.JoinIndex;r=AE((q=p-1>>0,((q<0||q>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+q])));s=0;t=0;u=s;v=t;w=0;x=0;y=w;z=x;if(!(BY.nil===m)){ab=AE((aa=p-1>>0,((aa<0||aa>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+aa])));y=ab.BtnALevel;z=ab.BtnBLevel;}if(0===a.FramesToRecover){ac=r.Dx;ad=r.Dy;u=ac;v=ad;}ae=-1;af=a.CapturedByInertia&&(((d.InertiaFramesToRecover>>1>>0))>a.FramesToRecover);if((0===a.FramesToRecover)||af){if(r.BtnBLevel>z){if(d.DashingEnabled&&0>r.Dy&&!((15===a.CharacterState))){ae=5;}else{ag=(ah=T[$Int32.keyFor(a.CharacterState)],ah!==undefined?[ah.v,true]:[false,false]);ai=ag[1];if(!ai){o=true;}else if(16===a.CharacterState){o=true;}}}}if(-1===ae){if(0<r.BtnALevel){if(r.BtnALevel>y){if(0>r.Dy){ae=3;}else if(0<r.Dy){ae=2;}else{ae=1;}}else{ae=4;}}}return[ae,o,u,v];};AX=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,fw,fx,fy,fz,g,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,gk,gl,gm,gn,go,gp,gq,gr,gs,gt,gu,gv,gw,gx,gy,gz,h,ha,hb,hc,hd,he,hf,hg,hh,hi,hj,hk,hl,hm,hn,ho,hp,hq,hr,hs,ht,hu,hv,hw,hx,hy,hz,i,ia,ib,ic,id,ie,ig,ih,ii,ij,ik,il,im,io,ip,iq,ir,is,it,iu,iv,iw,ix,iy,iz,j,ja,jb,jc,jd,je,jf,jg,jh,ji,jj,jk,jl,jm,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q});$s=$s||0;s:while(true){switch($s){case 0:r=$assertType(h.GetByFrameId(b),BZ);s=b+1>>0;t=r.PlayersArr.$length;u=BZ.nil;v=h.GetByFrameId(s);if($interfaceIsEqual($ifaceNil,v)){if(s===h.EdFrameId){h.DryPut();v=h.GetByFrameId(s);if($interfaceIsEqual($ifaceNil,v)){u=BK(t,64,64);h.SetByFrameId(u,s);}else{u=$assertType(v,BZ);}}else{$panic(new $String("Invalid nextRenderFrameId="+($encodeRune(s))+"!"));}}else{u=$assertType(v,BZ);}w=u.PlayersArr;x=r.PlayersArr;y=0;while(true){if(!(y<x.$length)){break;}z=y;aa=((y<0||y>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);ab=aa.FramesToRecover-1>>0;ac=aa.FramesInChState+1>>0;ad=aa.FramesInvinsible-1>>0;if(ab<0){ab=0;}if(ad<0){ad=0;}BI(aa.Id,aa.VirtualGridX,aa.VirtualGridY,aa.DirX,aa.DirY,aa.VelX,aa.VelY,ab,ac,aa.ActiveSkillId,aa.ActiveSkillHit,ad,aa.Speed,aa.BattleState,aa.CharacterState,aa.JoinIndex,aa.Hp,aa.MaxHp,aa.ColliderRadius,true,false,aa.OnWallNormX,aa.OnWallNormY,aa.CapturedByInertia,aa.BulletTeamId,aa.ChCollisionTeamId,aa.RevivalVirtualGridX,aa.RevivalVirtualGridY,((z<0||z>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+z]));y++;}ae=0;af=u.MeleeBullets;ag=0;ah=u.FireballBullets;ai=r.BulletLocalIdCounter;aj=AA(r.Id);if(0<aj){ak=$assertType(a.GetByFrameId(aj),BX);al=ak.InputList;am=al.$length;if(p){AV(aj,am,ak.ConfirmedList,al,n,o,q);}}an=r.PlayersArr;ao=0;case 1:if(!(ao<an.$length)){$s=2;continue;}ap=ao;aq=((ao<0||ao>=an.$length)?($throwRuntimeError("index out of range"),undefined):an.$array[an.$offset+ao]);ar=((ap<0||ap>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+ap]);as=((ap<0||ap>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+ap]);at=AW(aq,as,r,ar,a);au=at[0];av=at[1];aw=at[2];ax=at[3];((ap<0||ap>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+ap]=av);ay=aq.JoinIndex;az=ar.SkillMapper(au,aq);$s=3;case 3:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=(bc=S[$Int.keyFor(ba)],bc!==undefined?[bc.v,true]:[BQ.nil,false]);bd=bb[0];be=bb[1];if(be){as.ActiveSkillId=((ba>>0));as.ActiveSkillHit=0;as.FramesToRecover=bd.RecoveryFrames;bf=1;if(0>as.DirX){bf=-bf;}bg=false;bh=(bi=bd.Hits,bj=as.ActiveSkillHit,((bj<0||bj>=bi.$length)?($throwRuntimeError("index out of range"),undefined):bi.$array[bi.$offset+bj]));if($assertType(bh,BR,true)[1]){bk=bh.$val;BG(0,0,ai,b,ay,aq.BulletTeamId,bk.Bullet,((ae<0||ae>=af.$length)?($throwRuntimeError("index out of range"),undefined):af.$array[af.$offset+ae]));ai=ai+(1)>>0;ae=ae+(1)>>0;if(!((-1===bk.Bullet.SelfLockVelX))){bg=true;as.VelX=$imul(bf,bk.Bullet.SelfLockVelX);}if(!((-1===bk.Bullet.SelfLockVelY))){bg=true;as.VelY=bk.Bullet.SelfLockVelY;}}else if($assertType(bh,BV,true)[1]){bl=bh.$val;BH(0,0,aq.VirtualGridX+($imul(bf,bl.Bullet.HitboxOffsetX))>>0,aq.VirtualGridY+bl.Bullet.HitboxOffsetY>>0,bf,0,$imul(bl.Speed,bf),0,bl.Speed,ai,b,ay,aq.BulletTeamId,bl.Bullet,((ag<0||ag>=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ag]));ai=ai+(1)>>0;ag=ag+(1)>>0;if(!((-1===bl.Bullet.SelfLockVelX))){bg=true;as.VelX=$imul(bf,bl.Bullet.SelfLockVelX);}if(!((-1===bl.Bullet.SelfLockVelY))){bg=true;as.VelY=bl.Bullet.SelfLockVelY;}}if(false===bg&&false===aq.InAir){as.VelX=0;}as.CharacterState=bd.BoundChState;ao++;$s=1;continue;}if(0===aq.FramesToRecover){bm=aq.CapturedByInertia;bn=ar.OnWallEnabled&&(ar.WallJumpingInitVelX===X(aq.VelX));bo=true;bp=false;bq=false;if(!((0===aw))&&(0===as.VelX)){bo=false;}else if((0===aw)&&!((0===as.VelX))){bo=false;bq=true;}else if(0>($imul(aw,as.VelX))){bo=false;bp=true;}if(!av&&!bn&&!bm&&!bo){as.CapturedByInertia=true;if(bp){as.CharacterState=17;as.FramesToRecover=ar.InertiaFramesToRecover;}else if(bq){as.FramesToRecover=ar.InertiaFramesToRecover;}else{as.CharacterState=1;as.FramesToRecover=(ar.InertiaFramesToRecover>>1>>0);}}else{as.CapturedByInertia=false;if(!((0===aw))){br=1;if(0>aw){br=-br;}as.DirX=aw;as.DirY=ax;if(bn){as.VelX=$imul(br,X(aq.VelX));}else{as.VelX=$imul(br,aq.Speed);}as.CharacterState=1;}else{as.CharacterState=0;as.VelX=0;}}}ao++;$s=1;continue;case 2:bs=0;bt=r.PlayersArr;bu=0;case 4:if(!(bu<bt.$length)){$s=5;continue;}bv=bu;bw=((bu<0||bu>=bt.$length)?($throwRuntimeError("index out of range"),undefined):bt.$array[bt.$offset+bu]);bx=bw.JoinIndex;by=0;bz=0;(ca=bx-1>>0,((ca<0||ca>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+ca])).X=by;(cb=bx-1>>0,((cb<0||cb>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+cb])).Y=bz;cc=((bv<0||bv>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+bv]);cd=((bv<0||bv>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+bv]);ce=bw.VirtualGridX+bw.VelX>>0;cf=bw.VirtualGridY+bw.VelY>>0;cg=ce;ch=cf;if(0>=cc.Hp&&(0===cc.FramesToRecover)){ci=bw.RevivalVirtualGridX;cj=bw.RevivalVirtualGridY;cg=ci;ch=cj;cc.CharacterState=10;cc.FramesInChState=10;cc.FramesToRecover=cd.GetUpFramesToRecover;cc.FramesInvinsible=cd.GetUpInvinsibleFrames;cc.Hp=bw.MaxHp;if(0===((ck=cc.JoinIndex%2,ck===ck?ck:$throwRuntimeError("integer divide by zero")))){cc.DirX=-2;cc.DirY=0;}else{cc.DirX=2;cc.DirY=0;}}if(((bv<0||bv>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+bv])){if(16===bw.CharacterState){if(0<($imul(bw.VelX,bw.OnWallNormX))){cg=cg-(bw.VelX)>>0;}cl=-1;if(0>bw.OnWallNormX){cl=-cl;}cg=cg+(($imul(cl,cd.WallJumpingInitVelX)))>>0;ch=ch+(cd.WallJumpingInitVelY)>>0;cc.VelX=(($imul(cl,cd.WallJumpingInitVelX)));cc.VelY=(cd.WallJumpingInitVelY);cc.FramesToRecover=cd.WallJumpingFramesToRecover;}else{cc.VelY=(cd.JumpingInitVelY);ch=ch+(cd.JumpingInitVelY)>>0;}}cm=AP(cg,ch);cn=cm[0];co=cm[1];cp=$imul(bw.ColliderRadius,2);cq=$imul(bw.ColliderRadius,4);cr=cp;cs=cq;ct=bw.CharacterState;if(ct===(9)){cu=$imul(bw.ColliderRadius,4);cv=$imul(bw.ColliderRadius,2);cr=cu;cs=cv;}else if((ct===(8))||(ct===(4))||(ct===(5))||(ct===(16))){cw=$imul(bw.ColliderRadius,2);cx=$imul(bw.ColliderRadius,2);cr=cw;cs=cx;}cy=AP(cr,cs);cz=cy[0];da=cy[1];db=((bs<0||bs>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+bs]);BA(db,cn,co,cz,da,0.1,0.1,0.1,0.1,e,f,bw,"Player");bs=bs+(1)>>0;$r=c.AddSingle(db);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(bw.InAir){if((16===bw.CharacterState)&&!((bv<0||bv>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+bv])){cc.VelX=cc.VelX+(0)>>0;cc.VelY=cd.WallSlidingVelY;}else if(15===bw.CharacterState){cc.VelX=cc.VelX+(0)>>0;}else{cc.VelX=cc.VelX+(0)>>0;cc.VelY=cc.VelY+(-5)>>0;}}bu++;$s=4;continue;case 5:dc=r.FireballBullets;dd=0;case 7:if(!(dd<dc.$length)){$s=8;continue;}de=((dd<0||dd>=dc.$length)?($throwRuntimeError("index out of range"),undefined):dc.$array[dc.$offset+dd]);if(-1===de.BattleAttr.BulletLocalId){$s=8;continue;}df=((ag<0||ag>=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ag]);BH(de.BlState,de.FramesInBlState+1>>0,de.VirtualGridX,de.VirtualGridY,de.DirX,de.DirY,de.VelX,de.VelY,de.Speed,de.BattleAttr.BulletLocalId,de.BattleAttr.OriginatedRenderFrameId,de.BattleAttr.OffenderJoinIndex,de.BattleAttr.TeamId,de.Bullet,df);if(AM(df,r)){$s=9;continue;}$s=10;continue;case 9:if(AL(df,r)){$s=11;continue;}$s=12;continue;case 11:dg=AP(df.VirtualGridX,df.VirtualGridY);dh=dg[0];di=dg[1];dj=AP(df.Bullet.HitboxSizeX,df.Bullet.HitboxSizeY);dk=dj[0];dl=dj[1];dm=((bs<0||bs>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+bs]);BA(dm,dh,di,dk,dl,0.1,0.1,0.1,0.1,e,f,df,"FireballBullet");bs=bs+(1)>>0;$r=c.AddSingle(dm);$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}df.BlState=1;if(!((df.BlState===de.BlState))){df.FramesInBlState=0;}dn=df.VirtualGridX+df.VelX>>0;dp=df.VirtualGridY+df.VelY>>0;df.VirtualGridX=dn;df.VirtualGridY=dp;$s=13;continue;case 12:ds=(dq=r.PlayersArr,dr=df.BattleAttr.OffenderJoinIndex-1>>0,((dr<0||dr>=dq.$length)?($throwRuntimeError("index out of range"),undefined):dq.$array[dq.$offset+dr]));dt=(du=U[$Int32.keyFor(ds.CharacterState)],du!==undefined?[du.v,true]:[false,false]);dv=dt[1];if(dv){dd++;$s=7;continue;}case 13:ag=ag+(1)>>0;case 10:dd++;$s=7;continue;case 8:((ag<0||ag>=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ag]).BattleAttr.BulletLocalId=-1;dw=r.MeleeBullets;dx=0;case 15:if(!(dx<dw.$length)){$s=16;continue;}dy=((dx<0||dx>=dw.$length)?($throwRuntimeError("index out of range"),undefined):dw.$array[dw.$offset+dx]);if(-1===dy.BattleAttr.BulletLocalId){$s=16;continue;}dz=((ae<0||ae>=af.$length)?($throwRuntimeError("index out of range"),undefined):af.$array[af.$offset+ae]);BG(dy.BlState,dy.FramesInBlState+1>>0,dy.BattleAttr.BulletLocalId,dy.BattleAttr.OriginatedRenderFrameId,dy.BattleAttr.OffenderJoinIndex,dy.BattleAttr.TeamId,dy.Bullet,dz);if(AK(dz,r)){$s=17;continue;}$s=18;continue;case 17:ec=(ea=r.PlayersArr,eb=dz.BattleAttr.OffenderJoinIndex-1>>0,((eb<0||eb>=ea.$length)?($throwRuntimeError("index out of range"),undefined):ea.$array[ea.$offset+eb]));ed=(ee=U[$Int32.keyFor(ec.CharacterState)],ee!==undefined?[ee.v,true]:[false,false]);ef=ed[1];if(ef){dx++;$s=15;continue;}if(AJ(dz,r)){$s=19;continue;}$s=20;continue;case 19:eg=1;if(0>ec.DirX){eg=-eg;}eh=AP(ec.VirtualGridX+($imul(eg,dz.Bullet.HitboxOffsetX))>>0,ec.VirtualGridY);ei=eh[0];ej=eh[1];ek=AP(dz.Bullet.HitboxSizeX,dz.Bullet.HitboxSizeY);el=ek[0];em=ek[1];en=((bs<0||bs>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+bs]);BA(en,ei,ej,el,em,0.1,0.1,0.1,0.1,e,f,dz,"MeleeBullet");bs=bs+(1)>>0;$r=c.AddSingle(en);$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}dz.BlState=1;if(!((dz.BlState===dy.BlState))){dz.FramesInBlState=0;}case 20:ae=ae+(1)>>0;case 18:dx++;$s=15;continue;case 16:((ae<0||ae>=af.$length)?($throwRuntimeError("index out of range"),undefined):af.$array[af.$offset+ae]).BattleAttr.BulletLocalId=-1;eo=r.PlayersArr;ep=0;case 22:if(!(ep<eo.$length)){$s=23;continue;}eq=ep;er=((ep<0||ep>=eo.$length)?($throwRuntimeError("index out of range"),undefined):eo.$array[eo.$offset+ep]);es=er.JoinIndex;et=((eq<0||eq>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+eq]);eu=$assertType(et.Shape,BW);ev=((eq<0||eq>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+eq]);ey=AU(es,er,ev,et,eu,0.1,(ew=es-1>>0,((ew<0||ew>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+ew])),(ex=es-1>>0,((ex<0||ex>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+ex])),i);$s=24;case 24:if($c){$c=false;ey=ey.$blk();}if(ey&&ey.$blk!==undefined){break s;}ez=ey;fa=((eq<0||eq>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+eq]);fb=false;fc=et.CheckAllWithHolder(0,0,i);if(fc){$s=25;continue;}$s=26;continue;case 25:case 27:fd=i.PopFirstCollidedObject();if(BT.nil===fd){$s=28;continue;}fe=false;ff=false;fg=false;fh=fe;fi=ff;fj=fg;fk=fd.Data;if($assertType(fk,BU,true)[1]){fl=fk.$val;if(18===fl.CharacterState){$s=27;continue;}fi=true;}else if($assertType(fk,BR,true)[1]||$assertType(fk,BV,true)[1]){fm=fk;fj=true;}else{fn=fk;fh=true;}if(fj){$s=27;continue;}fo=$assertType(fd.Shape,BW);fq=AG(0,0,eu,fo);$s=29;case 29:if($c){$c=false;fq=fq.$blk();}if(fq&&fq.$blk!==undefined){break s;}fp=fq;fr=fp[0];fs=fp[1];ft=fp[2];fu=fp[3];if(!fr){$s=27;continue;}fv=fu.OverlapX*0+fu.OverlapY*-1;if(fi){fw=(fu.Overlap-0.2)*fu.OverlapX;fx=(fu.Overlap-0.2)*fu.OverlapY;fs=fw;ft=fx;}fy=0;while(true){if(!(fy<ez)){break;}gb=(fz=(ga=es-1>>0,((ga<0||ga>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+ga])),((fy<0||fy>=fz.$length)?($throwRuntimeError("index out of range"),undefined):fz.$array[fz.$offset+fy]));gc=fs*gb.X+ft*gb.Y;if(fh||(fi&&0>gc)){fs=fs-(gc*gb.X);ft=ft-(gc*gb.Y);}fy=fy+(1)>>0;}gd=es-1>>0;((gd<0||gd>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+gd]).X=((gd<0||gd>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+gd]).X+(fs);ge=es-1>>0;((ge<0||ge>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+ge]).Y=((ge<0||ge>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+ge]).Y+(ft);if(0.5<fv){fb=true;}$s=27;continue;case 28:case 26:if(fb){ev.InAir=false;gf=er.InAir&&0>=er.VelY;if(gf){ev.VelY=0;ev.VelX=0;if(18===ev.CharacterState){}else if(8===ev.CharacterState){ev.CharacterState=9;ev.FramesToRecover=fa.LayDownFramesToRecover;}else{gg=er.CharacterState;if((gg===(8))||(gg===(4))||(gg===(5))||(gg===(16))){gh=0;gi=er.ColliderRadius;gj=gh;gk=gi;gl=AP(gj,gk);gm=gl[1];gn=es-1>>0;((gn<0||gn>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+gn]).Y=((gn<0||gn>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+gn]).Y-(gm);}ev.CharacterState=0;ev.FramesToRecover=0;}}else{go=(gp=W[$Int32.keyFor(ev.CharacterState)],gp!==undefined?[gp.v,true]:[false,false]);gq=go[1];if(gq){if(18===ev.CharacterState){ev.VelY=0;ev.VelX=0;}else if(9===ev.CharacterState){if(0===ev.FramesToRecover){ev.CharacterState=10;ev.FramesToRecover=fa.GetUpFramesToRecover;}}else if(10===ev.CharacterState){if(0===ev.FramesToRecover){ev.CharacterState=0;ev.FramesInvinsible=fa.GetUpInvinsibleFrames;}}}}}if(fa.OnWallEnabled){if(ev.InAir){gr=(gs=U[$Int32.keyFor(er.CharacterState)],gs!==undefined?[gs.v,true]:[false,false]);gt=gr[1];if(!gt){gu=0;while(true){if(!(gu<ez)){break;}gx=(gv=(gw=es-1>>0,((gw<0||gw>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+gw])),((gu<0||gu>=gv.$length)?($throwRuntimeError("index out of range"),undefined):gv.$array[gv.$offset+gu]));gy=gx.X*1+gx.Y*0;gz=gx.X*-1+gx.Y*0;if(0.9<gy){ev.OnWall=true;ha=((gx.X>>0));hb=((gx.Y>>0));ev.OnWallNormX=ha;ev.OnWallNormY=hb;break;}if(0.9<gz){ev.OnWall=true;hc=((gx.X>>0));hd=((gx.Y>>0));ev.OnWallNormX=hc;ev.OnWallNormY=hd;break;}gu=gu+(1)>>0;}}}if(!ev.OnWall){he=0;hf=0;ev.OnWallNormX=he;ev.OnWallNormY=hf;}}ep++;$s=22;continue;case 23:hg=w.$length;case 30:if(!(hg<bs)){$s=31;continue;}hh=((hg<0||hg>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+hg]);hi=hh.CheckAllWithHolder(0,0,i);if(!hi){hg=hg+(1)>>0;$s=30;continue;}hj=false;hk=false;hl=BP.nil;hm=BO.nil;hn=hh.Data;if($assertType(hn,BR,true)[1]){ho=hn.$val;hl=ho.Bullet;hm=ho.BattleAttr;}else if($assertType(hn,BV,true)[1]){hp=hn.$val;hl=hp.Bullet;hm=hp.BattleAttr;}hq=$assertType(hh.Shape,BW);ht=(hr=r.PlayersArr,hs=hm.OffenderJoinIndex-1>>0,((hs<0||hs>=hr.$length)?($throwRuntimeError("index out of range"),undefined):hr.$array[hr.$offset+hs]));case 32:hu=i.PopFirstCollidedObject();if(BT.nil===hu){$s=33;continue;}hv=$assertType(hu.Shape,BW);hw=hu.Data;if($assertType(hw,BU,true)[1]){$s=34;continue;}$s=35;continue;case 34:hx=hw.$val;if(hm.OffenderJoinIndex===hx.JoinIndex){$s=32;continue;}ia=AG(0,0,hq,hv);$s=37;case 37:if($c){$c=false;ia=ia.$blk();}if(ia&&ia.$blk!==undefined){break s;}hz=ia;ib=hz[0];if(!ib){$s=32;continue;}ic=(id=V[$Int32.keyFor(hx.CharacterState)],id!==undefined?[id.v,true]:[false,false]);ie=ic[1];if(ie){$s=32;continue;}if(0<hx.FramesInvinsible){$s=32;continue;}hj=true;hk=true;ig=1;if(0>ht.DirX){ig=-ig;}ii=(ih=hx.JoinIndex-1>>0,((ih<0||ih>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+ih]));ii.Hp=ii.Hp-(hl.Damage)>>0;ij=$imul(ig,hl.PushbackVelX);ik=hl.PushbackVelY;il=ij;im=ik;ii.VelX=il;ii.VelY=im;if(0>=ii.Hp){ii.Hp=0;ii.CharacterState=18;ii.FramesToRecover=60;}else{if(hl.BlowUp){ii.CharacterState=8;}else{ii.CharacterState=3;}ip=(io=hx.JoinIndex-1>>0,((io<0||io>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+io])).FramesToRecover;if(hl.HitStunFrames>ip){ii.FramesToRecover=hl.HitStunFrames;}}$s=36;continue;case 35:hy=hw;hj=true;case 36:$s=32;continue;case 33:if(hj){iq=hh.Data;if($assertType(iq,BR,true)[1]){ir=iq.$val;ir.BlState=2;if(hk){ir.FramesInBlState=0;}else{ir.FramesInBlState=ir.Bullet.ExplosionFrames+1>>0;}}else if($assertType(iq,BV,true)[1]){is=iq.$val;is.BlState=2;is.FramesInBlState=0;}}hg=hg+(1)>>0;$s=30;continue;case 31:it=r.PlayersArr;iu=0;while(true){if(!(iu<it.$length)){break;}iv=iu;iw=((iu<0||iu>=it.$length)?($throwRuntimeError("index out of range"),undefined):it.$array[it.$offset+iu]);ix=iw.JoinIndex;iy=((iv<0||iv>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+iv]);iz=((iv<0||iv>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+iv]);ja=AS(iy.X-(jb=ix-1>>0,((jb<0||jb>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+jb])).X,iy.Y-(jc=ix-1>>0,((jc<0||jc>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+jc])).Y,iy.W*0.5,iy.H*0.5,0,0,0,0,e,f);iz.VirtualGridX=ja[0];iz.VirtualGridY=ja[1];if(iz.InAir){jd=iz.CharacterState;je=jd;if((je===(0))||(je===(1))||(je===(17))){if(((iv<0||iv>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+iv])||(5===iw.CharacterState)){iz.CharacterState=5;}else{iz.CharacterState=4;}}else if(je===(2)){iz.CharacterState=6;}else if(je===(3)){iz.CharacterState=7;}}if(iz.OnWall){jf=iz.CharacterState;if((jf===(1))||(jf===(5))||(jf===(4))){jg=(16===iw.CharacterState);jh=iw.OnWall&&12<=iz.FramesInChState;if(jg||jh){iz.CharacterState=16;}}}if(!((iz.CharacterState===iw.CharacterState))){iz.FramesInChState=0;}ji=(jj=W[$Int32.keyFor(iz.CharacterState)],jj!==undefined?[jj.v,true]:[false,false]);jk=ji[1];if(jk){iz.ActiveSkillId=-1;iz.ActiveSkillHit=-1;}iu++;}jl=0;while(true){if(!(jl<bs)){break;}jm=((jl<0||jl>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+jl]);jm.Space.RemoveSingle(jm);jl=jl+(1)>>0;}u.Id=s;u.BulletLocalIdCounter=ai;$s=-1;return true;}return;}var $f={$blk:AX,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,e,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,f,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,fw,fx,fy,fz,g,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,gk,gl,gm,gn,go,gp,gq,gr,gs,gt,gu,gv,gw,gx,gy,gz,h,ha,hb,hc,hd,he,hf,hg,hh,hi,hj,hk,hl,hm,hn,ho,hp,hq,hr,hs,ht,hu,hv,hw,hx,hy,hz,i,ia,ib,ic,id,ie,ig,ih,ii,ij,ik,il,im,io,ip,iq,ir,is,it,iu,iv,iw,ix,iy,iz,j,ja,jb,jc,jd,je,jf,jg,jh,ji,jj,jk,jl,jm,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=AX;AY=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=AQ(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=AZ(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:AY,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=AY;AZ=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObjectSingleTag(a,b,c,d,f);h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:AZ,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};BA=function(a,b,c,d,e,f,g,h,i,j,k,l,m){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;n=AQ(b,c,d*0.5,e*0.5,f,g,h,i,j,k);o=n[0];p=n[1];q=h+d+i;r=g+e+f;s=q;t=r;u=o;v=p;w=s;x=t;a.X=u;a.Y=v;a.W=w;a.H=x;y=$assertType(a.Shape,BW);y.UpdateAsRectangle(0,0,s,t);a.Data=l;};$pkg.UpdateRectCollider=BA;BB=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=BC(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(CA.nil);l=f.Points;m=0;while(true){if(!(m<l.$length)){break;}n=m;o=((m<0||m>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q<p.$length)){break;}r=q;s=((q<0||q>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(A.Abs(s.X-o.X)>i){i=A.Abs(s.X-o.X);}if(A.Abs(s.Y-o.Y)>j){j=A.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t<f.Points.$length)){break;}v=(u=f.Points,((t<0||t>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new CA([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new CB([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:BB,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=BB;BC=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new C.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d<c.$length)){break;}e=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X<b.X){b.X=e.X;}if(e.Y<b.Y){b.Y=e.Y;}d++;}f=new D.ptr(new C.ptr(a.Anchor.X+b.X,a.Anchor.Y+b.Y),$makeSlice(CD,a.Points.$length));g=a.Points;h=0;while(true){if(!(h<g.$length)){break;}i=h;j=((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new C.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=BC;BD=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;return new K.ptr(u,v,new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,w,x,false));};$pkg.NewMeleeBullet=BD;BE=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return new L.ptr(u,v,w,x,y,z,aa,ab,ac,new J.ptr(a,b,c,t),new I.ptr(d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,ad,ae,false));};$pkg.NewFireballBullet=BE;BF=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return new E.ptr(a,b,c,d,e,f,g,m,n,p,s,false,0,0,h,i,q,r,o,t,u,v,w,x,j,k,l,y,z,aa,ab);};$pkg.NewPlayerDownsync=BF;BG=function(a,b,c,d,e,f,g,h){var a,b,c,d,e,f,g,h;h.BlState=a;h.FramesInBlState=b;h.BattleAttr.BulletLocalId=c;h.BattleAttr.OriginatedRenderFrameId=d;h.BattleAttr.OffenderJoinIndex=e;h.BattleAttr.TeamId=f;h.Bullet=g;};$pkg.CloneMeleeBullet=BG;BH=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;o.BlState=a;o.FramesInBlState=b;o.VirtualGridX=c;o.VirtualGridY=d;o.DirX=e;o.DirY=f;o.VelX=g;o.VelY=h;o.Speed=i;o.BattleAttr.BulletLocalId=j;o.BattleAttr.OriginatedRenderFrameId=k;o.BattleAttr.OffenderJoinIndex=l;o.BattleAttr.TeamId=m;o.Bullet=n;};$pkg.CloneFireballBullet=BH;BI=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac){var a,aa,ab,ac,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;ac.Id=a;ac.VirtualGridX=b;ac.VirtualGridY=c;ac.DirX=d;ac.DirY=e;ac.VelX=f;ac.VelY=g;ac.FramesToRecover=h;ac.FramesInChState=i;ac.ActiveSkillId=j;ac.ActiveSkillHit=k;ac.FramesInvinsible=l;ac.Speed=m;ac.BattleState=n;ac.CharacterState=o;ac.JoinIndex=p;ac.Hp=q;ac.MaxHp=r;ac.ColliderRadius=s;ac.InAir=t;ac.OnWall=u;ac.OnWallNormX=v;ac.OnWallNormY=w;ac.CapturedByInertia=x;ac.BulletTeamId=y;ac.ChCollisionTeamId=z;ac.RevivalVirtualGridX=aa;ac.RevivalVirtualGridY=ab;};$pkg.ClonePlayerDownsync=BI;BJ=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;f.Id=a;f.BulletLocalIdCounter=c;g=0;while(true){if(!(g<b.$length)){break;}h=((g<0||g>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if(BU.nil===h||(-1===h.Id)){break;}BI(h.Id,h.VirtualGridX,h.VirtualGridY,h.DirX,h.DirY,h.VelX,h.VelY,h.FramesToRecover,h.FramesInChState,h.ActiveSkillId,h.ActiveSkillHit,h.FramesInvinsible,h.Speed,h.BattleState,h.CharacterState,h.JoinIndex,h.Hp,h.MaxHp,h.ColliderRadius,h.InAir,h.OnWall,h.OnWallNormX,h.OnWallNormY,h.CapturedByInertia,h.BulletTeamId,h.ChCollisionTeamId,h.RevivalVirtualGridX,h.RevivalVirtualGridY,(i=f.PlayersArr,((g<0||g>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+g])));g=g+(1)>>0;}j=0;while(true){if(!(j<d.$length)){break;}k=((j<0||j>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+j]);if(BR.nil===k||(-1===k.BattleAttr.BulletLocalId)){break;}BG(k.BlState,k.FramesInBlState,k.BattleAttr.BulletLocalId,k.BattleAttr.OriginatedRenderFrameId,k.BattleAttr.OffenderJoinIndex,k.BattleAttr.TeamId,k.Bullet,(l=f.MeleeBullets,((j<0||j>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j])));j=j+(1)>>0;}m=0;while(true){if(!(m<e.$length)){break;}n=((m<0||m>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+m]);if(BV.nil===n||(-1===n.BattleAttr.BulletLocalId)){break;}BH(n.BlState,n.FramesInBlState,n.VirtualGridX,n.VirtualGridY,n.DirX,n.DirY,n.VelX,n.VelY,n.Speed,n.BattleAttr.BulletLocalId,n.BattleAttr.OriginatedRenderFrameId,n.BattleAttr.OffenderJoinIndex,n.BattleAttr.TeamId,n.Bullet,(o=f.FireballBullets,((m<0||m>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+m])));m=m+(1)>>0;}};$pkg.CloneRoomDownsyncFrame=BJ;BK=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l;d=$makeSlice(CE,a);e=0;while(true){if(!(e<a)){break;}f=BF(-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,false,false,0,0,false,0,0,0,0);((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]=f);e=e+(1)>>0;}g=$makeSlice(CF,b);h=0;while(true){if(!(h<b)){break;}i=BD(-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,false,0,0,0,0,0);((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]=i);h=h+(1)>>0;}j=$makeSlice(CG,c);k=0;while(true){if(!(k<c)){break;}l=BE(-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,false,0,0,0,0,0,0,0,0,0,0,0,0);((k<0||k>=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]=l);k=k+(1)>>0;}return new N.ptr(-1,d,new $Int64(0,0),g,j,new $Uint64(0,0),false,-1);};$pkg.NewPreallocatedRoomDownsyncFrame=BK;BU.methods=[{prop:"GetId",name:"GetId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetJoinIndex",name:"GetJoinIndex",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVirtualGridX",name:"GetVirtualGridX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVirtualGridY",name:"GetVirtualGridY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetDirX",name:"GetDirX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetDirY",name:"GetDirY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVelX",name:"GetVelX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVelY",name:"GetVelY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetSpeed",name:"GetSpeed",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHp",name:"GetHp",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetMaxHp",name:"GetMaxHp",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetCharacterState",name:"GetCharacterState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetFramesToRecover",name:"GetFramesToRecover",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetFramesInChState",name:"GetFramesInChState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetInAir",name:"GetInAir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"GetOnWall",name:"GetOnWall",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"GetOnWallNormX",name:"GetOnWallNormX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetColliderRadius",name:"GetColliderRadius",pkg:"",typ:$funcType([],[$Int32],false)}];BR.methods=[{prop:"GetBlState",name:"GetBlState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetFramesInBlState",name:"GetFramesInBlState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetBulletLocalId",name:"GetBulletLocalId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetOffenderJoinIndex",name:"GetOffenderJoinIndex",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetOriginatedRenderFrameId",name:"GetOriginatedRenderFrameId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetStartupFrames",name:"GetStartupFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetActiveFrames",name:"GetActiveFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxSizeX",name:"GetHitboxSizeX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxSizeY",name:"GetHitboxSizeY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxOffsetX",name:"GetHitboxOffsetX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxOffsetY",name:"GetHitboxOffsetY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetExplosionFrames",name:"GetExplosionFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetSpeciesId",name:"GetSpeciesId",pkg:"",typ:$funcType([],[$Int32],false)}];BV.methods=[{prop:"GetVirtualGridX",name:"GetVirtualGridX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVirtualGridY",name:"GetVirtualGridY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetDirX",name:"GetDirX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetDirY",name:"GetDirY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVelX",name:"GetVelX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetVelY",name:"GetVelY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetSpeed",name:"GetSpeed",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetBlState",name:"GetBlState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetFramesInBlState",name:"GetFramesInBlState",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetBulletLocalId",name:"GetBulletLocalId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetOffenderJoinIndex",name:"GetOffenderJoinIndex",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetOriginatedRenderFrameId",name:"GetOriginatedRenderFrameId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetStartupFrames",name:"GetStartupFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetActiveFrames",name:"GetActiveFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxSizeX",name:"GetHitboxSizeX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxSizeY",name:"GetHitboxSizeY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxOffsetX",name:"GetHitboxOffsetX",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetHitboxOffsetY",name:"GetHitboxOffsetY",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetExplosionFrames",name:"GetExplosionFrames",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetSpeciesId",name:"GetSpeciesId",pkg:"",typ:$funcType([],[$Int32],false)}];BZ.methods=[{prop:"GetId",name:"GetId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetCountdownNanos",name:"GetCountdownNanos",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"GetBackendUnconfirmedMask",name:"GetBackendUnconfirmedMask",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"GetBulletLocalIdCounter",name:"GetBulletLocalIdCounter",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetShouldForceResync",name:"GetShouldForceResync",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"GetPlayersArr",name:"GetPlayersArr",pkg:"",typ:$funcType([],[CE],false)},{prop:"GetMeleeBullets",name:"GetMeleeBullets",pkg:"",typ:$funcType([],[CF],false)},{prop:"GetFireballBullets",name:"GetFireballBullets",pkg:"",typ:$funcType([],[CG],false)}];BX.methods=[{prop:"GetInputFrameId",name:"GetInputFrameId",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetInputList",name:"GetInputList",pkg:"",typ:$funcType([],[BY],false)},{prop:"GetConfirmedList",name:"GetConfirmedList",pkg:"",typ:$funcType([],[$Uint64],false)}];CJ.methods=[{prop:"GetSpeed",name:"GetSpeed",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"GetSpeciesId",name:"GetSpeciesId",pkg:"",typ:$funcType([],[$Int],false)},{prop:"GetSpeciesName",name:"GetSpeciesName",pkg:"",typ:$funcType([],[$String],false)}];C.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);D.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:CC,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:CD,tag:""}]);E.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInChState",name:"FramesInChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWall",name:"OnWall",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallNormX",name:"OnWallNormX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OnWallNormY",name:"OnWallNormY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CapturedByInertia",name:"CapturedByInertia",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"ActiveSkillId",name:"ActiveSkillId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveSkillHit",name:"ActiveSkillHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInvinsible",name:"FramesInvinsible",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BulletTeamId",name:"BulletTeamId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ChCollisionTeamId",name:"ChCollisionTeamId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RevivalVirtualGridX",name:"RevivalVirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RevivalVirtualGridY",name:"RevivalVirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""}]);F.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);H.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:CH,tag:""}]);I.init("",[{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableStFrame",name:"CancellableStFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancellableEdFrame",name:"CancellableEdFrame",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelX",name:"PushbackVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PushbackVelY",name:"PushbackVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelX",name:"SelfLockVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SelfLockVelY",name:"SelfLockVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetX",name:"HitboxOffsetX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxOffsetY",name:"HitboxOffsetY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeX",name:"HitboxSizeX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitboxSizeY",name:"HitboxSizeY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlowUp",name:"BlowUp",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"ExplosionFrames",name:"ExplosionFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CancelTransit",name:"CancelTransit",embedded:false,exported:true,typ:CI,tag:""}]);J.init("",[{prop:"BulletLocalId",name:"BulletLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"TeamId",name:"TeamId",embedded:false,exported:true,typ:$Int32,tag:""}]);K.init("",[{prop:"BlState",name:"BlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInBlState",name:"FramesInBlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BO,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BP,tag:""}]);L.init("",[{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlState",name:"BlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesInBlState",name:"FramesInBlState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleAttr",name:"BattleAttr",embedded:false,exported:true,typ:BO,tag:""},{prop:"Bullet",name:"Bullet",embedded:false,exported:true,typ:BP,tag:""}]);M.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BoundChState",name:"BoundChState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hits",name:"Hits",embedded:false,exported:true,typ:BN,tag:""}]);N.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:CE,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:CF,tag:""},{prop:"FireballBullets",name:"FireballBullets",embedded:false,exported:true,typ:CG,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BulletLocalIdCounter",name:"BulletLocalIdCounter",embedded:false,exported:true,typ:$Int32,tag:""}]);O.init("",[{prop:"InputFrameId",name:"InputFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InputList",name:"InputList",embedded:false,exported:true,typ:BY,tag:""},{prop:"ConfirmedList",name:"ConfirmedList",embedded:false,exported:true,typ:$Uint64,tag:""}]);P.init("",[{prop:"FlAct",name:"FlAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"FrAct",name:"FrAct",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);Q.init([$Int,BU],[$Int],false);R.init("",[{prop:"SpeciesId",name:"SpeciesId",embedded:false,exported:true,typ:$Int,tag:""},{prop:"SpeciesName",name:"SpeciesName",embedded:false,exported:true,typ:$String,tag:""},{prop:"InAirIdleFrameIdxTurningPoint",name:"InAirIdleFrameIdxTurningPoint",embedded:false,exported:true,typ:$Int,tag:""},{prop:"InAirIdleFrameIdxTurnedCycle",name:"InAirIdleFrameIdxTurnedCycle",embedded:false,exported:true,typ:$Int,tag:""},{prop:"LayDownFrames",name:"LayDownFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LayDownFramesToRecover",name:"LayDownFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpInvinsibleFrames",name:"GetUpInvinsibleFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"GetUpFramesToRecover",name:"GetUpFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JumpingInitVelY",name:"JumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JumpingFramesToRecover",name:"JumpingFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DashingEnabled",name:"DashingEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"OnWallEnabled",name:"OnWallEnabled",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"WallJumpingFramesToRecover",name:"WallJumpingFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelX",name:"WallJumpingInitVelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallJumpingInitVelY",name:"WallJumpingInitVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"WallSlidingVelY",name:"WallSlidingVelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InertiaFramesToRecover",name:"InertiaFramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"SkillMapper",name:"SkillMapper",embedded:false,exported:true,typ:Q,tag:""}]);AF.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:B.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new BM([new BL([0,0]),new BL([0,2]),new BL([0,-2]),new BL([2,0]),new BL([-2,0]),new BL([1,1]),new BL([-1,-1]),new BL([1,-1]),new BL([-1,1])]);S=$makeMap($Int.keyFor,[{k:1,v:new M.ptr(0,30,30,30,1,2,new BN([new K.ptr(0,0,BO.nil,new I.ptr(7,13,30,22,13,9,5,0,5,1,-1,120,0,240,320,false,9,1,$makeMap($Int.keyFor,[{k:1,v:2}])))]))},{k:2,v:new M.ptr(0,36,36,36,1,11,new BN([new K.ptr(0,0,BO.nil,new I.ptr(18,22,36,18,18,9,5,0,5,1,-1,180,0,240,320,false,9,1,$makeMap($Int.keyFor,[{k:1,v:3}])))]))},{k:3,v:new M.ptr(0,50,50,50,1,12,new BN([new K.ptr(0,0,BO.nil,new I.ptr(8,0,0,30,999999999,9,20,70,10,5,50,160,80,320,320,true,9,1,false))]))},{k:4,v:new M.ptr(0,30,30,30,1,2,new BN([new K.ptr(0,0,BO.nil,new I.ptr(7,13,30,22,13,9,5,0,5,1,-1,120,0,240,320,false,15,2,$makeMap($Int.keyFor,[{k:1,v:5}])))]))},{k:5,v:new M.ptr(0,36,36,36,1,11,new BN([new K.ptr(0,0,BO.nil,new I.ptr(18,23,36,18,18,9,5,0,5,1,-1,180,0,240,320,false,15,2,$makeMap($Int.keyFor,[{k:1,v:6}])))]))},{k:6,v:new M.ptr(0,45,45,45,1,12,new BN([new K.ptr(0,0,BO.nil,new I.ptr(8,0,0,28,999999999,9,20,30,10,-1,-1,240,0,320,320,true,15,2,false))]))},{k:7,v:new M.ptr(0,30,30,30,1,2,new BN([new K.ptr(0,0,BO.nil,new I.ptr(7,13,30,22,13,9,5,0,5,-1,-1,120,0,240,320,false,9,1,$makeMap($Int.keyFor,[{k:1,v:8}])))]))},{k:8,v:new M.ptr(0,36,36,36,1,11,new BN([new K.ptr(0,0,BO.nil,new I.ptr(18,22,36,18,18,9,5,0,5,1,-1,180,0,240,320,false,9,1,$makeMap($Int.keyFor,[{k:1,v:9}])))]))},{k:9,v:new M.ptr(0,40,40,40,1,12,new BN([new K.ptr(0,0,BO.nil,new I.ptr(7,0,0,30,999999999,9,20,40,10,10,-1,100,0,320,320,true,9,1,false))]))},{k:10,v:new M.ptr(0,38,38,38,1,13,new BN([new L.ptr(0,0,0,0,0,0,60,0,0,BO.nil,new I.ptr(10,0,0,999999999,15,9,20,0,22,-1,-1,320,100,640,480,false,30,1,false))]))},{k:11,v:new M.ptr(0,60,60,60,1,14,new BN([new K.ptr(0,0,BO.nil,new I.ptr(3,0,0,25,999999999,9,20,70,35,10,80,80,0,400,640,true,15,3,false))]))},{k:12,v:new M.ptr(0,10,10,10,1,15,new BN([new K.ptr(0,0,BO.nil,new I.ptr(3,0,0,0,0,0,-1,-1,0,60,0,0,0,0,0,false,0,0,false))]))},{k:13,v:new M.ptr(0,12,12,12,1,15,new BN([new K.ptr(0,0,BO.nil,new I.ptr(3,0,0,0,0,0,-1,-1,0,80,0,0,0,0,0,false,0,0,false))]))},{k:14,v:new M.ptr(0,8,8,8,1,15,new BN([new K.ptr(0,0,BO.nil,new I.ptr(4,0,0,0,999999999,0,-1,-1,0,50,0,0,0,0,0,false,0,0,false))]))},{k:15,v:new M.ptr(0,48,48,48,1,13,new BN([new L.ptr(0,0,0,0,0,0,40,0,0,BO.nil,new I.ptr(12,0,0,999999999,15,9,30,0,18,-1,-1,240,80,480,320,false,30,2,false))]))},{k:16,v:new M.ptr(0,60,60,60,1,13,new BN([new L.ptr(0,0,0,0,0,0,40,0,0,BO.nil,new I.ptr(16,0,0,999999999,999999999,9,30,70,30,-1,-1,240,80,480,320,true,30,3,false))]))},{k:255,v:new M.ptr(0,30,30,30,1,6,new BN([new K.ptr(0,0,BO.nil,new I.ptr(3,0,0,20,18,9,5,0,5,-1,-1,120,0,320,240,false,9,1,false))]))},{k:256,v:new M.ptr(0,20,20,20,1,6,new BN([new K.ptr(0,0,BO.nil,new I.ptr(3,0,0,10,15,9,5,0,5,-1,-1,120,0,320,240,false,15,2,false))]))},{k:257,v:new M.ptr(0,30,30,30,1,6,new BN([new K.ptr(0,0,BO.nil,new I.ptr(4,0,0,20,9,5,5,0,5,-1,-1,120,0,320,240,false,9,1,false))]))}]);$pkg.Characters=$makeMap($Int.keyFor,[{k:0,v:new R.ptr(0,"MonkGirl",11,1,16,16,10,27,21,80,2,true,true,8,28,70,-10,9,(function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(1===a){if(0===b.FramesToRecover){if(b.InAir){return 255;}else{return 1;}}else{c=(d=S[$Int.keyFor(((b.ActiveSkillId>>0)))],d!==undefined?[d.v,true]:[BQ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BR,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState<j.Bullet.CancellableEdFrame){k=(l=j.Bullet.CancelTransit[$Int.keyFor(a)],l!==undefined?[l.v,true]:[0,false]);m=k[0];n=k[1];if(n){return m;}}}}}}else if(3===a){if((0===b.FramesToRecover)&&!b.InAir){return 15;}}else if(5===a){if(!b.InAir){return 12;}}return-1;}))},{k:1,v:new R.ptr(1,"KnifeGirl",9,1,16,16,10,27,22,75,2,true,true,8,28,70,-10,9,(function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(1===a){if(0===b.FramesToRecover){if(b.InAir){return 256;}else{return 4;}}else{c=(d=S[$Int.keyFor(((b.ActiveSkillId>>0)))],d!==undefined?[d.v,true]:[BQ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BR,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState<j.Bullet.CancellableEdFrame){k=(l=j.Bullet.CancelTransit[$Int.keyFor(a)],l!==undefined?[l.v,true]:[0,false]);m=k[0];n=k[1];if(n){return m;}}}}}}else if(3===a){if((0===b.FramesToRecover)&&!b.InAir){return 16;}}else if(5===a){return 13;}return-1;}))},{k:4096,v:new R.ptr(4096,"Monk",42,2,14,14,8,30,18,78,2,true,false,0,0,0,0,9,(function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;if(1===a){if(0===b.FramesToRecover){if(b.InAir){return 257;}else{return 7;}}else{c=(d=S[$Int.keyFor(((b.ActiveSkillId>>0)))],d!==undefined?[d.v,true]:[BQ.nil,false]);e=c[0];f=c[1];if(f){g=(h=e.Hits,i=b.ActiveSkillHit,((i<0||i>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]));if($assertType(g,BR,true)[1]){j=g.$val;if(j.Bullet.CancellableStFrame<=b.FramesInChState&&b.FramesInChState<j.Bullet.CancellableEdFrame){k=(l=j.Bullet.CancelTransit[$Int.keyFor(a)],l!==undefined?[l.v,true]:[0,false]);m=k[0];n=k[1];if(n){return m;}}}}}}else if(2===a){if((0===b.FramesToRecover)&&!b.InAir){return 11;}}else if(3===a){if((0===b.FramesToRecover)&&!b.InAir){return 10;}}else if(5===a){if(!b.InAir){return 14;}}return-1;}))}]);T=$makeMap($Int32.keyFor,[{k:4,v:true},{k:5,v:true},{k:6,v:true},{k:7,v:true},{k:8,v:true},{k:16,v:true},{k:15,v:true}]);U=$makeMap($Int32.keyFor,[{k:3,v:true},{k:7,v:true},{k:8,v:true},{k:9,v:true},{k:18,v:true}]);V=$makeMap($Int32.keyFor,[{k:8,v:true},{k:9,v:true},{k:10,v:true},{k:18,v:true}]);W=$makeMap($Int32.keyFor,[{k:0,v:true},{k:1,v:true},{k:4,v:true},{k:5,v:true},{k:3,v:true},{k:7,v:true},{k:8,v:true},{k:9,v:true},{k:10,v:true},{k:18,v:true}]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$packages["jsexport"]=(function(){var $pkg={},$init,A,B,C,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["jsexport/battle"];C=$packages["resolv"];AE=$ptrType(A.Object);AF=$sliceType(AE);AG=$sliceType($Uint64);AH=$ptrType(B.Vec2D);AI=$sliceType(AH);AJ=$ptrType(B.Polygon2D);AK=$ptrType(B.CharacterConfig);AL=$ptrType(B.RoomDownsyncFrame);AM=$ptrType(B.InputFrameDownsync);AN=$funcType([$Float64,$Float64],[AE],false);AO=$funcType([AH,AI],[AE],false);AP=$funcType([AJ],[AE],false);AQ=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Bool,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32],[AE],false);AR=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32,$Int32],[AE],false);AS=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32],[AE],false);AT=$funcType([$Uint64,$Uint64,$Float64,$Float64],[AE],false);AU=$ptrType(B.PlayerDownsync);AV=$sliceType(AU);AW=$ptrType(B.MeleeBullet);AX=$sliceType(AW);AY=$ptrType(B.FireballBullet);AZ=$sliceType(AY);BA=$funcType([$Int32,AV,$Int32,AX,AZ],[AE],false);BB=$funcType([$Int,$Int,$Int,$Int],[AE],false);BC=$funcType([],[AE],false);BD=$funcType([$Int32,AG,$Uint64],[AE],false);BE=$funcType([$Int32],[AE],false);BF=$funcType([AJ,$Float64,$Float64,$emptyInterface,$String],[AE],false);BG=$ptrType(C.Space);BH=$funcType([BG],[AF],false);BI=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[$Float64,$Float64],false);BJ=$funcType([$Float64,$Float64],[$Int32,$Int32],false);BK=$funcType([$Int32,$Int32],[$Float64,$Float64],false);BL=$sliceType($Int);BM=$funcType([BL],[AF],false);BN=$ptrType(C.RingBuffer);BO=$ptrType(C.Object);BP=$mapType($Int32,BO);BQ=$sliceType(AK);BR=$ptrType(C.Collision);BS=$sliceType(AI);BT=$sliceType($Bool);BU=$sliceType(BO);BV=$sliceType($Int32);BW=$funcType([BN,$Int32,BG,BP,$Float64,$Float64,BQ,BN,BR,AI,BS,BT,BU,BV,AG,$Bool,$Int32],[$Bool],false);BX=$funcType([$Int32],[$Int32],false);BY=$funcType([$Int32],[$Bool],false);BZ=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32],[$Bool],false);CA=$funcType([BN,$Int32],[AE],false);CB=$funcType([AL,$Int],[AE],false);CC=$funcType([AM,$Int],[$Uint64],false);CD=$funcType([$Int],[AF],false);CE=$funcType([AM,$Int32],[$Bool],false);CF=$funcType([AM,$Int,$Uint64],[$Bool],false);CG=$funcType([AM,$Uint64],[$Bool],false);CH=$mapType($String,$emptyInterface);D=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$makeSlice(AF,a);c=0;case 1:if(!(c<a)){$s=2;continue;}d=B.GenerateRectCollider(0,0,0,0,0,0,0,0,0,0,$ifaceNil,"");$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=A.MakeWrapper(d);$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}((c<0||c>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]=e);c=c+(1)>>0;$s=1;continue;case 2:$s=-1;return b;}return;}var $f={$blk:D,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewDynamicRectangleColliders=D;E=function(){return A.MakeWrapper(C.NewCollision());};$pkg.NewCollisionHolder=E;F=function(a,b,c){var a,b,c;return A.MakeWrapper(new B.InputFrameDownsync.ptr(a,b,c));};$pkg.NewInputFrameDownsync=F;G=function(a){var a;return A.MakeWrapper(C.NewRingBuffer(a));};$pkg.NewRingBufferJs=G;H=function(a,b,c,d){var a,b,c,d;return A.MakeWrapper(C.NewSpace(a,b,c,d));};$pkg.NewCollisionSpaceJs=H;I=function(a,b){var a,b;return A.MakeWrapper(new B.Vec2D.ptr(a,b));};$pkg.NewVec2DJs=I;J=function(a,b){var a,b;return A.MakeWrapper(new B.Polygon2D.ptr(a,b));};$pkg.NewPolygon2DJs=J;K=function(a){var a;return A.MakeWrapper(new B.Barrier.ptr(a));};$pkg.NewBarrierJs=K;L=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab){var a,aa,ab,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return A.MakeWrapper(B.NewPlayerDownsync(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab));};$pkg.NewPlayerDownsyncJs=L;M=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;return A.MakeWrapper(B.NewMeleeBullet(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x));};$pkg.NewMeleeBulletJs=M;N=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;return A.MakeWrapper(B.NewFireballBullet(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ab,ac,ad,ae));};$pkg.NewFireballBulletJs=N;O=function(a,b,c,d){var a,b,c,d;return A.MakeWrapper(new B.NpcPatrolCue.ptr(a,b,c,d));};$pkg.NewNpcPatrolCue=O;P=function(a,b,c,d,e){var a,b,c,d,e,f;f=B.NewPreallocatedRoomDownsyncFrame(b.$length,64,64);B.CloneRoomDownsyncFrame(a,b,c,d,e,f);return A.MakeWrapper(f);};$pkg.NewRoomDownsyncFrameJs=P;Q=function(a){var a,b,c,d,e,f,g;b=a.Objects();c=$makeSlice(AF,b.$length);d=b;e=0;while(true){if(!(e<d.$length)){break;}f=e;g=((e<0||e>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=A.MakeWrapper(g));e++;}return c;};$pkg.GetCollisionSpaceObjsJs=Q;R=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=B.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:R,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=R;S=function(a){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$makeSlice(AF,a.$length,a.$length);c=a;d=0;case 1:if(!(d<c.$length)){$s=2;continue;}e=d;f=((d<0||d>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);h=A.MakeFullWrapper((g=B.Characters[$Int.keyFor(f)],g!==undefined?g.v:AK.nil));$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e]=h);d++;$s=1;continue;case 2:$s=-1;return b;}return;}var $f={$blk:S,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GetCharacterConfigsOrderedByJoinIndex=S;T=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q});$s=$s||0;s:while(true){switch($s){case 0:r=B.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q);$s=1;case 1:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=2;case 2:return s;}return;}var $f={$blk:T,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=T;U=function(a,b){var a,b,c;c=a.GetByFrameId(b);if($interfaceIsEqual($ifaceNil,c)){return null;}return A.MakeWrapper($assertType(c,AL));};$pkg.GetRoomDownsyncFrame=U;V=function(a,b){var a,b,c;c=a.GetByFrameId(b);if($interfaceIsEqual($ifaceNil,c)){return null;}return A.MakeWrapper($assertType(c,AM));};$pkg.GetInputFrameDownsync=V;W=function(a,b){var a,b,c;return(c=a.InputList,((b<0||b>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+b]));};$pkg.GetInput=W;X=function(a,b){var a,b;a.InputFrameId=b;return true;};$pkg.SetInputFrameId=X;Y=function(a,b,c){var a,b,c,d;if(b>=a.InputList.$length){return false;}(d=a.InputList,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b]=c));return true;};$pkg.SetInput=Y;Z=function(a,b){var a,b;a.ConfirmedList=b;return true;};$pkg.SetConfirmedList=Z;AA=function(a,b){var a,b,c;return A.MakeWrapper((c=a.PlayersArr,((b<0||b>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+b])));};$pkg.GetPlayer=AA;AB=function(a,b){var a,b,c,d;if(-1===(c=a.MeleeBullets,((b<0||b>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+b])).GetBulletLocalId()){return null;}return A.MakeWrapper((d=a.MeleeBullets,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])));};$pkg.GetMeleeBullet=AB;AC=function(a,b){var a,b,c,d;if(-1===(c=a.FireballBullets,((b<0||b>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+b])).GetBulletLocalId()){return null;}return A.MakeWrapper((d=a.FireballBullets,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])));};$pkg.GetFireballBullet=AC;AD=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new AN(I)},{k:"NewPolygon2DJs",v:new AO(J)},{k:"NewBarrierJs",v:new AP(K)},{k:"NewPlayerDownsyncJs",v:new AQ(L)},{k:"NewMeleeBulletJs",v:new AR(M)},{k:"NewFireballBulletJs",v:new AS(N)},{k:"NewNpcPatrolCue",v:new AT(O)},{k:"NewRoomDownsyncFrameJs",v:new BA(P)},{k:"NewCollisionSpaceJs",v:new BB(H)},{k:"NewCollisionHolder",v:new BC(E)},{k:"NewInputFrameDownsync",v:new BD(F)},{k:"NewRingBufferJs",v:new BE(G)},{k:"GenerateConvexPolygonColliderJs",v:new BF(R)},{k:"GetCollisionSpaceObjsJs",v:new BH(Q)},{k:"WorldToPolygonColliderBLPos",v:new BI(B.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new BI(B.PolygonColliderBLToWorldPos)},{k:"WorldToVirtualGridPos",v:new BJ(B.WorldToVirtualGridPos)},{k:"VirtualGridToWorldPos",v:new BK(B.VirtualGridToWorldPos)},{k:"GetCharacterConfigsOrderedByJoinIndex",v:new BM(S)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new BW(T)},{k:"ConvertToDelayedInputFrameId",v:new BX(B.ConvertToDelayedInputFrameId)},{k:"ConvertToNoDelayInputFrameId",v:new BX(B.ConvertToNoDelayInputFrameId)},{k:"ConvertToFirstUsedRenderFrameId",v:new BX(B.ConvertToFirstUsedRenderFrameId)},{k:"ConvertToLastUsedRenderFrameId",v:new BX(B.ConvertToLastUsedRenderFrameId)},{k:"ShouldGenerateInputFrameUpsync",v:new BY(B.ShouldGenerateInputFrameUpsync)},{k:"IsGeneralBulletActive",v:new BZ(B.IsGeneralBulletActive)},{k:"GetRoomDownsyncFrame",v:new CA(U)},{k:"GetInputFrameDownsync",v:new CA(V)},{k:"GetPlayer",v:new CB(AA)},{k:"GetMeleeBullet",v:new CB(AB)},{k:"GetFireballBullet",v:new CB(AC)},{k:"GetInput",v:new CC(W)},{k:"NewDynamicRectangleColliders",v:new CD(D)},{k:"SetInputFrameId",v:new CE(X)},{k:"SetInput",v:new CF(Y)},{k:"SetConfirmedList",v:new CG(Z)}]),CH);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){AD();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})();
|
|
$synthesizeMethods();
|
|
$initAllLinknames();
|
|
var $mainPkg = $packages["jsexport"];
|
|
$packages["runtime"].$init();
|
|
$go($mainPkg.$init, []);
|
|
$flushConsole();
|
|
|
|
}).call(this);
|
|
//# sourceMappingURL=jsexport.js.map
|