build/verse.amd.min.js
/*
* Verse Websocket Asynchronous Module
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2014 Jiri Vrany, Jiri Hnidek
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
/*
* Verse Websocket Asynchronous Module
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2014 Jiri Vrany, Jiri Hnidek
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
// Int64.js
//
// Copyright (c) 2012 Robert Kieffer
// MIT License - http://opensource.org/licenses/mit-license.php
(function(){define("request",[],function(){var request={message:function message(payload){var messageLen,buf,view,payloadView;messageLen=4+payload.byteLength,buf=new ArrayBuffer(messageLen),view=new DataView(buf),payloadView=new DataView(payload),view.setUint8(0,16),view.setUint16(2,messageLen);for(var i=0;i<payload.byteLength;i++)view.setUint8(i+4,payloadView.getUint8(i));return buf},buffer_push:function buffer_push(bufferA,bufferB){var result,viewResult,viewA,viewB,i,j,messageLen;messageLen=bufferA.byteLength+bufferB.byteLength,result=new ArrayBuffer(messageLen),viewResult=new DataView(result),viewA=new DataView(bufferA),viewB=new DataView(bufferB);for(i=0;i<bufferA.byteLength;i++)viewResult.setUint8(i,viewA.getUint8(i));for(j=bufferA.byteLength;j<messageLen;j++)viewResult.setUint8(j,viewB.getUint8(j-bufferA.byteLength));return result}};return request}),define("negotiation",[],function(){var negotiation,sendStringMessage,sendIntMessage;sendStringMessage=function(messageType,payload,featureType
){var buf,view,messageLen,i;messageLen=4+payload.length,buf=new ArrayBuffer(messageLen),view=new DataView(buf),view.setUint8(0,messageType),view.setUint8(1,messageLen),view.setUint8(2,featureType),view.setUint8(3,payload.length);for(i=0;i<payload.length;i++)view.setUint8(4+i,payload.charCodeAt(i));return buf},sendIntMessage=function(messageType,payload,featureType){var buf,view;return buf=new ArrayBuffer(4),view=new DataView(buf),view.setUint8(0,messageType),view.setUint8(1,4),view.setUint8(2,featureType),view.setUint8(3,payload),buf};var parseFeature=function parseFeature(feature,receivedView,bufferPosition,length){var value,stringFeatures={3:"HOST_URL",4:"TOKEN",5:"DED",9:"CLIENT_NAME",10:"CLIENT_VERSION"},intFeatures={1:"FCID",2:"CCID",6:"RWIN",8:"COMMAND_COMPRESSION"};if(feature in stringFeatures)return value=parseStringValue(receivedView,length,bufferPosition),{FEATURE:stringFeatures[feature],VALUE:value};if(feature in intFeatures)return{FEATURE:intFeatures[feature],VALUE:receivedView
.getUint8(7)}},parseStringValue=function parseStringValue(receivedDataView,length,bufferPosition){var i,result="";for(i=0;i<=length-4;i++)result+=String.fromCharCode(receivedDataView.getUint8(bufferPosition+2+i));return result.slice(1)};return negotiation={CHANGE_L:3,CHANGE_R:4,CONFIRM_L:5,CONFIRM_R:6,getFeatureValues:function getFeatureValues(feature,receivedView,bufferPosition,length){return parseFeature(feature,receivedView,bufferPosition,length)},fcid:function(type,id){return sendIntMessage(type,id,1)},ccid:function(type,id){return sendIntMessage(type,id,2)},url:function(type,nurl){return sendStringMessage(type,nurl,3)},token:function(type,tokenString){return sendStringMessage(type,tokenString,4)},ded:function(type,dedString){return sendStringMessage(type,dedString,5)},rwin:function(type,value){return sendIntMessage(type,value,6)},fps:function(messageType,value){var buf,view;return buf=new ArrayBuffer(7),view=new DataView(buf),view.setUint8(0,messageType),view.setUint8(1,7),view.setUint8
(2,7),view.setFloat32(3,value),buf},compression:function(type,value){return sendIntMessage(type,value,8)}},negotiation}),define("command",[],function(){var command;return command={template:function(length,opCode){var buf,view;return buf=new ArrayBuffer(length),view=new DataView(buf),view.setUint8(0,opCode),view.setUint8(1,length),buf}},command}),define("node",["command"],function(command){var node,commands,routines;return commands={32:"NODE_CREATE",33:"NODE_DESTROY",34:"NODE_SUBSCRIBE",35:"NODE_UNSUBSCRIBE",37:"NODE_LINK",38:"NODE_PERMISSIONS",39:"NODE_UMASK",40:"NODE_OWNER",41:"NODE_LOCK",42:"NODE_UNLOCK",43:"NODE_PRIORITY"},routines={32:function getNodeCreate(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),USER_ID:receivedView.getUint16(bufferPosition+3),PARENT_ID:receivedView.getUint32(bufferPosition+5),NODE_ID:receivedView.getUint32(bufferPosition+9),CUSTOM_TYPE:receivedView.getUint16(bufferPosition+13)}},33:function getNodeDestroy
(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],NODE_ID:receivedView.getUint32(bufferPosition+2)}},34:function getNodeSubscribe(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],NODE_ID:receivedView.getUint32(bufferPosition+2),VERSION:receivedView.getUint32(bufferPosition+6),CRC32:receivedView.getUint32(bufferPosition+10)}},35:function getNodeUnsubscribe(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],NODE_ID:receivedView.getUint32(bufferPosition+2),VERSION:receivedView.getUint32(bufferPosition+6),CRC32:receivedView.getUint32(bufferPosition+10)}},37:function getNodeLink(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),PARENT_NODE_ID:receivedView.getUint32(bufferPosition+3),CHILD_NODE_ID:receivedView.getUint32(bufferPosition+7)}},38:function getNodePermissions(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),USER_ID:receivedView
.getUint16(bufferPosition+3),PERMISSIONS:receivedView.getUint8(bufferPosition+5),NODE_ID:receivedView.getUint32(bufferPosition+6)}},39:function getNodeUmask(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],PERMISSIONS:receivedView.getUint8(bufferPosition+2)}},40:function getNodeOwner(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),USER_ID:receivedView.getUint16(bufferPosition+3),NODE_ID:receivedView.getUint32(bufferPosition+5)}},41:function getNodeLock(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),AVATAR_ID:receivedView.getUint32(bufferPosition+3),NODE_ID:receivedView.getUint32(bufferPosition+7)}},42:function getNodeUnlock(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),AVATAR_ID:receivedView.getUint32(bufferPosition+3),NODE_ID:receivedView.getUint32(bufferPosition+7)}},43:function getNodePriority
(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),PRIORITY:receivedView.getUint8(bufferPosition+3),NODE_ID:receivedView.getUint32(bufferPosition+4)}}},node={getNodeValues:function getNodeValues(opCode,receivedView,bufferPosition,length){var result=routines[opCode](opCode,receivedView,bufferPosition,length);return result},create:function(user_id,avatar_id,custom_type){var cmd,view;return cmd=command.template(15,32),view=new DataView(cmd),view.setUint8(2,0),view.setUint16(3,user_id),view.setUint32(5,avatar_id),view.setUint32(9,4294967295),view.setUint16(13,custom_type),cmd},destroy:function(node_id){var cmd,view;return cmd=command.template(6,33),view=new DataView(cmd),view.setUint32(2,node_id),cmd},subscribe:function(node_id){var cmd,view;return cmd=command.template(14,34),view=new DataView(cmd),view.setUint32(2,node_id),view.setUint32(6,0),view.setUint32(10,0),cmd},unsubscribe:function(node_id){var cmd,view;return cmd=command.template
(14,35),view=new DataView(cmd),view.setUint32(2,node_id),view.setUint32(6,0),view.setUint32(10,0),cmd},link:function(parent_node_id,child_node_id){var cmd,view;return cmd=command.template(11,37),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,parent_node_id),view.setUint32(7,child_node_id),cmd},perm:function(node_id,user_id,permission){var cmd,view;return cmd=command.template(10,38),view=new DataView(cmd),view.setUint8(2,0),view.setUint16(3,user_id),view.setUint8(5,permission),view.setUint32(6,node_id),cmd},umask:function(permission){var cmd,view;return cmd=command.template(3,39),view=new DataView(cmd),view.setUint8(2,permission),cmd},owner:function(node_id,user_id){var cmd,view;return cmd=command.template(9,40),view=new DataView(cmd),view.setUint8(2,0),view.setUint16(3,user_id),view.setUint32(5,node_id),cmd},lock:function(avatar_id,node_id){var cmd,view;return cmd=command.template(11,41),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,avatar_id),view.setUint32(7,node_id
),cmd},unlock:function(avatar_id,node_id){var cmd,view;return cmd=command.template(11,42),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,avatar_id),view.setUint32(7,node_id),cmd},prio:function(node_id,priority){var cmd,view;return cmd=command.template(8,43),view=new DataView(cmd),view.setUint8(2,0),view.setUint8(3,priority),view.setUint32(4,node_id),cmd}},node}),define("taggroup",["command"],function(command){var commands,routines,tagGroup,sendSubUnsub,getSubUnsub;return sendSubUnsub=function sendSubUnsub(opCode,nodeId,tagGroupId){var cmd,view;return cmd=command.template(17,opCode),view=new DataView(cmd),view.setUint8(3,0),view.setUint32(3,nodeId),view.setUint16(7,tagGroupId),view.setUint32(9,0),view.setUint32(13,0),cmd},getSubUnsub=function getSubUnsub(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3),TAG_GROUP_ID:receivedView.getUint16(bufferPosition+7),VERSION:receivedView
.getUint32(bufferPosition+9),CRC32:receivedView.getUint32(bufferPosition+13)}},commands={64:"TAG_GROUP_CREATE",65:"TAG_GROUP_DESTROY",66:"TAG_GROUP_SUBSCRIBE",67:"TAG_GROUP_UNSUBSCRIBE"},routines={64:function getTagGroupCreate(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3),TAG_GROUP_ID:receivedView.getUint16(bufferPosition+7),CUSTOM_TYPE:receivedView.getUint16(bufferPosition+9)}},65:function getTagGroupDestroy(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3),TAG_GROUP_ID:receivedView.getUint16(bufferPosition+7)}},66:getSubUnsub,67:getSubUnsub},tagGroup={create:function(nodeId,customType){var cmd,view;return cmd=command.template(11,64),view=new DataView(cmd),view.setUint8(3,0),view.setUint32(3,nodeId),view.setUint16(7,65535),view.setUint16(9,customType),cmd},destroy:function(
nodeId,tagGroupId){var cmd,view;return cmd=command.template(9,65),view=new DataView(cmd),view.setUint8(3,0),view.setUint32(3,nodeId),view.setUint16(7,tagGroupId),cmd},subscribe:function(nodeId,tagGroupId){return sendSubUnsub(66,nodeId,tagGroupId)},unsubscribe:function(nodeId,tagGroupId){return sendSubUnsub(67,nodeId,tagGroupId)},getTagGroupValues:function getTagGroupValues(opCode,receivedView,bufferPosition,length){var result=routines[opCode](opCode,receivedView,bufferPosition,length);return result}},tagGroup}),define("Int64",[],function(){var Int64=function(a1,offset){offset=offset||0,a1 instanceof Array?this.storage=a1.slice(offset,8):(this.storage=this.storage||new Array(8),this.setValue.apply(this,arguments))};Int64.MAX_INT=Math.pow(2,53),Int64.MIN_INT=-Math.pow(2,53),Int64.HexTable=new Array(256);for(var i=0;i<256;i++)Int64.HexTable[i]=(i>15?"":"0")+i.toString(16);return Int64.prototype={_2scomp:function(){var b=this.storage,o=o,carry=1;for(var i=o+7;i>=o;i--){var v=(b[i]^255)+carry
;b[i]=v&255,carry=v>>8}},setValue:function(hi,lo){var negate=!1;if(arguments.length===1)if(typeof hi=="number"){negate=hi<0,hi=Math.abs(hi),lo=hi%2147483648,hi/=2147483648;if(hi>2147483648)throw new RangeError(hi+" is outside Int64 range");hi|=0}else{if(typeof hi!="string")throw new Error(hi+" must be a Number or String");hi=(hi+"").replace(/^0x/,""),lo=hi.substr(-8),hi=hi.length>8?hi.substr(0,hi.length-8):"",hi=parseInt(hi,16),lo=parseInt(lo,16)}var b=this.storage,o=0;for(var i=7;i>=0;i--)b[o+i]=lo&255,lo=i===4?hi:lo>>>8;negate&&this._2scomp()},toNumber:function(allowImprecise){var b=this.storage,o=0,negate=b[0]&128,x=0,carry=1;for(var i=7,m=1;i>=0;i--,m*=256){var v=b[o+i];negate&&(v=(v^255)+carry,carry=v>>8,v&=255),x+=v*m}return!allowImprecise&&x>=Int64.MAX_INT?negate?-Infinity:Infinity:negate?-x:x},valueOf:function(){return this.toNumber(!1)},toString:function(radix){return this.valueOf().toString(radix||10)},toOctetString:function(sep){var out=new Array(8),b=this.storage,o=0;for(var i=0
;i<8;i++)out[i]=Int64.HexTable[b[o+i]];return out.join(sep||"")}},Int64}),define("tag",["Int64","command"],function(Int64,command){var commands,get_routines,set_routines,data_types,data_type_len,op_codes,tag,getTagSetCommons,getTagSetUint8,getTagSetUint16,getTagSetUint32,getTagSetUint64,getTagSetFloat16,getTagSetFloat32,getTagSetFloat64,getTagSetString8;return getTagSetCommons=function getTagSetCommons(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3),TAG_GROUP_ID:receivedView.getUint16(bufferPosition+7),TAG_ID:receivedView.getUint16(bufferPosition+9),VALUES:[]}},getTagSetUint8=function getTagSetUint8(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]=receivedView.getUint8(bufferPosition+11),opCode>70&&(result.VALUES[1]=receivedView.getUint8(bufferPosition+12)),opCode>71&&(result.VALUES[2]=receivedView.getUint8
(bufferPosition+13)),opCode>72&&(result.VALUES[3]=receivedView.getUint8(bufferPosition+14)),result},getTagSetUint16=function getTagSetUint16(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]=receivedView.getUint16(bufferPosition+11),opCode>74&&(result.VALUES[1]=receivedView.getUint16(bufferPosition+13)),opCode>75&&(result.VALUES[2]=receivedView.getUint16(bufferPosition+15)),opCode>76&&(result.VALUES[3]=receivedView.getUint16(bufferPosition+17)),result},getTagSetUint32=function getTagSetUint32(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]=receivedView.getUint32(bufferPosition+11),opCode>78&&(result.VALUES[1]=receivedView.getUint32(bufferPosition+15)),opCode>79&&(result.VALUES[2]=receivedView.getUint32(bufferPosition+19)),opCode>80&&(result.VALUES[3]=receivedView.getUint32(bufferPosition+23)),result},getTagSetUint64=function getTagSetUint64
(opCode,receivedView,bufferPosition){var result,hi,lo,bigNumber;return result=getTagSetCommons(opCode,receivedView,bufferPosition),lo=receivedView.getUint32(bufferPosition+11),hi=receivedView.getUint32(bufferPosition+15),bigNumber=new Int64(hi,lo),result.VALUES[0]=bigNumber.valueOf(),opCode>82&&(lo=receivedView.getUint32(bufferPosition+19),hi=receivedView.getUint32(bufferPosition+23),bigNumber=new Int64(hi,lo),result.VALUES[1]=bigNumber.valueOf()),opCode>83&&(lo=receivedView.getUint32(bufferPosition+27),hi=receivedView.getUint32(bufferPosition+31),bigNumber=new Int64(hi,lo),result.VALUES[2]=bigNumber.valueOf()),opCode>84&&(lo=receivedView.getUint32(bufferPosition+35),hi=receivedView.getUint32(bufferPosition+39),bigNumber=new Int64(hi,lo),result.VALUES[3]=bigNumber.valueOf()),result},getTagSetFloat16=function getTagSetFloat16(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]="Float16 not supported in JS",result},getTagSetFloat32=
function getTagSetFloat32(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]=receivedView.getFloat32(bufferPosition+11),opCode>90&&(result.VALUES[1]=receivedView.getFloat32(bufferPosition+15)),opCode>91&&(result.VALUES[2]=receivedView.getFloat32(bufferPosition+19)),opCode>92&&(result.VALUES[3]=receivedView.getFloat32(bufferPosition+23)),result},getTagSetFloat64=function getTagSetFloat64(opCode,receivedView,bufferPosition){var result=getTagSetCommons(opCode,receivedView,bufferPosition);return result.VALUES[0]=receivedView.getFloat64(bufferPosition+11),opCode>94&&(result.VALUES[1]=receivedView.getFloat64(bufferPosition+19)),opCode>95&&(result.VALUES[2]=receivedView.getFloat64(bufferPosition+27)),opCode>96&&(result.VALUES[3]=receivedView.getFloat64(bufferPosition+35)),result},getTagSetString8=function getTagSetString8(opCode,receivedView,bufferPosition){var i,strLength,result;result=getTagSetCommons(opCode,receivedView
,bufferPosition),delete result.VALUES,result.VALUE="",strLength=receivedView.getUint8(bufferPosition+11);for(i=0;i<strLength;i++)result.VALUE+=String.fromCharCode(receivedView.getUint8(bufferPosition+12+i));return result},commands={68:"TAG_CREATE",69:"TAG_DESTROY",70:"TAG_SET_UINT8",71:"TAG_SET_UINT8",72:"TAG_SET_UINT8",73:"TAG_SET_UINT8",74:"TAG_SET_UINT16",75:"TAG_SET_UINT16",76:"TAG_SET_UINT16",77:"TAG_SET_UINT16",78:"TAG_SET_UINT32",79:"TAG_SET_UINT32",80:"TAG_SET_UINT32",81:"TAG_SET_UINT32",82:"TAG_SET_UINT64",83:"TAG_SET_UINT64",84:"TAG_SET_UINT64",85:"TAG_SET_UINT64",86:"TAG_SET_REAL16",87:"TAG_SET_REAL16",88:"TAG_SET_REAL16",89:"TAG_SET_REAL16",90:"TAG_SET_REAL32",91:"TAG_SET_REAL32",92:"TAG_SET_REAL32",93:"TAG_SET_REAL32",94:"TAG_SET_REAL64",95:"TAG_SET_REAL64",96:"TAG_SET_REAL64",97:"TAG_SET_REAL64",98:"TAG_SET_STRING8"},get_routines={68:function getTagCreate(opCode,receivedView,bufferPosition){var result;return result=getTagSetCommons(opCode,receivedView,bufferPosition),delete
result.VALUES,result.DATA_TYPE=receivedView.getUint8(bufferPosition+11),result.COUNT=receivedView.getUint8(bufferPosition+12),result.CUSTOM_TYPE=receivedView.getUint16(bufferPosition+13),result},69:function getTagDestroy(opCode,receivedView,bufferPosition){var result;return result=getTagSetCommons(opCode,receivedView,bufferPosition),delete result.VALUES,result},70:getTagSetUint8,71:getTagSetUint8,72:getTagSetUint8,73:getTagSetUint8,74:getTagSetUint16,75:getTagSetUint16,76:getTagSetUint16,77:getTagSetUint16,78:getTagSetUint32,79:getTagSetUint32,80:getTagSetUint32,81:getTagSetUint32,82:getTagSetUint64,83:getTagSetUint64,84:getTagSetUint64,85:getTagSetUint64,86:getTagSetFloat16,87:getTagSetFloat16,88:getTagSetFloat16,89:getTagSetFloat16,90:getTagSetFloat32,91:getTagSetFloat32,92:getTagSetFloat32,93:getTagSetFloat32,94:getTagSetFloat64,95:getTagSetFloat64,96:getTagSetFloat64,97:getTagSetFloat64,98:getTagSetString8},set_routines={UINT8:function setTagSetUint8(view,values){for(var i=0;i<values
.length;i++)view.setUint8(11+i,values[i])},UINT16:function setTagSetUint16(view,values){for(var i=0;i<values.length;i++)view.setUint16(11+2*i,values[i])},UINT32:function setTagSetUint32(view,values){for(var i=0;i<values.length;i++)view.setUint32(11+4*i,values[i])},UINT64:function setTagSetUint64(view,values){for(var i=0;i<values.length;i++)view.setUint32(15+8*i,values[i])},REAL16:null,REAL32:function setTagSetReal32(view,values){for(var i=0;i<values.length;i++)view.setFloat32(11+4*i,values[i])},REAL64:function setTagSetReal64(view,values){for(var i=0;i<values.length;i++)view.setFloat64(11+8*i,values[i])},STRING8:function setTagSetString8(view,values){var n;view.setUint8(11,values[0].length);for(var i=0;i<values[0].length;i++)n=values[0].charCodeAt(i),n>=0&&n<128&&view.setUint8(12+i,n)}},data_types={UINT8:1,UINT16:2,UINT32:3,UINT64:4,REAL16:5,REAL32:6,REAL64:7,STRING8:8},data_type_len={UINT8:1,UINT16:2,UINT32:4,UINT64:8,REAL16:2,REAL32:4,REAL64:8},op_codes={UINT8:70,UINT16:74,UINT32:78,UINT64
:82,REAL16:86,REAL32:90,REAL64:94},tag={getTagValues:function getTagValues(opCode,receivedView,bufferPosition,length){var result=get_routines[opCode](opCode,receivedView,bufferPosition,length);return result},create:function(nodeId,tagGroupId,dataType,count,customType){var cmd,view;return cmd=command.template(15,68),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,nodeId),view.setUint16(7,tagGroupId),view.setUint16(9,65535),data_types.hasOwnProperty(dataType)?(view.setUint8(11,data_types[dataType]),view.setUint8(12,count),view.setUint16(13,customType),cmd):null},destroy:function(nodeId,tagGroupId,tagId){var cmd,view;return cmd=command.template(11,69),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,nodeId),view.setUint16(7,tagGroupId),view.setUint16(9,tagId),cmd},set:function(nodeId,tagGroupId,tagId,dataType,values){var cmd,view,cmd_len;return data_types.hasOwnProperty(dataType)?(dataType==="STRING8"?(cmd_len=12+values[0].length,cmd=command.template(cmd_len,98)):(cmd_len=11+
values.length*data_type_len[dataType],cmd=command.template(cmd_len,op_codes[dataType]+values.length-1)),view=new DataView(cmd),view.setUint8(2,0),view.setUint32(3,nodeId),view.setUint16(7,tagGroupId),view.setUint16(9,tagId),set_routines[dataType](view,values),cmd):null}},tag}),define("layer",["command","Int64"],function(command,Int64){var commands,get_routines,data_types,data_type_len,op_codes,layer,set_routines,getLayerCreateCommons,getLayerSetUint8,getLayerSetUint16,getLayerSetUint32,getLayerSetUint64,getLayerSetFloat16,getLayerSetFloat32,getLayerSetFloat64,getLayerCmdCommons,getLayerSubUnsub,sendLayerSubUnsub;return getLayerCreateCommons=function getLayerCreateCommons(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3,!1),PARENT_LAYER_ID:receivedView.getUint16(bufferPosition+7,!1),LAYER_ID:receivedView.getUint16(bufferPosition+9,!1)}},getLayerCmdCommons=function getLayerCmdCommons
(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3,!1),LAYER_ID:receivedView.getUint16(bufferPosition+7,!1),ITEM_ID:receivedView.getUint32(bufferPosition+9,!1)}},getLayerSetUint8=function getLayerSetUint8(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]=receivedView.getUint8(bufferPosition+13),opCode>133&&(result.VALUES[1]=receivedView.getUint8(bufferPosition+14)),opCode>134&&(result.VALUES[2]=receivedView.getUint8(bufferPosition+15)),opCode>135&&(result.VALUES[3]=receivedView.getUint8(bufferPosition+16)),result},getLayerSetUint16=function getLayerSetUint16(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]=receivedView.getUint16(bufferPosition+13,!1),opCode>137&&(result.VALUES[1]=receivedView.getUint16
(bufferPosition+15,!1)),opCode>138&&(result.VALUES[2]=receivedView.getUint16(bufferPosition+17,!1)),opCode>139&&(result.VALUES[3]=receivedView.getUint16(bufferPosition+19,!1)),result},getLayerSetUint32=function getLayerSetUint32(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]=receivedView.getUint32(bufferPosition+13,!1),opCode>141&&(result.VALUES[1]=receivedView.getUint32(bufferPosition+17,!1)),opCode>142&&(result.VALUES[2]=receivedView.getUint32(bufferPosition+21,!1)),opCode>143&&(result.VALUES[3]=receivedView.getUint32(bufferPosition+25,!1)),result},getLayerSetUint64=function getLayerSetUint64(opCode,receivedView,bufferPosition){var result,hi,lo,bigNumber;return result=getLayerCmdCommons(opCode,receivedView,bufferPosition),result.VALUES=[],lo=receivedView.getUint32(bufferPosition+13,!1),hi=receivedView.getUint32(bufferPosition+17,!1),bigNumber=new Int64(hi,lo),result.VALUES[0]=bigNumber.valueOf
(),opCode>145&&(lo=receivedView.getUint32(bufferPosition+21,!1),hi=receivedView.getUint32(bufferPosition+25,!1),bigNumber=new Int64(hi,lo),result.VALUES[1]=bigNumber.valueOf()),opCode>146&&(lo=receivedView.getUint32(bufferPosition+29,!1),hi=receivedView.getUint32(bufferPosition+33,!1),bigNumber=new Int64(hi,lo),result.VALUES[2]=bigNumber.valueOf()),opCode>147&&(lo=receivedView.getUint32(bufferPosition+37,!1),hi=receivedView.getUint32(bufferPosition+41,!1),bigNumber=new Int64(hi,lo),result.VALUES[3]=bigNumber.valueOf()),result},getLayerSetFloat16=function getLayerSetFloat16(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]="@TODO - data type Real16 not supported",result},getLayerSetFloat32=function getLayerSetFloat32(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]=receivedView.getFloat32(bufferPosition+13
,!1),opCode>153&&(result.VALUES[1]=receivedView.getFloat32(bufferPosition+17,!1)),opCode>154&&(result.VALUES[2]=receivedView.getFloat32(bufferPosition+21,!1)),opCode>155&&(result.VALUES[3]=receivedView.getFloat32(bufferPosition+25,!1)),result},getLayerSetFloat64=function getLayerSetFloat64(opCode,receivedView,bufferPosition){var result=getLayerCmdCommons(opCode,receivedView,bufferPosition);return result.VALUES=[],result.VALUES[0]=receivedView.getFloat64(bufferPosition+13,!1),opCode>157&&(result.VALUES[1]=receivedView.getFloat64(bufferPosition+21,!1)),opCode>158&&(result.VALUES[2]=receivedView.getFloat64(bufferPosition+29,!1)),opCode>159&&(result.VALUES[3]=receivedView.getFloat64(bufferPosition+37,!1)),result},getLayerSubUnsub=function getLayerSubUnsub(opCode,receivedView,bufferPosition){var result;return result=getLayerCmdCommons(opCode,receivedView,bufferPosition),result.VERSION=result.ITEM_ID,delete result.ITEM_ID,result.CRC32=receivedView.getUint32(bufferPosition+13),result},sendLayerSubUnsub=
function sendLayerSubUnsub(opCode,nodeId,layerId){var cmd,view;return cmd=command.template(17,opCode),view=new DataView(cmd),view.setUint8(3,0),view.setUint32(3,nodeId,!1),view.setUint16(7,layerId,!1),view.setUint32(9,0,!1),view.setUint32(13,0,!1),cmd},commands={128:"LAYER_CREATE",129:"LAYER_DESTROY",130:"LAYER_SUBSCRIBE",131:"LAYER_UNSUBSCRIBE",132:"LAYER_UNSET",133:"LAYER_SET_UINT8",134:"LAYER_SET_UINT8",135:"LAYER_SET_UINT8",136:"LAYER_SET_UINT8",137:"LAYER_SET_UINT16",138:"LAYER_SET_UINT16",139:"LAYER_SET_UINT16",140:"LAYER_SET_UINT16",141:"LAYER_SET_UINT32",142:"LAYER_SET_UINT32",143:"LAYER_SET_UINT32",144:"LAYER_SET_UINT32",145:"LAYER_SET_UINT64",146:"LAYER_SET_UINT64",147:"LAYER_SET_UINT64",148:"LAYER_SET_UINT64",149:"LAYER_SET_REAL16",150:"LAYER_SET_REAL16",151:"LAYER_SET_REAL16",152:"LAYER_SET_REAL16",153:"LAYER_SET_REAL32",154:"LAYER_SET_REAL32",155:"LAYER_SET_REAL32",156:"LAYER_SET_REAL32",157:"LAYER_SET_REAL64",158:"LAYER_SET_REAL64",159:"LAYER_SET_REAL64",160:"LAYER_SET_REAL64"
,161:"LAYER_UNSET_DATA"},get_routines={128:function getLayerCreate(opCode,receivedView,bufferPosition){var result;return result=getLayerCreateCommons(opCode,receivedView,bufferPosition),result.DATA_TYPE=receivedView.getUint8(bufferPosition+11),result.COUNT=receivedView.getUint8(bufferPosition+12),result.CUSTOM_TYPE=receivedView.getUint16(bufferPosition+13,!1),result},129:function getLayerDestroy(opCode,receivedView,bufferPosition){return{CMD:commands[opCode],SHARE:receivedView.getUint8(bufferPosition+2),NODE_ID:receivedView.getUint32(bufferPosition+3,!1),LAYER_ID:receivedView.getUint16(bufferPosition+7,!1)}},130:getLayerSubUnsub,131:getLayerSubUnsub,132:getLayerCmdCommons,133:getLayerSetUint8,134:getLayerSetUint8,135:getLayerSetUint8,136:getLayerSetUint8,137:getLayerSetUint16,138:getLayerSetUint16,139:getLayerSetUint16,140:getLayerSetUint16,141:getLayerSetUint32,142:getLayerSetUint32,143:getLayerSetUint32,144:getLayerSetUint32,145:getLayerSetUint64,146:getLayerSetUint64,147:getLayerSetUint64
,148:getLayerSetUint64,149:getLayerSetFloat16,150:getLayerSetFloat16,151:getLayerSetFloat16,152:getLayerSetFloat16,153:getLayerSetFloat32,154:getLayerSetFloat32,155:getLayerSetFloat32,156:getLayerSetFloat32,157:getLayerSetFloat64,158:getLayerSetFloat64,159:getLayerSetFloat64,160:getLayerSetFloat64},data_types={UINT8:1,UINT16:2,UINT32:3,UINT64:4,REAL16:5,REAL32:6,REAL64:7},data_type_len={UINT8:1,UINT16:2,UINT32:4,UINT64:8,REAL16:2,REAL32:4,REAL64:8},op_codes={UINT8:133,UINT16:137,UINT32:141,UINT64:145,REAL16:149,REAL32:153,REAL64:157},set_routines={UINT8:function setItemsUint8(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setUint8(buf_pos+i,values[i]),size+=1;return size},UINT16:function setItemsUint16(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setUint16(buf_pos+2*i,values[i]),size+=2;return size},UINT32:function setItemsUint32(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setUint32(buf_pos+4*i,values[i]),size+=4;return size
},UINT64:function setItemsUint64(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setUint32(buf_pos+4+8*i,values[i]),size+=8;return size},REAL16:null,REAL32:function setItemsReal32(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setFloat32(buf_pos+4*i,values[i]),size+=4;return size},REAL64:function setItemsReal64(view,buf_pos,values){var size=0;for(var i=0;i<values.length;i++)view.setFloat64(buf_pos+8*i,values[i]),size+=8;return size}},layer={create:function(nodeId,parentLayerId,dataType,count,customType){var cmd,view;return cmd=command.template(15,128),view=new DataView(cmd),view.setUint8(3,0),view.setUint32(3,nodeId),parentLayerId===null?view.setUint16(7,-1):view.setUint16(7,parentLayerId),view.setUint16(9,65535),data_types.hasOwnProperty(dataType)?(view.setUint8(11,data_types[dataType]),view.setUint8(12,count),view.setUint16(13,customType),cmd):null},destroy:function(nodeId,layerId){var cmd,view;return cmd=command.template(9,129),view=new DataView
(cmd),view.setUint8(3,0),view.setUint32(3,nodeId),view.setUint16(7,layerId),cmd},subscribe:function(nodeId,layerId){return sendLayerSubUnsub(130,nodeId,layerId)},unsubscribe:function(nodeId,layerId){return sendLayerSubUnsub(131,nodeId,layerId)},unsetItems:function(nodeId,layerId,itemIds){var cmd,view,cmd_len;cmd=command.template(9+4*itemIds.length,132),view=new DataView(cmd),view.setUint8(2,6),view.setUint32(3,nodeId),view.setUint16(7,layerId);for(var i=0;i<itemIds.length;i++)view.setUint32(9+4*i,itemIds[i]);return cmd},setItems:function(nodeId,layerId,dataType,items){var cmd,view,cmd_len,val_count=0,key,buf_pos;for(key in items)items.hasOwnProperty(key)&&val_count++;if(!data_types.hasOwnProperty(dataType))return null;cmd_len=9+val_count*(4+items[key].length*data_type_len[dataType]),cmd=command.template(cmd_len,op_codes[dataType]+items[key].length-1),view=new DataView(cmd),view.setUint8(2,6),view.setUint32(3,nodeId),view.setUint16(7,layerId),buf_pos=9;for(key in items)view.setUint32(buf_pos
,key),buf_pos+=4,buf_pos+=set_routines[dataType](view,buf_pos,items[key]);return cmd},getLayerValues:function getLayerValues(opCode,receivedView,bufferPosition,length){var result=get_routines[opCode](opCode,receivedView,bufferPosition,length);return result}},layer}),define("user",[],function(){var user={getUserInfo:function getUserInfo(receivedView,bufferPosition){return{CMD:"USER_AUTH_SUCCESS",USER_ID:receivedView.getUint16(bufferPosition+2),AVATAR_ID:receivedView.getUint32(bufferPosition+4)}},auth:function(name,method,passwd){var i,cmdLen;if(method===1)cmdLen=3+name.length+1;else{if(method!==2)return null;cmdLen=3+name.length+1+1+passwd.length}var buf=new ArrayBuffer(cmdLen),view=new DataView(buf);view.setUint8(0,7),view.setUint8(1,cmdLen),view.setUint8(2,name.length);for(i=0;i<name.length;i++)view.setUint8(3+i,name.charCodeAt(i));view.setUint8(3+name.length,method);if(method===2){view.setUint8(3+name.length+1,passwd.length);for(i=0;i<passwd.length;i++)view.setUint8(3+name.length+2+i,
passwd.charCodeAt(i))}return buf}};return user}),define("response",["negotiation","node","taggroup","tag","layer","user"],function(negotiation,node,tagGroup,tag,layer,user){var checkOpCode=function checkOpCode(opCode,receivedView,bufferPosition){var length,feature,cmdValues,opCodes;opCodes={3:"CHANGE_L",4:"CHANGE_R",5:"CONFIRM_L",6:"CONFIRM_R",7:"USER_AUTH_REQUEST",8:"USER_AUTH_FAILURE",9:"USER_AUTH_SUCCESS"};if(opCode!==8)return opCode===9?{group:"NEGO",cmd:user.getUserInfo(receivedView,bufferPosition-1)}:opCode<7?(length=receivedView.getUint8(bufferPosition),feature=receivedView.getUint8(bufferPosition+1),cmdValues=negotiation.getFeatureValues(feature,receivedView,bufferPosition,length),{group:"NEGO",cmd:{CMD:opCodes[opCode],FEATURE:cmdValues.FEATURE,VALUE:cmdValues.VALUE}}):opCode>31&&opCode<44?(length=receivedView.getUint8(bufferPosition),cmdValues=node.getNodeValues(opCode,receivedView,bufferPosition-1,length),{group:"NODE",cmd:cmdValues}):opCode>63&&opCode<68?(length=receivedView.
getUint8(bufferPosition),cmdValues=tagGroup.getTagGroupValues(opCode,receivedView,bufferPosition-1,length),{group:"TAG_GROUP",cmd:cmdValues}):opCode>67&&opCode<99?(length=receivedView.getUint8(bufferPosition),cmdValues=tag.getTagValues(opCode,receivedView,bufferPosition-1,length),{group:"TAG",cmd:cmdValues}):opCode>127&&opCode<162?(length=receivedView.getUint8(bufferPosition),cmdValues=layer.getLayerValues(opCode,receivedView,bufferPosition-1,length),{group:"LAYER",cmd:cmdValues}):{group:"NEGO",cmd:{CMD:opCode,MESSAGE:"@TODO - opCode not implemented"}};var method=receivedView.getUint8(bufferPosition+1);if(method===2)return{group:"NEGO",cmd:{CMD:"AUTH_PASSWD"}}},response={checkHeader:function(buffer){var receivedView=new DataView(buffer),bufferPosition=0,version=receivedView.getUint8(bufferPosition)>>4;return bufferPosition+=2,version!==1?!1:!0},parse:function(buffer){var opCode,cmdLen,result,payload,receivedView=new DataView(buffer),bufferPosition=2,message_len=receivedView.getUint16(bufferPosition
);bufferPosition+=2,result={TAG:[],NODE:[],LAYER:[],TAG_GROUP:[],NEGO:[]};while(bufferPosition<message_len-1)opCode=receivedView.getUint8(bufferPosition),bufferPosition+=1,cmdLen=receivedView.getUint8(bufferPosition),cmdLen>2?(payload=checkOpCode(opCode,receivedView,bufferPosition),result[payload.group].push(payload.cmd)):result.NEGO.push({CMD:"USER_AUTH_FAILURE"}),bufferPosition+=cmdLen-1;return result}};return response}),define("verse",["request","response","negotiation","node","user","taggroup","tag","layer"],function(request,response,negotiation,node,user,tagGroup,tag,layer){window.WebSocket=window.WebSocket||window.MozWebSocket;var myWebscoket,verse,onSocketMessage,onSocketError,onSocketConnect,onSocketClose,userAuthNone,userInfo={},confirmHost,userAuthData;return window.onbeforeunload=function(){myWebscoket.onclose=function(){},myWebscoket.close()},onSocketError=function onSocketError(event,config){console.error("Websocket Error: ",event)},onSocketConnect=function onSocketConnect(
event,config){userAuthNone(config)},onSocketClose=function onSocketClose(event,config){config&&config.connectionTerminatedCallback&&typeof config.connectionTerminatedCallback=="function"&&config.connectionTerminatedCallback(event)},userAuthNone=function userAuthNone(config){var buf=user.auth(config.username,1,"");buf=request.message(buf),myWebscoket.send(buf)},userAuthData=function userAuthData(config){var buf=user.auth(config.username,2,config.passwd);buf=request.message(buf),myWebscoket.send(buf)},confirmHost=function confirmHost(hostInfo){var buf=negotiation.url(negotiation.CHANGE_R,myWebscoket.url);buf=request.buffer_push(buf,negotiation.token(negotiation.CONFIRM_R,hostInfo[1].VALUE)),buf=request.buffer_push(buf,negotiation.token(negotiation.CHANGE_R,"^DD31*$cZ6#t")),buf=request.buffer_push(buf,negotiation.ded(negotiation.CONFIRM_L,hostInfo[2].VALUE)),buf=request.message(buf),myWebscoket.send(buf)},onSocketMessage=function onSocketMessage(message,config){var responseData;if(message.
data instanceof ArrayBuffer){if(!response.checkHeader(message.data)){myWebscoket.close();return}responseData=response.parse(message.data),responseData.NEGO.forEach(function(cmd){cmd.CMD==="AUTH_PASSWD"?userAuthData(config):cmd.CMD==="USER_AUTH_SUCCESS"?(confirmHost(responseData.NEGO),userInfo=cmd):cmd.CMD==="USER_AUTH_FAILURE"?(config.errorCallback(cmd.CMD),myWebscoket.close()):cmd.CMD==="CONFIRM_R"&&cmd.FEATURE==="HOST_URL"&&(verse.nodeSubscribe(0),config.connectionAcceptedCallback(userInfo))}),responseData.NODE.length>0&&config.nodeCallback(responseData.NODE),responseData.TAG_GROUP.length>0&&config.tagGroupCallback(responseData.TAG_GROUP),responseData.TAG.length>0&&config.tagCallback(responseData.TAG),responseData.LAYER.length>0&&config.layerCallback(responseData.LAYER)}},verse={init:function(config){console.info("Connecting to URI:"+config.uri+" ...");try{myWebscoket=new window.WebSocket(config.uri,config.version),myWebscoket.binaryType="arraybuffer",myWebscoket.addEventListener("error"
,function(event){onSocketError(event,config)}),myWebscoket.addEventListener("close",function(event){onSocketClose(event,config)}),myWebscoket.addEventListener("open",function(evnt){onSocketConnect(evnt,config)}),myWebscoket.addEventListener("message",function(msg){onSocketMessage(msg,config)})}catch(e){console.error('Sorry, the web socket at "%s" is un-available',config.uri)}},nodeCreate:function nodeCreate(prio,userId,avatarId,customType){var buf=node.create(userId,avatarId,customType);buf=request.message(buf),myWebscoket.send(buf)},nodeDestroy:function nodeDestroy(prio,nodeId){var buf=node.destroy(nodeId);buf=request.message(buf),myWebscoket.send(buf)},nodeSubscribe:function nodeSubscribe(prio,nodeId){var buf=node.subscribe(nodeId);buf=request.message(buf),myWebscoket.send(buf)},nodeUnSubscribe:function nodeUnSubscribe(prio,nodeId){var buf=node.unsubscribe(nodeId);buf=request.message(buf),myWebscoket.send(buf)},nodeLink:function nodeLink(prio,parenNodeId,childNodeId){var buf=node.link
(parenNodeId,childNodeId);buf=request.message(buf),myWebscoket.send(buf)},nodePerm:function nodePerm(prio,nodeId,userId,perm){var buf=node.perm(nodeId,userId,perm);buf=request.message(buf),myWebscoket.send(buf)},nodeUmask:function nodeUmask(prio,permission){var buf=node.umask(permission);buf=request.message(buf),myWebscoket.send(buf)},nodeOwner:function nodeOwner(prio,nodeId,userId){var buf=node.owner(nodeId,userId);buf=request.message(buf),myWebscoket.send(buf)},nodeLock:function nodeLock(prio,nodeId,avatarId){var buf=node.lock(nodeId,avatarId);buf=request.message(buf),myWebscoket.send(buf)},nodeUnLock:function nodeUnLock(prio,nodeId,avatarId){var buf=node.unlock(nodeId,avatarId);buf=request.message(buf),myWebscoket.send(buf)},nodePrio:function nodePrio(prio,nodeId,priority){var buf=node.prio(nodeId,priority);buf=request.message(buf),myWebscoket.send(buf)},tagGroupCreate:function tagGroupCreate(prio,nodeId,customType){var buf=tagGroup.create(nodeId,customType);buf=request.message(buf),
myWebscoket.send(buf)},tagGroupDestroy:function tagGroupDestroy(prio,nodeId,tagGroupId){var buf=tagGroup.destroy(nodeId,tagGroupId);buf=request.message(buf),myWebscoket.send(buf)},tagGroupSubscribe:function tagGroupSubscribe(prio,nodeId,tagGroupId){var buf=tagGroup.subscribe(nodeId,tagGroupId);buf=request.message(buf),myWebscoket.send(buf)},tagGroupUnSubscribe:function tagGroupUnSubscribe(prio,nodeId,tagGroupId){var buf=tagGroup.unsubscribe(nodeId,tagGroupId);buf=request.message(buf),myWebscoket.send(buf)},tagCreate:function tagCreate(prio,nodeId,tagGroupId,dataType,count,customType){var buf=tag.create(nodeId,tagGroupId,dataType,count,customType);buf=request.message(buf),myWebscoket.send(buf)},tagDestroy:function tagDestroy(prio,nodeId,tagGroupId,tagId){var buf=tag.destroy(nodeId,tagGroupId,tagId);buf=request.message(buf),myWebscoket.send(buf)},tagSet:function tagSet(prio,nodeId,tagGroupId,tagId,dataType,values){var buf=tag.set(nodeId,tagGroupId,tagId,dataType,values);buf=request.message
(buf),myWebscoket.send(buf)},layerCreate:function layerCreate(prio,nodeId,parentLayerId,dataType,count,customType){var buf=layer.create(nodeId,parentLayerId,dataType,count,customType);buf=request.message(buf),myWebscoket.send(buf)},layerDestroy:function layerDestroy(prio,nodeId,layerId){var buf=layer.destroy(nodeId,layerId);buf=request.message(buf),myWebscoket.send(buf)},layerSubscribe:function layerSubscribe(prio,nodeId,layerId){var buf=layer.subscribe(nodeId,layerId);buf=request.message(buf),myWebscoket.send(buf)},layerUnSubscribe:function layerUnSubscribe(prio,nodeId,layerId){var buf=layer.unsubscribe(nodeId,layerId);buf=request.message(buf),myWebscoket.send(buf)},layerUnSetItems:function layerUnSetItems(prio,nodeId,layerId,itemIds){var buf=layer.unsetItems(nodeId,layerId,itemIds);buf=request.message(buf),myWebscoket.send(buf)},layerSetItems:function layerSetItems(prio,nodeId,layerId,dataTypes,items){var buf=layer.setItems(nodeId,layerId,dataTypes,items);buf=request.message(buf),myWebscoket
.send(buf)}},verse}),require(["verse"])})();