@ewe-studios/foundation-wasm-ui 0.0.0-stage → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +11 -2
- package/bundle.js +15565 -0
- package/bundle.min.js +2 -0
- package/foundation_wasm/runtime/foundation-wasm.js +2449 -0
- package/index.js +3 -0
- package/package.json +12 -4
- package/ui/runtimes/foundation-ui-actions.js +698 -0
- package/ui/runtimes/foundation-ui-behaviours.js +792 -0
- package/ui/runtimes/foundation-ui-bootstrap.js +13 -0
- package/ui/runtimes/foundation-ui-connections.js +99 -0
- package/ui/runtimes/foundation-ui-frames.js +1023 -0
- package/ui/runtimes/foundation-ui-live.js +186 -0
- package/ui/runtimes/foundation-ui-recovery.js +66 -0
- package/ui/runtimes/foundation-ui-vocab.js +262 -0
- package/ui/runtimes/foundation-ui-wire.js +1 -0
- package/ui/runtimes/foundation-wasm-ui.js +2164 -0
- package/ui/runtimes/platform-scheme-interceptor.js +124 -0
- package/ui/runtimes/runtime-entry.js +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var SIZEOF_SHORT=2;var SIZEOF_INT=4;var FILE_IDENTIFIER_LENGTH=4;var SIZE_PREFIX_LENGTH=4;var int32=new Int32Array(2);var float32=new Float32Array(int32.buffer);var float64=new Float64Array(int32.buffer);var isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Encoding;(function(Encoding2){Encoding2[Encoding2["UTF8_BYTES"]=1]="UTF8_BYTES";Encoding2[Encoding2["UTF16_STRING"]=2]="UTF16_STRING"})(Encoding||(Encoding={}));var ByteBuffer=class _ByteBuffer{constructor(bytes_){this.bytes_=bytes_;this.position_=0;this.text_decoder_=new TextDecoder}static allocate(byte_size){return new _ByteBuffer(new Uint8Array(byte_size))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(position){this.position_=position}capacity(){return this.bytes_.length}readInt8(offset){return this.readUint8(offset)<<24>>24}readUint8(offset){return this.bytes_[offset]}readInt16(offset){return this.readUint16(offset)<<16>>16}readUint16(offset){return this.bytes_[offset]|this.bytes_[offset+1]<<8}readInt32(offset){return this.bytes_[offset]|this.bytes_[offset+1]<<8|this.bytes_[offset+2]<<16|this.bytes_[offset+3]<<24}readUint32(offset){return this.readInt32(offset)>>>0}readInt64(offset){return BigInt.asIntN(64,BigInt(this.readUint32(offset))+(BigInt(this.readUint32(offset+4))<<BigInt(32)))}readUint64(offset){return BigInt.asUintN(64,BigInt(this.readUint32(offset))+(BigInt(this.readUint32(offset+4))<<BigInt(32)))}readFloat32(offset){int32[0]=this.readInt32(offset);return float32[0]}readFloat64(offset){int32[isLittleEndian?0:1]=this.readInt32(offset);int32[isLittleEndian?1:0]=this.readInt32(offset+4);return float64[0]}writeInt8(offset,value){this.bytes_[offset]=value}writeUint8(offset,value){this.bytes_[offset]=value}writeInt16(offset,value){this.bytes_[offset]=value;this.bytes_[offset+1]=value>>8}writeUint16(offset,value){this.bytes_[offset]=value;this.bytes_[offset+1]=value>>8}writeInt32(offset,value){this.bytes_[offset]=value;this.bytes_[offset+1]=value>>8;this.bytes_[offset+2]=value>>16;this.bytes_[offset+3]=value>>24}writeUint32(offset,value){this.bytes_[offset]=value;this.bytes_[offset+1]=value>>8;this.bytes_[offset+2]=value>>16;this.bytes_[offset+3]=value>>24}writeInt64(offset,value){this.writeInt32(offset,Number(BigInt.asIntN(32,value)));this.writeInt32(offset+4,Number(BigInt.asIntN(32,value>>BigInt(32))))}writeUint64(offset,value){this.writeUint32(offset,Number(BigInt.asUintN(32,value)));this.writeUint32(offset+4,Number(BigInt.asUintN(32,value>>BigInt(32))))}writeFloat32(offset,value){float32[0]=value;this.writeInt32(offset,int32[0])}writeFloat64(offset,value){float64[0]=value;this.writeInt32(offset,int32[isLittleEndian?0:1]);this.writeInt32(offset+4,int32[isLittleEndian?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+SIZEOF_INT+FILE_IDENTIFIER_LENGTH){throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.")}let result="";for(let i=0;i<FILE_IDENTIFIER_LENGTH;i++){result+=String.fromCharCode(this.readInt8(this.position_+SIZEOF_INT+i))}return result}__offset(bb_pos,vtable_offset){const vtable=bb_pos-this.readInt32(bb_pos);return vtable_offset<this.readInt16(vtable)?this.readInt16(vtable+vtable_offset):0}__union(t,offset){t.bb_pos=offset+this.readInt32(offset);t.bb=this;return t}__string(offset,opt_encoding){offset+=this.readInt32(offset);const length=this.readInt32(offset);offset+=SIZEOF_INT;const utf8bytes=this.bytes_.subarray(offset,offset+length);if(opt_encoding===Encoding.UTF8_BYTES)return utf8bytes;else return this.text_decoder_.decode(utf8bytes)}__union_with_string(o,offset){if(typeof o==="string"){return this.__string(offset)}return this.__union(o,offset)}__indirect(offset){return offset+this.readInt32(offset)}__vector(offset){return offset+this.readInt32(offset)+SIZEOF_INT}__vector_len(offset){return this.readInt32(offset+this.readInt32(offset))}__has_identifier(ident){if(ident.length!=FILE_IDENTIFIER_LENGTH){throw new Error("FlatBuffers: file identifier must be length "+FILE_IDENTIFIER_LENGTH)}for(let i=0;i<FILE_IDENTIFIER_LENGTH;i++){if(ident.charCodeAt(i)!=this.readInt8(this.position()+SIZEOF_INT+i)){return false}}return true}createScalarList(listAccessor,listLength){const ret=[];for(let i=0;i<listLength;++i){const val=listAccessor(i);if(val!==null){ret.push(val)}}return ret}createObjList(listAccessor,listLength){const ret=[];for(let i=0;i<listLength;++i){const val=listAccessor(i);if(val!==null){ret.push(val.unpack())}}return ret}};var Builder=class _Builder{constructor(opt_initial_size){this.minalign=1;this.vtable=null;this.vtable_in_use=0;this.isNested=false;this.object_start=0;this.vtables=[];this.vector_num_elems=0;this.force_defaults=false;this.string_maps=null;this.text_encoder=new TextEncoder;let initial_size;if(!opt_initial_size){initial_size=1024}else{initial_size=opt_initial_size}this.bb=ByteBuffer.allocate(initial_size);this.space=initial_size}clear(){this.bb.clear();this.space=this.bb.capacity();this.minalign=1;this.vtable=null;this.vtable_in_use=0;this.isNested=false;this.object_start=0;this.vtables=[];this.vector_num_elems=0;this.force_defaults=false;this.string_maps=null}forceDefaults(forceDefaults){this.force_defaults=forceDefaults}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(size,additional_bytes){if(size>this.minalign){this.minalign=size}const align_size=~(this.bb.capacity()-this.space+additional_bytes)+1&size-1;while(this.space<align_size+size+additional_bytes){const old_buf_size=this.bb.capacity();this.bb=_Builder.growByteBuffer(this.bb);this.space+=this.bb.capacity()-old_buf_size}this.pad(align_size)}pad(byte_size){for(let i=0;i<byte_size;i++){this.bb.writeInt8(--this.space,0)}}writeInt8(value){this.bb.writeInt8(this.space-=1,value)}writeInt16(value){this.bb.writeInt16(this.space-=2,value)}writeInt32(value){this.bb.writeInt32(this.space-=4,value)}writeInt64(value){this.bb.writeInt64(this.space-=8,value)}writeFloat32(value){this.bb.writeFloat32(this.space-=4,value)}writeFloat64(value){this.bb.writeFloat64(this.space-=8,value)}addInt8(value){this.prep(1,0);this.writeInt8(value)}addInt16(value){this.prep(2,0);this.writeInt16(value)}addInt32(value){this.prep(4,0);this.writeInt32(value)}addInt64(value){this.prep(8,0);this.writeInt64(value)}addFloat32(value){this.prep(4,0);this.writeFloat32(value)}addFloat64(value){this.prep(8,0);this.writeFloat64(value)}addFieldInt8(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addInt8(value);this.slot(voffset)}}addFieldInt16(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addInt16(value);this.slot(voffset)}}addFieldInt32(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addInt32(value);this.slot(voffset)}}addFieldInt64(voffset,value,defaultValue){if(this.force_defaults||value!==defaultValue){this.addInt64(value);this.slot(voffset)}}addFieldFloat32(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addFloat32(value);this.slot(voffset)}}addFieldFloat64(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addFloat64(value);this.slot(voffset)}}addFieldOffset(voffset,value,defaultValue){if(this.force_defaults||value!=defaultValue){this.addOffset(value);this.slot(voffset)}}addFieldStruct(voffset,value,defaultValue){if(value!=defaultValue){this.nested(value);this.slot(voffset)}}nested(obj){if(obj!=this.offset()){throw new TypeError("FlatBuffers: struct must be serialized inline.")}}notNested(){if(this.isNested){throw new TypeError("FlatBuffers: object serialization must not be nested.")}}slot(voffset){if(this.vtable!==null)this.vtable[voffset]=this.offset()}offset(){return this.bb.capacity()-this.space}static growByteBuffer(bb){const old_buf_size=bb.capacity();if(old_buf_size&3221225472){throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.")}const new_buf_size=old_buf_size<<1;const nbb=ByteBuffer.allocate(new_buf_size);nbb.setPosition(new_buf_size-old_buf_size);nbb.bytes().set(bb.bytes(),new_buf_size-old_buf_size);return nbb}addOffset(offset){this.prep(SIZEOF_INT,0);this.writeInt32(this.offset()-offset+SIZEOF_INT)}startObject(numfields){this.notNested();if(this.vtable==null){this.vtable=[]}this.vtable_in_use=numfields;for(let i=0;i<numfields;i++){this.vtable[i]=0}this.isNested=true;this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested){throw new Error("FlatBuffers: endObject called without startObject")}this.addInt32(0);const vtableloc=this.offset();let i=this.vtable_in_use-1;for(;i>=0&&this.vtable[i]==0;i--){}const trimmed_size=i+1;for(;i>=0;i--){this.addInt16(this.vtable[i]!=0?vtableloc-this.vtable[i]:0)}const standard_fields=2;this.addInt16(vtableloc-this.object_start);const len=(trimmed_size+standard_fields)*SIZEOF_SHORT;this.addInt16(len);let existing_vtable=0;const vt1=this.space;outer_loop:for(i=0;i<this.vtables.length;i++){const vt2=this.bb.capacity()-this.vtables[i];if(len==this.bb.readInt16(vt2)){for(let j=SIZEOF_SHORT;j<len;j+=SIZEOF_SHORT){if(this.bb.readInt16(vt1+j)!=this.bb.readInt16(vt2+j)){continue outer_loop}}existing_vtable=this.vtables[i];break}}if(existing_vtable){this.space=this.bb.capacity()-vtableloc;this.bb.writeInt32(this.space,existing_vtable-vtableloc)}else{this.vtables.push(this.offset());this.bb.writeInt32(this.bb.capacity()-vtableloc,this.offset()-vtableloc)}this.isNested=false;return vtableloc}finish(root_table,opt_file_identifier,opt_size_prefix){const size_prefix=opt_size_prefix?SIZE_PREFIX_LENGTH:0;if(opt_file_identifier){const file_identifier=opt_file_identifier;this.prep(this.minalign,SIZEOF_INT+FILE_IDENTIFIER_LENGTH+size_prefix);if(file_identifier.length!=FILE_IDENTIFIER_LENGTH){throw new TypeError("FlatBuffers: file identifier must be length "+FILE_IDENTIFIER_LENGTH)}for(let i=FILE_IDENTIFIER_LENGTH-1;i>=0;i--){this.writeInt8(file_identifier.charCodeAt(i))}}this.prep(this.minalign,SIZEOF_INT+size_prefix);this.addOffset(root_table);if(size_prefix){this.addInt32(this.bb.capacity()-this.space)}this.bb.setPosition(this.space)}finishSizePrefixed(root_table,opt_file_identifier){this.finish(root_table,opt_file_identifier,true)}requiredField(table,field){const table_start=this.bb.capacity()-table;const vtable_start=table_start-this.bb.readInt32(table_start);const ok=field<this.bb.readInt16(vtable_start)&&this.bb.readInt16(vtable_start+field)!=0;if(!ok){throw new TypeError("FlatBuffers: field "+field+" must be set")}}startVector(elem_size,num_elems,alignment){this.notNested();this.vector_num_elems=num_elems;this.prep(SIZEOF_INT,elem_size*num_elems);this.prep(alignment,elem_size*num_elems)}endVector(){this.writeInt32(this.vector_num_elems);return this.offset()}createSharedString(s){if(!s){return 0}if(!this.string_maps){this.string_maps=new Map}if(this.string_maps.has(s)){return this.string_maps.get(s)}const offset=this.createString(s);this.string_maps.set(s,offset);return offset}createString(s){if(s===null||s===void 0){return 0}let utf8;if(s instanceof Uint8Array){utf8=s}else{utf8=this.text_encoder.encode(s)}this.addInt8(0);this.startVector(1,utf8.length,1);this.bb.setPosition(this.space-=utf8.length);this.bb.bytes().set(utf8,this.space);return this.endVector()}createByteVector(v){if(v===null||v===void 0){return 0}this.startVector(1,v.length,1);this.bb.setPosition(this.space-=v.length);this.bb.bytes().set(v,this.space);return this.endVector()}createObjectOffset(obj){if(obj===null){return 0}if(typeof obj==="string"){return this.createString(obj)}else{return obj.pack(this)}}createObjectOffsetList(list){const ret=[];for(let i=0;i<list.length;++i){const val=list[i];if(val!==null){ret.push(this.createObjectOffset(val))}else{throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")}}return ret}createStructOffsetList(list,startFunc){startFunc(this,list.length);this.createObjectOffsetList(list.slice().reverse());return this.endVector()}};var ErrorCode=(ErrorCode2=>{ErrorCode2[ErrorCode2["Unknown"]=0]="Unknown";ErrorCode2[ErrorCode2["BadRequest"]=1]="BadRequest";ErrorCode2[ErrorCode2["UnknownAction"]=2]="UnknownAction";ErrorCode2[ErrorCode2["UnavailableOrigin"]=3]="UnavailableOrigin";ErrorCode2[ErrorCode2["UnsupportedAction"]=4]="UnsupportedAction";ErrorCode2[ErrorCode2["StateRejected"]=5]="StateRejected";ErrorCode2[ErrorCode2["StateExpired"]=6]="StateExpired";ErrorCode2[ErrorCode2["RateLimited"]=7]="RateLimited";ErrorCode2[ErrorCode2["ActionFailed"]=8]="ActionFailed";ErrorCode2[ErrorCode2["UpdateRequired"]=9]="UpdateRequired";ErrorCode2[ErrorCode2["UnsupportedPlatformOp"]=10]="UnsupportedPlatformOp";ErrorCode2[ErrorCode2["InvalidInput"]=11]="InvalidInput";return ErrorCode2})(ErrorCode||{});var ActionError=class _ActionError{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsActionError(bb,obj){return(obj||new _ActionError).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsActionError(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ActionError).__init(bb.readInt32(bb.position())+bb.position(),bb)}code(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint16(this.bb_pos+offset):0}message(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}rowIndex(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startActionError(builder){builder.startObject(3)}static addCode(builder,code){builder.addFieldInt16(0,code,0)}static addMessage(builder,messageOffset){builder.addFieldOffset(1,messageOffset,0)}static addRowIndex(builder,rowIndex){builder.addFieldInt32(2,rowIndex,0)}static endActionError(builder){const offset=builder.endObject();return offset}static createActionError(builder,code,messageOffset,rowIndex){_ActionError.startActionError(builder);_ActionError.addCode(builder,code);_ActionError.addMessage(builder,messageOffset);_ActionError.addRowIndex(builder,rowIndex);return _ActionError.endActionError(builder)}unpack(){return new ActionErrorT(this.code(),this.message(),this.rowIndex())}unpackTo(_o){_o.code=this.code();_o.message=this.message();_o.rowIndex=this.rowIndex()}};var ActionErrorT=class{constructor(code=0,message=null,rowIndex=0){this.code=code;this.message=message;this.rowIndex=rowIndex}code;message;rowIndex;pack(builder){const message=this.message!==null?builder.createString(this.message):0;return ActionError.createActionError(builder,this.code,message,this.rowIndex)}};var ActionInput=class _ActionInput{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsActionInput(bb,obj){return(obj||new _ActionInput).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsActionInput(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ActionInput).__init(bb.readInt32(bb.position())+bb.position(),bb)}eventName(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}value(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}checked(){const offset=this.bb.__offset(this.bb_pos,8);return offset?!!this.bb.readInt8(this.bb_pos+offset):false}keyCode(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint32(this.bb_pos+offset):0}modifiers(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.readUint8(this.bb_pos+offset):0}parentNode(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.readUint32(this.bb_pos+offset):0}json(index){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}jsonLength(){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.__vector_len(this.bb_pos+offset):0}jsonArray(){const offset=this.bb.__offset(this.bb_pos,16);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startActionInput(builder){builder.startObject(7)}static addEventName(builder,eventNameOffset){builder.addFieldOffset(0,eventNameOffset,0)}static addValue(builder,valueOffset){builder.addFieldOffset(1,valueOffset,0)}static addChecked(builder,checked){builder.addFieldInt8(2,+checked,0)}static addKeyCode(builder,keyCode){builder.addFieldInt32(3,keyCode,0)}static addModifiers(builder,modifiers){builder.addFieldInt8(4,modifiers,0)}static addParentNode(builder,parentNode){builder.addFieldInt32(5,parentNode,0)}static addJson(builder,jsonOffset){builder.addFieldOffset(6,jsonOffset,0)}static createJsonVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startJsonVector(builder,numElems){builder.startVector(1,numElems,1)}static endActionInput(builder){const offset=builder.endObject();return offset}static createActionInput(builder,eventNameOffset,valueOffset,checked,keyCode,modifiers,parentNode,jsonOffset){_ActionInput.startActionInput(builder);_ActionInput.addEventName(builder,eventNameOffset);_ActionInput.addValue(builder,valueOffset);_ActionInput.addChecked(builder,checked);_ActionInput.addKeyCode(builder,keyCode);_ActionInput.addModifiers(builder,modifiers);_ActionInput.addParentNode(builder,parentNode);_ActionInput.addJson(builder,jsonOffset);return _ActionInput.endActionInput(builder)}unpack(){return new ActionInputT(this.eventName(),this.value(),this.checked(),this.keyCode(),this.modifiers(),this.parentNode(),this.jsonArray()===null?null:Array.from(this.jsonArray()))}unpackTo(_o){_o.eventName=this.eventName();_o.value=this.value();_o.checked=this.checked();_o.keyCode=this.keyCode();_o.modifiers=this.modifiers();_o.parentNode=this.parentNode();_o.json=this.jsonArray()===null?null:Array.from(this.jsonArray())}};var ActionInputT=class{constructor(eventName=null,value=null,checked=false,keyCode=0,modifiers=0,parentNode=0,json=null){this.eventName=eventName;this.value=value;this.checked=checked;this.keyCode=keyCode;this.modifiers=modifiers;this.parentNode=parentNode;this.json=json}eventName;value;checked;keyCode;modifiers;parentNode;json;pack(builder){const eventName=this.eventName!==null?builder.createString(this.eventName):0;const value=this.value!==null?builder.createString(this.value):0;const json=this.json===null?0:ActionInput.createJsonVector(builder,this.json);return ActionInput.createActionInput(builder,eventName,value,this.checked,this.keyCode,this.modifiers,this.parentNode,json)}};var ActionRequest=class _ActionRequest{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsActionRequest(bb,obj){return(obj||new _ActionRequest).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsActionRequest(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ActionRequest).__init(bb.readInt32(bb.position())+bb.position(),bb)}action(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}nodeId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}input(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new ActionInput).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}state(index){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}stateLength(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__vector_len(this.bb_pos+offset):0}stateArray(){const offset=this.bb.__offset(this.bb_pos,10);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startActionRequest(builder){builder.startObject(4)}static addAction(builder,actionOffset){builder.addFieldOffset(0,actionOffset,0)}static addNodeId(builder,nodeId){builder.addFieldInt32(1,nodeId,0)}static addInput(builder,inputOffset){builder.addFieldOffset(2,inputOffset,0)}static addState(builder,stateOffset){builder.addFieldOffset(3,stateOffset,0)}static createStateVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startStateVector(builder,numElems){builder.startVector(1,numElems,1)}static endActionRequest(builder){const offset=builder.endObject();return offset}unpack(){return new ActionRequestT(this.action(),this.nodeId(),this.input()!==null?this.input().unpack():null,this.bb.createScalarList(this.state.bind(this),this.stateLength()))}unpackTo(_o){_o.action=this.action();_o.nodeId=this.nodeId();_o.input=this.input()!==null?this.input().unpack():null;_o.state=this.bb.createScalarList(this.state.bind(this),this.stateLength())}};var ActionRequestT=class{constructor(action=null,nodeId=0,input=null,state=[]){this.action=action;this.nodeId=nodeId;this.input=input;this.state=state}action;nodeId;input;state;pack(builder){const action=this.action!==null?builder.createString(this.action):0;const input=this.input!==null?this.input.pack(builder):0;const state=ActionRequest.createStateVector(builder,this.state);ActionRequest.startActionRequest(builder);ActionRequest.addAction(builder,action);ActionRequest.addNodeId(builder,this.nodeId);ActionRequest.addInput(builder,input);ActionRequest.addState(builder,state);return ActionRequest.endActionRequest(builder)}};var Alignment=(Alignment2=>{Alignment2[Alignment2["Start"]=0]="Start";Alignment2[Alignment2["Center"]=1]="Center";Alignment2[Alignment2["End"]=2]="End";Alignment2[Alignment2["Stretch"]=3]="Stretch";return Alignment2})(Alignment||{});var AlignmentValue=class _AlignmentValue{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsAlignmentValue(bb,obj){return(obj||new _AlignmentValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsAlignmentValue(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _AlignmentValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}v(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}static startAlignmentValue(builder){builder.startObject(1)}static addV(builder,v){builder.addFieldInt8(0,v,0)}static endAlignmentValue(builder){const offset=builder.endObject();return offset}static createAlignmentValue(builder,v){_AlignmentValue.startAlignmentValue(builder);_AlignmentValue.addV(builder,v);return _AlignmentValue.endAlignmentValue(builder)}unpack(){return new AlignmentValueT(this.v())}unpackTo(_o){_o.v=this.v()}};var AlignmentValueT=class{constructor(v=0){this.v=v}v;pack(builder){return AlignmentValue.createAlignmentValue(builder,this.v)}};var AppendChild=class _AppendChild{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsAppendChild(bb,obj){return(obj||new _AppendChild).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsAppendChild(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _AppendChild).__init(bb.readInt32(bb.position())+bb.position(),bb)}parentId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}childId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startAppendChild(builder){builder.startObject(2)}static addParentId(builder,parentId){builder.addFieldInt32(0,parentId,0)}static addChildId(builder,childId){builder.addFieldInt32(1,childId,0)}static endAppendChild(builder){const offset=builder.endObject();return offset}static createAppendChild(builder,parentId,childId){_AppendChild.startAppendChild(builder);_AppendChild.addParentId(builder,parentId);_AppendChild.addChildId(builder,childId);return _AppendChild.endAppendChild(builder)}unpack(){return new AppendChildT(this.parentId(),this.childId())}unpackTo(_o){_o.parentId=this.parentId();_o.childId=this.childId()}};var AppendChildT=class{constructor(parentId=0,childId=0){this.parentId=parentId;this.childId=childId}parentId;childId;pack(builder){return AppendChild.createAppendChild(builder,this.parentId,this.childId)}};var ArrowIpcBlob=class _ArrowIpcBlob{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsArrowIpcBlob(bb,obj){return(obj||new _ArrowIpcBlob).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsArrowIpcBlob(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ArrowIpcBlob).__init(bb.readInt32(bb.position())+bb.position(),bb)}targetNode(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}bytes(index){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}bytesLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}bytesArray(){const offset=this.bb.__offset(this.bb_pos,6);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startArrowIpcBlob(builder){builder.startObject(2)}static addTargetNode(builder,targetNode){builder.addFieldInt32(0,targetNode,0)}static addBytes(builder,bytesOffset){builder.addFieldOffset(1,bytesOffset,0)}static createBytesVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startBytesVector(builder,numElems){builder.startVector(1,numElems,1)}static endArrowIpcBlob(builder){const offset=builder.endObject();return offset}static createArrowIpcBlob(builder,targetNode,bytesOffset){_ArrowIpcBlob.startArrowIpcBlob(builder);_ArrowIpcBlob.addTargetNode(builder,targetNode);_ArrowIpcBlob.addBytes(builder,bytesOffset);return _ArrowIpcBlob.endArrowIpcBlob(builder)}unpack(){return new ArrowIpcBlobT(this.targetNode(),this.bb.createScalarList(this.bytes.bind(this),this.bytesLength()))}unpackTo(_o){_o.targetNode=this.targetNode();_o.bytes=this.bb.createScalarList(this.bytes.bind(this),this.bytesLength())}};var ArrowIpcBlobT=class{constructor(targetNode=0,bytes=[]){this.targetNode=targetNode;this.bytes=bytes}targetNode;bytes;pack(builder){const bytes=ArrowIpcBlob.createBytesVector(builder,this.bytes);return ArrowIpcBlob.createArrowIpcBlob(builder,this.targetNode,bytes)}};var AttachState=class _AttachState{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsAttachState(bb,obj){return(obj||new _AttachState).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsAttachState(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _AttachState).__init(bb.readInt32(bb.position())+bb.position(),bb)}rootNode(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}state(index){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}stateLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}stateArray(){const offset=this.bb.__offset(this.bb_pos,6);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startAttachState(builder){builder.startObject(2)}static addRootNode(builder,rootNode){builder.addFieldInt32(0,rootNode,0)}static addState(builder,stateOffset){builder.addFieldOffset(1,stateOffset,0)}static createStateVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startStateVector(builder,numElems){builder.startVector(1,numElems,1)}static endAttachState(builder){const offset=builder.endObject();return offset}static createAttachState(builder,rootNode,stateOffset){_AttachState.startAttachState(builder);_AttachState.addRootNode(builder,rootNode);_AttachState.addState(builder,stateOffset);return _AttachState.endAttachState(builder)}unpack(){return new AttachStateT(this.rootNode(),this.bb.createScalarList(this.state.bind(this),this.stateLength()))}unpackTo(_o){_o.rootNode=this.rootNode();_o.state=this.bb.createScalarList(this.state.bind(this),this.stateLength())}};var AttachStateT=class{constructor(rootNode=0,state=[]){this.rootNode=rootNode;this.state=state}rootNode;state;pack(builder){const state=AttachState.createStateVector(builder,this.state);return AttachState.createAttachState(builder,this.rootNode,state)}};var Axis=(Axis2=>{Axis2[Axis2["Vertical"]=0]="Vertical";Axis2[Axis2["Horizontal"]=1]="Horizontal";return Axis2})(Axis||{});var AxisValue=class _AxisValue{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsAxisValue(bb,obj){return(obj||new _AxisValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsAxisValue(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _AxisValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}v(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}static startAxisValue(builder){builder.startObject(1)}static addV(builder,v){builder.addFieldInt8(0,v,0)}static endAxisValue(builder){const offset=builder.endObject();return offset}static createAxisValue(builder,v){_AxisValue.startAxisValue(builder);_AxisValue.addV(builder,v);return _AxisValue.endAxisValue(builder)}unpack(){return new AxisValueT(this.v())}unpackTo(_o){_o.v=this.v()}};var AxisValueT=class{constructor(v=0){this.v=v}v;pack(builder){return AxisValue.createAxisValue(builder,this.v)}};var BoolValue=class _BoolValue{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsBoolValue(bb,obj){return(obj||new _BoolValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsBoolValue(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _BoolValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}v(){const offset=this.bb.__offset(this.bb_pos,4);return offset?!!this.bb.readInt8(this.bb_pos+offset):false}static startBoolValue(builder){builder.startObject(1)}static addV(builder,v){builder.addFieldInt8(0,+v,0)}static endBoolValue(builder){const offset=builder.endObject();return offset}static createBoolValue(builder,v){_BoolValue.startBoolValue(builder);_BoolValue.addV(builder,v);return _BoolValue.endBoolValue(builder)}unpack(){return new BoolValueT(this.v())}unpackTo(_o){_o.v=this.v()}};var BoolValueT=class{constructor(v=false){this.v=v}v;pack(builder){return BoolValue.createBoolValue(builder,this.v)}};var ColorToken=class _ColorToken{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsColorToken(bb,obj){return(obj||new _ColorToken).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsColorToken(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ColorToken).__init(bb.readInt32(bb.position())+bb.position(),bb)}id(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startColorToken(builder){builder.startObject(1)}static addId(builder,id){builder.addFieldInt32(0,id,0)}static endColorToken(builder){const offset=builder.endObject();return offset}static createColorToken(builder,id){_ColorToken.startColorToken(builder);_ColorToken.addId(builder,id);return _ColorToken.endColorToken(builder)}unpack(){return new ColorTokenT(this.id())}unpackTo(_o){_o.id=this.id()}};var ColorTokenT=class{constructor(id=0){this.id=id}id;pack(builder){return ColorToken.createColorToken(builder,this.id)}};var FontToken=class _FontToken{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsFontToken(bb,obj){return(obj||new _FontToken).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsFontToken(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _FontToken).__init(bb.readInt32(bb.position())+bb.position(),bb)}id(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startFontToken(builder){builder.startObject(1)}static addId(builder,id){builder.addFieldInt32(0,id,0)}static endFontToken(builder){const offset=builder.endObject();return offset}static createFontToken(builder,id){_FontToken.startFontToken(builder);_FontToken.addId(builder,id);return _FontToken.endFontToken(builder)}unpack(){return new FontTokenT(this.id())}unpackTo(_o){_o.id=this.id()}};var FontTokenT=class{constructor(id=0){this.id=id}id;pack(builder){return FontToken.createFontToken(builder,this.id)}};var LengthUnit=(LengthUnit2=>{LengthUnit2[LengthUnit2["Point"]=0]="Point";LengthUnit2[LengthUnit2["Percent"]=1]="Percent";LengthUnit2[LengthUnit2["Auto"]=2]="Auto";return LengthUnit2})(LengthUnit||{});var Length=class{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}value(){return this.bb.readFloat32(this.bb_pos)}unit(){return this.bb.readUint8(this.bb_pos+4)}static sizeOf(){return 8}static createLength(builder,value,unit){builder.prep(4,8);builder.pad(3);builder.writeInt8(unit);builder.writeFloat32(value);return builder.offset()}unpack(){return new LengthT(this.value(),this.unit())}unpackTo(_o){_o.value=this.value();_o.unit=this.unit()}};var LengthT=class{constructor(value=0,unit=0){this.value=value;this.unit=unit}value;unit;pack(builder){return Length.createLength(builder,this.value,this.unit)}};var LengthValue=class _LengthValue{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsLengthValue(bb,obj){return(obj||new _LengthValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsLengthValue(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _LengthValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}v(obj){const offset=this.bb.__offset(this.bb_pos,4);return offset?(obj||new Length).__init(this.bb_pos+offset,this.bb):null}static startLengthValue(builder){builder.startObject(1)}static addV(builder,vOffset){builder.addFieldStruct(0,vOffset,0)}static endLengthValue(builder){const offset=builder.endObject();return offset}static createLengthValue(builder,vOffset){_LengthValue.startLengthValue(builder);_LengthValue.addV(builder,vOffset);return _LengthValue.endLengthValue(builder)}unpack(){return new LengthValueT(this.v()!==null?this.v().unpack():null)}unpackTo(_o){_o.v=this.v()!==null?this.v().unpack():null}};var LengthValueT=class{constructor(v=null){this.v=v}v;pack(builder){return LengthValue.createLengthValue(builder,this.v!==null?this.v.pack(builder):0)}};var TextValue=class _TextValue{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsTextValue(bb,obj){return(obj||new _TextValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsTextValue(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _TextValue).__init(bb.readInt32(bb.position())+bb.position(),bb)}v(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startTextValue(builder){builder.startObject(1)}static addV(builder,vOffset){builder.addFieldOffset(0,vOffset,0)}static endTextValue(builder){const offset=builder.endObject();return offset}static createTextValue(builder,vOffset){_TextValue.startTextValue(builder);_TextValue.addV(builder,vOffset);return _TextValue.endTextValue(builder)}unpack(){return new TextValueT(this.v())}unpackTo(_o){_o.v=this.v()}};var TextValueT=class{constructor(v=null){this.v=v}v;pack(builder){const v=this.v!==null?builder.createString(this.v):0;return TextValue.createTextValue(builder,v)}};var PropValue=(PropValue2=>{PropValue2[PropValue2["NONE"]=0]="NONE";PropValue2[PropValue2["Length"]=1]="Length";PropValue2[PropValue2["ColorToken"]=2]="ColorToken";PropValue2[PropValue2["FontToken"]=3]="FontToken";PropValue2[PropValue2["Alignment"]=4]="Alignment";PropValue2[PropValue2["Axis"]=5]="Axis";PropValue2[PropValue2["Bool"]=6]="Bool";PropValue2[PropValue2["Text"]=7]="Text";return PropValue2})(PropValue||{});function unionToPropValue(type,accessor){switch(PropValue[type]){case"NONE":return null;case"Length":return accessor(new LengthValue);case"ColorToken":return accessor(new ColorToken);case"FontToken":return accessor(new FontToken);case"Alignment":return accessor(new AlignmentValue);case"Axis":return accessor(new AxisValue);case"Bool":return accessor(new BoolValue);case"Text":return accessor(new TextValue);default:return null}}function unionListToPropValue(type,accessor,index){switch(PropValue[type]){case"NONE":return null;case"Length":return accessor(index,new LengthValue);case"ColorToken":return accessor(index,new ColorToken);case"FontToken":return accessor(index,new FontToken);case"Alignment":return accessor(index,new AlignmentValue);case"Axis":return accessor(index,new AxisValue);case"Bool":return accessor(index,new BoolValue);case"Text":return accessor(index,new TextValue);default:return null}}var BehaviourArg=class _BehaviourArg{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsBehaviourArg(bb,obj){return(obj||new _BehaviourArg).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsBehaviourArg(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _BehaviourArg).__init(bb.readInt32(bb.position())+bb.position(),bb)}name(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}valueType(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}value(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__union(obj,this.bb_pos+offset):null}static startBehaviourArg(builder){builder.startObject(3)}static addName(builder,nameOffset){builder.addFieldOffset(0,nameOffset,0)}static addValueType(builder,valueType){builder.addFieldInt8(1,valueType,0)}static addValue(builder,valueOffset){builder.addFieldOffset(2,valueOffset,0)}static endBehaviourArg(builder){const offset=builder.endObject();return offset}static createBehaviourArg(builder,nameOffset,valueType,valueOffset){_BehaviourArg.startBehaviourArg(builder);_BehaviourArg.addName(builder,nameOffset);_BehaviourArg.addValueType(builder,valueType);_BehaviourArg.addValue(builder,valueOffset);return _BehaviourArg.endBehaviourArg(builder)}unpack(){return new BehaviourArgT(this.name(),this.valueType(),(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})())}unpackTo(_o){_o.name=this.name();_o.valueType=this.valueType();_o.value=(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})()}};var BehaviourArgT=class{constructor(name=null,valueType=0,value=null){this.name=name;this.valueType=valueType;this.value=value}name;valueType;value;pack(builder){const name=this.name!==null?builder.createString(this.name):0;const value=builder.createObjectOffset(this.value);return BehaviourArg.createBehaviourArg(builder,name,this.valueType,value)}};var BehaviourId=(BehaviourId2=>{BehaviourId2[BehaviourId2["UNKNOWN"]=0]="UNKNOWN";BehaviourId2[BehaviourId2["DIALOG"]=1]="DIALOG";BehaviourId2[BehaviourId2["DISMISS"]=2]="DISMISS";BehaviourId2[BehaviourId2["SCROLL_LOCK"]=3]="SCROLL_LOCK";BehaviourId2[BehaviourId2["TRANSITION"]=4]="TRANSITION";return BehaviourId2})(BehaviourId||{});var EventId=(EventId2=>{EventId2[EventId2["UNKNOWN"]=0]="UNKNOWN";EventId2[EventId2["TAP"]=1]="TAP";EventId2[EventId2["CHANGE"]=2]="CHANGE";EventId2[EventId2["SUBMIT"]=3]="SUBMIT";EventId2[EventId2["FOCUS"]=4]="FOCUS";EventId2[EventId2["BLUR"]=5]="BLUR";return EventId2})(EventId||{});var BindAction=class _BindAction{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsBindAction(bb,obj){return(obj||new _BindAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsBindAction(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _BindAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}event(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}action(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startBindAction(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addEvent(builder,event){builder.addFieldInt16(1,event,0)}static addAction(builder,actionOffset){builder.addFieldOffset(2,actionOffset,0)}static endBindAction(builder){const offset=builder.endObject();return offset}static createBindAction(builder,nodeId,event,actionOffset){_BindAction.startBindAction(builder);_BindAction.addNodeId(builder,nodeId);_BindAction.addEvent(builder,event);_BindAction.addAction(builder,actionOffset);return _BindAction.endBindAction(builder)}unpack(){return new BindActionT(this.nodeId(),this.event(),this.action())}unpackTo(_o){_o.nodeId=this.nodeId();_o.event=this.event();_o.action=this.action()}};var BindActionT=class{constructor(nodeId=0,event=0,action=null){this.nodeId=nodeId;this.event=event;this.action=action}nodeId;event;action;pack(builder){const action=this.action!==null?builder.createString(this.action):0;return BindAction.createBindAction(builder,this.nodeId,this.event,action)}};var Bools=class _Bools{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsBools(bb,obj){return(obj||new _Bools).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsBools(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Bools).__init(bb.readInt32(bb.position())+bb.position(),bb)}values(index){const offset=this.bb.__offset(this.bb_pos,4);return offset?!!this.bb.readInt8(this.bb.__vector(this.bb_pos+offset)+index):false}valuesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}valuesArray(){const offset=this.bb.__offset(this.bb_pos,4);return offset?new Int8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startBools(builder){builder.startObject(1)}static addValues(builder,valuesOffset){builder.addFieldOffset(0,valuesOffset,0)}static createValuesVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(+data[i])}return builder.endVector()}static startValuesVector(builder,numElems){builder.startVector(1,numElems,1)}static endBools(builder){const offset=builder.endObject();return offset}static createBools(builder,valuesOffset){_Bools.startBools(builder);_Bools.addValues(builder,valuesOffset);return _Bools.endBools(builder)}unpack(){return new BoolsT(this.bb.createScalarList(this.values.bind(this),this.valuesLength()))}unpackTo(_o){_o.values=this.bb.createScalarList(this.values.bind(this),this.valuesLength())}};var BoolsT=class{constructor(values=[]){this.values=values}values;pack(builder){const values=Bools.createValuesVector(builder,this.values);return Bools.createBools(builder,values)}};var CapsStatus=(CapsStatus2=>{CapsStatus2[CapsStatus2["Ok"]=0]="Ok";CapsStatus2[CapsStatus2["UpdateRequired"]=1]="UpdateRequired";return CapsStatus2})(CapsStatus||{});var MountSurface=(MountSurface2=>{MountSurface2[MountSurface2["Native"]=0]="Native";MountSurface2[MountSurface2["Web"]=1]="Web";return MountSurface2})(MountSurface||{});var Platform=(Platform2=>{Platform2[Platform2["Unknown"]=0]="Unknown";Platform2[Platform2["Web"]=1]="Web";Platform2[Platform2["Ios"]=2]="Ios";Platform2[Platform2["Android"]=3]="Android";Platform2[Platform2["Desktop"]=4]="Desktop";return Platform2})(Platform||{});var ClientHello=class _ClientHello{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsClientHello(bb,obj){return(obj||new _ClientHello).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsClientHello(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ClientHello).__init(bb.readInt32(bb.position())+bb.position(),bb)}vocabularyVersion(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}platform(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}mount(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint8(this.bb_pos+offset):0}resumeFrom(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}subscriptionResume(){const offset=this.bb.__offset(this.bb_pos,12);return offset?!!this.bb.readInt8(this.bb_pos+offset):false}requestTag(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startClientHello(builder){builder.startObject(6)}static addVocabularyVersion(builder,vocabularyVersion){builder.addFieldInt32(0,vocabularyVersion,0)}static addPlatform(builder,platform){builder.addFieldInt8(1,platform,0)}static addMount(builder,mount){builder.addFieldInt8(2,mount,0)}static addResumeFrom(builder,resumeFrom){builder.addFieldInt64(3,resumeFrom,BigInt("0"))}static addSubscriptionResume(builder,subscriptionResume){builder.addFieldInt8(4,+subscriptionResume,0)}static addRequestTag(builder,requestTag){builder.addFieldInt64(5,requestTag,BigInt("0"))}static endClientHello(builder){const offset=builder.endObject();return offset}static createClientHello(builder,vocabularyVersion,platform,mount,resumeFrom,subscriptionResume,requestTag){_ClientHello.startClientHello(builder);_ClientHello.addVocabularyVersion(builder,vocabularyVersion);_ClientHello.addPlatform(builder,platform);_ClientHello.addMount(builder,mount);_ClientHello.addResumeFrom(builder,resumeFrom);_ClientHello.addSubscriptionResume(builder,subscriptionResume);_ClientHello.addRequestTag(builder,requestTag);return _ClientHello.endClientHello(builder)}unpack(){return new ClientHelloT(this.vocabularyVersion(),this.platform(),this.mount(),this.resumeFrom(),this.subscriptionResume(),this.requestTag())}unpackTo(_o){_o.vocabularyVersion=this.vocabularyVersion();_o.platform=this.platform();_o.mount=this.mount();_o.resumeFrom=this.resumeFrom();_o.subscriptionResume=this.subscriptionResume();_o.requestTag=this.requestTag()}};var ClientHelloT=class{constructor(vocabularyVersion=0,platform=0,mount=0,resumeFrom=BigInt("0"),subscriptionResume=false,requestTag=BigInt("0")){this.vocabularyVersion=vocabularyVersion;this.platform=platform;this.mount=mount;this.resumeFrom=resumeFrom;this.subscriptionResume=subscriptionResume;this.requestTag=requestTag}vocabularyVersion;platform;mount;resumeFrom;subscriptionResume;requestTag;pack(builder){return ClientHello.createClientHello(builder,this.vocabularyVersion,this.platform,this.mount,this.resumeFrom,this.subscriptionResume,this.requestTag)}};var F64s=class _F64s{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsF64s(bb,obj){return(obj||new _F64s).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsF64s(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _F64s).__init(bb.readInt32(bb.position())+bb.position(),bb)}values(index){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readFloat64(this.bb.__vector(this.bb_pos+offset)+index*8):0}valuesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}valuesArray(){const offset=this.bb.__offset(this.bb_pos,4);return offset?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startF64s(builder){builder.startObject(1)}static addValues(builder,valuesOffset){builder.addFieldOffset(0,valuesOffset,0)}static createValuesVector(builder,data){builder.startVector(8,data.length,8);for(let i=data.length-1;i>=0;i--){builder.addFloat64(data[i])}return builder.endVector()}static startValuesVector(builder,numElems){builder.startVector(8,numElems,8)}static endF64s(builder){const offset=builder.endObject();return offset}static createF64s(builder,valuesOffset){_F64s.startF64s(builder);_F64s.addValues(builder,valuesOffset);return _F64s.endF64s(builder)}unpack(){return new F64sT(this.bb.createScalarList(this.values.bind(this),this.valuesLength()))}unpackTo(_o){_o.values=this.bb.createScalarList(this.values.bind(this),this.valuesLength())}};var F64sT=class{constructor(values=[]){this.values=values}values;pack(builder){const values=F64s.createValuesVector(builder,this.values);return F64s.createF64s(builder,values)}};var I32s=class _I32s{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsI32s(bb,obj){return(obj||new _I32s).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsI32s(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _I32s).__init(bb.readInt32(bb.position())+bb.position(),bb)}values(index){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readInt32(this.bb.__vector(this.bb_pos+offset)+index*4):0}valuesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}valuesArray(){const offset=this.bb.__offset(this.bb_pos,4);return offset?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startI32s(builder){builder.startObject(1)}static addValues(builder,valuesOffset){builder.addFieldOffset(0,valuesOffset,0)}static createValuesVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startValuesVector(builder,numElems){builder.startVector(4,numElems,4)}static endI32s(builder){const offset=builder.endObject();return offset}static createI32s(builder,valuesOffset){_I32s.startI32s(builder);_I32s.addValues(builder,valuesOffset);return _I32s.endI32s(builder)}unpack(){return new I32sT(this.bb.createScalarList(this.values.bind(this),this.valuesLength()))}unpackTo(_o){_o.values=this.bb.createScalarList(this.values.bind(this),this.valuesLength())}};var I32sT=class{constructor(values=[]){this.values=values}values;pack(builder){const values=I32s.createValuesVector(builder,this.values);return I32s.createI32s(builder,values)}};var I64s=class _I64s{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsI64s(bb,obj){return(obj||new _I64s).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsI64s(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _I64s).__init(bb.readInt32(bb.position())+bb.position(),bb)}values(index){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readInt64(this.bb.__vector(this.bb_pos+offset)+index*8):BigInt(0)}valuesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startI64s(builder){builder.startObject(1)}static addValues(builder,valuesOffset){builder.addFieldOffset(0,valuesOffset,0)}static createValuesVector(builder,data){builder.startVector(8,data.length,8);for(let i=data.length-1;i>=0;i--){builder.addInt64(data[i])}return builder.endVector()}static startValuesVector(builder,numElems){builder.startVector(8,numElems,8)}static endI64s(builder){const offset=builder.endObject();return offset}static createI64s(builder,valuesOffset){_I64s.startI64s(builder);_I64s.addValues(builder,valuesOffset);return _I64s.endI64s(builder)}unpack(){return new I64sT(this.bb.createScalarList(this.values.bind(this),this.valuesLength()))}unpackTo(_o){_o.values=this.bb.createScalarList(this.values.bind(this),this.valuesLength())}};var I64sT=class{constructor(values=[]){this.values=values}values;pack(builder){const values=I64s.createValuesVector(builder,this.values);return I64s.createI64s(builder,values)}};var Strings=class _Strings{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsStrings(bb,obj){return(obj||new _Strings).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsStrings(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Strings).__init(bb.readInt32(bb.position())+bb.position(),bb)}values(index,optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb.__vector(this.bb_pos+offset)+index*4,optionalEncoding):null}valuesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startStrings(builder){builder.startObject(1)}static addValues(builder,valuesOffset){builder.addFieldOffset(0,valuesOffset,0)}static createValuesVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startValuesVector(builder,numElems){builder.startVector(4,numElems,4)}static endStrings(builder){const offset=builder.endObject();return offset}static createStrings(builder,valuesOffset){_Strings.startStrings(builder);_Strings.addValues(builder,valuesOffset);return _Strings.endStrings(builder)}unpack(){return new StringsT(this.bb.createScalarList(this.values.bind(this),this.valuesLength()))}unpackTo(_o){_o.values=this.bb.createScalarList(this.values.bind(this),this.valuesLength())}};var StringsT=class{constructor(values=[]){this.values=values}values;pack(builder){const values=Strings.createValuesVector(builder,builder.createObjectOffsetList(this.values));return Strings.createStrings(builder,values)}};var ColumnData=(ColumnData2=>{ColumnData2[ColumnData2["NONE"]=0]="NONE";ColumnData2[ColumnData2["I32"]=1]="I32";ColumnData2[ColumnData2["I64"]=2]="I64";ColumnData2[ColumnData2["F64"]=3]="F64";ColumnData2[ColumnData2["Bool"]=4]="Bool";ColumnData2[ColumnData2["Utf8"]=5]="Utf8";return ColumnData2})(ColumnData||{});function unionToColumnData(type,accessor){switch(ColumnData[type]){case"NONE":return null;case"I32":return accessor(new I32s);case"I64":return accessor(new I64s);case"F64":return accessor(new F64s);case"Bool":return accessor(new Bools);case"Utf8":return accessor(new Strings);default:return null}}function unionListToColumnData(type,accessor,index){switch(ColumnData[type]){case"NONE":return null;case"I32":return accessor(index,new I32s);case"I64":return accessor(index,new I64s);case"F64":return accessor(index,new F64s);case"Bool":return accessor(index,new Bools);case"Utf8":return accessor(index,new Strings);default:return null}}var Column=class _Column{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsColumn(bb,obj){return(obj||new _Column).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsColumn(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Column).__init(bb.readInt32(bb.position())+bb.position(),bb)}name(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}dataType(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}data(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__union(obj,this.bb_pos+offset):null}validity(index){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}validityLength(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__vector_len(this.bb_pos+offset):0}validityArray(){const offset=this.bb.__offset(this.bb_pos,10);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startColumn(builder){builder.startObject(4)}static addName(builder,nameOffset){builder.addFieldOffset(0,nameOffset,0)}static addDataType(builder,dataType){builder.addFieldInt8(1,dataType,0)}static addData(builder,dataOffset){builder.addFieldOffset(2,dataOffset,0)}static addValidity(builder,validityOffset){builder.addFieldOffset(3,validityOffset,0)}static createValidityVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startValidityVector(builder,numElems){builder.startVector(1,numElems,1)}static endColumn(builder){const offset=builder.endObject();return offset}static createColumn(builder,nameOffset,dataType,dataOffset,validityOffset){_Column.startColumn(builder);_Column.addName(builder,nameOffset);_Column.addDataType(builder,dataType);_Column.addData(builder,dataOffset);_Column.addValidity(builder,validityOffset);return _Column.endColumn(builder)}unpack(){return new ColumnT(this.name(),this.dataType(),(()=>{const temp=unionToColumnData(this.dataType(),this.data.bind(this));if(temp===null){return null}return temp.unpack()})(),this.bb.createScalarList(this.validity.bind(this),this.validityLength()))}unpackTo(_o){_o.name=this.name();_o.dataType=this.dataType();_o.data=(()=>{const temp=unionToColumnData(this.dataType(),this.data.bind(this));if(temp===null){return null}return temp.unpack()})();_o.validity=this.bb.createScalarList(this.validity.bind(this),this.validityLength())}};var ColumnT=class{constructor(name=null,dataType=0,data=null,validity=[]){this.name=name;this.dataType=dataType;this.data=data;this.validity=validity}name;dataType;data;validity;pack(builder){const name=this.name!==null?builder.createString(this.name):0;const data=builder.createObjectOffset(this.data);const validity=Column.createValidityVector(builder,this.validity);return Column.createColumn(builder,name,this.dataType,data,validity)}};var ColumnarBatch=class _ColumnarBatch{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsColumnarBatch(bb,obj){return(obj||new _ColumnarBatch).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsColumnarBatch(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ColumnarBatch).__init(bb.readInt32(bb.position())+bb.position(),bb)}opCodes(index){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}opCodesLength(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__vector_len(this.bb_pos+offset):0}opCodesArray(){const offset=this.bb.__offset(this.bb_pos,4);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}nodeIds(index){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb.__vector(this.bb_pos+offset)+index*4):0}nodeIdsLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}nodeIdsArray(){const offset=this.bb.__offset(this.bb_pos,6);return offset?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}argA(index){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint32(this.bb.__vector(this.bb_pos+offset)+index*4):0}argALength(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__vector_len(this.bb_pos+offset):0}argAArray(){const offset=this.bb.__offset(this.bb_pos,8);return offset?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}argB(index){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint32(this.bb.__vector(this.bb_pos+offset)+index*4):0}argBLength(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__vector_len(this.bb_pos+offset):0}argBArray(){const offset=this.bb.__offset(this.bb_pos,10);return offset?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}blobAOff(index){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.readUint32(this.bb.__vector(this.bb_pos+offset)+index*4):0}blobAOffLength(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.__vector_len(this.bb_pos+offset):0}blobAOffArray(){const offset=this.bb.__offset(this.bb_pos,12);return offset?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}blobBOff(index){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.readUint32(this.bb.__vector(this.bb_pos+offset)+index*4):0}blobBOffLength(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.__vector_len(this.bb_pos+offset):0}blobBOffArray(){const offset=this.bb.__offset(this.bb_pos,14);return offset?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}blobBytes(index){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}blobBytesLength(){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.__vector_len(this.bb_pos+offset):0}blobBytesArray(){const offset=this.bb.__offset(this.bb_pos,16);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startColumnarBatch(builder){builder.startObject(7)}static addOpCodes(builder,opCodesOffset){builder.addFieldOffset(0,opCodesOffset,0)}static createOpCodesVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startOpCodesVector(builder,numElems){builder.startVector(1,numElems,1)}static addNodeIds(builder,nodeIdsOffset){builder.addFieldOffset(1,nodeIdsOffset,0)}static createNodeIdsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startNodeIdsVector(builder,numElems){builder.startVector(4,numElems,4)}static addArgA(builder,argAOffset){builder.addFieldOffset(2,argAOffset,0)}static createArgAVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startArgAVector(builder,numElems){builder.startVector(4,numElems,4)}static addArgB(builder,argBOffset){builder.addFieldOffset(3,argBOffset,0)}static createArgBVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startArgBVector(builder,numElems){builder.startVector(4,numElems,4)}static addBlobAOff(builder,blobAOffOffset){builder.addFieldOffset(4,blobAOffOffset,0)}static createBlobAOffVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startBlobAOffVector(builder,numElems){builder.startVector(4,numElems,4)}static addBlobBOff(builder,blobBOffOffset){builder.addFieldOffset(5,blobBOffOffset,0)}static createBlobBOffVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addInt32(data[i])}return builder.endVector()}static startBlobBOffVector(builder,numElems){builder.startVector(4,numElems,4)}static addBlobBytes(builder,blobBytesOffset){builder.addFieldOffset(6,blobBytesOffset,0)}static createBlobBytesVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startBlobBytesVector(builder,numElems){builder.startVector(1,numElems,1)}static endColumnarBatch(builder){const offset=builder.endObject();return offset}static createColumnarBatch(builder,opCodesOffset,nodeIdsOffset,argAOffset,argBOffset,blobAOffOffset,blobBOffOffset,blobBytesOffset){_ColumnarBatch.startColumnarBatch(builder);_ColumnarBatch.addOpCodes(builder,opCodesOffset);_ColumnarBatch.addNodeIds(builder,nodeIdsOffset);_ColumnarBatch.addArgA(builder,argAOffset);_ColumnarBatch.addArgB(builder,argBOffset);_ColumnarBatch.addBlobAOff(builder,blobAOffOffset);_ColumnarBatch.addBlobBOff(builder,blobBOffOffset);_ColumnarBatch.addBlobBytes(builder,blobBytesOffset);return _ColumnarBatch.endColumnarBatch(builder)}unpack(){return new ColumnarBatchT(this.bb.createScalarList(this.opCodes.bind(this),this.opCodesLength()),this.bb.createScalarList(this.nodeIds.bind(this),this.nodeIdsLength()),this.bb.createScalarList(this.argA.bind(this),this.argALength()),this.bb.createScalarList(this.argB.bind(this),this.argBLength()),this.bb.createScalarList(this.blobAOff.bind(this),this.blobAOffLength()),this.bb.createScalarList(this.blobBOff.bind(this),this.blobBOffLength()),this.bb.createScalarList(this.blobBytes.bind(this),this.blobBytesLength()))}unpackTo(_o){_o.opCodes=this.bb.createScalarList(this.opCodes.bind(this),this.opCodesLength());_o.nodeIds=this.bb.createScalarList(this.nodeIds.bind(this),this.nodeIdsLength());_o.argA=this.bb.createScalarList(this.argA.bind(this),this.argALength());_o.argB=this.bb.createScalarList(this.argB.bind(this),this.argBLength());_o.blobAOff=this.bb.createScalarList(this.blobAOff.bind(this),this.blobAOffLength());_o.blobBOff=this.bb.createScalarList(this.blobBOff.bind(this),this.blobBOffLength());_o.blobBytes=this.bb.createScalarList(this.blobBytes.bind(this),this.blobBytesLength())}};var ColumnarBatchT=class{constructor(opCodes=[],nodeIds=[],argA=[],argB=[],blobAOff=[],blobBOff=[],blobBytes=[]){this.opCodes=opCodes;this.nodeIds=nodeIds;this.argA=argA;this.argB=argB;this.blobAOff=blobAOff;this.blobBOff=blobBOff;this.blobBytes=blobBytes}opCodes;nodeIds;argA;argB;blobAOff;blobBOff;blobBytes;pack(builder){const opCodes=ColumnarBatch.createOpCodesVector(builder,this.opCodes);const nodeIds=ColumnarBatch.createNodeIdsVector(builder,this.nodeIds);const argA=ColumnarBatch.createArgAVector(builder,this.argA);const argB=ColumnarBatch.createArgBVector(builder,this.argB);const blobAOff=ColumnarBatch.createBlobAOffVector(builder,this.blobAOff);const blobBOff=ColumnarBatch.createBlobBOffVector(builder,this.blobBOff);const blobBytes=ColumnarBatch.createBlobBytesVector(builder,this.blobBytes);return ColumnarBatch.createColumnarBatch(builder,opCodes,nodeIds,argA,argB,blobAOff,blobBOff,blobBytes)}};var ConnectionSharing=(ConnectionSharing2=>{ConnectionSharing2[ConnectionSharing2["TransportDefault"]=0]="TransportDefault";ConnectionSharing2[ConnectionSharing2["Shared"]=1]="Shared";ConnectionSharing2[ConnectionSharing2["Dedicated"]=2]="Dedicated";return ConnectionSharing2})(ConnectionSharing||{});var ReplayExpired=class _ReplayExpired{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsReplayExpired(bb,obj){return(obj||new _ReplayExpired).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsReplayExpired(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ReplayExpired).__init(bb.readInt32(bb.position())+bb.position(),bb)}streamId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}after(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startReplayExpired(builder){builder.startObject(2)}static addStreamId(builder,streamId){builder.addFieldInt64(0,streamId,BigInt("0"))}static addAfter(builder,after){builder.addFieldInt64(1,after,BigInt("0"))}static endReplayExpired(builder){const offset=builder.endObject();return offset}static createReplayExpired(builder,streamId,after){_ReplayExpired.startReplayExpired(builder);_ReplayExpired.addStreamId(builder,streamId);_ReplayExpired.addAfter(builder,after);return _ReplayExpired.endReplayExpired(builder)}unpack(){return new ReplayExpiredT(this.streamId(),this.after())}unpackTo(_o){_o.streamId=this.streamId();_o.after=this.after()}};var ReplayExpiredT=class{constructor(streamId=BigInt("0"),after=BigInt("0")){this.streamId=streamId;this.after=after}streamId;after;pack(builder){return ReplayExpired.createReplayExpired(builder,this.streamId,this.after)}};var ServerAction=class _ServerAction{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsServerAction(bb,obj){return(obj||new _ServerAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsServerAction(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ServerAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}hash(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}name(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startServerAction(builder){builder.startObject(2)}static addHash(builder,hash){builder.addFieldInt64(0,hash,BigInt("0"))}static addName(builder,nameOffset){builder.addFieldOffset(1,nameOffset,0)}static endServerAction(builder){const offset=builder.endObject();return offset}static createServerAction(builder,hash,nameOffset){_ServerAction.startServerAction(builder);_ServerAction.addHash(builder,hash);_ServerAction.addName(builder,nameOffset);return _ServerAction.endServerAction(builder)}unpack(){return new ServerActionT(this.hash(),this.name())}unpackTo(_o){_o.hash=this.hash();_o.name=this.name()}};var ServerActionT=class{constructor(hash=BigInt("0"),name=null){this.hash=hash;this.name=name}hash;name;pack(builder){const name=this.name!==null?builder.createString(this.name):0;return ServerAction.createServerAction(builder,this.hash,name)}};var ServerCaps=class _ServerCaps{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsServerCaps(bb,obj){return(obj||new _ServerCaps).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsServerCaps(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ServerCaps).__init(bb.readInt32(bb.position())+bb.position(),bb)}status(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}schemaVersion(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}vocabularyVersion(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint32(this.bb_pos+offset):0}streamId(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}resumeFrom(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}actions(index,obj){const offset=this.bb.__offset(this.bb_pos,14);return offset?(obj||new ServerAction).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}actionsLength(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.__vector_len(this.bb_pos+offset):0}subscriptionResume(){const offset=this.bb.__offset(this.bb_pos,16);return offset?!!this.bb.readInt8(this.bb_pos+offset):false}requestTag(){const offset=this.bb.__offset(this.bb_pos,18);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startServerCaps(builder){builder.startObject(8)}static addStatus(builder,status){builder.addFieldInt8(0,status,0)}static addSchemaVersion(builder,schemaVersion){builder.addFieldInt16(1,schemaVersion,0)}static addVocabularyVersion(builder,vocabularyVersion){builder.addFieldInt32(2,vocabularyVersion,0)}static addStreamId(builder,streamId){builder.addFieldInt64(3,streamId,BigInt("0"))}static addResumeFrom(builder,resumeFrom){builder.addFieldInt64(4,resumeFrom,BigInt("0"))}static addActions(builder,actionsOffset){builder.addFieldOffset(5,actionsOffset,0)}static createActionsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startActionsVector(builder,numElems){builder.startVector(4,numElems,4)}static addSubscriptionResume(builder,subscriptionResume){builder.addFieldInt8(6,+subscriptionResume,0)}static addRequestTag(builder,requestTag){builder.addFieldInt64(7,requestTag,BigInt("0"))}static endServerCaps(builder){const offset=builder.endObject();return offset}static createServerCaps(builder,status,schemaVersion,vocabularyVersion,streamId,resumeFrom,actionsOffset,subscriptionResume,requestTag){_ServerCaps.startServerCaps(builder);_ServerCaps.addStatus(builder,status);_ServerCaps.addSchemaVersion(builder,schemaVersion);_ServerCaps.addVocabularyVersion(builder,vocabularyVersion);_ServerCaps.addStreamId(builder,streamId);_ServerCaps.addResumeFrom(builder,resumeFrom);_ServerCaps.addActions(builder,actionsOffset);_ServerCaps.addSubscriptionResume(builder,subscriptionResume);_ServerCaps.addRequestTag(builder,requestTag);return _ServerCaps.endServerCaps(builder)}unpack(){return new ServerCapsT(this.status(),this.schemaVersion(),this.vocabularyVersion(),this.streamId(),this.resumeFrom(),this.bb.createObjList(this.actions.bind(this),this.actionsLength()),this.subscriptionResume(),this.requestTag())}unpackTo(_o){_o.status=this.status();_o.schemaVersion=this.schemaVersion();_o.vocabularyVersion=this.vocabularyVersion();_o.streamId=this.streamId();_o.resumeFrom=this.resumeFrom();_o.actions=this.bb.createObjList(this.actions.bind(this),this.actionsLength());_o.subscriptionResume=this.subscriptionResume();_o.requestTag=this.requestTag()}};var ServerCapsT=class{constructor(status=0,schemaVersion=0,vocabularyVersion=0,streamId=BigInt("0"),resumeFrom=BigInt("0"),actions=[],subscriptionResume=false,requestTag=BigInt("0")){this.status=status;this.schemaVersion=schemaVersion;this.vocabularyVersion=vocabularyVersion;this.streamId=streamId;this.resumeFrom=resumeFrom;this.actions=actions;this.subscriptionResume=subscriptionResume;this.requestTag=requestTag}status;schemaVersion;vocabularyVersion;streamId;resumeFrom;actions;subscriptionResume;requestTag;pack(builder){const actions=ServerCaps.createActionsVector(builder,builder.createObjectOffsetList(this.actions));return ServerCaps.createServerCaps(builder,this.status,this.schemaVersion,this.vocabularyVersion,this.streamId,this.resumeFrom,actions,this.subscriptionResume,this.requestTag)}};var StateExpired=class _StateExpired{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsStateExpired(bb,obj){return(obj||new _StateExpired).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsStateExpired(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _StateExpired).__init(bb.readInt32(bb.position())+bb.position(),bb)}tokenIssuedAt(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startStateExpired(builder){builder.startObject(1)}static addTokenIssuedAt(builder,tokenIssuedAt){builder.addFieldInt64(0,tokenIssuedAt,BigInt("0"))}static endStateExpired(builder){const offset=builder.endObject();return offset}static createStateExpired(builder,tokenIssuedAt){_StateExpired.startStateExpired(builder);_StateExpired.addTokenIssuedAt(builder,tokenIssuedAt);return _StateExpired.endStateExpired(builder)}unpack(){return new StateExpiredT(this.tokenIssuedAt())}unpackTo(_o){_o.tokenIssuedAt=this.tokenIssuedAt()}};var StateExpiredT=class{constructor(tokenIssuedAt=BigInt("0")){this.tokenIssuedAt=tokenIssuedAt}tokenIssuedAt;pack(builder){return StateExpired.createStateExpired(builder,this.tokenIssuedAt)}};var UpdateRequired=class _UpdateRequired{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsUpdateRequired(bb,obj){return(obj||new _UpdateRequired).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsUpdateRequired(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _UpdateRequired).__init(bb.readInt32(bb.position())+bb.position(),bb)}clientSchemaVersion(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint16(this.bb_pos+offset):0}serverSchemaVersion(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}static startUpdateRequired(builder){builder.startObject(2)}static addClientSchemaVersion(builder,clientSchemaVersion){builder.addFieldInt16(0,clientSchemaVersion,0)}static addServerSchemaVersion(builder,serverSchemaVersion){builder.addFieldInt16(1,serverSchemaVersion,0)}static endUpdateRequired(builder){const offset=builder.endObject();return offset}static createUpdateRequired(builder,clientSchemaVersion,serverSchemaVersion){_UpdateRequired.startUpdateRequired(builder);_UpdateRequired.addClientSchemaVersion(builder,clientSchemaVersion);_UpdateRequired.addServerSchemaVersion(builder,serverSchemaVersion);return _UpdateRequired.endUpdateRequired(builder)}unpack(){return new UpdateRequiredT(this.clientSchemaVersion(),this.serverSchemaVersion())}unpackTo(_o){_o.clientSchemaVersion=this.clientSchemaVersion();_o.serverSchemaVersion=this.serverSchemaVersion()}};var UpdateRequiredT=class{constructor(clientSchemaVersion=0,serverSchemaVersion=0){this.clientSchemaVersion=clientSchemaVersion;this.serverSchemaVersion=serverSchemaVersion}clientSchemaVersion;serverSchemaVersion;pack(builder){return UpdateRequired.createUpdateRequired(builder,this.clientSchemaVersion,this.serverSchemaVersion)}};var Control=class _Control{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsControl(bb,obj){return(obj||new _Control).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsControl(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Control).__init(bb.readInt32(bb.position())+bb.position(),bb)}caps(obj){const offset=this.bb.__offset(this.bb_pos,4);return offset?(obj||new ServerCaps).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}stateExpired(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new StateExpired).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}updateRequired(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new UpdateRequired).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}error(obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?(obj||new ActionError).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}replayExpired(obj){const offset=this.bb.__offset(this.bb_pos,12);return offset?(obj||new ReplayExpired).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}static startControl(builder){builder.startObject(5)}static addCaps(builder,capsOffset){builder.addFieldOffset(0,capsOffset,0)}static addStateExpired(builder,stateExpiredOffset){builder.addFieldOffset(1,stateExpiredOffset,0)}static addUpdateRequired(builder,updateRequiredOffset){builder.addFieldOffset(2,updateRequiredOffset,0)}static addError(builder,errorOffset){builder.addFieldOffset(3,errorOffset,0)}static addReplayExpired(builder,replayExpiredOffset){builder.addFieldOffset(4,replayExpiredOffset,0)}static endControl(builder){const offset=builder.endObject();return offset}unpack(){return new ControlT(this.caps()!==null?this.caps().unpack():null,this.stateExpired()!==null?this.stateExpired().unpack():null,this.updateRequired()!==null?this.updateRequired().unpack():null,this.error()!==null?this.error().unpack():null,this.replayExpired()!==null?this.replayExpired().unpack():null)}unpackTo(_o){_o.caps=this.caps()!==null?this.caps().unpack():null;_o.stateExpired=this.stateExpired()!==null?this.stateExpired().unpack():null;_o.updateRequired=this.updateRequired()!==null?this.updateRequired().unpack():null;_o.error=this.error()!==null?this.error().unpack():null;_o.replayExpired=this.replayExpired()!==null?this.replayExpired().unpack():null}};var ControlT=class{constructor(caps=null,stateExpired=null,updateRequired=null,error=null,replayExpired=null){this.caps=caps;this.stateExpired=stateExpired;this.updateRequired=updateRequired;this.error=error;this.replayExpired=replayExpired}caps;stateExpired;updateRequired;error;replayExpired;pack(builder){const caps=this.caps!==null?this.caps.pack(builder):0;const stateExpired=this.stateExpired!==null?this.stateExpired.pack(builder):0;const updateRequired=this.updateRequired!==null?this.updateRequired.pack(builder):0;const error=this.error!==null?this.error.pack(builder):0;const replayExpired=this.replayExpired!==null?this.replayExpired.pack(builder):0;Control.startControl(builder);Control.addCaps(builder,caps);Control.addStateExpired(builder,stateExpired);Control.addUpdateRequired(builder,updateRequired);Control.addError(builder,error);Control.addReplayExpired(builder,replayExpired);return Control.endControl(builder)}};var NodeKind=(NodeKind2=>{NodeKind2[NodeKind2["UNKNOWN"]=0]="UNKNOWN";NodeKind2[NodeKind2["STACK"]=1]="STACK";NodeKind2[NodeKind2["TEXT"]=2]="TEXT";NodeKind2[NodeKind2["IMAGE"]=3]="IMAGE";NodeKind2[NodeKind2["BUTTON"]=4]="BUTTON";NodeKind2[NodeKind2["TEXT_INPUT"]=5]="TEXT_INPUT";NodeKind2[NodeKind2["TOGGLE"]=6]="TOGGLE";NodeKind2[NodeKind2["LIST"]=7]="LIST";NodeKind2[NodeKind2["SCROLL"]=8]="SCROLL";NodeKind2[NodeKind2["SPACER"]=9]="SPACER";NodeKind2[NodeKind2["OVERLAY"]=10]="OVERLAY";NodeKind2[NodeKind2["MODAL"]=11]="MODAL";NodeKind2[NodeKind2["BOTTOM_SHEET"]=12]="BOTTOM_SHEET";NodeKind2[NodeKind2["NAVIGATION_TITLE"]=13]="NAVIGATION_TITLE";NodeKind2[NodeKind2["TOOLBAR_BUTTON"]=14]="TOOLBAR_BUTTON";NodeKind2[NodeKind2["SEGMENTED_CONTROL"]=15]="SEGMENTED_CONTROL";NodeKind2[NodeKind2["INSET_LIST"]=16]="INSET_LIST";NodeKind2[NodeKind2["CHECKLIST_ROW"]=17]="CHECKLIST_ROW";NodeKind2[NodeKind2["CHECKMARK_BUTTON"]=18]="CHECKMARK_BUTTON";NodeKind2[NodeKind2["DESTRUCTIVE_BUTTON"]=19]="DESTRUCTIVE_BUTTON";NodeKind2[NodeKind2["LIST_FOOTER"]=20]="LIST_FOOTER";NodeKind2[NodeKind2["CONFIRMATION_DIALOG"]=21]="CONFIRMATION_DIALOG";NodeKind2[NodeKind2["SHEET_TITLE"]=22]="SHEET_TITLE";NodeKind2[NodeKind2["SUBMIT_BUTTON"]=23]="SUBMIT_BUTTON";NodeKind2[NodeKind2["CANCEL_BUTTON"]=24]="CANCEL_BUTTON";NodeKind2[NodeKind2["DRAWING_SURFACE"]=25]="DRAWING_SURFACE";return NodeKind2})(NodeKind||{});var CreateNode=class _CreateNode{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsCreateNode(bb,obj){return(obj||new _CreateNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsCreateNode(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _CreateNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}kind(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}static startCreateNode(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addKind(builder,kind){builder.addFieldInt16(1,kind,0)}static endCreateNode(builder){const offset=builder.endObject();return offset}static createCreateNode(builder,nodeId,kind){_CreateNode.startCreateNode(builder);_CreateNode.addNodeId(builder,nodeId);_CreateNode.addKind(builder,kind);return _CreateNode.endCreateNode(builder)}unpack(){return new CreateNodeT(this.nodeId(),this.kind())}unpackTo(_o){_o.nodeId=this.nodeId();_o.kind=this.kind()}};var CreateNodeT=class{constructor(nodeId=0,kind=0){this.nodeId=nodeId;this.kind=kind}nodeId;kind;pack(builder){return CreateNode.createCreateNode(builder,this.nodeId,this.kind)}};var DataTable=class _DataTable{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsDataTable(bb,obj){return(obj||new _DataTable).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsDataTable(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _DataTable).__init(bb.readInt32(bb.position())+bb.position(),bb)}targetNode(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}rows(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}columns(index,obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new Column).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}columnsLength(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startDataTable(builder){builder.startObject(3)}static addTargetNode(builder,targetNode){builder.addFieldInt32(0,targetNode,0)}static addRows(builder,rows){builder.addFieldInt64(1,rows,BigInt("0"))}static addColumns(builder,columnsOffset){builder.addFieldOffset(2,columnsOffset,0)}static createColumnsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startColumnsVector(builder,numElems){builder.startVector(4,numElems,4)}static endDataTable(builder){const offset=builder.endObject();return offset}static createDataTable(builder,targetNode,rows,columnsOffset){_DataTable.startDataTable(builder);_DataTable.addTargetNode(builder,targetNode);_DataTable.addRows(builder,rows);_DataTable.addColumns(builder,columnsOffset);return _DataTable.endDataTable(builder)}unpack(){return new DataTableT(this.targetNode(),this.rows(),this.bb.createObjList(this.columns.bind(this),this.columnsLength()))}unpackTo(_o){_o.targetNode=this.targetNode();_o.rows=this.rows();_o.columns=this.bb.createObjList(this.columns.bind(this),this.columnsLength())}};var DataTableT=class{constructor(targetNode=0,rows=BigInt("0"),columns=[]){this.targetNode=targetNode;this.rows=rows;this.columns=columns}targetNode;rows;columns;pack(builder){const columns=DataTable.createColumnsVector(builder,builder.createObjectOffsetList(this.columns));return DataTable.createDataTable(builder,this.targetNode,this.rows,columns)}};var MessagePackBlob=class _MessagePackBlob{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsMessagePackBlob(bb,obj){return(obj||new _MessagePackBlob).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsMessagePackBlob(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _MessagePackBlob).__init(bb.readInt32(bb.position())+bb.position(),bb)}targetNode(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}bytes(index){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}bytesLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}bytesArray(){const offset=this.bb.__offset(this.bb_pos,6);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startMessagePackBlob(builder){builder.startObject(2)}static addTargetNode(builder,targetNode){builder.addFieldInt32(0,targetNode,0)}static addBytes(builder,bytesOffset){builder.addFieldOffset(1,bytesOffset,0)}static createBytesVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startBytesVector(builder,numElems){builder.startVector(1,numElems,1)}static endMessagePackBlob(builder){const offset=builder.endObject();return offset}static createMessagePackBlob(builder,targetNode,bytesOffset){_MessagePackBlob.startMessagePackBlob(builder);_MessagePackBlob.addTargetNode(builder,targetNode);_MessagePackBlob.addBytes(builder,bytesOffset);return _MessagePackBlob.endMessagePackBlob(builder)}unpack(){return new MessagePackBlobT(this.targetNode(),this.bb.createScalarList(this.bytes.bind(this),this.bytesLength()))}unpackTo(_o){_o.targetNode=this.targetNode();_o.bytes=this.bb.createScalarList(this.bytes.bind(this),this.bytesLength())}};var MessagePackBlobT=class{constructor(targetNode=0,bytes=[]){this.targetNode=targetNode;this.bytes=bytes}targetNode;bytes;pack(builder){const bytes=MessagePackBlob.createBytesVector(builder,this.bytes);return MessagePackBlob.createMessagePackBlob(builder,this.targetNode,bytes)}};var Data=class _Data{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsData(bb,obj){return(obj||new _Data).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsData(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Data).__init(bb.readInt32(bb.position())+bb.position(),bb)}targetNode(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}arrow(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new ArrowIpcBlob).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}table(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new DataTable).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}msgpack(obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?(obj||new MessagePackBlob).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}static startData(builder){builder.startObject(4)}static addTargetNode(builder,targetNode){builder.addFieldInt32(0,targetNode,0)}static addArrow(builder,arrowOffset){builder.addFieldOffset(1,arrowOffset,0)}static addTable(builder,tableOffset){builder.addFieldOffset(2,tableOffset,0)}static addMsgpack(builder,msgpackOffset){builder.addFieldOffset(3,msgpackOffset,0)}static endData(builder){const offset=builder.endObject();return offset}unpack(){return new DataT(this.targetNode(),this.arrow()!==null?this.arrow().unpack():null,this.table()!==null?this.table().unpack():null,this.msgpack()!==null?this.msgpack().unpack():null)}unpackTo(_o){_o.targetNode=this.targetNode();_o.arrow=this.arrow()!==null?this.arrow().unpack():null;_o.table=this.table()!==null?this.table().unpack():null;_o.msgpack=this.msgpack()!==null?this.msgpack().unpack():null}};var DataT=class{constructor(targetNode=0,arrow=null,table=null,msgpack=null){this.targetNode=targetNode;this.arrow=arrow;this.table=table;this.msgpack=msgpack}targetNode;arrow;table;msgpack;pack(builder){const arrow=this.arrow!==null?this.arrow.pack(builder):0;const table=this.table!==null?this.table.pack(builder):0;const msgpack=this.msgpack!==null?this.msgpack.pack(builder):0;Data.startData(builder);Data.addTargetNode(builder,this.targetNode);Data.addArrow(builder,arrow);Data.addTable(builder,table);Data.addMsgpack(builder,msgpack);return Data.endData(builder)}};var MobileBehaviourId=(MobileBehaviourId2=>{MobileBehaviourId2[MobileBehaviourId2["UNKNOWN"]=0]="UNKNOWN";return MobileBehaviourId2})(MobileBehaviourId||{});var MobileBehaviour=class _MobileBehaviour{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsMobileBehaviour(bb,obj){return(obj||new _MobileBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsMobileBehaviour(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _MobileBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}behaviour(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}custom(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}args(index,obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?(obj||new BehaviourArg).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}argsLength(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startMobileBehaviour(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addBehaviour(builder,behaviour){builder.addFieldInt16(1,behaviour,0)}static addCustom(builder,customOffset){builder.addFieldOffset(2,customOffset,0)}static addArgs(builder,argsOffset){builder.addFieldOffset(3,argsOffset,0)}static createArgsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startArgsVector(builder,numElems){builder.startVector(4,numElems,4)}static endMobileBehaviour(builder){const offset=builder.endObject();return offset}static createMobileBehaviour(builder,nodeId,behaviour,customOffset,argsOffset){_MobileBehaviour.startMobileBehaviour(builder);_MobileBehaviour.addNodeId(builder,nodeId);_MobileBehaviour.addBehaviour(builder,behaviour);_MobileBehaviour.addCustom(builder,customOffset);_MobileBehaviour.addArgs(builder,argsOffset);return _MobileBehaviour.endMobileBehaviour(builder)}unpack(){return new MobileBehaviourT(this.nodeId(),this.behaviour(),this.custom(),this.bb.createObjList(this.args.bind(this),this.argsLength()))}unpackTo(_o){_o.nodeId=this.nodeId();_o.behaviour=this.behaviour();_o.custom=this.custom();_o.args=this.bb.createObjList(this.args.bind(this),this.argsLength())}};var MobileBehaviourT=class{constructor(nodeId=0,behaviour=0,custom=null,args=[]){this.nodeId=nodeId;this.behaviour=behaviour;this.custom=custom;this.args=args}nodeId;behaviour;custom;args;pack(builder){const custom=this.custom!==null?builder.createString(this.custom):0;const args=MobileBehaviour.createArgsVector(builder,builder.createObjectOffsetList(this.args));return MobileBehaviour.createMobileBehaviour(builder,this.nodeId,this.behaviour,custom,args)}};var MountWebView=class _MountWebView{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsMountWebView(bb,obj){return(obj||new _MountWebView).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsMountWebView(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _MountWebView).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}parentId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}url(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startMountWebView(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addParentId(builder,parentId){builder.addFieldInt32(1,parentId,0)}static addUrl(builder,urlOffset){builder.addFieldOffset(2,urlOffset,0)}static endMountWebView(builder){const offset=builder.endObject();return offset}static createMountWebView(builder,nodeId,parentId,urlOffset){_MountWebView.startMountWebView(builder);_MountWebView.addNodeId(builder,nodeId);_MountWebView.addParentId(builder,parentId);_MountWebView.addUrl(builder,urlOffset);return _MountWebView.endMountWebView(builder)}unpack(){return new MountWebViewT(this.nodeId(),this.parentId(),this.url())}unpackTo(_o){_o.nodeId=this.nodeId();_o.parentId=this.parentId();_o.url=this.url()}};var MountWebViewT=class{constructor(nodeId=0,parentId=0,url=null){this.nodeId=nodeId;this.parentId=parentId;this.url=url}nodeId;parentId;url;pack(builder){const url=this.url!==null?builder.createString(this.url):0;return MountWebView.createMountWebView(builder,this.nodeId,this.parentId,url)}};var NativeArg=class _NativeArg{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsNativeArg(bb,obj){return(obj||new _NativeArg).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsNativeArg(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _NativeArg).__init(bb.readInt32(bb.position())+bb.position(),bb)}name(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}valueType(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}value(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__union(obj,this.bb_pos+offset):null}static startNativeArg(builder){builder.startObject(3)}static addName(builder,nameOffset){builder.addFieldOffset(0,nameOffset,0)}static addValueType(builder,valueType){builder.addFieldInt8(1,valueType,0)}static addValue(builder,valueOffset){builder.addFieldOffset(2,valueOffset,0)}static endNativeArg(builder){const offset=builder.endObject();return offset}static createNativeArg(builder,nameOffset,valueType,valueOffset){_NativeArg.startNativeArg(builder);_NativeArg.addName(builder,nameOffset);_NativeArg.addValueType(builder,valueType);_NativeArg.addValue(builder,valueOffset);return _NativeArg.endNativeArg(builder)}unpack(){return new NativeArgT(this.name(),this.valueType(),(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})())}unpackTo(_o){_o.name=this.name();_o.valueType=this.valueType();_o.value=(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})()}};var NativeArgT=class{constructor(name=null,valueType=0,value=null){this.name=name;this.valueType=valueType;this.value=value}name;valueType;value;pack(builder){const name=this.name!==null?builder.createString(this.name):0;const value=builder.createObjectOffset(this.value);return NativeArg.createNativeArg(builder,name,this.valueType,value)}};var NativeCommandId=(NativeCommandId2=>{NativeCommandId2[NativeCommandId2["UNKNOWN"]=0]="UNKNOWN";NativeCommandId2[NativeCommandId2["HAPTIC"]=1]="HAPTIC";NativeCommandId2[NativeCommandId2["OPEN_URL"]=2]="OPEN_URL";NativeCommandId2[NativeCommandId2["SHARE"]=3]="SHARE";return NativeCommandId2})(NativeCommandId||{});var NativeCommand=class _NativeCommand{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsNativeCommand(bb,obj){return(obj||new _NativeCommand).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsNativeCommand(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _NativeCommand).__init(bb.readInt32(bb.position())+bb.position(),bb)}command(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint16(this.bb_pos+offset):0}args(index,obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new NativeArg).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}argsLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startNativeCommand(builder){builder.startObject(2)}static addCommand(builder,command){builder.addFieldInt16(0,command,0)}static addArgs(builder,argsOffset){builder.addFieldOffset(1,argsOffset,0)}static createArgsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startArgsVector(builder,numElems){builder.startVector(4,numElems,4)}static endNativeCommand(builder){const offset=builder.endObject();return offset}static createNativeCommand(builder,command,argsOffset){_NativeCommand.startNativeCommand(builder);_NativeCommand.addCommand(builder,command);_NativeCommand.addArgs(builder,argsOffset);return _NativeCommand.endNativeCommand(builder)}unpack(){return new NativeCommandT(this.command(),this.bb.createObjList(this.args.bind(this),this.argsLength()))}unpackTo(_o){_o.command=this.command();_o.args=this.bb.createObjList(this.args.bind(this),this.argsLength())}};var NativeCommandT=class{constructor(command=0,args=[]){this.command=command;this.args=args}command;args;pack(builder){const args=NativeCommand.createArgsVector(builder,builder.createObjectOffsetList(this.args));return NativeCommand.createNativeCommand(builder,this.command,args)}};var MobileOperation=(MobileOperation2=>{MobileOperation2[MobileOperation2["NONE"]=0]="NONE";MobileOperation2[MobileOperation2["MountWebView"]=1]="MountWebView";MobileOperation2[MobileOperation2["NativeCommand"]=2]="NativeCommand";MobileOperation2[MobileOperation2["MobileBehaviour"]=3]="MobileBehaviour";return MobileOperation2})(MobileOperation||{});function unionToMobileOperation(type,accessor){switch(MobileOperation[type]){case"NONE":return null;case"MountWebView":return accessor(new MountWebView);case"NativeCommand":return accessor(new NativeCommand);case"MobileBehaviour":return accessor(new MobileBehaviour);default:return null}}function unionListToMobileOperation(type,accessor,index){switch(MobileOperation[type]){case"NONE":return null;case"MountWebView":return accessor(index,new MountWebView);case"NativeCommand":return accessor(index,new NativeCommand);case"MobileBehaviour":return accessor(index,new MobileBehaviour);default:return null}}var InsertBefore=class _InsertBefore{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsInsertBefore(bb,obj){return(obj||new _InsertBefore).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsInsertBefore(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _InsertBefore).__init(bb.readInt32(bb.position())+bb.position(),bb)}parentId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}childId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}beforeId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startInsertBefore(builder){builder.startObject(3)}static addParentId(builder,parentId){builder.addFieldInt32(0,parentId,0)}static addChildId(builder,childId){builder.addFieldInt32(1,childId,0)}static addBeforeId(builder,beforeId){builder.addFieldInt32(2,beforeId,0)}static endInsertBefore(builder){const offset=builder.endObject();return offset}static createInsertBefore(builder,parentId,childId,beforeId){_InsertBefore.startInsertBefore(builder);_InsertBefore.addParentId(builder,parentId);_InsertBefore.addChildId(builder,childId);_InsertBefore.addBeforeId(builder,beforeId);return _InsertBefore.endInsertBefore(builder)}unpack(){return new InsertBeforeT(this.parentId(),this.childId(),this.beforeId())}unpackTo(_o){_o.parentId=this.parentId();_o.childId=this.childId();_o.beforeId=this.beforeId()}};var InsertBeforeT=class{constructor(parentId=0,childId=0,beforeId=0){this.parentId=parentId;this.childId=childId;this.beforeId=beforeId}parentId;childId;beforeId;pack(builder){return InsertBefore.createInsertBefore(builder,this.parentId,this.childId,this.beforeId)}};var LiveKind=(LiveKind2=>{LiveKind2[LiveKind2["Stream"]=0]="Stream";LiveKind2[LiveKind2["Data"]=1]="Data";return LiveKind2})(LiveKind||{});var LiveTransport=(LiveTransport2=>{LiveTransport2[LiveTransport2["Local"]=0]="Local";LiveTransport2[LiveTransport2["Sse"]=1]="Sse";LiveTransport2[LiveTransport2["WebSocket"]=2]="WebSocket";LiveTransport2[LiveTransport2["Http"]=3]="Http";return LiveTransport2})(LiveTransport||{});var LiveMount=class _LiveMount{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsLiveMount(bb,obj){return(obj||new _LiveMount).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsLiveMount(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _LiveMount).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}kind(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}channelId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}transport(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint8(this.bb_pos+offset):0}endpoint(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}resumeFrom(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}sharing(){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.readUint8(this.bb_pos+offset):0}keepAlive(){const offset=this.bb.__offset(this.bb_pos,18);return offset?!!this.bb.readInt8(this.bb_pos+offset):false}static startLiveMount(builder){builder.startObject(8)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addKind(builder,kind){builder.addFieldInt8(1,kind,0)}static addChannelId(builder,channelId){builder.addFieldInt64(2,channelId,BigInt("0"))}static addTransport(builder,transport){builder.addFieldInt8(3,transport,0)}static addEndpoint(builder,endpointOffset){builder.addFieldOffset(4,endpointOffset,0)}static addResumeFrom(builder,resumeFrom){builder.addFieldInt64(5,resumeFrom,BigInt("0"))}static addSharing(builder,sharing){builder.addFieldInt8(6,sharing,0)}static addKeepAlive(builder,keepAlive){builder.addFieldInt8(7,+keepAlive,0)}static endLiveMount(builder){const offset=builder.endObject();return offset}static createLiveMount(builder,nodeId,kind,channelId,transport,endpointOffset,resumeFrom,sharing,keepAlive){_LiveMount.startLiveMount(builder);_LiveMount.addNodeId(builder,nodeId);_LiveMount.addKind(builder,kind);_LiveMount.addChannelId(builder,channelId);_LiveMount.addTransport(builder,transport);_LiveMount.addEndpoint(builder,endpointOffset);_LiveMount.addResumeFrom(builder,resumeFrom);_LiveMount.addSharing(builder,sharing);_LiveMount.addKeepAlive(builder,keepAlive);return _LiveMount.endLiveMount(builder)}unpack(){return new LiveMountT(this.nodeId(),this.kind(),this.channelId(),this.transport(),this.endpoint(),this.resumeFrom(),this.sharing(),this.keepAlive())}unpackTo(_o){_o.nodeId=this.nodeId();_o.kind=this.kind();_o.channelId=this.channelId();_o.transport=this.transport();_o.endpoint=this.endpoint();_o.resumeFrom=this.resumeFrom();_o.sharing=this.sharing();_o.keepAlive=this.keepAlive()}};var LiveMountT=class{constructor(nodeId=0,kind=0,channelId=BigInt("0"),transport=0,endpoint=null,resumeFrom=BigInt("0"),sharing=0,keepAlive=false){this.nodeId=nodeId;this.kind=kind;this.channelId=channelId;this.transport=transport;this.endpoint=endpoint;this.resumeFrom=resumeFrom;this.sharing=sharing;this.keepAlive=keepAlive}nodeId;kind;channelId;transport;endpoint;resumeFrom;sharing;keepAlive;pack(builder){const endpoint=this.endpoint!==null?builder.createString(this.endpoint):0;return LiveMount.createLiveMount(builder,this.nodeId,this.kind,this.channelId,this.transport,endpoint,this.resumeFrom,this.sharing,this.keepAlive)}};var PlacementKind=(PlacementKind2=>{PlacementKind2[PlacementKind2["Append"]=0]="Append";PlacementKind2[PlacementKind2["Before"]=1]="Before";PlacementKind2[PlacementKind2["After"]=2]="After";PlacementKind2[PlacementKind2["Swap"]=3]="Swap";PlacementKind2[PlacementKind2["Remove"]=4]="Remove";PlacementKind2[PlacementKind2["FullView"]=5]="FullView";return PlacementKind2})(PlacementKind||{});var SelectorKind=(SelectorKind2=>{SelectorKind2[SelectorKind2["NodeId"]=0]="NodeId";SelectorKind2[SelectorKind2["Id"]=1]="Id";SelectorKind2[SelectorKind2["Class"]=2]="Class";SelectorKind2[SelectorKind2["Query"]=3]="Query";SelectorKind2[SelectorKind2["TypedId"]=4]="TypedId";SelectorKind2[SelectorKind2["View"]=5]="View";SelectorKind2[SelectorKind2["Receiving"]=6]="Receiving";return SelectorKind2})(SelectorKind||{});var TargetSelector=class _TargetSelector{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsTargetSelector(bb,obj){return(obj||new _TargetSelector).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsTargetSelector(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _TargetSelector).__init(bb.readInt32(bb.position())+bb.position(),bb)}kind(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}nodeId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}text(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startTargetSelector(builder){builder.startObject(3)}static addKind(builder,kind){builder.addFieldInt8(0,kind,0)}static addNodeId(builder,nodeId){builder.addFieldInt32(1,nodeId,0)}static addText(builder,textOffset){builder.addFieldOffset(2,textOffset,0)}static endTargetSelector(builder){const offset=builder.endObject();return offset}static createTargetSelector(builder,kind,nodeId,textOffset){_TargetSelector.startTargetSelector(builder);_TargetSelector.addKind(builder,kind);_TargetSelector.addNodeId(builder,nodeId);_TargetSelector.addText(builder,textOffset);return _TargetSelector.endTargetSelector(builder)}unpack(){return new TargetSelectorT(this.kind(),this.nodeId(),this.text())}unpackTo(_o){_o.kind=this.kind();_o.nodeId=this.nodeId();_o.text=this.text()}};var TargetSelectorT=class{constructor(kind=0,nodeId=0,text=null){this.kind=kind;this.nodeId=nodeId;this.text=text}kind;nodeId;text;pack(builder){const text=this.text!==null?builder.createString(this.text):0;return TargetSelector.createTargetSelector(builder,this.kind,this.nodeId,text)}};var Place=class _Place{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsPlace(bb,obj){return(obj||new _Place).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsPlace(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Place).__init(bb.readInt32(bb.position())+bb.position(),bb)}kind(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}target(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new TargetSelector).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}child(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new TargetSelector).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}rootNode(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint32(this.bb_pos+offset):0}operations(index,obj){const offset=this.bb.__offset(this.bb_pos,12);return offset?(obj||new Operation).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}operationsLength(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startPlace(builder){builder.startObject(5)}static addKind(builder,kind){builder.addFieldInt8(0,kind,0)}static addTarget(builder,targetOffset){builder.addFieldOffset(1,targetOffset,0)}static addChild(builder,childOffset){builder.addFieldOffset(2,childOffset,0)}static addRootNode(builder,rootNode){builder.addFieldInt32(3,rootNode,0)}static addOperations(builder,operationsOffset){builder.addFieldOffset(4,operationsOffset,0)}static createOperationsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startOperationsVector(builder,numElems){builder.startVector(4,numElems,4)}static endPlace(builder){const offset=builder.endObject();return offset}unpack(){return new PlaceT(this.kind(),this.target()!==null?this.target().unpack():null,this.child()!==null?this.child().unpack():null,this.rootNode(),this.bb.createObjList(this.operations.bind(this),this.operationsLength()))}unpackTo(_o){_o.kind=this.kind();_o.target=this.target()!==null?this.target().unpack():null;_o.child=this.child()!==null?this.child().unpack():null;_o.rootNode=this.rootNode();_o.operations=this.bb.createObjList(this.operations.bind(this),this.operationsLength())}};var PlaceT=class{constructor(kind=0,target=null,child=null,rootNode=0,operations=[]){this.kind=kind;this.target=target;this.child=child;this.rootNode=rootNode;this.operations=operations}kind;target;child;rootNode;operations;pack(builder){const target=this.target!==null?this.target.pack(builder):0;const child=this.child!==null?this.child.pack(builder):0;const operations=Place.createOperationsVector(builder,builder.createObjectOffsetList(this.operations));Place.startPlace(builder);Place.addKind(builder,this.kind);Place.addTarget(builder,target);Place.addChild(builder,child);Place.addRootNode(builder,this.rootNode);Place.addOperations(builder,operations);return Place.endPlace(builder)}};var Remove=class _Remove{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsRemove(bb,obj){return(obj||new _Remove).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsRemove(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Remove).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startRemove(builder){builder.startObject(1)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static endRemove(builder){const offset=builder.endObject();return offset}static createRemove(builder,nodeId){_Remove.startRemove(builder);_Remove.addNodeId(builder,nodeId);return _Remove.endRemove(builder)}unpack(){return new RemoveT(this.nodeId())}unpackTo(_o){_o.nodeId=this.nodeId()}};var RemoveT=class{constructor(nodeId=0){this.nodeId=nodeId}nodeId;pack(builder){return Remove.createRemove(builder,this.nodeId)}};var ReplaceSubtree=class _ReplaceSubtree{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsReplaceSubtree(bb,obj){return(obj||new _ReplaceSubtree).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsReplaceSubtree(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ReplaceSubtree).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}operations(index,obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new Operation).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}operationsLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startReplaceSubtree(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addOperations(builder,operationsOffset){builder.addFieldOffset(1,operationsOffset,0)}static createOperationsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startOperationsVector(builder,numElems){builder.startVector(4,numElems,4)}static endReplaceSubtree(builder){const offset=builder.endObject();return offset}static createReplaceSubtree(builder,nodeId,operationsOffset){_ReplaceSubtree.startReplaceSubtree(builder);_ReplaceSubtree.addNodeId(builder,nodeId);_ReplaceSubtree.addOperations(builder,operationsOffset);return _ReplaceSubtree.endReplaceSubtree(builder)}unpack(){return new ReplaceSubtreeT(this.nodeId(),this.bb.createObjList(this.operations.bind(this),this.operationsLength()))}unpackTo(_o){_o.nodeId=this.nodeId();_o.operations=this.bb.createObjList(this.operations.bind(this),this.operationsLength())}};var ReplaceSubtreeT=class{constructor(nodeId=0,operations=[]){this.nodeId=nodeId;this.operations=operations}nodeId;operations;pack(builder){const operations=ReplaceSubtree.createOperationsVector(builder,builder.createObjectOffsetList(this.operations));return ReplaceSubtree.createReplaceSubtree(builder,this.nodeId,operations)}};var PropId=(PropId2=>{PropId2[PropId2["UNKNOWN"]=0]="UNKNOWN";PropId2[PropId2["PADDING"]=1]="PADDING";PropId2[PropId2["SPACING"]=2]="SPACING";PropId2[PropId2["ALIGN"]=3]="ALIGN";PropId2[PropId2["COLOR"]=4]="COLOR";PropId2[PropId2["FONT"]=5]="FONT";PropId2[PropId2["ENABLED"]=6]="ENABLED";PropId2[PropId2["A11Y_LABEL"]=7]="A11Y_LABEL";PropId2[PropId2["AXIS"]=8]="AXIS";PropId2[PropId2["VALUE"]=9]="VALUE";PropId2[PropId2["CHECKED"]=10]="CHECKED";PropId2[PropId2["SOURCE"]=11]="SOURCE";PropId2[PropId2["PLACEHOLDER"]=12]="PLACEHOLDER";PropId2[PropId2["BACKGROUND"]=13]="BACKGROUND";PropId2[PropId2["WIDTH"]=14]="WIDTH";PropId2[PropId2["HEIGHT"]=15]="HEIGHT";PropId2[PropId2["HIDDEN"]=16]="HIDDEN";PropId2[PropId2["PRESENTATION"]=17]="PRESENTATION";PropId2[PropId2["UTILITY_CLASSES"]=18]="UTILITY_CLASSES";PropId2[PropId2["ID"]=19]="ID";return PropId2})(PropId||{});var SetProp=class _SetProp{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsSetProp(bb,obj){return(obj||new _SetProp).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsSetProp(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _SetProp).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}prop(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}valueType(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint8(this.bb_pos+offset):0}value(obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__union(obj,this.bb_pos+offset):null}static startSetProp(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addProp(builder,prop){builder.addFieldInt16(1,prop,0)}static addValueType(builder,valueType){builder.addFieldInt8(2,valueType,0)}static addValue(builder,valueOffset){builder.addFieldOffset(3,valueOffset,0)}static endSetProp(builder){const offset=builder.endObject();return offset}static createSetProp(builder,nodeId,prop,valueType,valueOffset){_SetProp.startSetProp(builder);_SetProp.addNodeId(builder,nodeId);_SetProp.addProp(builder,prop);_SetProp.addValueType(builder,valueType);_SetProp.addValue(builder,valueOffset);return _SetProp.endSetProp(builder)}unpack(){return new SetPropT(this.nodeId(),this.prop(),this.valueType(),(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})())}unpackTo(_o){_o.nodeId=this.nodeId();_o.prop=this.prop();_o.valueType=this.valueType();_o.value=(()=>{const temp=unionToPropValue(this.valueType(),this.value.bind(this));if(temp===null){return null}return temp.unpack()})()}};var SetPropT=class{constructor(nodeId=0,prop=0,valueType=0,value=null){this.nodeId=nodeId;this.prop=prop;this.valueType=valueType;this.value=value}nodeId;prop;valueType;value;pack(builder){const value=builder.createObjectOffset(this.value);return SetProp.createSetProp(builder,this.nodeId,this.prop,this.valueType,value)}};var SetText=class _SetText{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsSetText(bb,obj){return(obj||new _SetText).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsSetText(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _SetText).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}text(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startSetText(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addText(builder,textOffset){builder.addFieldOffset(1,textOffset,0)}static endSetText(builder){const offset=builder.endObject();return offset}static createSetText(builder,nodeId,textOffset){_SetText.startSetText(builder);_SetText.addNodeId(builder,nodeId);_SetText.addText(builder,textOffset);return _SetText.endSetText(builder)}unpack(){return new SetTextT(this.nodeId(),this.text())}unpackTo(_o){_o.nodeId=this.nodeId();_o.text=this.text()}};var SetTextT=class{constructor(nodeId=0,text=null){this.nodeId=nodeId;this.text=text}nodeId;text;pack(builder){const text=this.text!==null?builder.createString(this.text):0;return SetText.createSetText(builder,this.nodeId,text)}};var UiBehaviour=class _UiBehaviour{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsUiBehaviour(bb,obj){return(obj||new _UiBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsUiBehaviour(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _UiBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}behaviour(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}args(index,obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new BehaviourArg).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}argsLength(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startUiBehaviour(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addBehaviour(builder,behaviour){builder.addFieldInt16(1,behaviour,0)}static addArgs(builder,argsOffset){builder.addFieldOffset(2,argsOffset,0)}static createArgsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startArgsVector(builder,numElems){builder.startVector(4,numElems,4)}static endUiBehaviour(builder){const offset=builder.endObject();return offset}static createUiBehaviour(builder,nodeId,behaviour,argsOffset){_UiBehaviour.startUiBehaviour(builder);_UiBehaviour.addNodeId(builder,nodeId);_UiBehaviour.addBehaviour(builder,behaviour);_UiBehaviour.addArgs(builder,argsOffset);return _UiBehaviour.endUiBehaviour(builder)}unpack(){return new UiBehaviourT(this.nodeId(),this.behaviour(),this.bb.createObjList(this.args.bind(this),this.argsLength()))}unpackTo(_o){_o.nodeId=this.nodeId();_o.behaviour=this.behaviour();_o.args=this.bb.createObjList(this.args.bind(this),this.argsLength())}};var UiBehaviourT=class{constructor(nodeId=0,behaviour=0,args=[]){this.nodeId=nodeId;this.behaviour=behaviour;this.args=args}nodeId;behaviour;args;pack(builder){const args=UiBehaviour.createArgsVector(builder,builder.createObjectOffsetList(this.args));return UiBehaviour.createUiBehaviour(builder,this.nodeId,this.behaviour,args)}};var UnbindAction=class _UnbindAction{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsUnbindAction(bb,obj){return(obj||new _UnbindAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsUnbindAction(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _UnbindAction).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}event(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}static startUnbindAction(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addEvent(builder,event){builder.addFieldInt16(1,event,0)}static endUnbindAction(builder){const offset=builder.endObject();return offset}static createUnbindAction(builder,nodeId,event){_UnbindAction.startUnbindAction(builder);_UnbindAction.addNodeId(builder,nodeId);_UnbindAction.addEvent(builder,event);return _UnbindAction.endUnbindAction(builder)}unpack(){return new UnbindActionT(this.nodeId(),this.event())}unpackTo(_o){_o.nodeId=this.nodeId();_o.event=this.event()}};var UnbindActionT=class{constructor(nodeId=0,event=0){this.nodeId=nodeId;this.event=event}nodeId;event;pack(builder){return UnbindAction.createUnbindAction(builder,this.nodeId,this.event)}};var UiOperation=(UiOperation2=>{UiOperation2[UiOperation2["NONE"]=0]="NONE";UiOperation2[UiOperation2["CreateNode"]=1]="CreateNode";UiOperation2[UiOperation2["SetText"]=2]="SetText";UiOperation2[UiOperation2["SetProp"]=3]="SetProp";UiOperation2[UiOperation2["AppendChild"]=4]="AppendChild";UiOperation2[UiOperation2["InsertBefore"]=5]="InsertBefore";UiOperation2[UiOperation2["Remove"]=6]="Remove";UiOperation2[UiOperation2["ReplaceSubtree"]=7]="ReplaceSubtree";UiOperation2[UiOperation2["BindAction"]=8]="BindAction";UiOperation2[UiOperation2["UnbindAction"]=9]="UnbindAction";UiOperation2[UiOperation2["AttachState"]=10]="AttachState";UiOperation2[UiOperation2["LiveMount"]=11]="LiveMount";UiOperation2[UiOperation2["UiBehaviour"]=12]="UiBehaviour";UiOperation2[UiOperation2["Place"]=13]="Place";return UiOperation2})(UiOperation||{});function unionToUiOperation(type,accessor){switch(UiOperation[type]){case"NONE":return null;case"CreateNode":return accessor(new CreateNode);case"SetText":return accessor(new SetText);case"SetProp":return accessor(new SetProp);case"AppendChild":return accessor(new AppendChild);case"InsertBefore":return accessor(new InsertBefore);case"Remove":return accessor(new Remove);case"ReplaceSubtree":return accessor(new ReplaceSubtree);case"BindAction":return accessor(new BindAction);case"UnbindAction":return accessor(new UnbindAction);case"AttachState":return accessor(new AttachState);case"LiveMount":return accessor(new LiveMount);case"UiBehaviour":return accessor(new UiBehaviour);case"Place":return accessor(new Place);default:return null}}function unionListToUiOperation(type,accessor,index){switch(UiOperation[type]){case"NONE":return null;case"CreateNode":return accessor(index,new CreateNode);case"SetText":return accessor(index,new SetText);case"SetProp":return accessor(index,new SetProp);case"AppendChild":return accessor(index,new AppendChild);case"InsertBefore":return accessor(index,new InsertBefore);case"Remove":return accessor(index,new Remove);case"ReplaceSubtree":return accessor(index,new ReplaceSubtree);case"BindAction":return accessor(index,new BindAction);case"UnbindAction":return accessor(index,new UnbindAction);case"AttachState":return accessor(index,new AttachState);case"LiveMount":return accessor(index,new LiveMount);case"UiBehaviour":return accessor(index,new UiBehaviour);case"Place":return accessor(index,new Place);default:return null}}var MorphAction=(MorphAction2=>{MorphAction2[MorphAction2["ReplaceChildren"]=0]="ReplaceChildren";MorphAction2[MorphAction2["ReplaceElement"]=1]="ReplaceElement";MorphAction2[MorphAction2["InsertBefore"]=2]="InsertBefore";MorphAction2[MorphAction2["InsertAfter"]=3]="InsertAfter";MorphAction2[MorphAction2["AppendSibling"]=4]="AppendSibling";return MorphAction2})(MorphAction||{});var HtmlMorph=class _HtmlMorph{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsHtmlMorph(bb,obj){return(obj||new _HtmlMorph).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsHtmlMorph(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _HtmlMorph).__init(bb.readInt32(bb.position())+bb.position(),bb)}target(obj){const offset=this.bb.__offset(this.bb_pos,4);return offset?(obj||new TargetSelector).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}action(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}content(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startHtmlMorph(builder){builder.startObject(3)}static addTarget(builder,targetOffset){builder.addFieldOffset(0,targetOffset,0)}static addAction(builder,action){builder.addFieldInt8(1,action,0)}static addContent(builder,contentOffset){builder.addFieldOffset(2,contentOffset,0)}static endHtmlMorph(builder){const offset=builder.endObject();return offset}static createHtmlMorph(builder,targetOffset,action,contentOffset){_HtmlMorph.startHtmlMorph(builder);_HtmlMorph.addTarget(builder,targetOffset);_HtmlMorph.addAction(builder,action);_HtmlMorph.addContent(builder,contentOffset);return _HtmlMorph.endHtmlMorph(builder)}unpack(){return new HtmlMorphT(this.target()!==null?this.target().unpack():null,this.action(),this.content())}unpackTo(_o){_o.target=this.target()!==null?this.target().unpack():null;_o.action=this.action();_o.content=this.content()}};var HtmlMorphT=class{constructor(target=null,action=0,content=null){this.target=target;this.action=action;this.content=content}target;action;content;pack(builder){const target=this.target!==null?this.target.pack(builder):0;const content=this.content!==null?builder.createString(this.content):0;return HtmlMorph.createHtmlMorph(builder,target,this.action,content)}};var ScriptNode=class _ScriptNode{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsScriptNode(bb,obj){return(obj||new _ScriptNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsScriptNode(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ScriptNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}parentId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}body(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startScriptNode(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addParentId(builder,parentId){builder.addFieldInt32(1,parentId,0)}static addBody(builder,bodyOffset){builder.addFieldOffset(2,bodyOffset,0)}static endScriptNode(builder){const offset=builder.endObject();return offset}static createScriptNode(builder,nodeId,parentId,bodyOffset){_ScriptNode.startScriptNode(builder);_ScriptNode.addNodeId(builder,nodeId);_ScriptNode.addParentId(builder,parentId);_ScriptNode.addBody(builder,bodyOffset);return _ScriptNode.endScriptNode(builder)}unpack(){return new ScriptNodeT(this.nodeId(),this.parentId(),this.body())}unpackTo(_o){_o.nodeId=this.nodeId();_o.parentId=this.parentId();_o.body=this.body()}};var ScriptNodeT=class{constructor(nodeId=0,parentId=0,body=null){this.nodeId=nodeId;this.parentId=parentId;this.body=body}nodeId;parentId;body;pack(builder){const body=this.body!==null?builder.createString(this.body):0;return ScriptNode.createScriptNode(builder,this.nodeId,this.parentId,body)}};var WebAddClass=class _WebAddClass{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebAddClass(bb,obj){return(obj||new _WebAddClass).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebAddClass(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebAddClass).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}className(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebAddClass(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addClassName(builder,classNameOffset){builder.addFieldOffset(1,classNameOffset,0)}static endWebAddClass(builder){const offset=builder.endObject();return offset}static createWebAddClass(builder,nodeId,classNameOffset){_WebAddClass.startWebAddClass(builder);_WebAddClass.addNodeId(builder,nodeId);_WebAddClass.addClassName(builder,classNameOffset);return _WebAddClass.endWebAddClass(builder)}unpack(){return new WebAddClassT(this.nodeId(),this.className())}unpackTo(_o){_o.nodeId=this.nodeId();_o.className=this.className()}};var WebAddClassT=class{constructor(nodeId=0,className=null){this.nodeId=nodeId;this.className=className}nodeId;className;pack(builder){const className=this.className!==null?builder.createString(this.className):0;return WebAddClass.createWebAddClass(builder,this.nodeId,className)}};var WebAddListener=class _WebAddListener{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebAddListener(bb,obj){return(obj||new _WebAddListener).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebAddListener(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebAddListener).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}nameId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customName(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebAddListener(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addNameId(builder,nameId){builder.addFieldInt16(1,nameId,0)}static addCustomName(builder,customNameOffset){builder.addFieldOffset(2,customNameOffset,0)}static endWebAddListener(builder){const offset=builder.endObject();return offset}static createWebAddListener(builder,nodeId,nameId,customNameOffset){_WebAddListener.startWebAddListener(builder);_WebAddListener.addNodeId(builder,nodeId);_WebAddListener.addNameId(builder,nameId);_WebAddListener.addCustomName(builder,customNameOffset);return _WebAddListener.endWebAddListener(builder)}unpack(){return new WebAddListenerT(this.nodeId(),this.nameId(),this.customName())}unpackTo(_o){_o.nodeId=this.nodeId();_o.nameId=this.nameId();_o.customName=this.customName()}};var WebAddListenerT=class{constructor(nodeId=0,nameId=0,customName=null){this.nodeId=nodeId;this.nameId=nameId;this.customName=customName}nodeId;nameId;customName;pack(builder){const customName=this.customName!==null?builder.createString(this.customName):0;return WebAddListener.createWebAddListener(builder,this.nodeId,this.nameId,customName)}};var WebBehaviourId=(WebBehaviourId2=>{WebBehaviourId2[WebBehaviourId2["UNKNOWN"]=0]="UNKNOWN";return WebBehaviourId2})(WebBehaviourId||{});var WebBehaviour=class _WebBehaviour{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebBehaviour(bb,obj){return(obj||new _WebBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebBehaviour(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebBehaviour).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}behaviour(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}custom(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}args(index,obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?(obj||new BehaviourArg).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}argsLength(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__vector_len(this.bb_pos+offset):0}static startWebBehaviour(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addBehaviour(builder,behaviour){builder.addFieldInt16(1,behaviour,0)}static addCustom(builder,customOffset){builder.addFieldOffset(2,customOffset,0)}static addArgs(builder,argsOffset){builder.addFieldOffset(3,argsOffset,0)}static createArgsVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startArgsVector(builder,numElems){builder.startVector(4,numElems,4)}static endWebBehaviour(builder){const offset=builder.endObject();return offset}static createWebBehaviour(builder,nodeId,behaviour,customOffset,argsOffset){_WebBehaviour.startWebBehaviour(builder);_WebBehaviour.addNodeId(builder,nodeId);_WebBehaviour.addBehaviour(builder,behaviour);_WebBehaviour.addCustom(builder,customOffset);_WebBehaviour.addArgs(builder,argsOffset);return _WebBehaviour.endWebBehaviour(builder)}unpack(){return new WebBehaviourT(this.nodeId(),this.behaviour(),this.custom(),this.bb.createObjList(this.args.bind(this),this.argsLength()))}unpackTo(_o){_o.nodeId=this.nodeId();_o.behaviour=this.behaviour();_o.custom=this.custom();_o.args=this.bb.createObjList(this.args.bind(this),this.argsLength())}};var WebBehaviourT=class{constructor(nodeId=0,behaviour=0,custom=null,args=[]){this.nodeId=nodeId;this.behaviour=behaviour;this.custom=custom;this.args=args}nodeId;behaviour;custom;args;pack(builder){const custom=this.custom!==null?builder.createString(this.custom):0;const args=WebBehaviour.createArgsVector(builder,builder.createObjectOffsetList(this.args));return WebBehaviour.createWebBehaviour(builder,this.nodeId,this.behaviour,custom,args)}};var WebDetachChild=class _WebDetachChild{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebDetachChild(bb,obj){return(obj||new _WebDetachChild).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebDetachChild(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebDetachChild).__init(bb.readInt32(bb.position())+bb.position(),bb)}parentId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}childId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startWebDetachChild(builder){builder.startObject(2)}static addParentId(builder,parentId){builder.addFieldInt32(0,parentId,0)}static addChildId(builder,childId){builder.addFieldInt32(1,childId,0)}static endWebDetachChild(builder){const offset=builder.endObject();return offset}static createWebDetachChild(builder,parentId,childId){_WebDetachChild.startWebDetachChild(builder);_WebDetachChild.addParentId(builder,parentId);_WebDetachChild.addChildId(builder,childId);return _WebDetachChild.endWebDetachChild(builder)}unpack(){return new WebDetachChildT(this.parentId(),this.childId())}unpackTo(_o){_o.parentId=this.parentId();_o.childId=this.childId()}};var WebDetachChildT=class{constructor(parentId=0,childId=0){this.parentId=parentId;this.childId=childId}parentId;childId;pack(builder){return WebDetachChild.createWebDetachChild(builder,this.parentId,this.childId)}};var WebElement=class _WebElement{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebElement(bb,obj){return(obj||new _WebElement).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebElement(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebElement).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}tagId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customTag(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}className(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebElement(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addTagId(builder,tagId){builder.addFieldInt16(1,tagId,0)}static addCustomTag(builder,customTagOffset){builder.addFieldOffset(2,customTagOffset,0)}static addClassName(builder,classNameOffset){builder.addFieldOffset(3,classNameOffset,0)}static endWebElement(builder){const offset=builder.endObject();return offset}static createWebElement(builder,nodeId,tagId,customTagOffset,classNameOffset){_WebElement.startWebElement(builder);_WebElement.addNodeId(builder,nodeId);_WebElement.addTagId(builder,tagId);_WebElement.addCustomTag(builder,customTagOffset);_WebElement.addClassName(builder,classNameOffset);return _WebElement.endWebElement(builder)}unpack(){return new WebElementT(this.nodeId(),this.tagId(),this.customTag(),this.className())}unpackTo(_o){_o.nodeId=this.nodeId();_o.tagId=this.tagId();_o.customTag=this.customTag();_o.className=this.className()}};var WebElementT=class{constructor(nodeId=0,tagId=0,customTag=null,className=null){this.nodeId=nodeId;this.tagId=tagId;this.customTag=customTag;this.className=className}nodeId;tagId;customTag;className;pack(builder){const customTag=this.customTag!==null?builder.createString(this.customTag):0;const className=this.className!==null?builder.createString(this.className):0;return WebElement.createWebElement(builder,this.nodeId,this.tagId,customTag,className)}};var WebProperty=class _WebProperty{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebProperty(bb,obj){return(obj||new _WebProperty).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebProperty(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebProperty).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}nameId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customName(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}value(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebProperty(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addNameId(builder,nameId){builder.addFieldInt16(1,nameId,0)}static addCustomName(builder,customNameOffset){builder.addFieldOffset(2,customNameOffset,0)}static addValue(builder,valueOffset){builder.addFieldOffset(3,valueOffset,0)}static endWebProperty(builder){const offset=builder.endObject();return offset}static createWebProperty(builder,nodeId,nameId,customNameOffset,valueOffset){_WebProperty.startWebProperty(builder);_WebProperty.addNodeId(builder,nodeId);_WebProperty.addNameId(builder,nameId);_WebProperty.addCustomName(builder,customNameOffset);_WebProperty.addValue(builder,valueOffset);return _WebProperty.endWebProperty(builder)}unpack(){return new WebPropertyT(this.nodeId(),this.nameId(),this.customName(),this.value())}unpackTo(_o){_o.nodeId=this.nodeId();_o.nameId=this.nameId();_o.customName=this.customName();_o.value=this.value()}};var WebPropertyT=class{constructor(nodeId=0,nameId=0,customName=null,value=null){this.nodeId=nodeId;this.nameId=nameId;this.customName=customName;this.value=value}nodeId;nameId;customName;value;pack(builder){const customName=this.customName!==null?builder.createString(this.customName):0;const value=this.value!==null?builder.createString(this.value):0;return WebProperty.createWebProperty(builder,this.nodeId,this.nameId,customName,value)}};var WebRegisterNode=class _WebRegisterNode{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebRegisterNode(bb,obj){return(obj||new _WebRegisterNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebRegisterNode(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebRegisterNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startWebRegisterNode(builder){builder.startObject(1)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static endWebRegisterNode(builder){const offset=builder.endObject();return offset}static createWebRegisterNode(builder,nodeId){_WebRegisterNode.startWebRegisterNode(builder);_WebRegisterNode.addNodeId(builder,nodeId);return _WebRegisterNode.endWebRegisterNode(builder)}unpack(){return new WebRegisterNodeT(this.nodeId())}unpackTo(_o){_o.nodeId=this.nodeId()}};var WebRegisterNodeT=class{constructor(nodeId=0){this.nodeId=nodeId}nodeId;pack(builder){return WebRegisterNode.createWebRegisterNode(builder,this.nodeId)}};var WebRemoveAttribute=class _WebRemoveAttribute{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebRemoveAttribute(bb,obj){return(obj||new _WebRemoveAttribute).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebRemoveAttribute(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebRemoveAttribute).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}attrId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customAttr(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebRemoveAttribute(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addAttrId(builder,attrId){builder.addFieldInt16(1,attrId,0)}static addCustomAttr(builder,customAttrOffset){builder.addFieldOffset(2,customAttrOffset,0)}static endWebRemoveAttribute(builder){const offset=builder.endObject();return offset}static createWebRemoveAttribute(builder,nodeId,attrId,customAttrOffset){_WebRemoveAttribute.startWebRemoveAttribute(builder);_WebRemoveAttribute.addNodeId(builder,nodeId);_WebRemoveAttribute.addAttrId(builder,attrId);_WebRemoveAttribute.addCustomAttr(builder,customAttrOffset);return _WebRemoveAttribute.endWebRemoveAttribute(builder)}unpack(){return new WebRemoveAttributeT(this.nodeId(),this.attrId(),this.customAttr())}unpackTo(_o){_o.nodeId=this.nodeId();_o.attrId=this.attrId();_o.customAttr=this.customAttr()}};var WebRemoveAttributeT=class{constructor(nodeId=0,attrId=0,customAttr=null){this.nodeId=nodeId;this.attrId=attrId;this.customAttr=customAttr}nodeId;attrId;customAttr;pack(builder){const customAttr=this.customAttr!==null?builder.createString(this.customAttr):0;return WebRemoveAttribute.createWebRemoveAttribute(builder,this.nodeId,this.attrId,customAttr)}};var WebRemoveClass=class _WebRemoveClass{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebRemoveClass(bb,obj){return(obj||new _WebRemoveClass).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebRemoveClass(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebRemoveClass).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}className(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebRemoveClass(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addClassName(builder,classNameOffset){builder.addFieldOffset(1,classNameOffset,0)}static endWebRemoveClass(builder){const offset=builder.endObject();return offset}static createWebRemoveClass(builder,nodeId,classNameOffset){_WebRemoveClass.startWebRemoveClass(builder);_WebRemoveClass.addNodeId(builder,nodeId);_WebRemoveClass.addClassName(builder,classNameOffset);return _WebRemoveClass.endWebRemoveClass(builder)}unpack(){return new WebRemoveClassT(this.nodeId(),this.className())}unpackTo(_o){_o.nodeId=this.nodeId();_o.className=this.className()}};var WebRemoveClassT=class{constructor(nodeId=0,className=null){this.nodeId=nodeId;this.className=className}nodeId;className;pack(builder){const className=this.className!==null?builder.createString(this.className):0;return WebRemoveClass.createWebRemoveClass(builder,this.nodeId,className)}};var WebRemoveListener=class _WebRemoveListener{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebRemoveListener(bb,obj){return(obj||new _WebRemoveListener).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebRemoveListener(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebRemoveListener).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}nameId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customName(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebRemoveListener(builder){builder.startObject(3)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addNameId(builder,nameId){builder.addFieldInt16(1,nameId,0)}static addCustomName(builder,customNameOffset){builder.addFieldOffset(2,customNameOffset,0)}static endWebRemoveListener(builder){const offset=builder.endObject();return offset}static createWebRemoveListener(builder,nodeId,nameId,customNameOffset){_WebRemoveListener.startWebRemoveListener(builder);_WebRemoveListener.addNodeId(builder,nodeId);_WebRemoveListener.addNameId(builder,nameId);_WebRemoveListener.addCustomName(builder,customNameOffset);return _WebRemoveListener.endWebRemoveListener(builder)}unpack(){return new WebRemoveListenerT(this.nodeId(),this.nameId(),this.customName())}unpackTo(_o){_o.nodeId=this.nodeId();_o.nameId=this.nameId();_o.customName=this.customName()}};var WebRemoveListenerT=class{constructor(nodeId=0,nameId=0,customName=null){this.nodeId=nodeId;this.nameId=nameId;this.customName=customName}nodeId;nameId;customName;pack(builder){const customName=this.customName!==null?builder.createString(this.customName):0;return WebRemoveListener.createWebRemoveListener(builder,this.nodeId,this.nameId,customName)}};var WebReplaceNode=class _WebReplaceNode{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebReplaceNode(bb,obj){return(obj||new _WebReplaceNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebReplaceNode(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebReplaceNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}oldId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}newId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startWebReplaceNode(builder){builder.startObject(2)}static addOldId(builder,oldId){builder.addFieldInt32(0,oldId,0)}static addNewId(builder,newId){builder.addFieldInt32(1,newId,0)}static endWebReplaceNode(builder){const offset=builder.endObject();return offset}static createWebReplaceNode(builder,oldId,newId){_WebReplaceNode.startWebReplaceNode(builder);_WebReplaceNode.addOldId(builder,oldId);_WebReplaceNode.addNewId(builder,newId);return _WebReplaceNode.endWebReplaceNode(builder)}unpack(){return new WebReplaceNodeT(this.oldId(),this.newId())}unpackTo(_o){_o.oldId=this.oldId();_o.newId=this.newId()}};var WebReplaceNodeT=class{constructor(oldId=0,newId=0){this.oldId=oldId;this.newId=newId}oldId;newId;pack(builder){return WebReplaceNode.createWebReplaceNode(builder,this.oldId,this.newId)}};var WebSetAttribute=class _WebSetAttribute{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebSetAttribute(bb,obj){return(obj||new _WebSetAttribute).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebSetAttribute(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebSetAttribute).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}attrId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customAttr(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}value(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebSetAttribute(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addAttrId(builder,attrId){builder.addFieldInt16(1,attrId,0)}static addCustomAttr(builder,customAttrOffset){builder.addFieldOffset(2,customAttrOffset,0)}static addValue(builder,valueOffset){builder.addFieldOffset(3,valueOffset,0)}static endWebSetAttribute(builder){const offset=builder.endObject();return offset}static createWebSetAttribute(builder,nodeId,attrId,customAttrOffset,valueOffset){_WebSetAttribute.startWebSetAttribute(builder);_WebSetAttribute.addNodeId(builder,nodeId);_WebSetAttribute.addAttrId(builder,attrId);_WebSetAttribute.addCustomAttr(builder,customAttrOffset);_WebSetAttribute.addValue(builder,valueOffset);return _WebSetAttribute.endWebSetAttribute(builder)}unpack(){return new WebSetAttributeT(this.nodeId(),this.attrId(),this.customAttr(),this.value())}unpackTo(_o){_o.nodeId=this.nodeId();_o.attrId=this.attrId();_o.customAttr=this.customAttr();_o.value=this.value()}};var WebSetAttributeT=class{constructor(nodeId=0,attrId=0,customAttr=null,value=null){this.nodeId=nodeId;this.attrId=attrId;this.customAttr=customAttr;this.value=value}nodeId;attrId;customAttr;value;pack(builder){const customAttr=this.customAttr!==null?builder.createString(this.customAttr):0;const value=this.value!==null?builder.createString(this.value):0;return WebSetAttribute.createWebSetAttribute(builder,this.nodeId,this.attrId,customAttr,value)}};var WebStyle=class _WebStyle{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebStyle(bb,obj){return(obj||new _WebStyle).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebStyle(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebStyle).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}nameId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint16(this.bb_pos+offset):0}customName(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}value(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebStyle(builder){builder.startObject(4)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addNameId(builder,nameId){builder.addFieldInt16(1,nameId,0)}static addCustomName(builder,customNameOffset){builder.addFieldOffset(2,customNameOffset,0)}static addValue(builder,valueOffset){builder.addFieldOffset(3,valueOffset,0)}static endWebStyle(builder){const offset=builder.endObject();return offset}static createWebStyle(builder,nodeId,nameId,customNameOffset,valueOffset){_WebStyle.startWebStyle(builder);_WebStyle.addNodeId(builder,nodeId);_WebStyle.addNameId(builder,nameId);_WebStyle.addCustomName(builder,customNameOffset);_WebStyle.addValue(builder,valueOffset);return _WebStyle.endWebStyle(builder)}unpack(){return new WebStyleT(this.nodeId(),this.nameId(),this.customName(),this.value())}unpackTo(_o){_o.nodeId=this.nodeId();_o.nameId=this.nameId();_o.customName=this.customName();_o.value=this.value()}};var WebStyleT=class{constructor(nodeId=0,nameId=0,customName=null,value=null){this.nodeId=nodeId;this.nameId=nameId;this.customName=customName;this.value=value}nodeId;nameId;customName;value;pack(builder){const customName=this.customName!==null?builder.createString(this.customName):0;const value=this.value!==null?builder.createString(this.value):0;return WebStyle.createWebStyle(builder,this.nodeId,this.nameId,customName,value)}};var WebText=class _WebText{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebText(bb,obj){return(obj||new _WebText).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebText(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebText).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}content(optionalEncoding){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__string(this.bb_pos+offset,optionalEncoding):null}static startWebText(builder){builder.startObject(2)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static addContent(builder,contentOffset){builder.addFieldOffset(1,contentOffset,0)}static endWebText(builder){const offset=builder.endObject();return offset}static createWebText(builder,nodeId,contentOffset){_WebText.startWebText(builder);_WebText.addNodeId(builder,nodeId);_WebText.addContent(builder,contentOffset);return _WebText.endWebText(builder)}unpack(){return new WebTextT(this.nodeId(),this.content())}unpackTo(_o){_o.nodeId=this.nodeId();_o.content=this.content()}};var WebTextT=class{constructor(nodeId=0,content=null){this.nodeId=nodeId;this.content=content}nodeId;content;pack(builder){const content=this.content!==null?builder.createString(this.content):0;return WebText.createWebText(builder,this.nodeId,content)}};var WebUnregisterNode=class _WebUnregisterNode{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsWebUnregisterNode(bb,obj){return(obj||new _WebUnregisterNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsWebUnregisterNode(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _WebUnregisterNode).__init(bb.readInt32(bb.position())+bb.position(),bb)}nodeId(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint32(this.bb_pos+offset):0}static startWebUnregisterNode(builder){builder.startObject(1)}static addNodeId(builder,nodeId){builder.addFieldInt32(0,nodeId,0)}static endWebUnregisterNode(builder){const offset=builder.endObject();return offset}static createWebUnregisterNode(builder,nodeId){_WebUnregisterNode.startWebUnregisterNode(builder);_WebUnregisterNode.addNodeId(builder,nodeId);return _WebUnregisterNode.endWebUnregisterNode(builder)}unpack(){return new WebUnregisterNodeT(this.nodeId())}unpackTo(_o){_o.nodeId=this.nodeId()}};var WebUnregisterNodeT=class{constructor(nodeId=0){this.nodeId=nodeId}nodeId;pack(builder){return WebUnregisterNode.createWebUnregisterNode(builder,this.nodeId)}};var WebOperation=(WebOperation2=>{WebOperation2[WebOperation2["NONE"]=0]="NONE";WebOperation2[WebOperation2["WebElement"]=1]="WebElement";WebOperation2[WebOperation2["WebText"]=2]="WebText";WebOperation2[WebOperation2["WebSetAttribute"]=3]="WebSetAttribute";WebOperation2[WebOperation2["WebRemoveAttribute"]=4]="WebRemoveAttribute";WebOperation2[WebOperation2["WebProperty"]=5]="WebProperty";WebOperation2[WebOperation2["WebAddListener"]=6]="WebAddListener";WebOperation2[WebOperation2["WebRemoveListener"]=7]="WebRemoveListener";WebOperation2[WebOperation2["WebReplaceNode"]=8]="WebReplaceNode";WebOperation2[WebOperation2["WebStyle"]=9]="WebStyle";WebOperation2[WebOperation2["WebAddClass"]=10]="WebAddClass";WebOperation2[WebOperation2["WebRemoveClass"]=11]="WebRemoveClass";WebOperation2[WebOperation2["HtmlMorph"]=12]="HtmlMorph";WebOperation2[WebOperation2["WebRegisterNode"]=13]="WebRegisterNode";WebOperation2[WebOperation2["WebUnregisterNode"]=14]="WebUnregisterNode";WebOperation2[WebOperation2["ScriptNode"]=15]="ScriptNode";WebOperation2[WebOperation2["WebBehaviour"]=16]="WebBehaviour";WebOperation2[WebOperation2["WebDetachChild"]=17]="WebDetachChild";return WebOperation2})(WebOperation||{});function unionToWebOperation(type,accessor){switch(WebOperation[type]){case"NONE":return null;case"WebElement":return accessor(new WebElement);case"WebText":return accessor(new WebText);case"WebSetAttribute":return accessor(new WebSetAttribute);case"WebRemoveAttribute":return accessor(new WebRemoveAttribute);case"WebProperty":return accessor(new WebProperty);case"WebAddListener":return accessor(new WebAddListener);case"WebRemoveListener":return accessor(new WebRemoveListener);case"WebReplaceNode":return accessor(new WebReplaceNode);case"WebStyle":return accessor(new WebStyle);case"WebAddClass":return accessor(new WebAddClass);case"WebRemoveClass":return accessor(new WebRemoveClass);case"HtmlMorph":return accessor(new HtmlMorph);case"WebRegisterNode":return accessor(new WebRegisterNode);case"WebUnregisterNode":return accessor(new WebUnregisterNode);case"ScriptNode":return accessor(new ScriptNode);case"WebBehaviour":return accessor(new WebBehaviour);case"WebDetachChild":return accessor(new WebDetachChild);default:return null}}function unionListToWebOperation(type,accessor,index){switch(WebOperation[type]){case"NONE":return null;case"WebElement":return accessor(index,new WebElement);case"WebText":return accessor(index,new WebText);case"WebSetAttribute":return accessor(index,new WebSetAttribute);case"WebRemoveAttribute":return accessor(index,new WebRemoveAttribute);case"WebProperty":return accessor(index,new WebProperty);case"WebAddListener":return accessor(index,new WebAddListener);case"WebRemoveListener":return accessor(index,new WebRemoveListener);case"WebReplaceNode":return accessor(index,new WebReplaceNode);case"WebStyle":return accessor(index,new WebStyle);case"WebAddClass":return accessor(index,new WebAddClass);case"WebRemoveClass":return accessor(index,new WebRemoveClass);case"HtmlMorph":return accessor(index,new HtmlMorph);case"WebRegisterNode":return accessor(index,new WebRegisterNode);case"WebUnregisterNode":return accessor(index,new WebUnregisterNode);case"ScriptNode":return accessor(index,new ScriptNode);case"WebBehaviour":return accessor(index,new WebBehaviour);case"WebDetachChild":return accessor(index,new WebDetachChild);default:return null}}var Operation=class _Operation{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsOperation(bb,obj){return(obj||new _Operation).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsOperation(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Operation).__init(bb.readInt32(bb.position())+bb.position(),bb)}uiType(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint8(this.bb_pos+offset):0}ui(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__union(obj,this.bb_pos+offset):null}webType(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint8(this.bb_pos+offset):0}web(obj){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.__union(obj,this.bb_pos+offset):null}mobileType(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.readUint8(this.bb_pos+offset):0}mobile(obj){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.__union(obj,this.bb_pos+offset):null}columnar(obj){const offset=this.bb.__offset(this.bb_pos,16);return offset?(obj||new ColumnarBatch).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}static startOperation(builder){builder.startObject(7)}static addUiType(builder,uiType){builder.addFieldInt8(0,uiType,0)}static addUi(builder,uiOffset){builder.addFieldOffset(1,uiOffset,0)}static addWebType(builder,webType){builder.addFieldInt8(2,webType,0)}static addWeb(builder,webOffset){builder.addFieldOffset(3,webOffset,0)}static addMobileType(builder,mobileType){builder.addFieldInt8(4,mobileType,0)}static addMobile(builder,mobileOffset){builder.addFieldOffset(5,mobileOffset,0)}static addColumnar(builder,columnarOffset){builder.addFieldOffset(6,columnarOffset,0)}static endOperation(builder){const offset=builder.endObject();return offset}unpack(){return new OperationT3(this.uiType(),(()=>{const temp=unionToUiOperation(this.uiType(),this.ui.bind(this));if(temp===null){return null}return temp.unpack()})(),this.webType(),(()=>{const temp=unionToWebOperation(this.webType(),this.web.bind(this));if(temp===null){return null}return temp.unpack()})(),this.mobileType(),(()=>{const temp=unionToMobileOperation(this.mobileType(),this.mobile.bind(this));if(temp===null){return null}return temp.unpack()})(),this.columnar()!==null?this.columnar().unpack():null)}unpackTo(_o){_o.uiType=this.uiType();_o.ui=(()=>{const temp=unionToUiOperation(this.uiType(),this.ui.bind(this));if(temp===null){return null}return temp.unpack()})();_o.webType=this.webType();_o.web=(()=>{const temp=unionToWebOperation(this.webType(),this.web.bind(this));if(temp===null){return null}return temp.unpack()})();_o.mobileType=this.mobileType();_o.mobile=(()=>{const temp=unionToMobileOperation(this.mobileType(),this.mobile.bind(this));if(temp===null){return null}return temp.unpack()})();_o.columnar=this.columnar()!==null?this.columnar().unpack():null}};var OperationT3=class{constructor(uiType=0,ui=null,webType=0,web=null,mobileType=0,mobile=null,columnar=null){this.uiType=uiType;this.ui=ui;this.webType=webType;this.web=web;this.mobileType=mobileType;this.mobile=mobile;this.columnar=columnar}uiType;ui;webType;web;mobileType;mobile;columnar;pack(builder){const ui=builder.createObjectOffset(this.ui);const web=builder.createObjectOffset(this.web);const mobile=builder.createObjectOffset(this.mobile);const columnar=this.columnar!==null?this.columnar.pack(builder):0;Operation.startOperation(builder);Operation.addUiType(builder,this.uiType);Operation.addUi(builder,ui);Operation.addWebType(builder,this.webType);Operation.addWeb(builder,web);Operation.addMobileType(builder,this.mobileType);Operation.addMobile(builder,mobile);Operation.addColumnar(builder,columnar);return Operation.endOperation(builder)}};var Message=class _Message{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsMessage(bb,obj){return(obj||new _Message).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsMessage(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Message).__init(bb.readInt32(bb.position())+bb.position(),bb)}operation(obj){const offset=this.bb.__offset(this.bb_pos,4);return offset?(obj||new Operation).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}data(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new Data).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}control(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new Control).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}static startMessage(builder){builder.startObject(3)}static addOperation(builder,operationOffset){builder.addFieldOffset(0,operationOffset,0)}static addData(builder,dataOffset){builder.addFieldOffset(1,dataOffset,0)}static addControl(builder,controlOffset){builder.addFieldOffset(2,controlOffset,0)}static endMessage(builder){const offset=builder.endObject();return offset}unpack(){return new MessageT(this.operation()!==null?this.operation().unpack():null,this.data()!==null?this.data().unpack():null,this.control()!==null?this.control().unpack():null)}unpackTo(_o){_o.operation=this.operation()!==null?this.operation().unpack():null;_o.data=this.data()!==null?this.data().unpack():null;_o.control=this.control()!==null?this.control().unpack():null}};var MessageT=class{constructor(operation=null,data=null,control=null){this.operation=operation;this.data=data;this.control=control}operation;data;control;pack(builder){const operation=this.operation!==null?this.operation.pack(builder):0;const data=this.data!==null?this.data.pack(builder):0;const control=this.control!==null?this.control.pack(builder):0;Message.startMessage(builder);Message.addOperation(builder,operation);Message.addData(builder,data);Message.addControl(builder,control);return Message.endMessage(builder)}};var FrameMessage=class _FrameMessage{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsFrameMessage(bb,obj){return(obj||new _FrameMessage).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsFrameMessage(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _FrameMessage).__init(bb.readInt32(bb.position())+bb.position(),bb)}ack(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}messages(index,obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new Message).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+offset)+index*4),this.bb):null}messagesLength(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.__vector_len(this.bb_pos+offset):0}subscriptionId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startFrameMessage(builder){builder.startObject(3)}static addAck(builder,ack){builder.addFieldInt64(0,ack,BigInt("0"))}static addMessages(builder,messagesOffset){builder.addFieldOffset(1,messagesOffset,0)}static createMessagesVector(builder,data){builder.startVector(4,data.length,4);for(let i=data.length-1;i>=0;i--){builder.addOffset(data[i])}return builder.endVector()}static startMessagesVector(builder,numElems){builder.startVector(4,numElems,4)}static addSubscriptionId(builder,subscriptionId){builder.addFieldInt64(2,subscriptionId,BigInt("0"))}static endFrameMessage(builder){const offset=builder.endObject();return offset}static createFrameMessage(builder,ack,messagesOffset,subscriptionId){_FrameMessage.startFrameMessage(builder);_FrameMessage.addAck(builder,ack);_FrameMessage.addMessages(builder,messagesOffset);_FrameMessage.addSubscriptionId(builder,subscriptionId);return _FrameMessage.endFrameMessage(builder)}unpack(){return new FrameMessageT(this.ack(),this.bb.createObjList(this.messages.bind(this),this.messagesLength()),this.subscriptionId())}unpackTo(_o){_o.ack=this.ack();_o.messages=this.bb.createObjList(this.messages.bind(this),this.messagesLength());_o.subscriptionId=this.subscriptionId()}};var FrameMessageT=class{constructor(ack=BigInt("0"),messages=[],subscriptionId=BigInt("0")){this.ack=ack;this.messages=messages;this.subscriptionId=subscriptionId}ack;messages;subscriptionId;pack(builder){const messages=FrameMessage.createMessagesVector(builder,builder.createObjectOffsetList(this.messages));return FrameMessage.createFrameMessage(builder,this.ack,messages,this.subscriptionId)}};var ResumeSubscription=class _ResumeSubscription{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsResumeSubscription(bb,obj){return(obj||new _ResumeSubscription).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsResumeSubscription(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _ResumeSubscription).__init(bb.readInt32(bb.position())+bb.position(),bb)}deliverySession(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}subscriptionId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}streamId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}after(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}static startResumeSubscription(builder){builder.startObject(4)}static addDeliverySession(builder,deliverySession){builder.addFieldInt64(0,deliverySession,BigInt("0"))}static addSubscriptionId(builder,subscriptionId){builder.addFieldInt64(1,subscriptionId,BigInt("0"))}static addStreamId(builder,streamId){builder.addFieldInt64(2,streamId,BigInt("0"))}static addAfter(builder,after){builder.addFieldInt64(3,after,BigInt("0"))}static endResumeSubscription(builder){const offset=builder.endObject();return offset}static createResumeSubscription(builder,deliverySession,subscriptionId,streamId,after){_ResumeSubscription.startResumeSubscription(builder);_ResumeSubscription.addDeliverySession(builder,deliverySession);_ResumeSubscription.addSubscriptionId(builder,subscriptionId);_ResumeSubscription.addStreamId(builder,streamId);_ResumeSubscription.addAfter(builder,after);return _ResumeSubscription.endResumeSubscription(builder)}unpack(){return new ResumeSubscriptionT(this.deliverySession(),this.subscriptionId(),this.streamId(),this.after())}unpackTo(_o){_o.deliverySession=this.deliverySession();_o.subscriptionId=this.subscriptionId();_o.streamId=this.streamId();_o.after=this.after()}};var ResumeSubscriptionT=class{constructor(deliverySession=BigInt("0"),subscriptionId=BigInt("0"),streamId=BigInt("0"),after=BigInt("0")){this.deliverySession=deliverySession;this.subscriptionId=subscriptionId;this.streamId=streamId;this.after=after}deliverySession;subscriptionId;streamId;after;pack(builder){return ResumeSubscription.createResumeSubscription(builder,this.deliverySession,this.subscriptionId,this.streamId,this.after)}};var FrameRequest=class _FrameRequest{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsFrameRequest(bb,obj){return(obj||new _FrameRequest).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsFrameRequest(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _FrameRequest).__init(bb.readInt32(bb.position())+bb.position(),bb)}action(obj){const offset=this.bb.__offset(this.bb_pos,4);return offset?(obj||new ActionRequest).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}hello(obj){const offset=this.bb.__offset(this.bb_pos,6);return offset?(obj||new ClientHello).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}resume(obj){const offset=this.bb.__offset(this.bb_pos,8);return offset?(obj||new ResumeSubscription).__init(this.bb.__indirect(this.bb_pos+offset),this.bb):null}static startFrameRequest(builder){builder.startObject(3)}static addAction(builder,actionOffset){builder.addFieldOffset(0,actionOffset,0)}static addHello(builder,helloOffset){builder.addFieldOffset(1,helloOffset,0)}static addResume(builder,resumeOffset){builder.addFieldOffset(2,resumeOffset,0)}static endFrameRequest(builder){const offset=builder.endObject();return offset}unpack(){return new FrameRequestT(this.action()!==null?this.action().unpack():null,this.hello()!==null?this.hello().unpack():null,this.resume()!==null?this.resume().unpack():null)}unpackTo(_o){_o.action=this.action()!==null?this.action().unpack():null;_o.hello=this.hello()!==null?this.hello().unpack():null;_o.resume=this.resume()!==null?this.resume().unpack():null}};var FrameRequestT=class{constructor(action=null,hello=null,resume=null){this.action=action;this.hello=hello;this.resume=resume}action;hello;resume;pack(builder){const action=this.action!==null?this.action.pack(builder):0;const hello=this.hello!==null?this.hello.pack(builder):0;const resume=this.resume!==null?this.resume.pack(builder):0;FrameRequest.startFrameRequest(builder);FrameRequest.addAction(builder,action);FrameRequest.addHello(builder,hello);FrameRequest.addResume(builder,resume);return FrameRequest.endFrameRequest(builder)}};var FrameKind=(FrameKind2=>{FrameKind2[FrameKind2["NONE"]=0]="NONE";FrameKind2[FrameKind2["FrameRequest"]=1]="FrameRequest";FrameKind2[FrameKind2["FrameMessage"]=2]="FrameMessage";return FrameKind2})(FrameKind||{});function unionToFrameKind(type,accessor){switch(FrameKind[type]){case"NONE":return null;case"FrameRequest":return accessor(new FrameRequest);case"FrameMessage":return accessor(new FrameMessage);default:return null}}function unionListToFrameKind(type,accessor,index){switch(FrameKind[type]){case"NONE":return null;case"FrameRequest":return accessor(index,new FrameRequest);case"FrameMessage":return accessor(index,new FrameMessage);default:return null}}var Frame=class _Frame{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsFrame(bb,obj){return(obj||new _Frame).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsFrame(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _Frame).__init(bb.readInt32(bb.position())+bb.position(),bb)}static bufferHasIdentifier(bb){return bb.__has_identifier("EWF1")}schemaVersion(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint16(this.bb_pos+offset):0}streamId(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}sequenceId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}kindType(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint8(this.bb_pos+offset):0}kind(obj){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.__union(obj,this.bb_pos+offset):null}static startFrame(builder){builder.startObject(5)}static addSchemaVersion(builder,schemaVersion){builder.addFieldInt16(0,schemaVersion,0)}static addStreamId(builder,streamId){builder.addFieldInt64(1,streamId,BigInt("0"))}static addSequenceId(builder,sequenceId){builder.addFieldInt64(2,sequenceId,BigInt("0"))}static addKindType(builder,kindType){builder.addFieldInt8(3,kindType,0)}static addKind(builder,kindOffset){builder.addFieldOffset(4,kindOffset,0)}static endFrame(builder){const offset=builder.endObject();return offset}static finishFrameBuffer(builder,offset){builder.finish(offset,"EWF1")}static finishSizePrefixedFrameBuffer(builder,offset){builder.finish(offset,"EWF1",true)}static createFrame(builder,schemaVersion,streamId,sequenceId,kindType,kindOffset){_Frame.startFrame(builder);_Frame.addSchemaVersion(builder,schemaVersion);_Frame.addStreamId(builder,streamId);_Frame.addSequenceId(builder,sequenceId);_Frame.addKindType(builder,kindType);_Frame.addKind(builder,kindOffset);return _Frame.endFrame(builder)}unpack(){return new FrameT(this.schemaVersion(),this.streamId(),this.sequenceId(),this.kindType(),(()=>{const temp=unionToFrameKind(this.kindType(),this.kind.bind(this));if(temp===null){return null}return temp.unpack()})())}unpackTo(_o){_o.schemaVersion=this.schemaVersion();_o.streamId=this.streamId();_o.sequenceId=this.sequenceId();_o.kindType=this.kindType();_o.kind=(()=>{const temp=unionToFrameKind(this.kindType(),this.kind.bind(this));if(temp===null){return null}return temp.unpack()})()}};var FrameT=class{constructor(schemaVersion=0,streamId=BigInt("0"),sequenceId=BigInt("0"),kindType=0,kind=null){this.schemaVersion=schemaVersion;this.streamId=streamId;this.sequenceId=sequenceId;this.kindType=kindType;this.kind=kind}schemaVersion;streamId;sequenceId;kindType;kind;pack(builder){const kind=builder.createObjectOffset(this.kind);return Frame.createFrame(builder,this.schemaVersion,this.streamId,this.sequenceId,this.kindType,kind)}};var SignedState=class _SignedState{bb=null;bb_pos=0;__init(i,bb){this.bb_pos=i;this.bb=bb;return this}static getRootAsSignedState(bb,obj){return(obj||new _SignedState).__init(bb.readInt32(bb.position())+bb.position(),bb)}static getSizePrefixedRootAsSignedState(bb,obj){bb.setPosition(bb.position()+SIZE_PREFIX_LENGTH);return(obj||new _SignedState).__init(bb.readInt32(bb.position())+bb.position(),bb)}static bufferHasIdentifier(bb){return bb.__has_identifier("EWS1")}formatVersion(){const offset=this.bb.__offset(this.bb_pos,4);return offset?this.bb.readUint16(this.bb_pos+offset):0}flags(){const offset=this.bb.__offset(this.bb_pos,6);return offset?this.bb.readUint8(this.bb_pos+offset):0}keyId(){const offset=this.bb.__offset(this.bb_pos,8);return offset?this.bb.readUint32(this.bb_pos+offset):0}issuedAt(){const offset=this.bb.__offset(this.bb_pos,10);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}expiresAt(){const offset=this.bb.__offset(this.bb_pos,12);return offset?this.bb.readUint64(this.bb_pos+offset):BigInt("0")}componentType(){const offset=this.bb.__offset(this.bb_pos,14);return offset?this.bb.readUint32(this.bb_pos+offset):0}rootNode(){const offset=this.bb.__offset(this.bb_pos,16);return offset?this.bb.readUint32(this.bb_pos+offset):0}sessionBinding(index){const offset=this.bb.__offset(this.bb_pos,18);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}sessionBindingLength(){const offset=this.bb.__offset(this.bb_pos,18);return offset?this.bb.__vector_len(this.bb_pos+offset):0}sessionBindingArray(){const offset=this.bb.__offset(this.bb_pos,18);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}body(index){const offset=this.bb.__offset(this.bb_pos,20);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}bodyLength(){const offset=this.bb.__offset(this.bb_pos,20);return offset?this.bb.__vector_len(this.bb_pos+offset):0}bodyArray(){const offset=this.bb.__offset(this.bb_pos,20);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}tag(index){const offset=this.bb.__offset(this.bb_pos,22);return offset?this.bb.readUint8(this.bb.__vector(this.bb_pos+offset)+index):0}tagLength(){const offset=this.bb.__offset(this.bb_pos,22);return offset?this.bb.__vector_len(this.bb_pos+offset):0}tagArray(){const offset=this.bb.__offset(this.bb_pos,22);return offset?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+offset),this.bb.__vector_len(this.bb_pos+offset)):null}static startSignedState(builder){builder.startObject(10)}static addFormatVersion(builder,formatVersion){builder.addFieldInt16(0,formatVersion,0)}static addFlags(builder,flags){builder.addFieldInt8(1,flags,0)}static addKeyId(builder,keyId){builder.addFieldInt32(2,keyId,0)}static addIssuedAt(builder,issuedAt){builder.addFieldInt64(3,issuedAt,BigInt("0"))}static addExpiresAt(builder,expiresAt){builder.addFieldInt64(4,expiresAt,BigInt("0"))}static addComponentType(builder,componentType){builder.addFieldInt32(5,componentType,0)}static addRootNode(builder,rootNode){builder.addFieldInt32(6,rootNode,0)}static addSessionBinding(builder,sessionBindingOffset){builder.addFieldOffset(7,sessionBindingOffset,0)}static createSessionBindingVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startSessionBindingVector(builder,numElems){builder.startVector(1,numElems,1)}static addBody(builder,bodyOffset){builder.addFieldOffset(8,bodyOffset,0)}static createBodyVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startBodyVector(builder,numElems){builder.startVector(1,numElems,1)}static addTag(builder,tagOffset){builder.addFieldOffset(9,tagOffset,0)}static createTagVector(builder,data){builder.startVector(1,data.length,1);for(let i=data.length-1;i>=0;i--){builder.addInt8(data[i])}return builder.endVector()}static startTagVector(builder,numElems){builder.startVector(1,numElems,1)}static endSignedState(builder){const offset=builder.endObject();return offset}static finishSignedStateBuffer(builder,offset){builder.finish(offset,"EWS1")}static finishSizePrefixedSignedStateBuffer(builder,offset){builder.finish(offset,"EWS1",true)}static createSignedState(builder,formatVersion,flags,keyId,issuedAt,expiresAt,componentType,rootNode,sessionBindingOffset,bodyOffset,tagOffset){_SignedState.startSignedState(builder);_SignedState.addFormatVersion(builder,formatVersion);_SignedState.addFlags(builder,flags);_SignedState.addKeyId(builder,keyId);_SignedState.addIssuedAt(builder,issuedAt);_SignedState.addExpiresAt(builder,expiresAt);_SignedState.addComponentType(builder,componentType);_SignedState.addRootNode(builder,rootNode);_SignedState.addSessionBinding(builder,sessionBindingOffset);_SignedState.addBody(builder,bodyOffset);_SignedState.addTag(builder,tagOffset);return _SignedState.endSignedState(builder)}unpack(){return new SignedStateT(this.formatVersion(),this.flags(),this.keyId(),this.issuedAt(),this.expiresAt(),this.componentType(),this.rootNode(),this.bb.createScalarList(this.sessionBinding.bind(this),this.sessionBindingLength()),this.bb.createScalarList(this.body.bind(this),this.bodyLength()),this.bb.createScalarList(this.tag.bind(this),this.tagLength()))}unpackTo(_o){_o.formatVersion=this.formatVersion();_o.flags=this.flags();_o.keyId=this.keyId();_o.issuedAt=this.issuedAt();_o.expiresAt=this.expiresAt();_o.componentType=this.componentType();_o.rootNode=this.rootNode();_o.sessionBinding=this.bb.createScalarList(this.sessionBinding.bind(this),this.sessionBindingLength());_o.body=this.bb.createScalarList(this.body.bind(this),this.bodyLength());_o.tag=this.bb.createScalarList(this.tag.bind(this),this.tagLength())}};var SignedStateT=class{constructor(formatVersion=0,flags=0,keyId=0,issuedAt=BigInt("0"),expiresAt=BigInt("0"),componentType=0,rootNode=0,sessionBinding=[],body=[],tag=[]){this.formatVersion=formatVersion;this.flags=flags;this.keyId=keyId;this.issuedAt=issuedAt;this.expiresAt=expiresAt;this.componentType=componentType;this.rootNode=rootNode;this.sessionBinding=sessionBinding;this.body=body;this.tag=tag}formatVersion;flags;keyId;issuedAt;expiresAt;componentType;rootNode;sessionBinding;body;tag;pack(builder){const sessionBinding=SignedState.createSessionBindingVector(builder,this.sessionBinding);const body=SignedState.createBodyVector(builder,this.body);const tag=SignedState.createTagVector(builder,this.tag);return SignedState.createSignedState(builder,this.formatVersion,this.flags,this.keyId,this.issuedAt,this.expiresAt,this.componentType,this.rootNode,sessionBinding,body,tag)}};export{ActionError,ActionErrorT,ActionInput,ActionInputT,ActionRequest,ActionRequestT,Alignment,AlignmentValue,AlignmentValueT,AppendChild,AppendChildT,ArrowIpcBlob,ArrowIpcBlobT,AttachState,AttachStateT,Axis,AxisValue,AxisValueT,BehaviourArg,BehaviourArgT,BehaviourId,BindAction,BindActionT,BoolValue,BoolValueT,Bools,BoolsT,Builder,ByteBuffer,CapsStatus,ClientHello,ClientHelloT,ColorToken,ColorTokenT,Column,ColumnData,ColumnT,ColumnarBatch,ColumnarBatchT,ConnectionSharing,Control,ControlT,CreateNode,CreateNodeT,Data,DataT,DataTable,DataTableT,ErrorCode,EventId,F64s,F64sT,FontToken,FontTokenT,Frame,FrameKind,FrameMessage,FrameMessageT,FrameRequest,FrameRequestT,FrameT,HtmlMorph,HtmlMorphT,I32s,I32sT,I64s,I64sT,InsertBefore,InsertBeforeT,Length,LengthT,LengthUnit,LengthValue,LengthValueT,LiveKind,LiveMount,LiveMountT,LiveTransport,Message,MessagePackBlob,MessagePackBlobT,MessageT,MobileBehaviour,MobileBehaviourId,MobileBehaviourT,MobileOperation,MorphAction,MountSurface,MountWebView,MountWebViewT,NativeArg,NativeArgT,NativeCommand,NativeCommandId,NativeCommandT,NodeKind,Operation,OperationT3 as OperationT,Place,PlaceT,PlacementKind,Platform,PropId,PropValue,Remove,RemoveT,ReplaceSubtree,ReplaceSubtreeT,ReplayExpired,ReplayExpiredT,ResumeSubscription,ResumeSubscriptionT,ScriptNode,ScriptNodeT,SelectorKind,ServerAction,ServerActionT,ServerCaps,ServerCapsT,SetProp,SetPropT,SetText,SetTextT,SignedState,SignedStateT,StateExpired,StateExpiredT,Strings,StringsT,TargetSelector,TargetSelectorT,TextValue,TextValueT,UiBehaviour,UiBehaviourT,UiOperation,UnbindAction,UnbindActionT,UpdateRequired,UpdateRequiredT,WebAddClass,WebAddClassT,WebAddListener,WebAddListenerT,WebBehaviour,WebBehaviourId,WebBehaviourT,WebDetachChild,WebDetachChildT,WebElement,WebElementT,WebOperation,WebProperty,WebPropertyT,WebRegisterNode,WebRegisterNodeT,WebRemoveAttribute,WebRemoveAttributeT,WebRemoveClass,WebRemoveClassT,WebRemoveListener,WebRemoveListenerT,WebReplaceNode,WebReplaceNodeT,WebSetAttribute,WebSetAttributeT,WebStyle,WebStyleT,WebText,WebTextT,WebUnregisterNode,WebUnregisterNodeT,unionListToColumnData,unionListToFrameKind,unionListToMobileOperation,unionListToPropValue,unionListToUiOperation,unionListToWebOperation,unionToColumnData,unionToFrameKind,unionToMobileOperation,unionToPropValue,unionToUiOperation,unionToWebOperation};
|